commit ac0f12b21ae336fb4351c966f763df44ab25a4ba Author: 你的名字 Date: Wed Oct 15 14:53:54 2025 +0800 1 diff --git a/.example.env b/.example.env new file mode 100644 index 0000000..5510776 --- /dev/null +++ b/.example.env @@ -0,0 +1,50 @@ +APP_DEBUG=true + +# 后台系统日志开关 +APP_ADMIN_SYSTEM_LOG=true + +DEFAULT_TIMEZONE=Asia/Shanghai + +DB_TYPE=mysql +DB_HOST=127.0.0.1 +DB_NAME=easyadmin8 +DB_USER=root +DB_PASS=root +DB_PORT=3306 +DB_CHARSET=utf8mb4 +DB_PREFIX=ea8_ + +# 限流器开关 若启动需要配置 Redis 服务 +RATE_LIMITING_STATUS=false + +# Redis配置 +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_PASSWORD= +REDIS_PREFIX= +REDIS_DATABASE=0 + +# 后台配置项组 +[EASYADMIN] + +# 后台地址后缀名称 +ADMIN=admin + +# 后台登录验证码开关 +CAPTCHA=false + +# 是否为演示环境 +IS_DEMO=false + +# CDN配置项组 +CDN= +EXAMPLE=true + +# 是否开启CSRF过滤 +IS_CSRF=false + +# 静态文件路径前缀 +STATIC_PATH=/static + +# OSS静态文件路径前缀 +OSS_STATIC_PREFIX=static_easyadmin diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0b217dc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.js linguist-language=PHP +*.css linguist-language=PHP +*.html linguist-language=PHP diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1722050 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.log +.env +composer.phar +composer.lock +.DS_Store +Thumbs.db +/.idea +/.vscode +/vendor +/.settings +/.buildpath +/.project diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..36f7b6f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +sudo: false + +language: php + +branches: + only: + - stable + +cache: + directories: + - $HOME/.composer/cache + +before_install: + - composer self-update + +install: + - composer install --no-dev --no-interaction --ignore-platform-reqs + - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip . + - composer require --update-no-dev --no-interaction "topthink/think-image:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0" + - composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0" + - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip . + +script: + - php think unit + +deploy: + provider: releases + api_key: + secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw= + file: + - ThinkPHP_Core.zip + - ThinkPHP_Full.zip + skip_cleanup: true + on: + tags: true diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e7890a4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 EasyAdmin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3314250 --- /dev/null +++ b/README.md @@ -0,0 +1,144 @@ +
+log + +

+php +MySQL +ThinkPHP +layui +License +

+ +
+ +## `EasyAdmin8`所有版本 (当前项目为`ThinkPHP`版本) + +| | Github | Gitee | +|----------|:----------------------------------------------------------------------:|:---------------------------------------------------------------------:| +| ThinkPHP | [EasyAdmin8](https://github.com/EasyAdmin8/EasyAdmin8) | [EasyAdmin8](https://gitee.com/EasyAdmin8/EasyAdmin8) | +| Laravel | [EasyAdmin8-Laravel](https://github.com/EasyAdmin8/EasyAdmin8-Laravel) | [EasyAdmin8-Laravel](https://gitee.com/EasyAdmin8/EasyAdmin8-Laravel) | +| webman | [EasyAdmin8-webman](https://github.com/EasyAdmin8/EasyAdmin8-webman) | [EasyAdmin8-webman](https://gitee.com/EasyAdmin8/EasyAdmin8-webman) | + +## 项目介绍 + +> `EasyAdmin8` 在 [`EasyAdmin`](https://gitee.com/zhongshaofa/easyadmin) 的基础上更新 ThinkPHP 框架到 8.1+ ,PHP 最低版本要求不低于 8.1 +> +> 2025年起 `PHP` 版本要求提升到 `8.1+`, 如果需要 `8.0` 到分支 `v8.0` 中下载 +> +> ThinkPHP v8.1+ 和 Layui v2.9.x 的快速开发的后台管理系统。 +> +> 项目地址:[http://easyadmin8.top](http://easyadmin8.top) +> +> 演示地址:[http://thinkphp.easyadmin8.top/admin](http://thinkphp.easyadmin8.top/admin) +> +> 如果您之前已经用过 `FastAdmin` 或者 `EasyAdmin` , 那么入手 `EasyAdmin8` 将会更加轻松 +> +>【如果不能访问,可以自行本地搭建预览或参考下方界面预览图】 + +## 大版本更新记录: + +[更新记录](log.md) + +## 安装教程 + +> EasyAdmin8 使用 Composer 来管理项目依赖。因此,在使用 EasyAdmin8 之前,请确保你的机器已经安装了 Composer。 + +### 通过一键安装命令 + +``` +if [ -f /usr/bin/curl ];then curl -sSO https://easyadmin8.top/auto-install-EasyAdmin8.sh;else wget -O auto-install-EasyAdmin8.sh https://easyadmin8.top/auto-install-EasyAdmin8.sh;fi;bash auto-install-EasyAdmin8.sh +``` + +### 通过`git`下载安装包,`composer`安装依赖包 + +``` +1.下载安装包 + + git clone https://github.com/EasyAdmin8/EasyAdmin8 + + 或者 + + git clone https://gitee.com/EasyAdmin8/EasyAdmin8 + +2.安装依赖包(确保 PHP 版本 >= 8.1) + + 在根目录下 composer install ,如果有报错信息可以使用命令 composer install --ignore-platform-reqs + +3. 拷贝 .example.env 文件重命名为 .env ,命令 cp .example.env .env ,修改数据库账号密码参数 + +4.配置伪静态(以 Nginx 为例) + + location / { + if ( !-e $request_filename){ + rewrite ^/(.*)$ /index.php?s=$1 last; + break; + } + } + +``` + +## CURD命令大全 + +> 参考 [CURD命令大全](https://edocs.easyadmin8.top/curd/command.html) + +## 常见问题 + +> 参考 [常见问题](https://easyadmin8.top/guide/question.html) + +## 界面预览 + +![EasyAdmin8-01](public/static/common/images/easyadmin8-01.png) +![EasyAdmin8-02](public/static/common/images/easyadmin8-02.png) +![EasyAdmin8-03](public/static/common/images/easyadmin8-03.png) + +## 交流群 + +
+ +![EasyAdmin8-ThinkPHP 交流群](public/static/common/images/EasyAdmin8-ThinkPHP.png) + +
+ +## 相关文档 + +* [ThinkPHP 8.1](https://doc.thinkphp.cn) + +* [EasyAdmin](http://easyadmin.99php.cn/docs) + +* [Layui 2.9.x](https://layui.dev/docs) + +* [Layuimini](https://github.com/zhongshaofa/layuimini) + +* [Annotations](https://github.com/doctrine/annotations) + +* [Jquery](https://github.com/jquery/jquery) + +* [RequireJs](https://github.com/requirejs/requirejs) + +* [CKEditor](https://github.com/ckeditor/ckeditor4) + +* [Echarts](https://github.com/apache/incubator-echarts) + +* [UEditorPlus](https://github.com/modstart-lib/ueditor-plus) + +* [wangEditor](https://github.com/wangeditor-team/wangEditor) + +## 免责声明 + +> 所有协议遵循 [`EasyAdmin`](https://gitee.com/zhongshaofa/easyadmin) +> +> 任何用户在使用 `EasyAdmin8` 后台框架前,请您仔细阅读并透彻理解本声明。您可以选择不使用`EasyAdmin8`后台框架,若您一旦使用`EasyAdmin8`后台框架,您的使用行为即被视为对本声明全部内容的认可和接受。 + +* `EasyAdmin8`后台框架是一款开源免费的后台快速开发框架 ,主要用于更便捷地开发后台管理;其尊重并保护所有用户的个人隐私权,不窃取任何用户计算机中的信息。更不具备用户数据存储等网络传输功能。 + +* 您承诺秉着合法、合理的原则使用`EasyAdmin8`后台框架,不利用`EasyAdmin8`后台框架进行任何违法、侵害他人合法利益等恶意的行为,亦不将`EasyAdmin8`后台框架运用于任何违反我国法律法规的 Web 平台。 + +* 任何单位或个人因下载使用`EasyAdmin8`后台框架而产生的任何意外、疏忽、合约毁坏、诽谤、版权或知识产权侵犯及其造成的损失 (包括但不限于直接、间接、附带或衍生的损失等),本开源项目不承担任何法律责任。 + +* 用户明确并同意本声明条款列举的全部内容,对使用`EasyAdmin8`后台框架可能存在的风险和相关后果将完全由用户自行承担,本开源项目不承担任何法律责任。 + +* 任何单位或个人在阅读本免责声明后,应在《MIT 开源许可证》所允许的范围内进行合法的发布、传播和使用`EasyAdmin8`后台框架等行为,若违反本免责声明条款或违反法律法规所造成的法律责任(包括但不限于民事赔偿和刑事责任),由违约者自行承担。 + +* 如果本声明的任何部分被认为无效或不可执行,其余部分仍具有完全效力。不可执行的部分声明,并不构成我们放弃执行该声明的权利。 + +* 本开源项目有权随时对本声明条款及附件内容进行单方面的变更,并以消息推送、网页公告等方式予以公布,公布后立即自动生效,无需另行单独通知;若您在本声明内容公告变更后继续使用的,表示您已充分阅读、理解并接受修改后的声明内容。 \ No newline at end of file diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/app/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/app/AppService.php b/app/AppService.php new file mode 100644 index 0000000..96556e8 --- /dev/null +++ b/app/AppService.php @@ -0,0 +1,22 @@ +app = $app; + $this->request = $this->app->request; + + // 控制器初始化 + $this->initialize(); + } + + // 初始化 + protected function initialize() + {} + + /** + * 验证数据 + * @access protected + * @param array $data 数据 + * @param string|array $validate 验证器名或者验证规则数组 + * @param array $message 提示信息 + * @param bool $batch 是否批量验证 + * @return array|string|true + * @throws ValidateException + */ + protected function validate(array $data, string|array $validate, array $message = [], bool $batch = false) + { + if (is_array($validate)) { + $v = new Validate(); + $v->rule($validate); + } else { + if (strpos($validate, '.')) { + // 支持场景 + [$validate, $scene] = explode('.', $validate); + } + $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate); + $v = new $class(); + if (!empty($scene)) { + $v->scene($scene); + } + } + + $v->message($message); + + // 是否批量验证 + if ($batch || $this->batchValidate) { + $v->batch(true); + } + + return $v->failException(true)->check($data); + } + +} diff --git a/app/ExceptionHandle.php b/app/ExceptionHandle.php new file mode 100644 index 0000000..453d126 --- /dev/null +++ b/app/ExceptionHandle.php @@ -0,0 +1,58 @@ +value; + }, array_filter(LangEnum::cases(), function ($item) { + return $item->is_open(); + })); + } + + /** + * @return array + */ + public static function getLangCases(): array + { + return array_map(function ($item) { + return [ + 'value' => $item->value, + 'lang' => $item->lang(), + 'label' => $item->label() + ]; + }, array_filter(LangEnum::cases(), function ($item) { + return $item->is_open(); + })); + } + + /** + * @return array + */ + public static function getLabelCases(): array + { + return array_map(function ($item) { + return [ + 'value' => $item->value, + 'label' => $item->label() + ]; + }, array_filter(LangEnum::cases(), function ($item) { + return $item->is_open(); + })); + } + + /** + * @return array + */ + public static function getLangExtend(): array + { + $extend = []; + foreach (array_filter(LangEnum::cases(), function ($item) { + return $item->is_open(); + }) as $item) { + $extend[$item->value] = $item->extend(); + } + return $extend; + } + + /** + * @return array + */ + public static function getAcceptLang(): array + { + $extend = []; + foreach (array_filter(LangEnum::cases(), function ($item) { + return $item->is_open(); + }) as $item) { + foreach ($item->getLangList() as $langListitem) { + $extend[$langListitem] = $item->value; + } + } + return $extend; + } +} \ No newline at end of file diff --git a/app/Request.php b/app/Request.php new file mode 100644 index 0000000..fc9aba0 --- /dev/null +++ b/app/Request.php @@ -0,0 +1,8 @@ + env('EASYADMIN.ADMIN'), + + // 不需要验证权限的控制器 + 'no_auth_controller' => [ + 'ajax', + 'login', + 'index', + ], + + // 不需要验证权限的节点 + 'no_auth_node' => [ + 'login/index', + 'login/out', + ], + + //上传类型 + 'upload_types' => [ + 'local' => '本地存储', + 'oss' => '阿里云oss', + 'cos' => '腾讯云cos', + 'qnoss' => '七牛云' + ], + + // 默认编辑器 + 'editor_types' => [ + 'ueditor' => '百度编辑器(不建议使用)', + 'ckeditor' => 'CK编辑器', + 'wangEditor' => 'wangEditor(推荐使用)', + 'EasyMDE' => 'EasyMDE(markdown)', + ], + +]; \ No newline at end of file diff --git a/app/admin/config/route.php b/app/admin/config/route.php new file mode 100644 index 0000000..b9fe91b --- /dev/null +++ b/app/admin/config/route.php @@ -0,0 +1,31 @@ + [ + // 限流中间件 + RateLimiting::class, + // 判断是否已经安装后台系统 +// CheckInstall::class, + // 检测是否登录 + CheckLogin::class, + // 操作日志 + SystemLog::class, + // 验证节点权限 + CheckAuth::class, + ], +]; \ No newline at end of file diff --git a/app/admin/controller/Ajax.php b/app/admin/controller/Ajax.php new file mode 100644 index 0000000..06c7cce --- /dev/null +++ b/app/admin/controller/Ajax.php @@ -0,0 +1,247 @@ +adminUid); + if (!empty($cacheData)) { + return json($cacheData); + } + $menuService = new MenuService($this->adminUid); + $data = [ + 'logoInfo' => [ + 'title' => sysConfig('site', 'logo_title'), + 'image' => sysConfig('site', 'logo_image'), + 'href' => __url('index/index'), + ], + 'homeInfo' => $menuService->getHomeInfo(), + 'menuInfo' => $menuService->getMenuTree(), + ]; + Cache::tag('initAdmin')->set('initAdmin_' . $this->adminUid, $data); + return json($data); + } + + /** + * 清理缓存接口 + */ + public function clearCache(): void + { + Cache::clear(); + $this->success('清理缓存成功'); + } + + /** + * 上传文件 + * @param Request $request + * @return Json|null + * @throws \Kaadon\Helper\HelperException + */ + public function upload(Request $request): Json|null + { + $this->isDemo && $this->error('演示环境下不允许修改'); + $this->checkPostRequest(); + $type = $request->param('type', ''); + $file = $request->file($type == 'editor' ? 'upload' : 'file'); + if (config('filesystem.image.to_webp', true) && GdImageHelper::isSupportSuffix($file->extension())) { + (new GdImageHelper($file->getRealPath(), $file->extension()))->convertTo($file->getRealPath(),'webp'); + $file = new UploadedFile($file->getRealPath(), date("YmdHis") . "_" . md5($file->getOriginalName()) . '.webp'); + $file->setExtension('webp'); + } + $data = [ + 'upload_type' => $request->post('upload_type'), + 'file' => $file, + ]; + $uploadConfig = sysConfig('upload'); + empty($data['upload_type']) && $data['upload_type'] = $uploadConfig['upload_type']; + $rule = [ + 'upload_type|指定上传类型有误' => "in:{$uploadConfig['upload_allow_type']}", + 'file|文件' => "require|file|fileExt:{$uploadConfig['upload_allow_ext']},webp|fileSize:{$uploadConfig['upload_allow_size']}", + ]; + $this->validate($data, $rule); + $upload_type = $uploadConfig['upload_type']; + try { + $upload = UploadService::instance()->setConfig($uploadConfig)->$upload_type($data['file'], $type); + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + $code = $upload['code'] ?? 0; + if ($code == 0) { + $this->error($upload['data'] ?? ''); + }else { + if ($type == 'editor') { + return json( + [ + 'error' => ['message' => '上传成功', 'number' => 201,], + 'fileName' => '', + 'uploaded' => 1, + 'url' => $upload['data']['url'] ?? '', + ] + ); + }else { + $this->success('上传成功', $upload['data'] ?? ''); + } + } + } + + /** + * 获取上传文件列表 + * @param Request $request + * @return Json + * @throws DataNotFoundException + * @throws DbException + * @throws ModelNotFoundException + */ + public function getUploadFiles(Request $request): Json + { + $get = $request->get(); + $page = !empty($get['page']) ? $get['page'] : 1; + $limit = !empty($get['limit']) ? $get['limit'] : 10; + $title = !empty($get['title']) ? $get['title'] : null; + $count = SystemUploadfile::where(function(Query $query) use ($title) { + !empty($title) && $query->where('original_name', 'like', "%{$title}%"); + }) + ->count(); + $list = SystemUploadfile::where(function(Query $query) use ($title) { + !empty($title) && $query->where('original_name', 'like', "%{$title}%"); + }) + ->page($page, $limit) + ->order($this->sort) + ->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + + /** + * 百度编辑器上传 + * @param Request $request + * @return Json + * @throws DataNotFoundException + * @throws DbException + * @throws ModelNotFoundException + * @throws \Kaadon\Helper\HelperException + */ + public function uploadUEditor(Request $request): Json + { + $uploadConfig = sysConfig('upload'); + $upload_allow_size = $uploadConfig['upload_allow_size']; + $_upload_allow_ext = explode(',', $uploadConfig['upload_allow_ext']); + $upload_allow_ext = []; + array_map(function($value) use (&$upload_allow_ext) { + $upload_allow_ext[] = '.' . $value; + }, $_upload_allow_ext); + $config = [ + // 上传图片配置项 + "imageActionName" => "image", + "imageFieldName" => "file", + "imageMaxSize" => $upload_allow_size, + "imageAllowFiles" => $upload_allow_ext, + "imageCompressEnable" => true, + "imageCompressBorder" => 5000, + "imageInsertAlign" => "none", + "imageUrlPrefix" => "", + // 列出图片 + "imageManagerActionName" => "listImage", + "imageManagerListSize" => 20, + "imageManagerUrlPrefix" => "", + "imageManagerInsertAlign" => "none", + "imageManagerAllowFiles" => $upload_allow_ext, + // 上传 video + "videoActionName" => "video", + "videoFieldName" => "file", + "videoUrlPrefix" => "", + "videoMaxSize" => $upload_allow_size, + "videoAllowFiles" => $upload_allow_ext, + // 上传 附件 + "fileActionName" => "attachment", + "fileFieldName" => "file", + "fileMaxSize" => $upload_allow_size, + "fileAllowFiles" => $upload_allow_ext, + ]; + $action = $request->param('action/s', ''); + $file = $request->file('file'); + $upload_type = $uploadConfig['upload_type']; + switch ($action) { + case 'image': + if (config('filesystem.image.to_webp', true) && GdImageHelper::isSupportSuffix($file->extension())) { + (new GdImageHelper($file->getRealPath(), $file->extension()))->convertTo($file->getRealPath(),'webp'); + $file = new UploadedFile($file->getRealPath(), date("YmdHis") . "_" . md5($file->getOriginalName()) . '.webp'); + $file->setExtension('webp'); + } + case 'attachment': + case 'video': + if ($this->isDemo) return json(['state' => '演示环境下不允许修改']); + try { + $upload = UploadService::instance()->setConfig($uploadConfig)->$upload_type($file); + $code = $upload['code'] ?? 0; + if ($code == 0) { + return json(['state' => $upload['data'] ?? '上传错误信息']); + }else { + return json(['state' => 'SUCCESS', 'url' => $upload['data']['url'] ?? '']); + } + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + break; + case 'listImage': + $list = (new SystemUploadfile())->order($this->sort)->limit(100)->field('url')->select()->toArray(); + $result = [ + "state" => "SUCCESS", + "list" => $list, + "total" => 0, + "start" => 0, + ]; + return json($result); + default: + return json($config); + } + } + + public function composerInfo(): Json + { + $lockFilePath = root_path() . '/composer.lock'; + $list = []; + if (file_exists($lockFilePath)) { + $lockFileContent = file_get_contents($lockFilePath); + if ($lockFileContent !== false) { + $lockData = json_decode($lockFileContent, true); + if (!empty($lockData['packages'])) { + foreach ($lockData['packages'] as $package) { + $list[] = ['name' => $package['name'], 'version' => $package['version']]; + } + } + } + } + $this->success('success', $list); + } + +} \ No newline at end of file diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php new file mode 100644 index 0000000..2e9586e --- /dev/null +++ b/app/admin/controller/Index.php @@ -0,0 +1,198 @@ +fetch('', ['admin' => $request->adminUserInfo,]); + } + + /** + * 后台欢迎页 + * @return string + * @throws Exception + */ + public function welcome(): string + { + $tpVersion = \think\facade\App::version(); + $mysqlVersion = Db::query("select version() as version")[0]['version'] ?? '未知'; + $phpVersion = phpversion(); + $versions = compact('tpVersion', 'mysqlVersion', 'phpVersion'); + $quick_list = SystemQuick::field('id,title,icon,href') + ->where(['status' => 1])->order('sort', 'desc')->limit(50)->select()->toArray(); + $quicks = array_chunk($quick_list, 8); + $this->assign(compact('quicks', 'versions')); + $data = [ + 'all_member'=>[ + "title"=>"今日订单", + "data"=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")]])->count(), + ], + 'login_member'=>[ + "title"=>"今日金额", + "data"=> (new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")]])->sum('money'), + ], + 'recharge_member'=>[ + "title"=>"今日已支付", + "data"=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',2]])->count(), + ], + + 'all_charge'=>[ + "title"=>"今日已支付金额", + "data"=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',2]])->sum('money'), + + ], + 'day_charge'=>[ + "title"=>"待处理订单", + "data"=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',0]])->count(), + + ], + 'recharge_number'=>[ + "title"=>"总订单数", + "data"=>(new MallOrder())->count(), + ], + ]; + $this->assign('data', $data); + return $this->fetch(); + } + public function get_order() + { + $this->success('操作成功', [ + 'count'=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',0]])->count(), + 'rid'=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',0]]) + ->order('id desc')->value('id') + ]); + } + /** + * 修改管理员信息 + * @param Request $request + * @return string + * @throws DataNotFoundException + * @throws DbException + * @throws ModelNotFoundException + */ + public function editAdmin(Request $request): string + { + $id = $this->adminUid; + $row = (new SystemAdmin()) + ->withoutField('password') + ->find($id); + empty($row) && $this->error('用户信息不存在'); + if ($request->isPost()) { + $post = $request->post(); + $this->isDemo && $this->error('演示环境下不允许修改'); + $rule = []; + $this->validate($post, $rule); + try { + $login_type = $post['login_type'] ?? 1; + if ($login_type == 2) { + $ga_secret = (new SystemAdmin())->where('id', $id)->value('ga_secret'); + if (empty($ga_secret)) $this->error('请先绑定谷歌验证器'); + } + $save = $row->allowField(['head_img', 'phone', 'remark', 'update_time', 'login_type'])->save($post); + }catch (\PDOException $e) { + $this->error('保存失败'); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + $this->assign('row', $row); + $notes = (new SystemAdmin())->notes; + $this->assign('notes', $notes); + return $this->fetch(); + } + + /** + * 修改密码 + * @param Request $request + * @return string + */ + public function editPassword(Request $request): string + { + $id = $this->adminUid; + $row = (new SystemAdmin()) + ->withoutField('password') + ->find($id); + if (!$row) { + $this->error('用户信息不存在'); + } + if ($request->isPost()) { + $post = $request->post(); + $this->isDemo && $this->error('演示环境下不允许修改'); + $rule = [ + 'password|登录密码' => 'require', + 'password_again|确认密码' => 'require', + ]; + $this->validate($post, $rule); + if ($post['password'] != $post['password_again']) { + $this->error('两次密码输入不一致'); + } + + try { + $save = $row->save([ + 'password' => password_hash($post['password'], PASSWORD_DEFAULT), + ]); + }catch (Exception $e) { + $this->error('保存失败'); + } + if ($save) { + $this->success('保存成功'); + }else { + $this->error('保存失败'); + } + } + $this->assign('row', $row); + return $this->fetch(); + } + + /** + * 设置谷歌验证码 + * @param Request $request + * @return string + * @throws Exception + */ + public function set2fa(Request $request): string + { + $id = $this->adminUid; + $row = (new SystemAdmin())->withoutField('password')->find($id); + if (!$row) $this->error('用户信息不存在'); + // You can see: https://gitee.com/wolf-code/authenticator + $ga = new \Wolfcode\Authenticator\google\PHPGangstaGoogleAuthenticator(); + if (!$request->isAjax()) { + $old_secret = $row->ga_secret; + $secret = $ga->createSecret(32); + $ga_title = $this->isDemo ? 'EasyAdmin8演示环境' : '可自定义修改显示标题'; + $dataUri = $ga->getQRCode($ga_title, $secret); + $this->assign(compact('row', 'dataUri', 'old_secret', 'secret')); + return $this->fetch(); + } + $this->isDemo && $this->error('演示环境下不允许修改'); + $post = $request->post(); + $ga_secret = $post['ga_secret'] ?? ''; + $ga_code = $post['ga_code'] ?? ''; + if (empty($ga_code)) $this->error('请输入验证码'); + if (!$ga->verifyCode($ga_secret, $ga_code)) $this->error('验证码错误'); + $row->ga_secret = $ga_secret; + $row->login_type = 2; + $row->save(); + $this->success('操作成功'); + } + +} diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php new file mode 100644 index 0000000..84e41eb --- /dev/null +++ b/app/admin/controller/Login.php @@ -0,0 +1,93 @@ +request->action(); + if (!empty($this->adminUid) && !in_array($action, ['out'])) { + $adminModuleName = config('admin.alias_name'); + $this->success('已登录,无需再次登录', [], __url("@{$adminModuleName}")); + } + } + + /** + * 用户登录 + * @param Request $request + * @return string + * @throws DataNotFoundException + * @throws DbException + * @throws ModelNotFoundException + */ + #[RateLimitingMiddleware(key: [Helper::class, 'getIp'], seconds: 1, limit: 1, message: '请求过于频繁')] + public function index(Request $request): string + { + $captcha = env('EASYADMIN.CAPTCHA', 1); + if (!$request->isPost()) return $this->fetch('', compact('captcha')); + $post = $request->post(); + $rule = [ + 'username|用户名' => 'require', + 'password|密码' => 'require', + 'keep_login|是否保持登录' => 'require', + ]; + $captcha == 1 && $rule['captcha|验证码'] = 'require|captcha'; + $this->validate($post, $rule); + $admin = SystemAdmin::where(['username' => $post['username']])->find(); + if (empty($admin)) { + $this->error('用户不存在'); + } + if (!password_verify($post['password'], $admin->password)) { + $this->error('密码输入有误'); + } + if ($admin->status == 0) { + $this->error('账号已被禁用'); + } + if ($admin->login_type == 2) { + if (empty($post['ga_code'])) $this->error('请输入谷歌验证码', ['is_ga_code' => true]); + $ga = new \Wolfcode\Authenticator\google\PHPGangstaGoogleAuthenticator(); + if (!$ga->verifyCode($admin->ga_secret, $post['ga_code'])) $this->error('谷歌验证码错误');; + } + $admin->login_num += 1; + $admin->save(); + $admin = $admin->toArray(); + unset($admin['password']); + $admin['expire_time'] = $post['keep_login'] == 1 ? 0 : time() + 7200; + session('admin', $admin); + $this->success('登录成功'); + } + + /** + * 用户退出 + */ + public function out(): void + { + session('admin', null); + $this->success('退出登录成功'); + } + + /** + * 验证码 + * @return Response + */ + public function captcha(): Response + { + return Captcha::instance()->create(); + } +} diff --git a/app/admin/controller/article/Article.php b/app/admin/controller/article/Article.php new file mode 100644 index 0000000..3a82355 --- /dev/null +++ b/app/admin/controller/article/Article.php @@ -0,0 +1,21 @@ +isAjax()) { + if (input('selectFields')) return $this->selectList(); + list($page, $limit, $where) = $this->buildTableParams(); + $count = self::$model::where($where)->count(); + $list = self::$model::where($where)->page($page, $limit)->order($this->sort)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)] + public function no_check_login(Request $request): string + { + return '这里演示方法不需要经过登录验证'; + } + +} \ No newline at end of file diff --git a/app/admin/controller/mall/Cate.php b/app/admin/controller/mall/Cate.php new file mode 100644 index 0000000..519d9f4 --- /dev/null +++ b/app/admin/controller/mall/Cate.php @@ -0,0 +1,21 @@ +assign('cate', MallCate::column('title', 'id')); + } + + #[NodeAnnotation(title: '列表', auth: true)] + public function index(Request $request): Json|string + { + if ($request->isAjax()) { + if (input('selectFields')) return $this->selectList(); + list($page, $limit, $where) = $this->buildTableParams(); + $count = self::$model::where($where)->count(); + $list = self::$model::with(['cate'])->where($where)->page($page, $limit)->order($this->sort)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '入库', auth: true)] + public function stock(Request $request, $id): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + $post = $request->post(); + $rule = []; + $this->validate($post, $rule); + try { + $post['total_stock'] = $row->total_stock + $post['stock']; + $post['stock'] = $row->stock + $post['stock']; + $save = $row->save($post); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + $this->assign('row', $row); + return $this->fetch(); + } + + #[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)] + public function no_check_login(Request $request): string + { + return '这里演示方法不需要经过登录验证'; + } + + + #[NodeAnnotation(title: 'AI优化', auth: true)] + public function aiOptimization(Request $request): void + { + $message = $request->post('message'); + if (empty($message)) $this->error('请输入内容'); + + // 演示环境下 默认返回的内容 + if ($this->isDemo) { + $content = << [ + 'role' => 'assistant', + 'content' => $content, + ]]]; + $this->success('success', compact('choices')); + } + + try { + $result = AiChatService::instance() + // 当使用推理模型时,可能存在超时的情况,所以需要设置超时时间为 0 + // ->setTimeLimit(0) + // 请替换为您需要的模型类型 + ->setAiType(AiType::QWEN) + // 如果需要指定模型的 API 地址,可自行设置 + // ->setAiUrl('https://xxx.com') + // 请替换为您的模型 + ->setAiModel('qwen-plus') + // 请替换为您的 API KEY + ->setAiKey('sk-1234567890') + // 此内容会作为系统提示,会影响到回答的内容 当前仅作为测试使用 + ->setSystemContent('你现在是一位资深的海外电商产品经理') + ->chat($message); + $choices = $result['choices']; + }catch (\Throwable $exception) { + $choices = [['message' => [ + 'role' => 'assistant', + 'content' => $exception->getMessage(), + ]]]; + } + $this->success('success', compact('choices')); + } + +} \ No newline at end of file diff --git a/app/admin/controller/mall/Order.php b/app/admin/controller/mall/Order.php new file mode 100644 index 0000000..b4ce5fd --- /dev/null +++ b/app/admin/controller/mall/Order.php @@ -0,0 +1,120 @@ +isAjax()) { + if (input('selectFields')) return $this->selectList(); + list($page, $limit, $where) = $this->buildTableParams(); + $count = self::$model::where($where)->count(); + $list = self::$model::where($where)->page($page, $limit)->order($this->sort)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + #[NodeAnnotation(title: '确认支付成功', auth: true)] + public function recharge(Request $request, $id): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + $post = $request->post(); + try { + $post['status'] = 2; + $save = $row->save($post); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $save ? $this->success('确认支付成功') : $this->error('保存失败'); + } + } + + #[NodeAnnotation(title: '编辑', auth: true)] + public function edit(Request $request, $id = 0): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + $post = $request->post(); + $rule = []; + $this->validate($post, $rule); + try { + Db::transaction(function() use ($post, $row, &$save) { + $post['status'] = 1; + $save = $row->save($post); + }); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + $this->assign('row', $row); + return $this->fetch(); + } + + #[NodeAnnotation(title: 'IP拉黑', auth: true)] + public function blockip(Request $request, $id): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + try { + $save = (new \app\admin\model\BlackIp())->save([ + 'ip' => $row->ip, + ]); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $save ? $this->success('IP拉黑成功') : $this->error('保存失败'); + } + } + + #[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)] + public function no_check_login(Request $request): string + { + return '这里演示方法不需要经过登录验证'; + } + +} \ No newline at end of file diff --git a/app/admin/controller/system/Admin.php b/app/admin/controller/system/Admin.php new file mode 100644 index 0000000..95b9980 --- /dev/null +++ b/app/admin/controller/system/Admin.php @@ -0,0 +1,179 @@ + 'desc', + 'id' => 'desc', + ]; + + public function __construct(App $app) + { + parent::__construct($app); + self::$model = SystemAdmin::class; + $this->assign('auth_list', self::$model::getAuthList()); + } + + #[NodeAnnotation(title: '列表', auth: true)] + public function index(Request $request): Json|string + { + if ($request->isAjax()) { + if (input('selectFields')) { + return $this->selectList(); + } + list($page, $limit, $where) = $this->buildTableParams(); + $count = self::$model::where($where)->count(); + $list = self::$model::withoutField('password') + ->where($where) + ->page($page, $limit) + ->order($this->sort) + ->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '添加', auth: true)] + public function add(Request $request): string + { + if ($request->isPost()) { + $post = $request->post(); + $authIds = $request->post('auth_ids', []); + $post['auth_ids'] = implode(',', array_keys($authIds)); + $rule = []; + $this->validate($post, $rule); + if (empty($post['password'])) $post['password'] = '123456'; + $post['password'] = password_hash($post['password'],PASSWORD_DEFAULT); + try { + $save = self::$model::create($post); + }catch (\Exception $e) { + $this->error('保存失败' . $e->getMessage()); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '编辑', auth: true)] + public function edit(Request $request, $id = 0): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + $post = $request->post(); + $authIds = $request->post('auth_ids', []); + $post['auth_ids'] = implode(',', array_keys($authIds)); + $rule = []; + $this->validate($post, $rule); + try { + $save = $row->save($post); + TriggerService::updateMenu($id); + }catch (\Exception $e) { + $this->error('保存失败' . $e->getMessage()); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + $this->assign('row', $row); + return $this->fetch(); + } + + #[NodeAnnotation(title: '设置密码', auth: true)] + public function password(Request $request, $id): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isAjax()) { + $post = $request->post(); + $rule = [ + 'password|登录密码' => 'require', + 'password_again|确认密码' => 'require', + ]; + $this->validate($post, $rule); + if ($post['password'] != $post['password_again']) { + $this->error('两次密码输入不一致'); + } + try { + $save = $row->save([ + 'password' => password_hash($post['password'],PASSWORD_DEFAULT), + ]); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + $this->assign('row', $row); + return $this->fetch(); + } + + #[NodeAnnotation(title: '删除', auth: true)] + public function delete(Request $request): void + { + $this->checkPostRequest(); + $id = $request->param('id'); + $row = self::$model::whereIn('id', $id)->select(); + $row->isEmpty() && $this->error('数据不存在'); + $id == AdminConstant::SUPER_ADMIN_ID && $this->error('超级管理员不允许修改'); + if (is_array($id)) { + if (in_array(AdminConstant::SUPER_ADMIN_ID, $id)) { + $this->error('超级管理员不允许修改'); + } + } + try { + $save = $row->delete(); + }catch (\Exception $e) { + $this->error('删除失败'); + } + $save ? $this->success('删除成功') : $this->error('删除失败'); + } + + #[NodeAnnotation(title: '属性修改', auth: true)] + public function modify(Request $request): void + { + $this->checkPostRequest(); + $post = $request->post(); + $rule = [ + 'id|ID' => 'require', + 'field|字段' => 'require', + 'value|值' => 'require', + ]; + $this->validate($post, $rule); + if (!in_array($post['field'], $this->allowModifyFields)) { + $this->error('该字段不允许修改:' . $post['field']); + } + if ($post['id'] == AdminConstant::SUPER_ADMIN_ID && $post['field'] == 'status') { + $this->error('超级管理员状态不允许修改'); + } + $row = self::$model::find($post['id']); + empty($row) && $this->error('数据不存在'); + try { + $row->save([ + $post['field'] => $post['value'], + ]); + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + $this->success('保存成功'); + } + + +} diff --git a/app/admin/controller/system/Auth.php b/app/admin/controller/system/Auth.php new file mode 100644 index 0000000..1ab1829 --- /dev/null +++ b/app/admin/controller/system/Auth.php @@ -0,0 +1,71 @@ + 'desc', + 'id' => 'desc', + ]; + + public function __construct(App $app) + { + parent::__construct($app); + self::$model = SystemAuth::class; + } + + #[NodeAnnotation(title: '授权', auth: true)] + public function authorize(Request $request, $id): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isAjax()) { + $list = self::$model::getAuthorizeNodeListByAdminId($id); + $this->success('获取成功', $list); + } + $this->assign('row', $row); + return $this->fetch(); + } + + #[NodeAnnotation(title: '授权保存', auth: true)] + public function saveAuthorize(Request $request): void + { + $this->checkPostRequest(); + $id = $request->post('id'); + $node = $request->post('node', "[]"); + $node = json_decode($node, true); + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + try { + $authNode = new SystemAuthNode(); + $authNode->where('auth_id', $id)->delete(); + if (!empty($node)) { + $saveAll = []; + foreach ($node as $vo) { + $saveAll[] = [ + 'auth_id' => $id, + 'node_id' => $vo, + ]; + } + $authNode->saveAll($saveAll); + } + TriggerService::updateMenu(); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $this->success('保存成功'); + } + +} \ No newline at end of file diff --git a/app/admin/controller/system/Config.php b/app/admin/controller/system/Config.php new file mode 100644 index 0000000..fa85eb7 --- /dev/null +++ b/app/admin/controller/system/Config.php @@ -0,0 +1,70 @@ +assign('upload_types', config('admin.upload_types')); + $this->assign('editor_types', config('admin.editor_types')); + } + + #[NodeAnnotation(title: '列表', auth: true)] + public function index(Request $request): Json|string + { + return $this->fetch(); + } + + #[NodeAnnotation(title: '保存', auth: true)] + public function save(Request $request): void + { + $this->checkPostRequest(); + $post = $request->post(); + $notAddFields = ['_token', 'file', 'group']; + try { + $group = $post['group'] ?? ''; + if (empty($group)) $this->error('保存失败'); + if ($group == 'upload') { + $upload_types = config('admin.upload_types'); + // 兼容旧版本 + self::$model::where('name', 'upload_allow_type')->update(['value' => implode(',', array_keys($upload_types))]); + } + foreach ($post as $key => $val) { + if (in_array($key, $notAddFields)) continue; + $config_key_data = self::$model::where('name', $key)->find(); + if (!is_null($config_key_data)) { + $config_key_data->save(['value' => $val,]); + }else { + self::$model::create( + [ + 'name' => $key, + 'value' => $val, + 'group' => $group, + ]); + } + if (Cache::has($key)) Cache::set($key, $val); + } + TriggerService::updateMenu(); + TriggerService::updateSysConfig(); + }catch (\Exception $e) { + $this->error('保存失败' . $e->getMessage()); + } + $this->success('保存成功'); + } + +} \ No newline at end of file diff --git a/app/admin/controller/system/CurdGenerate.php b/app/admin/controller/system/CurdGenerate.php new file mode 100644 index 0000000..d27d47b --- /dev/null +++ b/app/admin/controller/system/CurdGenerate.php @@ -0,0 +1,155 @@ +fetch(); + } + + #[NodeAnnotation(title: '操作', auth: true)] + public function save(Request $request, string $type = ''): ?Json + { + if (!$request->isAjax()) $this->error(); + switch ($type) { + case "search": + $tb_prefix = $request->param('tb_prefix/s', ''); + $tb_name = $request->param('tb_name/s', ''); + if (empty($tb_name)) $this->error('参数错误'); + + try { + $list = Db::query("SHOW FULL COLUMNS FROM {$tb_prefix}{$tb_name}"); + $data = []; + foreach ($list as $value) { + $data[] = [ + 'name' => $value['Field'], + 'type' => $value['Type'], + 'key' => $value['Key'], + 'extra' => $value['Extra'], + 'null' => $value['Null'], + 'desc' => $value['Comment'], + ]; + } + $this->success('查询成功', compact('data', 'list')); + }catch (PDOException $exception) { + $this->error($exception->getMessage()); + } + break; + case "add": + $tb_prefix = $request->param('tb_prefix/s', ''); + $tb_name = $request->param('tb_name/s', ''); + if (empty($tb_name)) $this->error('参数错误'); + + $tb_fields = $request->param('tb_fields'); + $force = $request->post('force/d', 0); + try { + $build = (new BuildCurd())->setTablePrefix($tb_prefix)->setTable($tb_name); + $build->setForce($force); // 强制覆盖 + // 新增字段类型 + if ($tb_fields) { + foreach ($tb_fields as $tk => $tf) { + if (empty($tf)) continue; + $tf = array_values($tf); + switch ($tk) { + case 'ignore': + $build->setIgnoreFields($tf, true); + break; + case 'select': + $build->setSelectFields($tf, true); + break; + case 'radio': + $build->setRadioFieldSuffix($tf, true); + break; + case 'checkbox': + $build->setCheckboxFieldSuffix($tf, true); + break; + case 'image': + $build->setImageFieldSuffix($tf, true); + break; + case 'images': + $build->setImagesFieldSuffix($tf, true); + break; + case 'date': + $build->setDateFieldSuffix($tf, true); + break; + case 'datetime': + $build->setDatetimeFieldSuffix($tf, true); + break; + case 'editor': + $build->setEditorFields($tf, true); + break; + default: + break; + } + } + } + $build = $build->render(); + $fileList = $build->getFileList(); + if (empty($fileList)) $this->error('这里什么都没有'); + $result = $build->create(); + $_file = $result[0] ?? ''; + $link = ''; + if (!empty($_file)) { + $_fileExp = explode(DIRECTORY_SEPARATOR, $_file); + $_fileExp_last = array_slice($_fileExp, -2); + $_fileExp_last_0 = $_fileExp_last[0] . '.'; + if ($_fileExp_last[0] == 'controller') $_fileExp_last_0 = ''; + $link = '/' . config('admin.alias_name') . '/' . $_fileExp_last_0 . Str::snake(explode('.php', end($_fileExp_last))[0] ?? '') . '/index'; + } + $this->success('生成成功', compact('result', 'link')); + }catch (FileException $exception) { + return json(['code' => -1, 'msg' => $exception->getMessage()]); + } + break; + case "delete": + $tb_prefix = $request->param('tb_prefix/s', ''); + $tb_name = $request->param('tb_name/s', ''); + if (empty($tb_name)) $this->error('参数错误'); + + try { + $build = (new BuildCurd())->setTablePrefix($tb_prefix)->setTable($tb_name); + $build = $build->render(); + $fileList = $build->getFileList(); + if (empty($fileList)) $this->error('这里什么都没有'); + $result = $build->delete(); + $this->success('删除自动生成CURD文件成功', compact('result')); + }catch (FileException $exception) { + return json(['code' => -1, 'msg' => $exception->getMessage()]); + } + break; + case 'console': + $command = $request->post('command', ''); + if (empty($command)) $this->error('请输入命令'); + $commandExp = explode(' ', $command); + $commandExp = array_values(array_filter($commandExp)); + try { + + $output = Console::call('curd', [...$commandExp]); + }catch (\Throwable $exception) { + $this->error($exception->getMessage() . $exception->getLine()); + } + if (empty($output)) $this->error('设置错误'); + $this->success($output->fetch()); + break; + default: + $this->error('参数错误'); + break; + } + } +} \ No newline at end of file diff --git a/app/admin/controller/system/Log.php b/app/admin/controller/system/Log.php new file mode 100644 index 0000000..1e54eb4 --- /dev/null +++ b/app/admin/controller/system/Log.php @@ -0,0 +1,138 @@ +isAjax()) { + if (input('selectFields')) { + return $this->selectList(); + } + [$page, $limit, $where, $excludeFields] = $this->buildTableParams(['month']); + $month = !empty($excludeFields['month']) ? date('Ym', strtotime($excludeFields['month'])) : date('Ym'); + $model = (new self::$model)->setSuffix("_$month")->with('admin')->where($where); + try { + $count = $model->count(); + $list = $model->page($page, $limit)->order($this->sort)->select(); + }catch (PDOException|DbException $exception) { + $count = 0; + $list = []; + } + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '导出', auth: true)] + public function export() + { + if (env('EASYADMIN.IS_DEMO', false)) { + $this->error('演示环境下不允许操作'); + } + [$page, $limit, $where, $excludeFields] = $this->buildTableParams(['month']); + $month = !empty($excludeFields['month']) ? date('Ym', strtotime($excludeFields['month'])) : date('Ym'); + $tableName = (new self::$model)->setSuffix("_$month")->getName(); + $tableName = CommonTool::humpToLine(lcfirst($tableName)); + $prefix = config('database.connections.mysql.prefix'); + $dbList = Db::query("show full columns from {$prefix}{$tableName}"); + $header = []; + foreach ($dbList as $vo) { + $comment = !empty($vo['Comment']) ? $vo['Comment'] : $vo['Field']; + if (!in_array($vo['Field'], $this->noExportFields)) { + $header[] = [$comment, $vo['Field']]; + } + } + $model = (new self::$model)->setSuffix("_$month")->with('admin')->where($where); + try { + $list = $model + ->limit(10000) + ->order('id', 'desc') + ->select() + ->toArray(); + foreach ($list as &$vo) { + $vo['content'] = json_encode($vo['content'], JSON_UNESCAPED_UNICODE); + $vo['response'] = json_encode($vo['response'], JSON_UNESCAPED_UNICODE); + } + exportExcel($header, $list, '操作日志'); + }catch (\Throwable $exception) { + $this->error($exception->getMessage()); + } + } + + + #[NodeAnnotation(title: '删除指定日志', auth: true)] + public function deleteMonthLog(Request $request) + { + if (!$request->isAjax()) { + return $this->fetch(); + } + + if ($this->isDemo) $this->error('演示环境下不允许操作'); + + $monthsAgo = $request->param('month/d', 0); + if ($monthsAgo < 1) $this->error('月份错误'); + + $currentDate = new \DateTime(); + $currentDate->modify("-$monthsAgo months"); + + $dbPrefix = env('DB_PREFIX'); + $dbLike = "{$dbPrefix}system_log_"; + $tables = Db::query("SHOW TABLES LIKE '$dbLike%'"); + $threshold = date('Ym', strtotime("-$monthsAgo month")); + $tableNames = []; + try { + foreach ($tables as $table) { + $tableName = current($table); + if (!preg_match("/^$dbLike\d{6}$/", $tableName)) continue; + $datePart = substr($tableName, -6); + $issetTable = Db::query("SHOW TABLES LIKE '$tableName'"); + if (!$issetTable) continue; + if ($datePart - $threshold <= 0) { + Db::execute("DROP TABLE `$tableName`"); + $tableNames[] = $tableName; + } + } + }catch (PDOException) { + } + if (empty($tableNames)) $this->error('没有需要删除的表'); + $this->success('操作成功 - 共删除 ' . count($tableNames) . ' 张表
' . implode('
', $tableNames)); + } + + #[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOG)] + #[NodeAnnotation(title: '框架日志', auth: true, ignore: NodeAnnotation::IGNORE_NODE)] + public function record(): Json|string + { + return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewer())->fetch(); + } + +} \ No newline at end of file diff --git a/app/admin/controller/system/Menu.php b/app/admin/controller/system/Menu.php new file mode 100644 index 0000000..21597d5 --- /dev/null +++ b/app/admin/controller/system/Menu.php @@ -0,0 +1,191 @@ + 'desc', + 'id' => 'asc', + ]; + + public function __construct(App $app) + { + parent::__construct($app); + self::$model = SystemMenu::class; + } + + #[NodeAnnotation(title: '列表', auth: true)] + public function index(Request $request): Json|string + { + if ($request->isAjax()) { + if (input('selectFields')) { + return $this->selectList(); + } + $count = self::$model::count(); + $list = self::$model::order($this->sort)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '添加', auth: true)] + public function add(Request $request): string + { + $id = $request->param('id'); + $homeId = self::$model::where(['pid' => MenuConstant::HOME_PID,])->value('id'); + if ($id == $homeId) { + $this->error('首页不能添加子菜单'); + } + if ($request->isPost()) { + $post = $request->post(); + $rule = [ + 'pid|上级菜单' => 'require', + 'title|菜单名称' => 'require', + 'icon|菜单图标' => 'require', + ]; + $this->validate($post, $rule); + try { + $save = self::$model::create($post); + }catch (\Exception $e) { + $this->error('保存失败'); + } + if ($save) { + TriggerService::updateMenu(); + $this->success('保存成功'); + }else { + $this->error('保存失败'); + } + } + $pidMenuList = self::$model::getPidMenuList(); + $this->assign('id', $id); + $this->assign('pidMenuList', $pidMenuList); + return $this->fetch(); + } + + #[NodeAnnotation(title: '编辑', auth: true)] + public function edit(Request $request, $id = 0): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + $post = $request->post(); + $rule = [ + 'pid|上级菜单' => 'require', + 'title|菜单名称' => 'require', + 'icon|菜单图标' => 'require', + ]; + $this->validate($post, $rule); + if ($row->pid == MenuConstant::HOME_PID) $post['pid'] = MenuConstant::HOME_PID; + try { + $save = $row->save($post); + }catch (\Exception $e) { + $this->error('保存失败'); + } + if (!empty($save)) { + TriggerService::updateMenu(); + $this->success('保存成功'); + }else { + $this->error('保存失败'); + } + } + $pidMenuList = self::$model::getPidMenuList(); + $this->assign([ + 'id' => $id, + 'pidMenuList' => $pidMenuList, + 'row' => $row, + ]); + return $this->fetch(); + } + + #[NodeAnnotation(title: '删除', auth: true)] + public function delete(Request $request): void + { + $this->checkPostRequest(); + $id = $request->param('id'); + $row = self::$model::whereIn('id', $id)->select(); + empty($row) && $this->error('数据不存在'); + try { + $save = $row->delete(); + }catch (\Exception $e) { + $this->error('删除失败'); + } + if ($save) { + TriggerService::updateMenu(); + $this->success('删除成功'); + }else { + $this->error('删除失败'); + } + } + + #[NodeAnnotation(title: '属性修改', auth: true)] + public function modify(Request $request): void + { + $this->checkPostRequest(); + $post = $request->post(); + $rule = [ + 'id|ID' => 'require', + 'field|字段' => 'require', + 'value|值' => 'require', + ]; + $this->validate($post, $rule); + $row = self::$model::find($post['id']); + if (!$row) { + $this->error('数据不存在'); + } + if (!in_array($post['field'], $this->allowModifyFields)) { + $this->error('该字段不允许修改:' . $post['field']); + } + $homeId = self::$model::where([ + 'pid' => MenuConstant::HOME_PID, + ]) + ->value('id'); + if ($post['id'] == $homeId && $post['field'] == 'status') { + $this->error('首页状态不允许关闭'); + } + try { + $row->save([ + $post['field'] => $post['value'], + ]); + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + TriggerService::updateMenu(); + $this->success('保存成功'); + } + + #[NodeAnnotation(title: '添加菜单提示', auth: true)] + public function getMenuTips(): Json + { + $node = input('get.keywords'); + $list = SystemNode::whereLike('node', "%{$node}%") + ->field('node,title') + ->limit(10) + ->select()->toArray(); + return json([ + 'code' => 0, + 'content' => $list, + 'type' => 'success', + ]); + } + +} \ No newline at end of file diff --git a/app/admin/controller/system/Node.php b/app/admin/controller/system/Node.php new file mode 100644 index 0000000..3cf89bf --- /dev/null +++ b/app/admin/controller/system/Node.php @@ -0,0 +1,125 @@ +isAjax()) { + if (input('selectFields')) { + return $this->selectList(); + } + $count = self::$model::count(); + $list = self::$model::getNodeTreeList(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '系统节点更新', auth: true)] + public function refreshNode($force = 0): void + { + + $this->checkPostRequest(); + $nodeList = (new NodeService())->getNodeList(); + empty($nodeList) && $this->error('暂无需要更新的系统节点'); + + try { + if ($force == 1) { + $updateNodeList = self::$model::whereIn('node', array_column($nodeList, 'node'))->select(); + $formatNodeList = array_format_key($nodeList, 'node'); + foreach ($updateNodeList as $vo) { + isset($formatNodeList[$vo['node']]) + && self::$model::where('id', $vo['id'])->update( + [ + 'title' => $formatNodeList[$vo['node']]['title'], + 'is_auth' => $formatNodeList[$vo['node']]['is_auth'], + ] + ); + } + } + $existNodeList = self::$model::field('node,title,type,is_auth')->select(); + foreach ($nodeList as $key => $vo) { + foreach ($existNodeList as $v) { + if ($vo['node'] == $v->node) { + unset($nodeList[$key]); + break; + } + } + } + if (!empty($nodeList)) { + (new self::$model)->saveAll($nodeList); + TriggerService::updateNode(); + } + }catch (\Exception $e) { + $this->error('节点更新失败'); + } + $this->success('节点更新成功'); + } + + #[NodeAnnotation(title: '清除失效节点', auth: true)] + public function clearNode(): void + { + $this->checkPostRequest(); + $nodeList = (new NodeService())->getNodeList(); + try { + $existNodeList = self::$model::field('id,node,title,type,is_auth')->select()->toArray(); + $formatNodeList = array_format_key($nodeList, 'node'); + foreach ($existNodeList as $vo) { + !isset($formatNodeList[$vo['node']]) && self::$model::where('id', $vo['id'])->delete(); + } + TriggerService::updateNode(); + }catch (\Exception $e) { + $this->error('节点更新失败'); + } + $this->success('节点更新成功'); + } + + /** + * @throws \ReflectionException + * @throws \Doctrine\Common\Annotations\AnnotationException + */ + #[NodeAnnotation(title: '刷新菜单', auth: true)] + public function refreshMenu(): void + { + $this->checkPostRequest(); + $nodeList = (new NodeService())->getNodeList(); + empty($nodeList) && $this->error('暂无需要更新的系统节点'); + try { + SystemMenu::refreshMenu($nodeList); + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + $this->success('菜单刷新成功'); + } +} \ No newline at end of file diff --git a/app/admin/controller/system/Quick.php b/app/admin/controller/system/Quick.php new file mode 100644 index 0000000..14f4b92 --- /dev/null +++ b/app/admin/controller/system/Quick.php @@ -0,0 +1,27 @@ + 'desc', + 'id' => 'desc', + ]; + + public function __construct(App $app) + { + parent::__construct($app); + self::$model = SystemQuick::class; + } + +} \ No newline at end of file diff --git a/app/admin/controller/system/Uploadfile.php b/app/admin/controller/system/Uploadfile.php new file mode 100644 index 0000000..866805a --- /dev/null +++ b/app/admin/controller/system/Uploadfile.php @@ -0,0 +1,22 @@ +assign('upload_types', config('admin.upload_types')); + } + +} \ No newline at end of file diff --git a/app/admin/entity/.keep b/app/admin/entity/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/admin/entity/Test.php b/app/admin/entity/Test.php new file mode 100644 index 0000000..3ac48cc --- /dev/null +++ b/app/admin/entity/Test.php @@ -0,0 +1,12 @@ +adminUserInfo; + if (empty($adminUserInfo)) return $next($request); + $adminConfig = config('admin'); + $adminId = $adminUserInfo['id']; + + $authService = app(AuthService::class, ['adminId' => $adminId]); + $currentNode = $authService->getCurrentNode(); + $currentController = parse_name($request->controller()); + + if (!in_array($currentController, $adminConfig['no_auth_controller']) && !in_array($currentNode, $adminConfig['no_auth_node'])) { + $check = $authService->checkNode($currentNode); + !$check && $this->error('无权限访问'); + // 判断是否为演示环境 + if (env('EASYADMIN.IS_DEMO', false) && $request->isPost()) { + if (!in_array($currentNode, ['system.log/record', 'mall.goods/aiOptimization'])) $this->error('演示环境下不允许修改'); + } + } + return $next($request); + } +} \ No newline at end of file diff --git a/app/admin/middleware/CheckInstall.php b/app/admin/middleware/CheckInstall.php new file mode 100644 index 0000000..717b072 --- /dev/null +++ b/app/admin/middleware/CheckInstall.php @@ -0,0 +1,21 @@ +controller(); + if (!is_file(root_path() . 'config' . DIRECTORY_SEPARATOR . 'install' . DIRECTORY_SEPARATOR . 'lock' . DIRECTORY_SEPARATOR . 'install.lock')) { + if ($controller != 'Install') return redirect('/install'); + } + return $next($request); + } +} \ No newline at end of file diff --git a/app/admin/middleware/CheckLogin.php b/app/admin/middleware/CheckLogin.php new file mode 100644 index 0000000..4e0d40b --- /dev/null +++ b/app/admin/middleware/CheckLogin.php @@ -0,0 +1,60 @@ +controller(); + if (empty($controller)) return $next($request); + if (str_contains($controller, '.')) $controller = str_replace('.', '\\', $controller); + $action = $request->action(); + $controllerClass = 'app\\admin\\controller\\' . $controller; + $classObj = new ReflectionClass($controllerClass); + $properties = $classObj->getDefaultProperties(); + // 整个控制器是否忽略登录 + $ignoreLogin = $properties['ignoreLogin'] ?? false; + $adminUserInfo = session('admin'); + if (!$ignoreLogin) { + $noNeedCheck = $properties['noNeedCheck'] ?? []; + if (in_array($action, $noNeedCheck)) { + return $next($request); + } + try { + $reflectionMethod = new \ReflectionMethod($controllerClass, $action); + $attributes = $reflectionMethod->getAttributes(MiddlewareAnnotation::class); + foreach ($attributes as $attribute) { + $annotation = $attribute->newInstance(); + $_ignore = (array)$annotation->ignore; + // 控制器中的某个方法忽略登录 + if (in_array('LOGIN', $_ignore)) return $next($request); + } + }catch (\Throwable) { + } + if (empty($adminUserInfo)) { + return redirect(__url('login/index')); + } + // 判断是否登录过期 + $expireTime = $adminUserInfo['expire_time']; + if ($expireTime !== 0 && time() > $expireTime) { + session('admin', null); + $this->error('登录已过期,请重新登录', [], __url(env('EASYADMIN.ADMIN') . '/login/index')); + } + } + $request->adminUserInfo = $adminUserInfo ?: []; + return $next($request); + } +} \ No newline at end of file diff --git a/app/admin/middleware/RateLimiting.php b/app/admin/middleware/RateLimiting.php new file mode 100644 index 0000000..f301374 --- /dev/null +++ b/app/admin/middleware/RateLimiting.php @@ -0,0 +1,45 @@ +method() == 'GET') return $next($request); + $controller = $request->controller(); + $module = app('http')->getName(); + $appNamespace = config('app.app_namespace'); + $controllerClass = "app\\{$module}\\controller\\{$controller}{$appNamespace}"; + $controllerClass = str_replace('.', '\\', $controllerClass); + $action = $request->action(); + try { + Bootstrap::init($controllerClass, $action, [ + # Redis 相关配置 + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'port' => (int)env('REDIS_PORT', 6379), + 'password' => env('REDIS_PASSWORD', ''), + 'prefix' => env('REDIS_PREFIX', ''), + 'database' => (int)env('REDIS_DATABASE', 0), + ]); + }catch (\Throwable $exception) { + $this->error($exception->getMessage()); + } + return $next($request); + } +} \ No newline at end of file diff --git a/app/admin/middleware/SystemLog.php b/app/admin/middleware/SystemLog.php new file mode 100644 index 0000000..a85ba3f --- /dev/null +++ b/app/admin/middleware/SystemLog.php @@ -0,0 +1,104 @@ +param(); + if (isset($params['s'])) unset($params['s']); + foreach ($params as $key => $val) { + in_array($key, $this->sensitiveParams) && $params[$key] = "***********"; + } + $method = strtolower($request->method()); + $url = $request->url(); + + if (env('APP_DEBUG')) { + trace(['url' => $url, 'method' => $method, 'params' => $params,], 'requestDebugInfo'); + } + if ($request->isAjax()) { + if (in_array($method, ['post', 'put', 'delete'])) { + + $title = ''; + try { + $pathInfo = $request->pathinfo(); + $pathInfoExp = explode('/', $pathInfo); + $_action = end($pathInfoExp) ?? ''; + $pathInfoExp = explode('.', $pathInfoExp[0] ?? ''); + $_name = $pathInfoExp[0] ?? ''; + $_controller = ucfirst($pathInfoExp[1] ?? ''); + $className = $_controller ? "app\admin\controller\\{$_name}\\{$_controller}" : "app\admin\controller\\{$_name}"; + if ($_name && $_action) { + $reflectionMethod = new \ReflectionMethod($className, $_action); + $attributes = $reflectionMethod->getAttributes(MiddlewareAnnotation::class); + foreach ($attributes as $attribute) { + $annotation = $attribute->newInstance(); + $_ignore = (array)$annotation->ignore; + if (in_array('log', array_map('strtolower', $_ignore))) return $response; + } + $controllerTitle = $nodeTitle = ''; + $controllerAttributes = (new \ReflectionClass($className))->getAttributes(ControllerAnnotation::class); + $actionAttributes = $reflectionMethod->getAttributes(NodeAnnotation::class); + foreach ($controllerAttributes as $controllerAttribute) { + $controllerAnnotation = $controllerAttribute->newInstance(); + $controllerTitle = $controllerAnnotation->title ?? ''; + } + foreach ($actionAttributes as $actionAttribute) { + $actionAnnotation = $actionAttribute->newInstance(); + $nodeTitle = $actionAnnotation->title ?? ''; + } + $title = $controllerTitle . ' - ' . $nodeTitle; + } + }catch (\Throwable $exception) { + } + + $ip = $request->ip(); + // 限制记录的响应内容,避免过大 + $_response = json_encode($response->getData(), JSON_UNESCAPED_UNICODE); + $_response = mb_substr($_response, 0, 3000, 'utf-8'); + + $data = [ + 'admin_id' => session('admin.id'), + 'title' => $title, + 'url' => $url, + 'method' => $method, + 'ip' => $ip, + 'content' => json_encode($params, JSON_UNESCAPED_UNICODE), + 'response' => $_response, + 'useragent' => $request->server('HTTP_USER_AGENT'), + 'create_time' => time(), + ]; + SystemLogService::instance()->save($data); + } + } + return $response; + } +} \ No newline at end of file diff --git a/app/admin/model/BlackIp.php b/app/admin/model/BlackIp.php new file mode 100644 index 0000000..aa921ef --- /dev/null +++ b/app/admin/model/BlackIp.php @@ -0,0 +1,25 @@ + 'delete_time', + ]; + } + + // * +++++++++++++++++++++++++++ + // | 以下两种写法适用于 with 关联 + // * +++++++++++++++++++++++++ + + // public function cate(): BelongsTo + // { + // return $this->belongsTo('app\admin\model\MallCate', 'cate_id', 'id'); + // } + +} \ No newline at end of file diff --git a/app/admin/model/MallCate.php b/app/admin/model/MallCate.php new file mode 100644 index 0000000..c2b9f23 --- /dev/null +++ b/app/admin/model/MallCate.php @@ -0,0 +1,18 @@ + 'delete_time', + ]; + } + +} \ No newline at end of file diff --git a/app/admin/model/MallGoods.php b/app/admin/model/MallGoods.php new file mode 100644 index 0000000..d78477f --- /dev/null +++ b/app/admin/model/MallGoods.php @@ -0,0 +1,32 @@ + 'delete_time', + ]; + } + + // * +++++++++++++++++++++++++++ + // | 以下两种写法适用于 with 关联 + // * +++++++++++++++++++++++++ + + // public function cate(): BelongsTo + // { + // return $this->belongsTo('app\admin\model\MallCate', 'cate_id', 'id'); + // } + + public function cate(): HasOne + { + return $this->hasOne(MallCate::class, 'id', 'cate_id'); + } + +} \ No newline at end of file diff --git a/app/admin/model/MallOrder.php b/app/admin/model/MallOrder.php new file mode 100644 index 0000000..72b4ff1 --- /dev/null +++ b/app/admin/model/MallOrder.php @@ -0,0 +1,27 @@ + 'delete_time', + ]; + } + + // * +++++++++++++++++++++++++++ + // | 以下两种写法适用于 with 关联 + // * +++++++++++++++++++++++++ + + // public function cate(): BelongsTo + // { + // return $this->belongsTo('app\admin\model\MallCate', 'cate_id', 'id'); + // } + + +} \ No newline at end of file diff --git a/app/admin/model/SystemAdmin.php b/app/admin/model/SystemAdmin.php new file mode 100644 index 0000000..d1e9ee5 --- /dev/null +++ b/app/admin/model/SystemAdmin.php @@ -0,0 +1,36 @@ + 'delete_time', + ]; + } + + public array $notes = [ + 'login_type' => [ + 1 => '密码登录', + 2 => '密码 + 谷歌验证码登录' + ], + ]; + + public static function getAuthIdsAttr($value): array + { + if (!$value) return []; + return explode(',', $value); + } + + public static function getAuthList(): array + { + return SystemAuth::where('status', 1)->column('title', 'id'); + } + +} \ No newline at end of file diff --git a/app/admin/model/SystemAuth.php b/app/admin/model/SystemAuth.php new file mode 100644 index 0000000..775c590 --- /dev/null +++ b/app/admin/model/SystemAuth.php @@ -0,0 +1,61 @@ + 'delete_time', + ]; + } + + /** + * 根据角色ID获取授权节点 + * @param $authId + * @return array + * @throws DataNotFoundException + * @throws DbException + * @throws ModelNotFoundException + */ + public static function getAuthorizeNodeListByAdminId($authId): array + { + $checkNodeList = (new SystemAuthNode()) + ->where('auth_id', $authId) + ->column('node_id'); + $systemNode = new SystemNode(); + $nodeList = $systemNode + ->where('is_auth', 1) + ->field('id,node,title,type,is_auth') + ->select() + ->toArray(); + $newNodeList = []; + foreach ($nodeList as $vo) { + if ($vo['type'] == 1) { + $vo = array_merge($vo, ['field' => 'node', 'spread' => true]); + $vo['checked'] = false; + $vo['title'] = "{$vo['title']}【{$vo['node']}】"; + $children = []; + foreach ($nodeList as $v) { + if ($v['type'] == 2 && strpos($v['node'], $vo['node'] . '/') !== false) { + $v = array_merge($v, ['field' => 'node', 'spread' => true]); + $v['checked'] = in_array($v['id'], $checkNodeList) ? true : false; + $v['title'] = "{$v['title']}【{$v['node']}】"; + $children[] = $v; + } + } + !empty($children) && $vo['children'] = $children; + $newNodeList[] = $vo; + } + } + return $newNodeList; + } + +} \ No newline at end of file diff --git a/app/admin/model/SystemAuthNode.php b/app/admin/model/SystemAuthNode.php new file mode 100644 index 0000000..7aee03e --- /dev/null +++ b/app/admin/model/SystemAuthNode.php @@ -0,0 +1,10 @@ +getData('name') === 'upload_allow_ext') { + //去除 php + $model->value = implode(',',array_map(function ($ext) { + return trim(strtolower($ext), ' '); + }, array_filter(explode(',', $model->getData('value')), function ($ext) { + return strtolower(trim($ext)) !== 'php'; + }))); + } + } +} \ No newline at end of file diff --git a/app/admin/model/SystemLog.php b/app/admin/model/SystemLog.php new file mode 100644 index 0000000..5f8f017 --- /dev/null +++ b/app/admin/model/SystemLog.php @@ -0,0 +1,29 @@ + 'json', + 'response' => 'json', + ]; + + protected function init(): void + { + SystemLogService::instance()->detectTable(); + } + + + public function admin(): BelongsTo + { + return $this->belongsTo('app\admin\model\SystemAdmin', 'admin_id', 'id'); + } + + +} \ No newline at end of file diff --git a/app/admin/model/SystemMenu.php b/app/admin/model/SystemMenu.php new file mode 100644 index 0000000..b7f7c1e --- /dev/null +++ b/app/admin/model/SystemMenu.php @@ -0,0 +1,132 @@ + '系统管理', + 'mall' => '商城管理', + 'article' => '文章管理', + ]; + + protected function getOptions(): array + { + return [ + 'deleteTime' => 'delete_time', + ]; + } + + public static function onBeforeUpdate(Model $model): void + { + $model->system = 0; // 系统添加 + + } + + /** + * @throws ModelNotFoundException + * @throws DbException + * @throws DataNotFoundException + */ + public static function getPidMenuList(): array + { + $list = self::field('id,pid,title')->where([ + ['pid', '<>', MenuConstant::HOME_PID], + ['status', '=', 1], + ])->select()->toArray(); + + $pidMenuList = self::buildPidMenu(0, $list); + return array_merge([[ + 'id' => 0, + 'pid' => 0, + 'title' => '顶级菜单', + ]], $pidMenuList); + } + + protected static function buildPidMenu($pid, $list, $level = 0): array + { + $newList = []; + foreach ($list as $vo) { + if ($vo['pid'] == $pid) { + $level++; + foreach ($newList as $v) { + if ($vo['pid'] == $v['pid'] && isset($v['level'])) { + $level = $v['level']; + break; + } + } + $vo['level'] = $level; + if ($level > 1) { + $repeatString = "      "; + $markString = str_repeat("{$repeatString}├{$repeatString}", $level - 1); + $vo['title'] = $markString . $vo['title']; + } + $newList[] = $vo; + $childList = self::buildPidMenu($vo['id'], $list, $level); + !empty($childList) && $newList = array_merge($newList, $childList); + } + + } + return $newList; + } + + public static function refreshMenu($nodeList): void + { + $nodeList = array_filter($nodeList, function ($item) { + return $item['type'] == 1; + }); + $menuList = array_map(function ($item) { + return "{$item['node']}/index"; + }, $nodeList); + + if (!empty($menuList)) { + $hasMenu = (new self())->whereIn('href', $menuList)->column('href'); + $needInsertMenu = array_diff($menuList, $hasMenu); + $insertNode = array_filter($nodeList, function ($item) use ($needInsertMenu) { + return in_array("{$item['node']}/index", $needInsertMenu); + }); + $data = []; + foreach ($insertNode as $vo) { + $pidText = explode('.', $vo['node']); + if (isset($pidText[0]) && self::$menuTypeList[$pidText[0]]) { + $pidMenuId = (new self())->where([ + 'title' => self::$menuTypeList[$pidText[0]], + 'pid' => 0, + ])->value('id'); + if (empty($pidMenuId)) { + $pidMenuId = (new self())->insertGetId([ + 'title' => self::$menuTypeList[$pidText[0]], + 'href' => '', + 'icon' => 'fa fa-list', + 'pid' => 0, + 'status' => 1, + 'system' => 0, // 系统添加 + 'create_time' => time(), + ]); + } + $data[] = [ + 'title' => $vo['title'], + 'href' => "{$vo['node']}/index", + 'icon' => 'fa fa-list', + 'target' => '_self', + 'pid' => $pidMenuId, + 'status' => 1, + 'system' => 1, // 系统添加 + 'create_time' => time(), + ]; + } + + }; + if (count($data) > 0) (new self())->insertAll($data); + self::getPidMenuList(); // 刷新菜单缓存 + } + } + +} \ No newline at end of file diff --git a/app/admin/model/SystemNode.php b/app/admin/model/SystemNode.php new file mode 100644 index 0000000..0ff2798 --- /dev/null +++ b/app/admin/model/SystemNode.php @@ -0,0 +1,35 @@ +toArray(); + return self::buildNodeTree($list); + } + + protected static function buildNodeTree($list): array + { + $newList = []; + $repeatString = "      "; + foreach ($list as $vo) { + if ($vo['type'] == 1) { + $newList[] = $vo; + foreach ($list as $v) { + if ($v['type'] == 2 && str_contains($v['node'], $vo['node'] . '/')) { + $v['node'] = "{$repeatString}├{$repeatString}" . $v['node']; + $newList[] = $v; + } + } + } + } + return $newList; + } + + +} \ No newline at end of file diff --git a/app/admin/model/SystemQuick.php b/app/admin/model/SystemQuick.php new file mode 100644 index 0000000..27542f8 --- /dev/null +++ b/app/admin/model/SystemQuick.php @@ -0,0 +1,17 @@ + 'delete_time', + ]; + } + +} \ No newline at end of file diff --git a/app/admin/model/SystemUploadfile.php b/app/admin/model/SystemUploadfile.php new file mode 100644 index 0000000..6ff11b2 --- /dev/null +++ b/app/admin/model/SystemUploadfile.php @@ -0,0 +1,10 @@ +getNodeList(); + return $nodeList; + } +} \ No newline at end of file diff --git a/app/admin/service/SystemLogService.php b/app/admin/service/SystemLogService.php new file mode 100644 index 0000000..4e104fb --- /dev/null +++ b/app/admin/service/SystemLogService.php @@ -0,0 +1,128 @@ +tablePrefix = Config::get('database.connections.mysql.prefix'); + $this->tableSuffix = date('Ym', time()); + $this->tableName = "{$this->tablePrefix}system_log_{$this->tableSuffix}"; + } + + /** + * 获取实例对象 + * @return SystemLogService + */ + public static function instance(): SystemLogService + { + if (is_null(self::$instance)) { + self::$instance = new static(); + } + return self::$instance; + } + + + /** + * 保存数据 + * @param $data + * @return bool|string + */ + public function save($data): bool|string + { + Db::startTrans(); + try { + $this->detectTable(); + Db::table($this->tableName)->strict(false)->insert($data); + Db::commit(); + }catch (\Exception $e) { + Db::rollback(); + return $e->getMessage(); + } + return true; + } + + /** + * 检测数据表 + * @return bool + */ + public function detectTable(): bool + { + $_key = "system_log_{$this->tableName}_table"; + // 手动删除日志表时候 记得清除缓存 + $isset = Cache::get($_key); + if ($isset) return true; + $check = Db::query("show tables like '{$this->tableName}'"); + if (empty($check)) { + $sql = $this->getCreateSql(); + Db::execute($sql); + } + Cache::set($_key, !empty($check)); + return true; + } + + public function getAllTableList() + { + + } + + /** + * 根据后缀获取创建表的sql + * @return string + */ + protected function getCreateSql(): string + { + return <<tableName}` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `admin_id` int(10) unsigned DEFAULT '0' COMMENT '管理员ID', + `url` varchar(1500) NOT NULL DEFAULT '' COMMENT '操作页面', + `method` varchar(50) NOT NULL COMMENT '请求方法', + `title` varchar(100) DEFAULT '' COMMENT '日志标题', + `content` json NOT NULL COMMENT '请求数据', + `response` json DEFAULT NULL COMMENT '回调数据', + `ip` varchar(50) NOT NULL DEFAULT '' COMMENT 'IP', + `useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent', + `create_time` int(10) DEFAULT NULL COMMENT '操作时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='后台操作日志表 - {$this->tableSuffix}'; +EOT; + } + +} diff --git a/app/admin/service/TriggerService.php b/app/admin/service/TriggerService.php new file mode 100644 index 0000000..48f6956 --- /dev/null +++ b/app/admin/service/TriggerService.php @@ -0,0 +1,50 @@ +clear(); + }else{ + Cache::delete('initAdmin_' . $adminId); + } + return true; + } + + /** + * 更新节点缓存 + * @param null $adminId + * @return bool + */ + public static function updateNode($adminId = null) + { + if(empty($adminId)){ + Cache::tag('authNode')->clear(); + }else{ + Cache::delete('allAuthNode_' . $adminId); + } + return true; + } + + /** + * 更新系统设置缓存 + * @return bool + */ + public static function updateSysConfig(): bool + { + Cache::tag('sysConfig')->clear(); + return true; + } + +} \ No newline at end of file diff --git a/app/admin/service/UploadService.php b/app/admin/service/UploadService.php new file mode 100644 index 0000000..5a780e8 --- /dev/null +++ b/app/admin/service/UploadService.php @@ -0,0 +1,226 @@ +options = $options; + return $this; + } + + /** + * @return array + */ + public function getConfig(): array + { + return $this->options; + } + + /** + * @param UploadedFile $file + * @param string $base_path + * @return string + */ + protected function setFilePath(UploadedFile $file, string $base_path = ''): string + { + $path = date('Ymd') . '/' . Str::random(3) . time() . Str::random() . '.' . $file->extension(); + return $base_path . $path; + } + + /** + * @param UploadedFile $file + * @return UploadService + */ + protected function setSaveData(UploadedFile $file): static + { + $options = $this->options; + $data = [ + 'upload_type' => $options['upload_type'], + 'original_name' => $file->getOriginalName(), + 'mime_type' => $file->getMime(), + 'file_size' => $file->getSize(), + 'file_ext' => strtolower($file->extension()), + 'create_time' => time(), + ]; + $this->saveData = $data; + return $this; + } + + /** + * 本地存储 + * + * @param UploadedFile $file + * @param string $type + * @return array + */ + public function local(UploadedFile $file, string $type = ''): array + { + if ($file->isValid()) { + $base_path = '/storage/' . date('Ymd') . '/'; + // 上传文件的目标文件夹 + $destinationPath = public_path() . $base_path; + $this->setSaveData($file); + // 将文件移动到目标文件夹中 + $move = $file->move($destinationPath, Str::random(3) . time() . Str::random() . session('admin.id') . '.' . $file->extension()); + $url = $base_path . $move->getFilename(); + $data = ['url' => $url]; + $this->save($url); + return ['code' => 1, 'data' => $data]; + } + $data = '上传失败'; + return ['code' => 0, 'data' => $data]; + } + + /** + * 阿里云OSS + * + * @param UploadedFile $file + * @param string $type + * @return array + */ + public function oss(UploadedFile $file, string $type = ''): array + { + $config = $this->getConfig(); + $accessKeyId = $config['oss_access_key_id']; + $accessKeySecret = $config['oss_access_key_secret']; + $endpoint = $config['oss_endpoint']; + $bucket = $config['oss_bucket']; + // 升级 aliyuncs/oss-sdk-php 到 v2.7.2 以上, 使用签名 v4 版本 + putenv('OSS_ACCESS_KEY_ID=' . $accessKeyId); + putenv('OSS_ACCESS_KEY_SECRET=' . $accessKeySecret); + $region = str_replace(['http://oss-', 'https://oss-', 'oss-'], '', explode('.aliyuncs.com', $endpoint)[0] ?? ''); + $provider = new EnvironmentVariableCredentialsProvider(); + $args = [ + "provider" => $provider, + "endpoint" => $endpoint, + "signatureVersion" => OssClient::OSS_SIGNATURE_VERSION_V4, + "region" => $region + ]; + if ($file->isValid()) { + $object = $this->setFilePath($file, Env::get('EASYADMIN.OSS_STATIC_PREFIX', 'easyadmin8') . '/'); + try { + $ossClient = new OssClient($args); + $_rs = $ossClient->putObject($bucket, $object, file_get_contents($file->getRealPath())); + $oss_request_url = $_rs['oss-request-url'] ?? ''; + if (empty($oss_request_url)) return ['code' => 0, 'data' => '上传至OSS失败']; + $oss_request_url = str_replace('http://', 'https://', $oss_request_url); + $this->setSaveData($file); + } catch (OssException $e) { + return ['code' => 0, 'data' => $e->getMessage()]; + } + $data = ['url' => $oss_request_url]; + $this->save($oss_request_url); + return ['code' => 1, 'data' => $data]; + } + $data = '上传失败'; + return ['code' => 0, 'data' => $data]; + } + + /** + * 腾讯云cos + * + * @param UploadedFile $file + * @param string $type + * @return array + */ + public function cos(UploadedFile $file, string $type = ''): array + { + $config = $this->getConfig(); + $secretId = $config['cos_secret_id']; //替换为用户的 secretId,请登录访问管理控制台进行查看和管理,https://console.cloud.tencent.com/cam/capi + $secretKey = $config['cos_secret_key']; //替换为用户的 secretKey,请登录访问管理控制台进行查看和管理,https://console.cloud.tencent.com/cam/capi + $region = $config['cos_region']; //替换为用户的 region,已创建桶归属的region可以在控制台查看,https://console.cloud.tencent.com/cos5/bucket + if ($file->isValid()) { + $cosClient = new Client( + [ + 'region' => $region, + 'schema' => 'http', + 'credentials' => ['secretId' => $secretId, 'secretKey' => $secretKey, + ], + ]); + try { + $object = $this->setFilePath($file, Env::get('EASYADMIN.OSS_STATIC_PREFIX', 'easyadmin8') . '/'); + $result = $cosClient->upload( + $config['cos_bucket'], //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + $object, //此处的 key 为对象键 + file_get_contents($file->getRealPath()) + ); + $location = $result['Location'] ?? ''; + if (empty($location)) return ['code' => 0, 'data' => '上传至COS失败']; + $location = 'https://' . $location; + $this->setSaveData($file); + }catch (Exception $e) { + return ['code' => 0, 'data' => $e->getMessage()]; + } + $data = ['url' => $location]; + $this->save($location); + return ['code' => 1, 'data' => $data]; + } + $data = '上传失败'; + return ['code' => 0, 'data' => $data]; + } + + /** + * 七牛云 + * + * @param UploadedFile $file + * @param string $type + * @return array + * @throws Exception + */ + public function qnoss(UploadedFile $file, string $type = ''): array + { + if (!$file->isValid()) return ['code' => 1, 'data' => '上传验证失败']; + $uploadMgr = new UploadManager(); + $config = $this->getConfig(); + $accessKey = $config['qnoss_access_key']; + $secretKey = $config['qnoss_secret_key']; + $bucket = $config['qnoss_bucket']; + $domain = $config['qnoss_domain']; + $auth = new Auth($accessKey, $secretKey); + $token = $auth->uploadToken($bucket); + $object = $this->setFilePath($file, Env::get('EASYADMIN.OSS_STATIC_PREFIX', 'easyadmin8') . '/'); + list($ret, $error) = $uploadMgr->putFile($token, $object, $file->getRealPath()); + if (empty($ret)) return ['code' => 0, 'data' => $error->getResponse()->error ?? '上传失败,请检查七牛云相关参数配置']; + $url = $domain . "/" . $ret['key']; + $data = ['url' => $url]; + $this->setSaveData($file); + $this->save($url); + return ['code' => 1, 'data' => $data]; + } + + protected function save(string $url = ''): bool + { + $data = $this->saveData; + $data['url'] = $url; + $data['upload_time'] = time(); + return (new SystemUploadfile())->save($data); + } +} diff --git a/app/admin/service/annotation/ControllerAnnotation.php b/app/admin/service/annotation/ControllerAnnotation.php new file mode 100644 index 0000000..5e51992 --- /dev/null +++ b/app/admin/service/annotation/ControllerAnnotation.php @@ -0,0 +1,21 @@ +basePath = $basePath; + $this->baseNamespace = $baseNamespace; + return $this; + } + + /** + * 获取所有节点 + * @return array + * @throws AnnotationException + * @throws ReflectionException + */ + public function getNodeList(): array + { + list($nodeList, $controllerList) = [[], $this->getControllerList()]; + + if (!empty($controllerList)) { + AnnotationRegistry::loadAnnotationClass('class_exists'); + $parser = new DocParser(); + $parser->setIgnoreNotImportedAnnotations(true); + $reader = new AnnotationReader($parser); + + foreach ($controllerList as $controllerFormat => $controller) { + + // 获取类和方法的注释信息 + $reflectionClass = new \ReflectionClass($controller); + $methods = $reflectionClass->getMethods(); + $actionList = []; + + // 遍历读取所有方法的注释的参数信息 + foreach ($methods as $method) { + + // 忽略掉不需要的节点 + $property = $reflectionClass->getProperty('ignoreNode'); + $propertyAttributes = $property->getAttributes(NodeAnnotation::class); + if (!empty($propertyAttributes[0])) { + $propertyAttribute = $propertyAttributes[0]->newInstance(); + if (in_array($method->name, $propertyAttribute->ignore)) continue; + } + + $attributes = $reflectionClass->getMethod($method->name)->getAttributes(NodeAnnotation::class); + foreach ($attributes as $attribute) { + $annotation = $attribute->newInstance(); + if (!empty($annotation->ignore)) if (strtolower($annotation->ignore) == 'node') continue; + $actionList[] = [ + 'node' => $controllerFormat . '/' . $method->name, + 'title' => $annotation->title ?? null, + 'is_auth' => $annotation->auth ?? false, + 'type' => 2, + ]; + } + } + // 方法非空才读取控制器注解 + if (!empty($actionList)) { + // 读取Controller的注解 + $attributes = $reflectionClass->getAttributes(ControllerAnnotation::class); + foreach ($attributes as $attribute) { + $controllerAnnotation = $attribute->newInstance(); + $nodeList[] = [ + 'node' => $controllerFormat, + 'title' => $controllerAnnotation->title ?? null, + 'is_auth' => $controllerAnnotation->auth ?? false, + 'type' => 1, + ]; + } + $nodeList = array_merge($nodeList, $actionList); + } + + } + } + return $nodeList; + } + + /** + * 获取所有控制器 + * @return array + */ + public function getControllerList(): array + { + return $this->readControllerFiles($this->basePath); + } + + /** + * 遍历读取控制器文件 + * @param $path + * @return array + */ + protected function readControllerFiles($path): array + { + list($list, $temp_list, $dirExplode) = [[], scandir($path), explode($this->basePath, $path)]; + $middleDir = !empty($dirExplode[1]) ? str_replace('/', '\\', substr($dirExplode[1], 1)) . "\\" : ''; + + foreach ($temp_list as $file) { + // 排除根目录和没有开启注解的模块 + if ($file == ".." || $file == ".") { + continue; + } + if (is_dir($path . DIRECTORY_SEPARATOR . $file)) { + // 子文件夹,进行递归 + $childFiles = $this->readControllerFiles($path . DIRECTORY_SEPARATOR . $file); + $list = array_merge($childFiles, $list); + }else { + // 判断是不是控制器 + $fileExplodeArray = explode('.', $file); + if (count($fileExplodeArray) != 2 || end($fileExplodeArray) != 'php') { + continue; + } + // 根目录下的文件 + $className = str_replace('.php', '', $file); + $controllerFormat = str_replace('\\', '.', $middleDir) . CommonTool::humpToLine(lcfirst($className)); + $list[$controllerFormat] = "{$this->baseNamespace}\\{$middleDir}" . $className; + } + } + return $list; + } + +} \ No newline at end of file diff --git a/app/admin/service/console/CliEcho.php b/app/admin/service/console/CliEcho.php new file mode 100644 index 0000000..81ffac2 --- /dev/null +++ b/app/admin/service/console/CliEcho.php @@ -0,0 +1,166 @@ + '0;30', + 'dark_gray' => '1;30', + 'blue' => '0;34', + 'light_blue' => '1;34', + 'green' => '0;32', + 'light_green' => '1;32', + 'cyan' => '0;36', + 'light_cyan' => '1;36', + 'red' => '0;31', + 'light_red' => '1;31', + 'purple' => '0;35', + 'light_purple' => '1;35', + 'brown' => '0;33', + 'yellow' => '1;33', + 'light_gray' => '0;37', + 'white' => '1;37', + ]; + + private static $backgroundColors = [ + 'black' => '40', + 'red' => '41', + 'green' => '42', + 'yellow' => '43', + 'blue' => '44', + 'magenta' => '45', + 'cyan' => '46', + 'light_gray' => '47', + ]; + + public function __construct() + { + // Set up shell colors + $this->foreground_colors['black'] = '0;30'; + $this->foreground_colors['dark_gray'] = '1;30'; + $this->foreground_colors['blue'] = '0;34'; + $this->foreground_colors['light_blue'] = '1;34'; + $this->foreground_colors['green'] = '0;32'; + $this->foreground_colors['light_green'] = '1;32'; + $this->foreground_colors['cyan'] = '0;36'; + $this->foreground_colors['light_cyan'] = '1;36'; + $this->foreground_colors['red'] = '0;31'; + $this->foreground_colors['light_red'] = '1;31'; + $this->foreground_colors['purple'] = '0;35'; + $this->foreground_colors['light_purple'] = '1;35'; + $this->foreground_colors['brown'] = '0;33'; + $this->foreground_colors['yellow'] = '1;33'; + $this->foreground_colors['light_gray'] = '0;37'; + $this->foreground_colors['white'] = '1;37'; + $this->background_colors['black'] = '40'; + $this->background_colors['red'] = '41'; + $this->background_colors['green'] = '42'; + $this->background_colors['yellow'] = '43'; + $this->background_colors['blue'] = '44'; + $this->background_colors['magenta'] = '45'; + $this->background_colors['cyan'] = '46'; + $this->background_colors['light_gray'] = '47'; + } + + // Returns colored string + public function getColoredString($string, $foreground_color = null, $background_color = null, $new_line = false): string + { + $colored_string = ''; + // Check if given foreground color found + if (isset($this->foreground_colors[$foreground_color])) { + $colored_string .= "\033[" . $this->foreground_colors[$foreground_color] . 'm'; + } + // Check if given background color found + if (isset($this->background_colors[$background_color])) { + $colored_string .= "\033[" . $this->background_colors[$background_color] . 'm'; + } + // Add string and end coloring + $colored_string .= $string . "\033[0m"; + return $new_line ? $colored_string . PHP_EOL : $colored_string; + } + + // Returns all foreground color names + public function getForegroundColors(): array + { + return array_keys($this->foreground_colors); + } + + // Returns all background color names + public function getBackgroundColors(): array + { + return array_keys($this->background_colors); + } + + /** + * 获取带颜色的文字. + * + * @param string $string black|dark_gray|blue|light_blue|green|light_green|cyan|light_cyan|red|light_red|purple|brown|yellow|light_gray|white + * @param string|null $foregroundColor 前景颜色 black|red|green|yellow|blue|magenta|cyan|light_gray + * @param string|null $backgroundColor 背景颜色 同$foregroundColor + * + * @return string + */ + public static function initColoredString( + string $string, + ?string $foregroundColor = null, + ?string $backgroundColor = null + ): string + { + $coloredString = ''; + if (isset(static::$foregroundColors[$foregroundColor])) { + $coloredString .= "\033[" . static::$foregroundColors[$foregroundColor] . 'm'; + } + if (isset(static::$backgroundColors[$backgroundColor])) { + $coloredString .= "\033[" . static::$backgroundColors[$backgroundColor] . 'm'; + } + $coloredString .= $string . "\033[0m"; + return $coloredString; + } + + /** + * 输出提示信息. + * + * @param $msg + */ + public static function notice($msg): void + { + fwrite(STDOUT, self::initColoredString($msg, 'light_gray') . PHP_EOL); + } + + /** + * 输出错误信息. + * + * @param $msg + */ + public static function error($msg): void + { + fwrite(STDERR, self::initColoredString($msg, 'white', 'red') . PHP_EOL); + } + + /** + * 输出警告信息. + * + * @param $msg + */ + public static function warn($msg): void + { + fwrite(STDOUT, self::initColoredString($msg, 'red', 'yellow') . PHP_EOL); + } + + /** + * 输出成功信息. + * + * @param $msg + */ + public static function success($msg): void + { + fwrite(STDOUT, self::initColoredString($msg, 'light_cyan') . PHP_EOL); + } + +} \ No newline at end of file diff --git a/app/admin/service/curd/BuildCurd.php b/app/admin/service/curd/BuildCurd.php new file mode 100644 index 0000000..601ea06 --- /dev/null +++ b/app/admin/service/curd/BuildCurd.php @@ -0,0 +1,1575 @@ +tablePrefix = config('database.connections.mysql.prefix'); + $this->dbName = config('database.connections.mysql.database'); + $this->dir = __DIR__; + $this->rootDir = root_path(); + return $this; + } + + public function setTablePrefix($prefix): static + { + $this->tablePrefix = $prefix; + return $this; + } + + /** + * 设置主表 + * @param $table + * @return $this + * @throws TableException + */ + public function setTable($table): static + { + $this->table = $table; + try { + + // 获取表列注释 + $columns = Db::query("SHOW FULL COLUMNS FROM {$this->tablePrefix}{$this->table}"); + foreach ($columns as $vo) { + $colum = [ + 'type' => $vo['Type'], + 'comment' => !empty($vo['Comment']) ? $vo['Comment'] : $vo['Field'], + 'required' => $vo['Null'] == "NO", + 'default' => $vo['Default'], + ]; + + // 格式化列数据 + $this->buildColum($colum); + + $this->tableColumns[$vo['Field']] = $colum; + + if ($vo['Field'] == 'delete_time') { + $this->delete = true; + } + } + $this->tableComment = $this->table; + } catch (Exception $e) { + throw new TableException($e->getMessage()); + } + + // 初始化默认控制器名 + $nodeArray = explode('_', $this->table); + if (count($nodeArray) == 1) { + $this->controllerFilename = ucfirst($nodeArray[0]); + } else { + foreach ($nodeArray as $k => $v) { + if ($k == 0) { + $this->controllerFilename = "{$v}{$this->DS}"; + } else { + $this->controllerFilename .= ucfirst($v); + } + } + } + + // 初始化默认模型名 + $this->modelFilename = ucfirst(CommonTool::lineToHump($this->table)); + + $this->buildViewJsUrl(); + + // 构建数据 + $this->buildStructure(); + + return $this; + } + + /** + * 设置关联表 + * @param $relationTable + * @param $foreignKey + * @param null $primaryKey + * @param null $modelFilename + * @param array $onlyShowFields + * @param null $bindSelectField + * @return $this + * @throws TableException + */ + public function setRelation($relationTable, $foreignKey, $primaryKey = null, $modelFilename = null, array $onlyShowFields = [], $bindSelectField = null): static + { + if (!isset($this->tableColumns[$foreignKey])) { + throw new TableException("主表不存在外键字段:{$foreignKey}"); + } + if (!empty($modelFilename)) { + $modelFilename = str_replace('/', $this->DS, $modelFilename); + } + try { + $columns = Db::query("SHOW FULL COLUMNS FROM {$this->tablePrefix}{$relationTable}"); + $formatColumns = []; + $delete = false; + if (!empty($bindSelectField) && !in_array($bindSelectField, array_column($columns, 'Field'))) { + throw new TableException("关联表{$relationTable}不存在该字段: {$bindSelectField}"); + } + $onlyFields = []; + foreach ($columns as $vo) { + if (empty($primaryKey) && $vo['Key'] == 'PRI') { + $primaryKey = $vo['Field']; + } + if (!empty($onlyShowFields) && !in_array($vo['Field'], $onlyShowFields)) { + continue; + } + if (!empty($onlyShowFields)) $onlyFields[] = $vo['Field']; + $colum = [ + 'type' => $vo['Type'], + 'comment' => $vo['Comment'], + 'default' => $vo['Default'], + ]; + + $this->buildColum($colum); + + $formatColumns[$vo['Field']] = $colum; + if ($vo['Field'] == 'delete_time') { + $delete = true; + } + } + + $modelFilename = empty($modelFilename) ? ucfirst(CommonTool::lineToHump($relationTable)) : $modelFilename; + $modelArray = explode($this->DS, $modelFilename); + $modelName = array_pop($modelArray); + + $relation = [ + 'modelFilename' => $modelFilename, + 'modelName' => $modelName, + 'foreignKey' => $foreignKey, + 'primaryKey' => $primaryKey, + 'bindSelectField' => $bindSelectField, + 'delete' => $delete, + 'tableColumns' => $formatColumns, + 'onlyFields' => $onlyFields, + ]; + if (!empty($bindSelectField)) { + $relationArray = explode('\\', $modelFilename); + $this->tableColumns[$foreignKey]['bindSelectField'] = $bindSelectField; + $this->tableColumns[$foreignKey]['bindRelation'] = lcfirst(end($relationArray)) . ucfirst($bindSelectField); + } + $this->relationArray[$relationTable] = $relation; + $this->selectFields[] = $foreignKey; + } catch (Exception $e) { + throw new TableException($e->getMessage()); + } + return $this; + } + + /** + * 设置控制器名 + * @param $controllerFilename + * @return $this + */ + public function setControllerFilename($controllerFilename): static + { + $this->controllerFilename = str_replace('/', $this->DS, $controllerFilename); + $this->buildViewJsUrl(); + return $this; + } + + /** + * 设置模型名 + * @param $modelFilename + * @return $this + */ + public function setModelFilename($modelFilename): static + { + $this->modelFilename = str_replace('/', $this->DS, $modelFilename); + $this->buildViewJsUrl(); + return $this; + } + + /** + * 设置显示字段 + * @param $fields + * @return $this + */ + public function setFields($fields): static + { + $this->fields = $fields; + return $this; + } + + /** + * 设置删除模式 + * @param $delete + * @return $this + */ + public function setDelete($delete): static + { + $this->delete = $delete; + return $this; + } + + /** + * 设置是否强制替换 + * @param $force + * @return $this + */ + public function setForce($force): static + { + $this->force = $force; + return $this; + } + + /** + * 设置复选框字段后缀 + * @param $array + * @return $this + */ + public function setCheckboxFieldSuffix($array, $replace = false): static + { + $this->checkboxFieldSuffix = $replace ? $array : array_merge($this->checkboxFieldSuffix, $array); + return $this; + } + + /** + * 设置单选框字段后缀 + * @param $array + * @return $this + */ + public function setRadioFieldSuffix($array, $replace = false): static + { + $this->radioFieldSuffix = $replace ? $array : array_merge($this->radioFieldSuffix, $array); + return $this; + } + + /** + * 设置单图片字段后缀 + * @param $array + * @return $this + */ + public function setImageFieldSuffix($array, $replace = false): static + { + $this->imageFieldSuffix = $replace ? $array : array_merge($this->imageFieldSuffix, $array); + return $this; + } + + /** + * 设置多图片字段后缀 + * @param $array + * @return $this + */ + public function setImagesFieldSuffix($array, $replace = false): static + { + $this->imagesFieldSuffix = $replace ? $array : array_merge($this->imagesFieldSuffix, $array); + return $this; + } + + /** + * 设置单文件字段后缀 + * @param $array + * @return $this + */ + public function setFileFieldSuffix($array, $replace = false): static + { + $this->fileFieldSuffix = $replace ? $array : array_merge($this->fileFieldSuffix, $array); + return $this; + } + + /** + * 设置多文件字段后缀 + * @param $array + * @return $this + */ + public function setFilesFieldSuffix($array, $replace = false): static + { + $this->filesFieldSuffix = $replace ? $array : array_merge($this->filesFieldSuffix, $array); + return $this; + } + + /** + * 设置日期字段后缀 + * @param $array + * @return $this + */ + public function setDateFieldSuffix($array, $replace = false): static + { + $this->dateFieldSuffix = $replace ? $array : array_merge($this->dateFieldSuffix, $array); + return $this; + } + + /** + * 设置日期时间字段后缀 + * @param $array + * @return $this + */ + public function setDatetimeFieldSuffix($array, $replace = false): static + { + $this->datetimeFieldSuffix = $replace ? $array : array_merge($this->datetimeFieldSuffix, $array); + return $this; + } + + /** + * 设置开关字段 + * @param $array + * @return $this + */ + public function setSwitchFields($array, $replace = false): static + { + $this->switchFields = $replace ? $array : array_merge($this->switchFields, $array); + return $this; + } + + /** + * 设置下拉选择字段 + * @param $array + * @return $this + */ + public function setSelectFields($array, $replace = false): static + { + $this->selectFields = $replace ? $array : array_merge($this->selectFields, $array); + return $this; + } + + /** + * 设置排序字段 + * @param $array + * @return $this + */ + public function setSortFields($array, $replace = false): static + { + $this->sortFields = $replace ? $array : array_merge($this->sortFields, $array); + return $this; + } + + /** + * 设置忽略字段 + * @param $array + * @return $this + */ + public function setIgnoreFields($array, $replace = false): static + { + $this->ignoreFields = $replace ? $array : array_merge($this->ignoreFields, $array); + return $this; + } + + public function setEditorFields($array, $replace = false): static + { + $this->editorFields = $replace ? $array : array_merge($this->editorFields, $array); + return $this; + } + + /** + * 获取相关的文件 + * @return array + */ + public function getFileList(): array + { + return $this->fileList; + } + + /** + * 构建基础视图、JS、URL + * @return $this + */ + protected function buildViewJsUrl(): static + { + $nodeArray = explode($this->DS, $this->controllerFilename); + $formatArray = []; + foreach ($nodeArray as $vo) { + $formatArray[] = CommonTool::humpToLine(lcfirst($vo)); + } + $this->controllerUrl = implode('.', $formatArray); + $this->viewFilename = implode($this->DS, $formatArray); + $this->jsFilename = $this->viewFilename; + + // 控制器命名空间 + $namespaceArray = $nodeArray; + $this->controllerName = array_pop($namespaceArray); + $namespaceSuffix = implode('\\', $namespaceArray); + $this->controllerNamespace = empty($namespaceSuffix) ? "app\admin\controller" : "app\admin\controller\\{$namespaceSuffix}"; + + // 主表模型命名 + $modelArray = explode($this->DS, $this->modelFilename); + + $this->modelName = array_pop($modelArray); + + return $this; + } + + /** + * 构建字段 + * @return $this + */ + protected function buildStructure(): static + { + foreach ($this->tableColumns as $key => $val) { + + // 排序 + if ($key == 'sort') { + $this->sortFields[] = $key; + } + + // 富文本 + if (in_array($key, ['describe', 'content', 'details'])) { + $this->editorFields[] = $key; + } + } + return $this; + } + + /** + * 构建必填 + * @param $require + * @return string + */ + protected function buildRequiredHtml($require): string + { + return $require ? 'lay-verify="required"' : ""; + } + + /** + * 构建初始化字段信息 + * @param $colum + * @return array + */ + protected function buildColum(&$colum): array + { + + $string = $colum['comment']; + + $colum['define'] = json_encode([1 => '系统自动生成A', 2 => '请自行修改B'], JSON_UNESCAPED_UNICODE); + + // 处理定义类型 + preg_match('/{[\s\S]*?}/i', $string, $formTypeMatch); + if (!empty($formTypeMatch) && isset($formTypeMatch[0])) { + $colum['comment'] = str_replace($formTypeMatch[0], '', $colum['comment']); + $formType = trim(str_replace('}', '', str_replace('{', '', $formTypeMatch[0]))); + $_formType = $this->checkCommentFormType($formType); + if ($_formType) { + $colum['formType'] = $_formType; + } + } + + // 处理默认定义 + preg_match('/\([\s\S]*?\)/i', $string, $defineMatch); + if (!empty($formTypeMatch) && isset($defineMatch[0])) { + $colum['comment'] = str_replace($defineMatch[0], '', $colum['comment']); + if (isset($colum['formType']) && in_array($colum['formType'], ['images', 'files', 'select', 'switch', 'radio', 'checkbox', 'date'])) { + $define = str_replace(')', '', str_replace('(', '', $defineMatch[0])); + if (in_array($colum['formType'], ['select', 'switch', 'radio', 'checkbox'])) { + $formatDefine = []; + $explodeArray = explode(',', $define); + foreach ($explodeArray as $vo) { + $voExplodeArray = explode(':', $vo); + if (count($voExplodeArray) == 2) { + $formatDefine[trim($voExplodeArray[0])] = trim($voExplodeArray[1]); + } + } + !empty($formatDefine) && $colum['define'] = $formatDefine; + } else { + $colum['define'] = $define; + } + } + } + + $colum['comment'] = trim($colum['comment']); + + return $colum; + } + + /** + * 构建下拉控制器 + * @param $field + * @return mixed + */ + protected function buildSelectController($field): mixed + { + $field = CommonTool::lineToHump(ucfirst($field)); + $name = "get{$field}List"; + $selectCode = CommonTool::replaceTemplate( + $this->getTemplate("controller{$this->DS}select"), + [ + 'name' => $name, + ] + ); + return $selectCode; + } + + /** + * 构架下拉模型 + * @param $field + * @param $array + * @return mixed + */ + protected function buildSelectModel($field, $array): mixed + { + $field = CommonTool::lineToHump(ucfirst($field)); + $name = "get{$field}List"; + $values = '['; + foreach ($array as $k => $v) { + $values .= "'{$k}'=>'{$v}',"; + } + $values .= ']'; + $selectCode = CommonTool::replaceTemplate( + $this->getTemplate("model{$this->DS}select"), + [ + 'name' => $name, + 'values' => $values, + ] + ); + return $selectCode; + } + + /** + * 构架关联下拉模型 + * @param $relation + * @param $filed + * @return mixed + */ + protected function buildRelationSelectModel($relation, $field): mixed + { + $relationArray = explode('\\', $relation); + $name = end($relationArray); + $name = "get{$name}List"; + $selectCode = CommonTool::replaceTemplate( + $this->getTemplate("model{$this->DS}relationSelect"), + [ + 'name' => "notes['$field']", + 'relation' => $relation, + 'values' => $field, + ] + ); + return $selectCode; + } + + /** + * 构建下拉框视图 + * @param $field + * @param string $select + * @return mixed + */ + protected function buildOptionView($field, string $select = '') + { + // $field = CommonTool::lineToHump(ucfirst($field)); + // $name = "get{$field}List"; + return CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}module{$this->DS}option"), + [ + 'name' => "notes['$field']", + 'select' => $select, + ] + ); + } + + /** + * 构建单选框视图 + * @param $field + * @param string $select + * @return mixed + */ + protected function buildRadioView($field, string $select = ''): mixed + { + // $formatField = CommonTool::lineToHump(ucfirst($field)); + // $name = "get{$formatField}List"; + return CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}module{$this->DS}radioInput"), + [ + 'field' => $field, + 'name' => "notes['$field']", + 'select' => $select, + ] + ); + } + + /** + * 构建多选框视图 + * @param $field + * @param string $select + * @return mixed + */ + protected function buildCheckboxView($field, string $select = ''): mixed + { + // $formatField = CommonTool::lineToHump(ucfirst($field)); + // $name = "get{$formatField}List"; + return CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}module{$this->DS}checkboxInput"), + [ + 'field' => $field, + 'name' => "notes['$field']", + 'select' => $select, + ] + ); + } + + /** + * 初始化 + * @return $this + */ + public function render(): static + { + + // 初始化数据 + $this->renderData(); + + // 控制器 + $this->renderController(); + + // 模型 + $this->renderModel(); + + // 视图 + $this->renderView(); + + // JS + $this->renderJs(); + + return $this; + } + + /** + * 初始化数据 + * @return $this + */ + protected function renderData(): static + { + + // 主表 + foreach ($this->tableColumns as $field => $val) { + + + // 过滤字段 + if (in_array($field, $this->ignoreFields)) { + unset($this->tableColumns[$field]); + continue; + } + + $this->tableColumns[$field]['formType'] = $this->tableColumns[$field]['formType'] ?? 'text'; + + // 判断图片 + if ($this->checkContain($field, $this->imageFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'image'; + continue; + } + if ($this->checkContain($field, $this->imagesFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'images'; + continue; + } + + // 判断文件 + if ($this->checkContain($field, $this->fileFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'file'; + continue; + } + if ($this->checkContain($field, $this->filesFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'files'; + continue; + } + + // 判断日期 + if ($this->checkContain($field, $this->dateFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'date'; + continue; + } + + // 判断日期时间 + if ($this->checkContain($field, $this->datetimeFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'datetime'; + continue; + } + + if (in_array($field, $this->radioFields) || $this->checkContain($field, $this->radioFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'radio'; + continue; + } + + if (in_array($field, $this->checkboxFields) || $this->checkContain($field, $this->checkboxFieldSuffix)) { + $this->tableColumns[$field]['formType'] = 'checkbox'; + continue; + } + + // 判断开关 + if (in_array($field, $this->switchFields)) { + $this->tableColumns[$field]['formType'] = 'switch'; + continue; + } + + + // 判断富文本 + if (in_array($field, $this->editorFields) || in_array($val['type'], ['text', 'tinytext', 'mediumtext', 'longtext'])) { + $this->tableColumns[$field]['formType'] = 'editor'; + continue; + } + + // 判断排序 + if (in_array($field, $this->sortFields)) { + $this->tableColumns[$field]['formType'] = 'sort'; + continue; + } + + // 判断下拉选择 + if (in_array($field, $this->selectFields)) { + $this->tableColumns[$field]['formType'] = 'select'; + continue; + } + } + + // 关联表 + foreach ($this->relationArray as $table => $tableVal) { + foreach ($tableVal['tableColumns'] as $field => $val) { + + // 过滤字段 + if (in_array($field, $this->ignoreFields)) { + unset($this->relationArray[$table]['tableColumns'][$field]); + continue; + } + + // 判断是否已初始化 + if (isset($this->relationArray[$table]['tableColumns'][$field]['formType'])) { + continue; + } + + // 判断图片 + if ($this->checkContain($field, $this->imageFieldSuffix)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'image'; + continue; + } + if ($this->checkContain($field, $this->imagesFieldSuffix)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'images'; + continue; + } + + // 判断文件 + if ($this->checkContain($field, $this->fileFieldSuffix)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'file'; + continue; + } + if ($this->checkContain($field, $this->filesFieldSuffix)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'files'; + continue; + } + + // 判断时间 + if ($this->checkContain($field, $this->dateFieldSuffix)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'date'; + continue; + } + + // 判断开关 + if (in_array($field, $this->switchFields)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'switch'; + continue; + } + + // 判断富文本 + if (in_array($field, $this->editorFields) || in_array($val['type'], ['text', 'tinytext', 'mediumtext', 'longtext'])) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'editor'; + continue; + } + + // 判断排序 + if (in_array($field, $this->sortFields)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'sort'; + continue; + } + + // 判断下拉选择 + if (in_array($field, $this->selectFields)) { + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'select'; + continue; + } + + $this->relationArray[$table]['tableColumns'][$field]['formType'] = 'text'; + } + } + + return $this; + } + + /** + * 初始化控制器 + * @return $this + */ + protected function renderController(): static + { + $controllerFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}controller{$this->DS}{$this->controllerFilename}.php"; + $constructRelation = ''; + if (empty($this->relationArray)) { + $controllerIndexMethod = ''; + } else { + $relationCode = ''; + foreach ($this->relationArray as $key => $val) { + $relation = CommonTool::lineToHump($key); + $relationCode = "withJoin('{$relation}', 'LEFT')"; + if (!empty($val['bindSelectField']) && !empty($val['primaryKey'])) { + $constructRelation = '$notes["' . lcfirst($val['foreignKey']) . '"] = \app\admin\model\\' . $val['modelFilename'] . '::column("' . $val['bindSelectField'] . '", "' . $val['primaryKey'] . '");'; + } + } + $controllerIndexMethod = CommonTool::replaceTemplate( + $this->getTemplate("controller{$this->DS}indexMethod"), + [ + 'relationIndexMethod' => $relationCode, + ] + ); + } + $selectList = ''; + // foreach ($this->relationArray as $relation) { + // if (!empty($relation['bindSelectField'])) { + // $relationArray = explode('\\', $relation['modelFilename']); + // $selectList .= $this->buildSelectController(end($relationArray)); + // } + // } + // foreach ($this->tableColumns as $field => $val) { + // if (isset($val['formType']) && in_array($val['formType'], ['select', 'switch', 'radio', 'checkbox']) && isset($val['define'])) { + // $selectList .= $this->buildSelectController($field); + // } + // } + + $modelFilenameExtend = str_replace($this->DS, '\\', $this->modelFilename); + + $controllerValue = CommonTool::replaceTemplate( + $this->getTemplate("controller{$this->DS}controller"), + [ + 'controllerName' => $this->controllerName, + 'controllerNamespace' => $this->controllerNamespace, + 'controllerAnnotation' => $this->tableComment, + 'modelFilename' => "\app\admin\model\\{$modelFilenameExtend}", + 'indexMethod' => $controllerIndexMethod, + 'selectList' => $selectList, + 'constructRelation' => $constructRelation, + ] + ); + $this->fileList[$controllerFile] = $controllerValue; + return $this; + } + + /** + * 初始化模型 + * @return $this + */ + protected function renderModel(): static + { + // 主表模型 + $modelFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}model{$this->DS}{$this->modelFilename}.php"; + $relationList = ''; + if (!empty($this->relationArray)) { + foreach ($this->relationArray as $key => $val) { + $relation = CommonTool::lineToHump($key); + $relationCode = CommonTool::replaceTemplate( + $this->getTemplate("model{$this->DS}relation"), + [ + 'relationMethod' => $relation, + 'relationModel' => "{$val['modelFilename']}::class", + 'foreignKey' => $val['foreignKey'], + 'primaryKey' => $val['primaryKey'], + 'relationFields' => empty($val['onlyFields']) ? "" : "->field('{$val['primaryKey']}," . implode(',', $val['onlyFields']) . "')", + ]); + $relationList .= $relationCode; + } + } + + $selectList = ''; + foreach ($this->relationArray as $relation) { + if (!empty($relation['bindSelectField'])) { + $selectList .= $this->buildRelationSelectModel($relation['modelFilename'], $relation['bindSelectField']); + } + } + $selectArrays = []; + foreach ($this->tableColumns as $field => $val) { + if (isset($val['formType']) && in_array($val['formType'], ['select', 'switch', 'radio', 'checkbox']) && isset($val['define'])) { + $selectArrays += [$field => is_array($val['define']) ? $val['define'] : json_decode($val['define'], true)]; + } + } + $extendNamespaceArray = explode($this->DS, $this->modelFilename); + $extendNamespace = null; + if (count($extendNamespaceArray) > 1) { + array_pop($extendNamespaceArray); + $extendNamespace = '\\' . implode('\\', $extendNamespaceArray); + } + $modelValue = CommonTool::replaceTemplate( + $this->getTemplate("model{$this->DS}model"), + [ + 'modelName' => $this->modelName, + 'modelNamespace' => "app\admin\model{$extendNamespace}", + 'prefix_table' => $this->tablePrefix == config('database.connections.mysql.prefix') ? "" : $this->tablePrefix . $this->table, + 'table' => $this->table, + 'deleteTime' => $this->delete ? '"delete_time"' : 'false', + 'relationList' => $relationList, + // 'selectList' => $selectList, + 'selectArrays' => CommonTool::replaceArrayString(var_export($selectArrays, true)), + ] + ); + + + $this->fileList[$modelFile] = $modelValue; + + // 关联模型 + foreach ($this->relationArray as $key => $val) { + $relationModelFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}model{$this->DS}{$val['modelFilename']}.php"; + + // todo 判断关联模型文件是否存在, 存在就不重新生成文件, 防止关联模型文件被覆盖 + $relationModelClass = "\\app\\admin\\model\\{$val['modelFilename']}"; + if (class_exists($relationModelClass) && method_exists(new $relationModelClass, 'getName')) { + $tableName = (new $relationModelClass)->getName(); + if (CommonTool::humpToLine(lcfirst($tableName)) == CommonTool::humpToLine(lcfirst($key))) { + continue; + } + } + + $extendNamespaceArray = explode($this->DS, $val['modelFilename']); + $extendNamespace = null; + if (count($extendNamespaceArray) > 1) { + array_pop($extendNamespaceArray); + $extendNamespace = '\\' . implode('\\', $extendNamespaceArray); + } + + $relationModelValue = CommonTool::replaceTemplate( + $this->getTemplate("model{$this->DS}model"), + [ + 'modelName' => $val['modelName'], + 'modelNamespace' => "app\admin\model{$extendNamespace}", + 'prefix_table' => $this->tablePrefix == config('database.connections.mysql.prefix') ? "" : $this->tablePrefix . $this->table, + 'table' => $key, + 'deleteTime' => $val['delete'] ? '"delete_time"' : 'false', + 'relationList' => '', + 'selectList' => '', + 'selectArrays' => "[]", + ] + ); + $this->fileList[$relationModelFile] = $relationModelValue; + } + return $this; + } + + /** + * 初始化视图 + * @return $this + */ + protected function renderView(): static + { + // 列表页面 + $viewIndexFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}view{$this->DS}{$this->viewFilename}{$this->DS}index.html"; + $viewIndexValue = CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}index"), + [ + 'controllerUrl' => $this->controllerUrl, + 'notesScript' => $this->formatNotesScript(), + ] + ); + $this->fileList[$viewIndexFile] = $viewIndexValue; + + // 添加页面 + $viewAddFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}view{$this->DS}{$this->viewFilename}{$this->DS}add.html"; + $addFormList = ''; + foreach ($this->tableColumns as $field => $val) { + + if (in_array($field, ['id', 'create_time'])) { + continue; + } + + $templateFile = "view{$this->DS}module{$this->DS}input"; + $define = ''; + + // 根据formType去获取具体模板 + if ($val['formType'] == 'image') { + $templateFile = "view{$this->DS}module{$this->DS}image"; + } elseif ($val['formType'] == 'images') { + $templateFile = "view{$this->DS}module{$this->DS}images"; + $define = $val['define'] ?? '|'; + if (strlen($define) > 5) $define = '|'; + } elseif ($val['formType'] == 'file') { + $templateFile = "view{$this->DS}module{$this->DS}file"; + } elseif ($val['formType'] == 'files') { + $templateFile = "view{$this->DS}module{$this->DS}files"; + $define = $val['define'] ?? '|'; + } elseif ($val['formType'] == 'editor') { + $templateFile = "view{$this->DS}module{$this->DS}editor"; + $val['default'] = '""'; + } elseif ($val['formType'] == 'date') { + $templateFile = "view{$this->DS}module{$this->DS}date"; + $define = 'date'; + } elseif ($val['formType'] == 'datetime') { + $templateFile = "view{$this->DS}module{$this->DS}date"; + $define = 'datetime'; + } elseif ($val['formType'] == 'radio') { + $templateFile = "view{$this->DS}module{$this->DS}radio"; + if (!empty($val['define'])) { + $define = $this->buildRadioView($field, ''); + } + } elseif ($val['formType'] == 'checkbox') { + $templateFile = "view{$this->DS}module{$this->DS}checkbox"; + if (!empty($val['define'])) { + $define = $this->buildCheckboxView($field, ''); + } + } elseif ($val['formType'] == 'select') { + $templateFile = "view{$this->DS}module{$this->DS}select"; + if (isset($val['bindRelation'])) { + $define = $this->buildOptionView($field); + } elseif (!empty($val['define'])) { + $define = $this->buildOptionView($field); + } + } elseif ($field == 'remark' || $val['formType'] == 'textarea') { + $templateFile = "view{$this->DS}module{$this->DS}textarea"; + } elseif ($field == 'sort') { + $templateFile = "view{$this->DS}module{$this->DS}sort"; + } + $addFormList .= CommonTool::replaceTemplate( + $this->getTemplate($templateFile), + [ + 'comment' => $val['comment'], + 'field' => $field, + 'required' => $this->buildRequiredHtml($val['required']), + 'value' => $val['default'], + 'define' => $define, + ] + ); + } + $viewAddValue = CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}form"), + [ + 'formList' => $addFormList, + ] + ); + $this->fileList[$viewAddFile] = $viewAddValue; + + + // 编辑页面 + $viewEditFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}view{$this->DS}{$this->viewFilename}{$this->DS}edit.html"; + $editFormList = ''; + foreach ($this->tableColumns as $field => $val) { + + if (in_array($field, ['id', 'create_time'])) { + continue; + } + + $templateFile = "view{$this->DS}module{$this->DS}input"; + + $define = ''; + $value = '{$row.' . $field . '|default=\'\'}'; + + // 根据formType去获取具体模板 + if ($val['formType'] == 'image') { + $templateFile = "view{$this->DS}module{$this->DS}image"; + } elseif ($val['formType'] == 'images') { + $templateFile = "view{$this->DS}module{$this->DS}images"; + } elseif ($val['formType'] == 'file') { + $templateFile = "view{$this->DS}module{$this->DS}file"; + } elseif ($val['formType'] == 'files') { + $templateFile = "view{$this->DS}module{$this->DS}files"; + } elseif ($val['formType'] == 'editor') { + $templateFile = "view{$this->DS}module{$this->DS}editor"; + $value = '$row["' . $field . '"]'; + } elseif ($val['formType'] == 'date') { + $templateFile = "view{$this->DS}module{$this->DS}date"; + $define = 'date'; + } elseif ($val['formType'] == 'datetime') { + $templateFile = "view{$this->DS}module{$this->DS}date"; + $define = 'datetime'; + } elseif ($val['formType'] == 'radio') { + $templateFile = "view{$this->DS}module{$this->DS}radio"; + if (!empty($val['define'])) { + $define = $this->buildRadioView($field, '{if in_array($k, $row.' . $field . ')}checked{/if}'); + } + } elseif ($val['formType'] == 'checkbox') { + $templateFile = "view{$this->DS}module{$this->DS}checkbox"; + if (!empty($val['define'])) { + $define = $this->buildCheckboxView($field, '{if in_array($k, $row.' . $field . ')}checked{/if}'); + } + } elseif ($val['formType'] == 'select') { + $templateFile = "view{$this->DS}module{$this->DS}select"; + if (isset($val['bindRelation'])) { + $define = $this->buildOptionView($field, '{if $row.' . $field . '==$k}selected{/if}'); + } elseif (!empty($val['define'])) { + $define = $this->buildOptionView($field, '{if $row.' . $field . '==$k}selected{/if}'); + } + } elseif ($field == 'remark' || $val['formType'] == 'textarea') { + $templateFile = "view{$this->DS}module{$this->DS}textarea"; + $value = '{$row.' . $field . '|raw|default=\'\'}'; + } elseif ($field == 'sort') { + $templateFile = "view{$this->DS}module{$this->DS}sort"; + } + $editFormList .= CommonTool::replaceTemplate( + $this->getTemplate($templateFile), + [ + 'comment' => $val['comment'], + 'field' => $field, + 'required' => $this->buildRequiredHtml($val['required']), + 'value' => $value, + 'define' => $define, + ] + ); + } + $viewEditValue = CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}form"), + [ + 'formList' => $editFormList, + ] + ); + $this->fileList[$viewEditFile] = $viewEditValue; + + $viewRecycleFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}view{$this->DS}{$this->viewFilename}{$this->DS}recycle.html"; + $viewRecycleValue = CommonTool::replaceTemplate( + $this->getTemplate("view{$this->DS}recycle"), + [ + 'controllerUrl' => $this->controllerUrl, + 'notesScript' => $this->formatNotesScript(), + ] + ); + $this->fileList[$viewRecycleFile] = $viewRecycleValue; + return $this; + } + + /** + * 初始化JS + * @return $this + */ + protected function renderJs(): static + { + $jsFile = "{$this->rootDir}public{$this->DS}static{$this->DS}admin{$this->DS}js{$this->DS}{$this->jsFilename}.js"; + + $indexCols = " {type: 'checkbox'},\r"; + + // 主表字段 + foreach ($this->tableColumns as $field => $val) { + + if ($val['formType'] == 'image') { + $templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.image}"; + } elseif ($val['formType'] == 'datetime') { + $templateValue = "{field: '{$field}', search: 'range', title: '{$val['comment']}'}"; + } elseif ($val['formType'] == 'images') { + continue; + } elseif ($val['formType'] == 'file') { + $templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.url}"; + } elseif ($val['formType'] == 'files') { + continue; + } elseif ($val['formType'] == 'editor') { + continue; + } elseif (in_array($field, $this->switchFields)) { + if (!empty($val['define'])) { + $templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}', templet: ea.table.switch}"; + } else { + $templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.switch}"; + } + } elseif (in_array($val['formType'], ['select', 'checkbox', 'radio', 'switch'])) { + if (!empty($val['define'])) { + $templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}'}"; + } else { + $templateValue = "{field: '{$field}', title: '{$val['comment']}'}"; + } + } elseif ($field == 'remark') { + $templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.text}"; + } elseif (in_array($field, $this->sortFields)) { + $templateValue = "{field: '{$field}', title: '{$val['comment']}', edit: 'text'}"; + } else { + $templateValue = "{field: '{$field}', title: '{$val['comment']}'}"; + } + $indexCols .= $this->formatColsRow("{$templateValue},\r"); + } + + // 关联表 + foreach ($this->relationArray as $table => $tableVal) { + $table = CommonTool::humpToLine($table); + foreach ($tableVal['tableColumns'] as $field => $val) { + if ($val['formType'] == 'image') { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.image}"; + } elseif ($val['formType'] == 'images') { + continue; + } elseif ($val['formType'] == 'file') { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.url}"; + } elseif ($val['formType'] == 'files') { + continue; + } elseif ($val['formType'] == 'editor') { + continue; + } elseif ($val['formType'] == 'select') { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}"; + } elseif ($field == 'remark') { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.text}"; + } elseif (in_array($field, $this->switchFields)) { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.switch}"; + } elseif (in_array($field, $this->sortFields)) { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', edit: 'text'}"; + } else { + $templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}"; + } + + if ($templateValue) $indexCols .= $this->formatColsRow("{$templateValue},\r"); + } + } + + $recycleCols = $indexCols; + $indexCols .= $this->formatColsRow("{width: 250, title: '操作', templet: ea.table.tool},\r"); + + $jsValue = CommonTool::replaceTemplate( + $this->getTemplate("static{$this->DS}js"), + [ + 'controllerUrl' => $this->controllerUrl, + 'indexCols' => $indexCols, + 'recycleCols' => $recycleCols, + ] + ); + $this->fileList[$jsFile] = $jsValue; + return $this; + } + + /** + * 检测文件 + * @return $this + */ + protected function check(): static + { + // 是否强制性 + if ($this->force) { + return $this; + } + foreach ($this->fileList as $key => $val) { + if (is_file($key)) { + throw new FileException("文件已存在:{$key}"); + } + } + return $this; + } + + /** + * 开始生成 + * @return array + */ + public function create(): array + { + $this->check(); + foreach ($this->fileList as $key => $val) { + + // 判断文件夹是否存在,不存在就创建 + $fileArray = explode($this->DS, $key); + array_pop($fileArray); + $fileDir = implode($this->DS, $fileArray); + if (!is_dir($fileDir)) { + mkdir($fileDir, 0775, true); + } + + // 写入 + file_put_contents($key, $val); + } + return array_keys($this->fileList); + } + + /** + * 开始删除 + * @return array + */ + public function delete(): array + { + $deleteFile = []; + foreach ($this->fileList as $key => $val) { + if (is_file($key)) { + unlink($key); + $deleteFile[] = $key; + } + } + return $deleteFile; + } + + /** + * 检测字段后缀 + * @param $string + * @param $array + * @return bool + */ + protected function checkContain($string, $array): bool + { + foreach ($array as $vo) { + if (str_starts_with($vo, $string)) { + return true; + } + if (str_ends_with($vo, $string)) { + return true; + } + } + return false; + } + + /** + * 格式化表单行 + * @param $value + * @return string + */ + protected function formatColsRow($value): string + { + return " {$value}"; + } + + /** + * 获取对应的模板信息 + * @param $name + * @return false|string + */ + protected function getTemplate($name): bool|string + { + return file_get_contents("{$this->dir}{$this->DS}templates{$this->DS}{$name}.code"); + } + + /** + * 检测字段注释归类的类型 + * @param string $formType + * @return string|null + */ + protected function checkCommentFormType(string $formType = ''): ?string + { + $classProperties = get_class_vars(get_class($this)); + foreach ($classProperties as $property => $classProperty) { + if (empty($property)) continue; + if (str_ends_with($property, 'FieldSuffix')) { + if (in_array($formType, $this->$property)) { + return $this->$property[0] ?? ''; + } + } + } + return ''; + } + + + protected function formatNotesScript(): string + { + return ' let notes = JSON.parse(\'{$notes|json_encode=256|raw}\');'; + } +} diff --git a/app/admin/service/curd/exceptions/CurdException.php b/app/admin/service/curd/exceptions/CurdException.php new file mode 100644 index 0000000..fcd26e5 --- /dev/null +++ b/app/admin/service/curd/exceptions/CurdException.php @@ -0,0 +1,8 @@ +notes =$notes; + $this->assign(compact('notes')); + } + + {{indexMethod}} + +} \ No newline at end of file diff --git a/app/admin/service/curd/templates/controller/indexMethod.code b/app/admin/service/curd/templates/controller/indexMethod.code new file mode 100644 index 0000000..c51610d --- /dev/null +++ b/app/admin/service/curd/templates/controller/indexMethod.code @@ -0,0 +1,21 @@ + + #[NodeAnnotation(title: '列表', auth: true)] + public function index(\app\Request $request): \think\response\Json|string + { + if ($request->isAjax()) { + if (input('selectFields')) { + return $this->selectList(); + } + list($page, $limit, $where) = $this->buildTableParams(); + $count = self::$model::where($where)->{{relationIndexMethod}}->count(); + $list = self::$model::where($where)->{{relationIndexMethod}}->page($page, $limit)->order($this->sort)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } \ No newline at end of file diff --git a/app/admin/service/curd/templates/controller/select.code b/app/admin/service/curd/templates/controller/select.code new file mode 100644 index 0000000..ad29a0a --- /dev/null +++ b/app/admin/service/curd/templates/controller/select.code @@ -0,0 +1,2 @@ + + $this->assign('{{name}}', $this->model->{{name}}()); diff --git a/app/admin/service/curd/templates/model/model.code b/app/admin/service/curd/templates/model/model.code new file mode 100644 index 0000000..6054eb9 --- /dev/null +++ b/app/admin/service/curd/templates/model/model.code @@ -0,0 +1,23 @@ + "{{table}}", + 'table' => "{{prefix_table}}", + 'deleteTime' => {{deleteTime}}, + ]; + } + + public static array $notes = {{selectArrays}}; + + {{relationList}} + +} \ No newline at end of file diff --git a/app/admin/service/curd/templates/model/relation.code b/app/admin/service/curd/templates/model/relation.code new file mode 100644 index 0000000..993cdfe --- /dev/null +++ b/app/admin/service/curd/templates/model/relation.code @@ -0,0 +1,5 @@ + + public function {{relationMethod}}() + { + return $this->belongsTo({{relationModel}}, '{{foreignKey}}', '{{primaryKey}}'){{relationFields}}; + } diff --git a/app/admin/service/curd/templates/model/relationSelect.code b/app/admin/service/curd/templates/model/relationSelect.code new file mode 100644 index 0000000..60a45bf --- /dev/null +++ b/app/admin/service/curd/templates/model/relationSelect.code @@ -0,0 +1,5 @@ + + public function {{name}}() + { + return \app\admin\model\{{relation}}::column('{{values}}', 'id'); + } \ No newline at end of file diff --git a/app/admin/service/curd/templates/model/select.code b/app/admin/service/curd/templates/model/select.code new file mode 100644 index 0000000..847252e --- /dev/null +++ b/app/admin/service/curd/templates/model/select.code @@ -0,0 +1,5 @@ + + public function {{name}}() + { + return {{values}}; + } diff --git a/app/admin/service/curd/templates/static/js.code b/app/admin/service/curd/templates/static/js.code new file mode 100644 index 0000000..31b6604 --- /dev/null +++ b/app/admin/service/curd/templates/static/js.code @@ -0,0 +1,91 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: '{{controllerUrl}}/index', + add_url: '{{controllerUrl}}/add', + edit_url: '{{controllerUrl}}/edit', + delete_url: '{{controllerUrl}}/delete', + export_url: '{{controllerUrl}}/export', + modify_url: '{{controllerUrl}}/modify', + recycle_url: '{{controllerUrl}}/recycle', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + cols: [[ + {{indexCols}} + ]], + }); + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + }, + recycle: function () { + init.index_url = init.recycle_url; + ea.table.render({ + init: init, + toolbar: ['refresh', + [{ + class: 'layui-btn layui-btn-sm', + method: 'get', + field: 'id', + icon: 'fa fa-refresh', + text: '全部恢复', + title: '确定恢复?', + auth: 'recycle', + url: init.recycle_url + '?type=restore', + checkbox: true + }, { + class: 'layui-btn layui-btn-danger layui-btn-sm', + method: 'get', + field: 'id', + icon: 'fa fa-delete', + text: '彻底删除', + title: '确定彻底删除?', + auth: 'recycle', + url: init.recycle_url + '?type=delete', + checkbox: true + }], 'export', + ], + cols: [[ + {{recycleCols}} + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + [{ + title: '确认恢复?', + text: '恢复数据', + filed: 'id', + url: init.recycle_url + '?type=restore', + method: 'get', + auth: 'recycle', + class: 'layui-btn layui-btn-xs layui-btn-success', + }, { + title: '想好了吗?', + text: '彻底删除', + filed: 'id', + method: 'get', + url: init.recycle_url + '?type=delete', + auth: 'recycle', + class: 'layui-btn layui-btn-xs layui-btn-normal layui-bg-red', + }]] + } + ]], + }); + + ea.listen(); + }, + }; +}); \ No newline at end of file diff --git a/app/admin/service/curd/templates/view/form.code b/app/admin/service/curd/templates/view/form.code new file mode 100644 index 0000000..4ca1116 --- /dev/null +++ b/app/admin/service/curd/templates/view/form.code @@ -0,0 +1,10 @@ +
+
+ {{formList}} +
+
+ + +
+
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/index.code b/app/admin/service/curd/templates/view/index.code new file mode 100644 index 0000000..182bf41 --- /dev/null +++ b/app/admin/service/curd/templates/view/index.code @@ -0,0 +1,16 @@ +
+
+ + +
+
+
+ + \ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/checkbox.code b/app/admin/service/curd/templates/view/module/checkbox.code new file mode 100644 index 0000000..d9f1b1d --- /dev/null +++ b/app/admin/service/curd/templates/view/module/checkbox.code @@ -0,0 +1,7 @@ + +
+ +
+{{define}} +
+
diff --git a/app/admin/service/curd/templates/view/module/checkboxInput.code b/app/admin/service/curd/templates/view/module/checkboxInput.code new file mode 100644 index 0000000..3a3bddf --- /dev/null +++ b/app/admin/service/curd/templates/view/module/checkboxInput.code @@ -0,0 +1,3 @@ + {foreach ${{name}} as $k=>$v} + + {/foreach} \ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/date.code b/app/admin/service/curd/templates/view/module/date.code new file mode 100644 index 0000000..8458b4b --- /dev/null +++ b/app/admin/service/curd/templates/view/module/date.code @@ -0,0 +1,7 @@ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/editor.code b/app/admin/service/curd/templates/view/module/editor.code new file mode 100644 index 0000000..d58e2d5 --- /dev/null +++ b/app/admin/service/curd/templates/view/module/editor.code @@ -0,0 +1,8 @@ + +
+ +
+ {:editor_textarea({{value}},"{{field}}","{{comment}}")} + +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/file.code b/app/admin/service/curd/templates/view/module/file.code new file mode 100644 index 0000000..ddd903a --- /dev/null +++ b/app/admin/service/curd/templates/view/module/file.code @@ -0,0 +1,11 @@ + +
+ +
+ + +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/files.code b/app/admin/service/curd/templates/view/module/files.code new file mode 100644 index 0000000..fe65d0e --- /dev/null +++ b/app/admin/service/curd/templates/view/module/files.code @@ -0,0 +1,11 @@ + +
+ +
+ + +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/image.code b/app/admin/service/curd/templates/view/module/image.code new file mode 100644 index 0000000..ff6bee1 --- /dev/null +++ b/app/admin/service/curd/templates/view/module/image.code @@ -0,0 +1,11 @@ + +
+ +
+ + +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/images.code b/app/admin/service/curd/templates/view/module/images.code new file mode 100644 index 0000000..58329db --- /dev/null +++ b/app/admin/service/curd/templates/view/module/images.code @@ -0,0 +1,11 @@ + +
+ +
+ + +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/input.code b/app/admin/service/curd/templates/view/module/input.code new file mode 100644 index 0000000..7656fcd --- /dev/null +++ b/app/admin/service/curd/templates/view/module/input.code @@ -0,0 +1,7 @@ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/option.code b/app/admin/service/curd/templates/view/module/option.code new file mode 100644 index 0000000..7593045 --- /dev/null +++ b/app/admin/service/curd/templates/view/module/option.code @@ -0,0 +1,4 @@ + + {foreach ${{name}} as $k=>$v} + + {/foreach} \ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/radio.code b/app/admin/service/curd/templates/view/module/radio.code new file mode 100644 index 0000000..d9f1b1d --- /dev/null +++ b/app/admin/service/curd/templates/view/module/radio.code @@ -0,0 +1,7 @@ + +
+ +
+{{define}} +
+
diff --git a/app/admin/service/curd/templates/view/module/radioInput.code b/app/admin/service/curd/templates/view/module/radioInput.code new file mode 100644 index 0000000..1a033ec --- /dev/null +++ b/app/admin/service/curd/templates/view/module/radioInput.code @@ -0,0 +1,3 @@ + {foreach ${{name}} as $k=>$v} + + {/foreach} \ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/select.code b/app/admin/service/curd/templates/view/module/select.code new file mode 100644 index 0000000..c638a79 --- /dev/null +++ b/app/admin/service/curd/templates/view/module/select.code @@ -0,0 +1,9 @@ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/sort.code b/app/admin/service/curd/templates/view/module/sort.code new file mode 100644 index 0000000..1c315f3 --- /dev/null +++ b/app/admin/service/curd/templates/view/module/sort.code @@ -0,0 +1,7 @@ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/module/textarea.code b/app/admin/service/curd/templates/view/module/textarea.code new file mode 100644 index 0000000..c7bc984 --- /dev/null +++ b/app/admin/service/curd/templates/view/module/textarea.code @@ -0,0 +1,7 @@ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/service/curd/templates/view/recycle.code b/app/admin/service/curd/templates/view/recycle.code new file mode 100644 index 0000000..e827fac --- /dev/null +++ b/app/admin/service/curd/templates/view/recycle.code @@ -0,0 +1,13 @@ +
+
+ + +
+
+
+ + \ No newline at end of file diff --git a/app/admin/service/tool/CommonTool.php b/app/admin/service/tool/CommonTool.php new file mode 100644 index 0000000..61d4aa5 --- /dev/null +++ b/app/admin/service/tool/CommonTool.php @@ -0,0 +1,108 @@ + $val) { + if (is_null($val)) $val = ''; + $string = str_replace("{{" . $key . "}}", $val, $string); + } + return $string; + } + + + public static function replaceArrayString(?string $arrayString): string + { + $arrayString = str_replace('array (', '[', $arrayString); + $arrayString = str_replace(')', ']', $arrayString); + $arrayString = str_replace('=> + [', '=> [', $arrayString); + return $arrayString; + } + +} \ No newline at end of file diff --git a/app/admin/traits/Curd.php b/app/admin/traits/Curd.php new file mode 100644 index 0000000..ba7789c --- /dev/null +++ b/app/admin/traits/Curd.php @@ -0,0 +1,203 @@ +isAjax()) { + if (input('selectFields')) { + return $this->selectList(); + } + list($page, $limit, $where) = $this->buildTableParams(); + $count = self::$model::where($where)->count(); + $list = self::$model::where($where)->page($page, $limit)->order($this->sort)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + return json($data); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '添加', auth: true)] + public function add(Request $request): string + { + if ($request->isPost()) { + $post = $request->post(); + $rule = []; + $this->validate($post, $rule); + try { + Db::transaction(function() use ($post, &$save) { + $save = self::$model::create($post); + }); + }catch (\Exception $e) { + $this->error('新增失败:' . $e->getMessage()); + } + $save ? $this->success('新增成功') : $this->error('新增失败'); + } + return $this->fetch(); + } + + #[NodeAnnotation(title: '编辑', auth: true)] + public function edit(Request $request, $id = 0): string + { + $row = self::$model::find($id); + empty($row) && $this->error('数据不存在'); + if ($request->isPost()) { + $post = $request->post(); + $rule = []; + $this->validate($post, $rule); + try { + Db::transaction(function() use ($post, $row, &$save) { + $save = $row->save($post); + }); + }catch (\Exception $e) { + $this->error('保存失败'); + } + $save ? $this->success('保存成功') : $this->error('保存失败'); + } + $this->assign('row', $row); + return $this->fetch(); + } + + #[NodeAnnotation(title: '删除', auth: true)] + public function delete(Request $request): void + { + // 如果不是id作为主键 请在对应的控制器中覆盖重写 + $id = $request->param('id', []); + $this->checkPostRequest(); + $row = self::$model::whereIn('id', $id)->select(); + $row->isEmpty() && $this->error('数据不存在'); + try { + $save = $row->delete(); + }catch (\Exception $e) { + $this->error('删除失败'); + } + $save ? $this->success('删除成功') : $this->error('删除失败'); + } + + #[NodeAnnotation(title: '导出', auth: true)] + public function export() + { + if (env('EASYADMIN.IS_DEMO', false)) { + $this->error('演示环境下不允许操作'); + } + list($page, $limit, $where) = $this->buildTableParams(); + $tableName = (new self::$model)->getName(); + $tableName = CommonTool::humpToLine(lcfirst($tableName)); + $prefix = config('database.connections.mysql.prefix'); + $dbList = Db::query("show full columns from {$prefix}{$tableName}"); + $header = []; + foreach ($dbList as $vo) { + $comment = !empty($vo['Comment']) ? $vo['Comment'] : $vo['Field']; + if (!in_array($vo['Field'], $this->noExportFields)) { + $header[] = [$comment, $vo['Field']]; + } + } + $list = self::$model::where($where) + ->limit(100000) + ->order($this->sort) + ->select() + ->toArray(); + try { + exportExcel($header, $list); + }catch (\Throwable $exception) { + $this->error('导出失败: ' . $exception->getMessage() . PHP_EOL . $exception->getFile() . PHP_EOL . $exception->getLine()); + } + } + + #[NodeAnnotation(title: '属性修改', auth: true)] + public function modify(Request $request): void + { + $this->checkPostRequest(); + $post = $request->post(); + $rule = [ + 'id|ID' => 'require', + 'field|字段' => 'require', + 'value|值' => 'require', + ]; + $this->validate($post, $rule); + $row = self::$model::find($post['id']); + if (!$row) { + $this->error('数据不存在'); + } + if (!in_array($post['field'], $this->allowModifyFields)) { + $this->error('该字段不允许修改:' . $post['field']); + } + try { + Db::transaction(function() use ($post, $row) { + $row->save([ + $post['field'] => $post['value'], + ]); + }); + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + $this->success('保存成功'); + } + + #[NodeAnnotation(title: '回收站', auth: true)] + public function recycle(Request $request): Json|string + { + if (!$request->isAjax()) { + return $this->fetch(); + } + $id = $request->param('id', []); + $type = $request->param('type', ''); + $deleteTimeField = (new self::$model)->getOption('deleteTime'); // 获取软删除字段 + $defaultErrorMsg = 'Model 中未设置软删除 deleteTime 对应字段 或 数据表中不存在该字段'; + if (!$deleteTimeField) $this->success($defaultErrorMsg); + switch ($type) { + case 'restore': + self::$model::withTrashed()->whereIn('id', $id)->strict(false)->update([$deleteTimeField => null, 'update_time' => time()]); + $this->success('success'); + break; + case 'delete': + self::$model::destroy($id, true); + $this->success('success'); + break; + default: + list($page, $limit, $where) = $this->buildTableParams(); + try { + $count = self::$model::withTrashed()->where($where)->whereNotNull($deleteTimeField)->count(); + $list = self::$model::withTrashed()->where($where)->page($page, $limit)->order($this->sort)->whereNotNull($deleteTimeField)->select()->toArray(); + $data = [ + 'code' => 0, + 'msg' => '', + 'count' => $count, + 'data' => $list, + ]; + } catch (\Throwable $e) { + $error = $e->getMessage(); + if ($e instanceof PDOException) $error .= '
' . $defaultErrorMsg; + $data = [ + 'code' => -1, + 'msg' => $error, + 'count' => 0, + 'data' => [], + ]; + } + return json($data); + } + + } +} diff --git a/app/admin/view/article/article/add.html b/app/admin/view/article/article/add.html new file mode 100644 index 0000000..47b166c --- /dev/null +++ b/app/admin/view/article/article/add.html @@ -0,0 +1,73 @@ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+
+ + +
+ +
+
\ No newline at end of file diff --git a/app/admin/view/article/article/edit.html b/app/admin/view/article/article/edit.html new file mode 100644 index 0000000..f1d158e --- /dev/null +++ b/app/admin/view/article/article/edit.html @@ -0,0 +1,71 @@ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+
+ + +
+ +
+
\ No newline at end of file diff --git a/app/admin/view/article/article/index.html b/app/admin/view/article/article/index.html new file mode 100644 index 0000000..326005b --- /dev/null +++ b/app/admin/view/article/article/index.html @@ -0,0 +1,10 @@ +
+
+ +
+
+
\ No newline at end of file diff --git a/app/admin/view/article/cate/add.html b/app/admin/view/article/cate/add.html new file mode 100644 index 0000000..c020ab7 --- /dev/null +++ b/app/admin/view/article/cate/add.html @@ -0,0 +1,33 @@ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+
+ + +
+ +
+
\ No newline at end of file diff --git a/app/admin/view/article/cate/edit.html b/app/admin/view/article/cate/edit.html new file mode 100644 index 0000000..fbbc806 --- /dev/null +++ b/app/admin/view/article/cate/edit.html @@ -0,0 +1,33 @@ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+
+ + +
+ +
+
\ No newline at end of file diff --git a/app/admin/view/article/cate/index.html b/app/admin/view/article/cate/index.html new file mode 100644 index 0000000..54188a5 --- /dev/null +++ b/app/admin/view/article/cate/index.html @@ -0,0 +1,10 @@ +
+
+ +
+
+
\ No newline at end of file diff --git a/app/admin/view/index/edit_admin.html b/app/admin/view/index/edit_admin.html new file mode 100644 index 0000000..ed8a086 --- /dev/null +++ b/app/admin/view/index/edit_admin.html @@ -0,0 +1,58 @@ +
+
+ +
+ +
+ +
+ + +
+
+ +
+ +
+ + 填写登录账户。 +
+
+ +
+ +
+ + 填写用户手机。 +
+
+ +
+ +
+ {foreach notes.login_type as $key=>$val} + + {/foreach} +
+
+ +
+ +
+ +
+
+ +
+
+ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/view/index/edit_password.html b/app/admin/view/index/edit_password.html new file mode 100644 index 0000000..ba4c7b2 --- /dev/null +++ b/app/admin/view/index/edit_password.html @@ -0,0 +1,38 @@ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ + 填写登录密码。 +
+
+ +
+ +
+ + 填写再次登录密码。 +
+
+ +
+
+ + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/admin/view/index/index.html b/app/admin/view/index/index.html new file mode 100644 index 0000000..b284b29 --- /dev/null +++ b/app/admin/view/index/index.html @@ -0,0 +1,120 @@ + + + +
+
+ +
+ + +
+ +
+
+ + +
    +
+ + + + + +
+
+ + +
+
+ + +
+
+
+ + +
+ + +
+ +
+
+
    +
  • +
+
+
  • +
  • +
  • + +
  • +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/app/admin/view/index/set2fa.html b/app/admin/view/index/set2fa.html new file mode 100644 index 0000000..7ad9b4e --- /dev/null +++ b/app/admin/view/index/set2fa.html @@ -0,0 +1,45 @@ +
    +
    + {if $old_secret} +
    +
    提示
    +
    + 当前账号已经绑定过了 谷歌验证码 ,如果重新保存将替换 +
    +
    + {/if} +
    + +
    + +
    +
    + +
    + +
    + 二维码 +
    + 使用  + 2FAS +  或者  + Google Authenticator +  APP 扫描二维码 后 输入验证码 进行绑定 +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/index/welcome.html b/app/admin/view/index/welcome.html new file mode 100644 index 0000000..8e0cc03 --- /dev/null +++ b/app/admin/view/index/welcome.html @@ -0,0 +1,40 @@ + +
    +
    +
    +
    +
    +
    +
    +
    数据统计
    +
    +
    +
    + + {volist name="data" id="vo"} +
    +
    +
    +
    + 实时 +
    {$vo.title}
    +
    +
    +

    {$vo.data}

    + 当前分类总记录数 +
    +
    +
    +
    + {/volist} +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/admin/view/layout/default.html b/app/admin/view/layout/default.html new file mode 100644 index 0000000..d6572ab --- /dev/null +++ b/app/admin/view/layout/default.html @@ -0,0 +1,41 @@ + + + + + {:sysConfig('site','site_name')} + + + + + + + + + + + + + {include file="layout/editor" /} + + + +{__CONTENT__} + + + \ No newline at end of file diff --git a/app/admin/view/layout/editor.html b/app/admin/view/layout/editor.html new file mode 100644 index 0000000..f553f5d --- /dev/null +++ b/app/admin/view/layout/editor.html @@ -0,0 +1,27 @@ + {switch $adminEditor} + {case ckeditor} + + + {/case} + + {case wangEditor} + + + + {/case} + + + {case EasyMDE} + + + + {/case} + + {default /} + + + + + + + {/switch} diff --git a/app/admin/view/login/index.html b/app/admin/view/login/index.html new file mode 100644 index 0000000..fb494e0 --- /dev/null +++ b/app/admin/view/login/index.html @@ -0,0 +1,55 @@ + +
    +
    + +
    + +
    + \ No newline at end of file diff --git a/app/admin/view/mall/blackip/edit.html b/app/admin/view/mall/blackip/edit.html new file mode 100644 index 0000000..5093af2 --- /dev/null +++ b/app/admin/view/mall/blackip/edit.html @@ -0,0 +1,56 @@ +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + +
    + {:editor_textarea($row["describe"],'describe')} +
    +
    +
    +
    + +
    +
    + + +
    + + + \ No newline at end of file diff --git a/app/admin/view/mall/blackip/index.html b/app/admin/view/mall/blackip/index.html new file mode 100644 index 0000000..30518aa --- /dev/null +++ b/app/admin/view/mall/blackip/index.html @@ -0,0 +1,12 @@ +
    +
    + +
    +
    +
    diff --git a/app/admin/view/mall/cate/add.html b/app/admin/view/mall/cate/add.html new file mode 100644 index 0000000..eaea3b4 --- /dev/null +++ b/app/admin/view/mall/cate/add.html @@ -0,0 +1,43 @@ +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/mall/cate/edit.html b/app/admin/view/mall/cate/edit.html new file mode 100644 index 0000000..4c35f5a --- /dev/null +++ b/app/admin/view/mall/cate/edit.html @@ -0,0 +1,43 @@ +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    +
    diff --git a/app/admin/view/mall/cate/index.html b/app/admin/view/mall/cate/index.html new file mode 100644 index 0000000..a8a183d --- /dev/null +++ b/app/admin/view/mall/cate/index.html @@ -0,0 +1,10 @@ +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/admin/view/mall/goods/add.html b/app/admin/view/mall/goods/add.html new file mode 100644 index 0000000..f3da146 --- /dev/null +++ b/app/admin/view/mall/goods/add.html @@ -0,0 +1,131 @@ +
    +
    + +
    +
    + +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + + +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + +
    + {:editor_textarea('','describe')} +
    +
    +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/mall/goods/edit.html b/app/admin/view/mall/goods/edit.html new file mode 100644 index 0000000..7039a9a --- /dev/null +++ b/app/admin/view/mall/goods/edit.html @@ -0,0 +1,132 @@ +
    +
    + +
    +
    + +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + + +
    + +
    + + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + + +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + +
    + {:editor_textarea($row["describe"],'describe')} +
    +
    +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/mall/goods/index.html b/app/admin/view/mall/goods/index.html new file mode 100644 index 0000000..fe02941 --- /dev/null +++ b/app/admin/view/mall/goods/index.html @@ -0,0 +1,15 @@ +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/app/admin/view/mall/goods/recycle.html b/app/admin/view/mall/goods/recycle.html new file mode 100644 index 0000000..29b8573 --- /dev/null +++ b/app/admin/view/mall/goods/recycle.html @@ -0,0 +1,11 @@ +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/app/admin/view/mall/goods/stock.html b/app/admin/view/mall/goods/stock.html new file mode 100644 index 0000000..2f42cde --- /dev/null +++ b/app/admin/view/mall/goods/stock.html @@ -0,0 +1,39 @@ +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/mall/order/edit.html b/app/admin/view/mall/order/edit.html new file mode 100644 index 0000000..95bd9ed --- /dev/null +++ b/app/admin/view/mall/order/edit.html @@ -0,0 +1,56 @@ +
    +
    + +
    + + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    + + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/mall/order/index.html b/app/admin/view/mall/order/index.html new file mode 100644 index 0000000..26f9135 --- /dev/null +++ b/app/admin/view/mall/order/index.html @@ -0,0 +1,12 @@ +
    +
    + +
    +
    +
    diff --git a/app/admin/view/system/admin/add.html b/app/admin/view/system/admin/add.html new file mode 100644 index 0000000..ba5221a --- /dev/null +++ b/app/admin/view/system/admin/add.html @@ -0,0 +1,61 @@ +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + + 填写登录账户。 +
    +
    +
    + +
    + + 为空默认 123456 +
    +
    + +
    + +
    + + 填写用户手机。 +
    +
    + +
    + +
    + {foreach auth_list as $key=>$val} + + {/foreach} +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/system/admin/edit.html b/app/admin/view/system/admin/edit.html new file mode 100644 index 0000000..9697c83 --- /dev/null +++ b/app/admin/view/system/admin/edit.html @@ -0,0 +1,54 @@ +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + + 填写登录账户。 +
    +
    + +
    + +
    + + 填写用户手机。 +
    +
    + +
    + +
    + {foreach auth_list as $key=>$val} + + {/foreach} +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    +
    diff --git a/app/admin/view/system/admin/index.html b/app/admin/view/system/admin/index.html new file mode 100644 index 0000000..c9fbf88 --- /dev/null +++ b/app/admin/view/system/admin/index.html @@ -0,0 +1,36 @@ +
    +
    + +
    +
    +
    +

    角色列表

    +
      +
    • +
      全部
      +
    • + {volist name="auth_list" id="vo"} +
    • +
      {$vo}
      +
    • + {/volist} +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + + \ No newline at end of file diff --git a/app/admin/view/system/admin/password.html b/app/admin/view/system/admin/password.html new file mode 100644 index 0000000..165c92f --- /dev/null +++ b/app/admin/view/system/admin/password.html @@ -0,0 +1,34 @@ +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + + 填写登录密码。 +
    +
    + +
    + +
    + + 填写再次登录密码。 +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/system/auth/add.html b/app/admin/view/system/auth/add.html new file mode 100644 index 0000000..5bba4ef --- /dev/null +++ b/app/admin/view/system/auth/add.html @@ -0,0 +1,26 @@ +
    +
    + +
    + +
    + + 填写权限名称。 +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    + +
    +
    \ No newline at end of file diff --git a/app/admin/view/system/auth/authorize.html b/app/admin/view/system/auth/authorize.html new file mode 100644 index 0000000..6f276fc --- /dev/null +++ b/app/admin/view/system/auth/authorize.html @@ -0,0 +1,34 @@ + + + + + + +
    + +
    + +
    + +
    + +
    +
    + +
    + +
    +
      +
      +
      + + + +
      +
      + + +
      + +
      +
      diff --git a/app/admin/view/system/auth/edit.html b/app/admin/view/system/auth/edit.html new file mode 100644 index 0000000..27c96d1 --- /dev/null +++ b/app/admin/view/system/auth/edit.html @@ -0,0 +1,26 @@ +
      +
      + +
      + +
      + + 填写权限名称。 +
      +
      + +
      + +
      + +
      +
      + +
      +
      + + +
      + +
      +
      diff --git a/app/admin/view/system/auth/index.html b/app/admin/view/system/auth/index.html new file mode 100644 index 0000000..177284c --- /dev/null +++ b/app/admin/view/system/auth/index.html @@ -0,0 +1,11 @@ +
      +
      + +
      +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/config/index.html b/app/admin/view/system/config/index.html new file mode 100644 index 0000000..a284870 --- /dev/null +++ b/app/admin/view/system/config/index.html @@ -0,0 +1,18 @@ +
      +
      + +
      +
        +
      • 网站设置
      • +
      • LOGO配置
      • +
      • 上传配置
      • +
      +
      +
      {include file="system/config/site" /}
      +
      {include file="system/config/logo" /}
      +
      {include file="system/config/upload" /}
      +
      +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/config/logo.html b/app/admin/view/system/config/logo.html new file mode 100644 index 0000000..874c8ab --- /dev/null +++ b/app/admin/view/system/config/logo.html @@ -0,0 +1,28 @@ +
      + +
      + +
      + + 填写站点名称。 +
      +
      + +
      + +
      + + +
      +
      + +
      +
      + + +
      + +
      \ No newline at end of file diff --git a/app/admin/view/system/config/site.html b/app/admin/view/system/config/site.html new file mode 100644 index 0000000..8676c83 --- /dev/null +++ b/app/admin/view/system/config/site.html @@ -0,0 +1,54 @@ +
      + +
      + +
      + + 填写站点名称。 +
      +
      + +
      + +
      + + +
      +
      + +
      + +
      + + +
      +
      + +
      + +
      + + 最小订单金额。 +
      +
      + +
      + +
      + + 最大订单金额。 +
      +
      +
      +
      + + +
      + +
      \ No newline at end of file diff --git a/app/admin/view/system/config/upload.html b/app/admin/view/system/config/upload.html new file mode 100644 index 0000000..0e2f2e7 --- /dev/null +++ b/app/admin/view/system/config/upload.html @@ -0,0 +1,140 @@ +
      +
      + +
      + {foreach $upload_types as $key=>$val} + + {/foreach} +
      +
      + +
      + +
      + + 英文逗号做分隔符。 +
      +
      + +
      + +
      + + 设置允许上传大小。 +
      +
      + +
      + +
      + + 例子:FSGGshu64642THSk +
      +
      + +
      + +
      + + 例子:5fsfPReYKkFSGGshu64642THSkmTInaIm +
      +
      + +
      + +
      + + 例子:https://oss-cn-shenzhen.aliyuncs.com +
      +
      + +
      + +
      + + 例子:easy-admin +
      +
      + +
      + +
      + + 例子:easy-admin.oss-cn-shenzhen.aliyuncs.com +
      +
      + +
      + +
      + + 例子:AKIDta6OQCbALQGrCI6ngKwQffR3dfsfrwrfs +
      +
      + +
      + +
      + + 例子:VllEWYKtClAbpqfFdTqysXxGQM6dsfs +
      +
      + +
      + +
      + + 例子:ap-guangzhou +
      +
      + +
      + +
      + + 例子:easyadmin-1251997243 +
      +
      + +
      + +
      + + 例子:v-lV3tXev7yyfsfa1jRc6_8rFOhFYGQvvjsAQxdrB +
      +
      + +
      + +
      + + 例子:XOhYRR9JNqxsWVEO-mHWB4193vfsfsQADuORaXzr +
      +
      + +
      + +
      + + 例子:easyadmin +
      +
      + +
      + +
      + + 例子:http://q0xqzappp.bkt.clouddn.com +
      +
      + +
      +
      + + +
      + +
      + \ No newline at end of file diff --git a/app/admin/view/system/curd_generate/index.html b/app/admin/view/system/curd_generate/index.html new file mode 100644 index 0000000..9005eae --- /dev/null +++ b/app/admin/view/system/curd_generate/index.html @@ -0,0 +1,119 @@ + +
      +
      + +
      +
        +
      • 视图生成
      • +
      • 命令生成
      • +
      +
      +
      +
      + +
      + +
      + +
      + + 可为空,为空则不带前缀 +
      +
      +
      + +
      + + 数据库表名字 不包含数据库表前缀。 +
      +
      + +
      +
      + +
      + +
      + +
      + +
      +
      + 数据表: +
      +
      +
      + 设置忽略字段 +
      +
      +
      +
      +
      + 设置下拉字段 +
      +
      +
      +
      +
      + 设置单选字段 +
      +
      +
      +
      +
      + 设置多选字段 +
      +
      +
      +
      +
      + 设置单选图片字段 +
      +
      +
      +
      +
      + 设置多选图片字段 +
      +
      +
      +
      +
      + 设置日期(Y-m-d)字段 +
      +
      +
      +
      +
      + 设置日期时间(Y-m-d H:i:s)字段 +
      +
      +
      +
      +
      + 设置编辑器字段 +
      +
      +
      +
      +
      +
      +
      + + +
      +
      还未生成任何文件
      +
      +
      +
      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/log/delete_month_log.html b/app/admin/view/system/log/delete_month_log.html new file mode 100644 index 0000000..6935c28 --- /dev/null +++ b/app/admin/view/system/log/delete_month_log.html @@ -0,0 +1,23 @@ +
      + +
      + +
      + +
      +
      删除
      + +
      个月前的日志
      +
      + +
      + +
      +
      + +
      +
      + +
      \ No newline at end of file diff --git a/app/admin/view/system/log/index.html b/app/admin/view/system/log/index.html new file mode 100644 index 0000000..4ded481 --- /dev/null +++ b/app/admin/view/system/log/index.html @@ -0,0 +1,9 @@ +
      +
      + +
      +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/menu/add.html b/app/admin/view/system/menu/add.html new file mode 100644 index 0000000..128209f --- /dev/null +++ b/app/admin/view/system/menu/add.html @@ -0,0 +1,75 @@ + + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + + 填写菜单名称。 +
      +
      + +
      + +
      + + 填写菜单链接。 +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + {foreach ['_self','_blank','_parent','_top'] as $vo} + + {/foreach} +
      +
      + +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      + +
      +
      + + +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/menu/edit.html b/app/admin/view/system/menu/edit.html new file mode 100644 index 0000000..ba3afb1 --- /dev/null +++ b/app/admin/view/system/menu/edit.html @@ -0,0 +1,75 @@ + + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + + 填写菜单名称。 +
      +
      + +
      + +
      + + 填写菜单链接。 +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + {foreach ['_self','_blank','_parent','_top'] as $vo} + + {/foreach} +
      +
      + +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      + +
      +
      + + +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/menu/index.html b/app/admin/view/system/menu/index.html new file mode 100644 index 0000000..4cf7bad --- /dev/null +++ b/app/admin/view/system/menu/index.html @@ -0,0 +1,24 @@ + + +
      +
      + +
      +
      +
      + diff --git a/app/admin/view/system/node/index.html b/app/admin/view/system/node/index.html new file mode 100644 index 0000000..e264b14 --- /dev/null +++ b/app/admin/view/system/node/index.html @@ -0,0 +1,9 @@ +
      +
      + +
      +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/quick/add.html b/app/admin/view/system/quick/add.html new file mode 100644 index 0000000..e5e8c70 --- /dev/null +++ b/app/admin/view/system/quick/add.html @@ -0,0 +1,52 @@ + + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      +
      + + +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/quick/edit.html b/app/admin/view/system/quick/edit.html new file mode 100644 index 0000000..716f857 --- /dev/null +++ b/app/admin/view/system/quick/edit.html @@ -0,0 +1,52 @@ + + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      +
      + + +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/quick/index.html b/app/admin/view/system/quick/index.html new file mode 100644 index 0000000..a4798f5 --- /dev/null +++ b/app/admin/view/system/quick/index.html @@ -0,0 +1,10 @@ +
      +
      + +
      +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/uploadfile/add.html b/app/admin/view/system/uploadfile/add.html new file mode 100644 index 0000000..b4d51c0 --- /dev/null +++ b/app/admin/view/system/uploadfile/add.html @@ -0,0 +1,15 @@ +
      +
      + +
      + +
      + + +
      +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/uploadfile/edit.html b/app/admin/view/system/uploadfile/edit.html new file mode 100644 index 0000000..6d60ace --- /dev/null +++ b/app/admin/view/system/uploadfile/edit.html @@ -0,0 +1,54 @@ +
      +
      + +
      + + +
      + +
      + +
      + + 填写登录账户。 +
      +
      + +
      + +
      + + 填写用户手机。 +
      +
      + +
      + +
      + {foreach auth_list as $key=>$val} + + {/foreach} +
      +
      + +
      + +
      + +
      +
      + +
      +
      + + +
      + +
      +
      \ No newline at end of file diff --git a/app/admin/view/system/uploadfile/index.html b/app/admin/view/system/uploadfile/index.html new file mode 100644 index 0000000..7e4d221 --- /dev/null +++ b/app/admin/view/system/uploadfile/index.html @@ -0,0 +1,13 @@ +
      +
      + +
      +
      +
      + \ No newline at end of file diff --git a/app/common.php b/app/common.php new file mode 100644 index 0000000..03b1072 --- /dev/null +++ b/app/common.php @@ -0,0 +1,164 @@ +build(); + } +} + +if (!function_exists('password')) { + + /** + * 密码加密算法 + * @param $value + * @return string + */ + function password($value): string + { + $value = sha1('blog_') . md5($value) . md5('_encrypt') . sha1($value); + return sha1($value); + } + +} + + +if (!function_exists('sysConfig')) { + + /** + * 获取系统配置信息 + * @param $group + * @param $name + * @return mixed + */ + function sysConfig($group, $name = null): mixed + { + $where = ['group' => $group]; + $value = empty($name) ? Cache::get("sysConfig_{$group}") : Cache::get("sysConfig_{$group}_{$name}"); + if (empty($value)) { + if (!empty($name)) { + $where['name'] = $name; + $value = \app\admin\model\SystemConfig::where($where)->value('value'); + if (!empty($value) || $value >= 0) Cache::tag('sysConfig')->set("sysConfig_{$group}_{$name}", $value, 3600); + } else { + $value = \app\admin\model\SystemConfig::where($where)->column('value', 'name'); + if (!empty($value) || $value >= 0) Cache::tag('sysConfig')->set("sysConfig_{$group}", $value, 3600); + } + } + return $value; + } +} + +if (!function_exists('array_format_key')) { + + /** + * 二位数组重新组合数据 + * @param $array + * @param $key + * @return array + */ + function array_format_key($array, $key): array + { + $newArray = []; + foreach ($array as $vo) { + $newArray[$vo[$key]] = $vo; + } + return $newArray; + } + +} + +if (!function_exists('auth')) { + + /** + * auth权限验证 + * @param $node + * @return bool + * @throws DataNotFoundException + * @throws DbException + * @throws ModelNotFoundException + */ + function auth($node = null): bool + { + $authService = new AuthService(session('admin.id')); + return $authService->checkNode($node); + } +} + +/** + * @param string|null $detail + * @param string $name + * @param string $placeholder + * @return string + */ +function editor_textarea(?string $detail, string $name = 'desc', string $placeholder = '请输入'): string +{ + $editor_type = sysConfig('site', 'editor_type'); + return match ($editor_type) { + 'ckeditor' => "", + 'ueditor' => "", + 'EasyMDE' => "", + default => "
      ", + }; +} + +/** + * @desc 导出excel + * @tip 追求性能请使用 xlsWriter https://xlswriter-docs.viest.me/zh-cn + * @param array $header + * @param array $list + * @param string $fileName + * @return void + * @throws Exception + */ +function exportExcel(array $header = [], array $list = [], string $fileName = ''): void +{ + if (empty($fileName)) $fileName = time(); + if (empty($header) || empty($list)) throw new \Exception('导出数据不能为空'); + $spreadsheet = new Spreadsheet(); + $sheet = $spreadsheet->getActiveSheet(); + $headers = array_column($header, 0) ?? array_keys($list[0]); + $sheet->fromArray([$headers], null, 'A1'); + $rowIndex = 2; + foreach ($list as $row) { + $rowData = []; + foreach ($header as $item) { + $value = $row[$item[1]] ?? ''; + if ($value === null) { + $rowData[] = ''; + continue; + } + $rowData[] = $value; + } + $sheet->fromArray([$rowData], null, "A{$rowIndex}"); + $rowIndex++; + } + foreach (range('A', $sheet->getHighestColumn()) as $col) { + $sheet->getColumnDimension($col)->setAutoSize(true); + } + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $fileName . '.xlsx"'); + header('Cache-Control: max-age=0'); + $writer = new Xlsx($spreadsheet); + $writer->save('php://output'); + die(); +} \ No newline at end of file diff --git a/app/common/command/Curd.php b/app/common/command/Curd.php new file mode 100644 index 0000000..ffea9b2 --- /dev/null +++ b/app/common/command/Curd.php @@ -0,0 +1,187 @@ +setName('curd') + ->addOption('table', 't', Option::VALUE_REQUIRED, '主表名', null) + ->addOption('controllerFilename', 'c', Option::VALUE_REQUIRED, '控制器文件名', null) + ->addOption('modelFilename', 'm', Option::VALUE_REQUIRED, '主表模型文件名', null) + # + ->addOption('checkboxFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '复选框字段后缀', null) + ->addOption('radioFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '单选框字段后缀', null) + ->addOption('imageFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '单图片字段后缀', null) + ->addOption('imagesFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '多图片字段后缀', null) + ->addOption('fileFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '单文件字段后缀', null) + ->addOption('filesFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '多文件字段后缀', null) + ->addOption('dateFieldSuffix', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '时间字段后缀', null) + ->addOption('switchFields', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '开关的字段', null) + ->addOption('selectFields', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '下拉的字段', null) + ->addOption('editorFields', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '富文本的字段', null) + ->addOption('sortFields', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '排序的字段', null) + ->addOption('ignoreFields', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '忽略的字段', null) + # + ->addOption('relationTable', 'r', Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '关联表名', null) + ->addOption('foreignKey', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '关联外键', null) + ->addOption('primaryKey', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '关联主键', null) + ->addOption('relationModelFilename', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '关联模型文件名', null) + ->addOption('relationOnlyFields', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '关联模型中只显示的字段', null) + ->addOption('relationBindSelect', null, Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY, '关联模型中的字段用于主表外键的表单下拉选择', null) + # + ->addOption('force', 'f', Option::VALUE_REQUIRED, '强制覆盖模式', 0) + ->addOption('delete', 'd', Option::VALUE_REQUIRED, '删除模式', 0) + ->setDescription('一键curd命令服务'); + } + + protected function execute(Input $input, Output $output) + { + + $table = $input->getOption('table'); + $controllerFilename = $input->getOption('controllerFilename'); + $modelFilename = $input->getOption('modelFilename'); + + $checkboxFieldSuffix = $input->getOption('checkboxFieldSuffix'); + $radioFieldSuffix = $input->getOption('radioFieldSuffix'); + $imageFieldSuffix = $input->getOption('imageFieldSuffix'); + $imagesFieldSuffix = $input->getOption('imagesFieldSuffix'); + $fileFieldSuffix = $input->getOption('fileFieldSuffix'); + $filesFieldSuffix = $input->getOption('filesFieldSuffix'); + $dateFieldSuffix = $input->getOption('dateFieldSuffix'); + $switchFields = $input->getOption('switchFields'); + $selectFields = $input->getOption('selectFields'); + $sortFields = $input->getOption('sortFields'); + $ignoreFields = $input->getOption('ignoreFields'); + + $relationTable = $input->getOption('relationTable'); + $foreignKey = $input->getOption('foreignKey'); + $primaryKey = $input->getOption('primaryKey'); + $relationModelFilename = $input->getOption('relationModelFilename'); + $relationOnlyFields = $input->getOption('relationOnlyFields'); + $relationBindSelect = $input->getOption('relationBindSelect'); + + $force = $input->getOption('force'); + $delete = $input->getOption('delete'); + + $relations = []; + foreach ($relationTable as $key => $val) { + $relations[] = [ + 'table' => $val, + 'foreignKey' => $foreignKey[$key] ?? null, + 'primaryKey' => $primaryKey[$key] ?? null, + 'modelFilename' => $relationModelFilename[$key] ?? null, + 'onlyField' => isset($relationOnlyFields[$key]) ? explode(",", $relationOnlyFields[$key]) : [], + 'relationBindSelect' => $relationBindSelect[$key] ?? null, + ]; + } + + if (empty($table)) { + if (PHP_SAPI == 'cli') + CliEcho::error('请设置主表'); + else + $output->writeln('请设置主表'); + return false; + } + + try { + $build = (new BuildCurd()) + ->setTable($table) + ->setForce($force); + + !empty($controllerFilename) && $build = $build->setControllerFilename($controllerFilename); + !empty($modelFilename) && $build = $build->setModelFilename($modelFilename); + + !empty($checkboxFieldSuffix) && $build = $build->setCheckboxFieldSuffix($checkboxFieldSuffix); + !empty($radioFieldSuffix) && $build = $build->setRadioFieldSuffix($radioFieldSuffix); + !empty($imageFieldSuffix) && $build = $build->setImageFieldSuffix($imageFieldSuffix); + !empty($imagesFieldSuffix) && $build = $build->setImagesFieldSuffix($imagesFieldSuffix); + !empty($fileFieldSuffix) && $build = $build->setFileFieldSuffix($fileFieldSuffix); + !empty($filesFieldSuffix) && $build = $build->setFilesFieldSuffix($filesFieldSuffix); + !empty($dateFieldSuffix) && $build = $build->setDateFieldSuffix($dateFieldSuffix); + !empty($switchFields) && $build = $build->setSwitchFields($switchFields); + !empty($selectFields) && $build = $build->setselectFields($selectFields); + !empty($sortFields) && $build = $build->setSortFields($sortFields); + !empty($ignoreFields) && $build = $build->setIgnoreFields($ignoreFields); + + foreach ($relations as $relation) { + $build = $build->setRelation($relation['table'], $relation['foreignKey'], $relation['primaryKey'], $relation['modelFilename'], $relation['onlyField'], $relation['relationBindSelect']); + } + + $build = $build->render(); + $fileList = $build->getFileList(); + + if (!$delete) { + $result = $build->create(); + if ($force) { + if (PHP_SAPI == 'cli') { + $output->info(">>>>>>>>>>>>>>>"); + foreach ($fileList as $key => $val) { + $output->info($key); + } + $output->info(">>>>>>>>>>>>>>>"); + $output->info("确定强制生成上方所有文件? 如果文件存在会直接覆盖。 请输入 'yes' 按回车键继续操作: "); + $line = fgets(defined('STDIN') ? STDIN : fopen('php://stdin', 'r')); + if (trim($line) != 'yes') { + throw new Exception("取消文件CURD生成操作"); + } + CliEcho::success('自动生成CURD成功'); + }else { + $output->writeln('自动生成CURD成功'); + } + } + }else { + if (PHP_SAPI == 'cli') { + $output->info(">>>>>>>>>>>>>>>"); + foreach ($fileList as $key => $val) { + $output->info($key); + } + $output->info(">>>>>>>>>>>>>>>"); + $output->info("确定删除上方所有文件? 请输入 'yes' 按回车键继续操作: "); + $line = fgets(defined('STDIN') ? STDIN : fopen('php://stdin', 'r')); + if (trim($line) != 'yes') { + throw new Exception("取消删除文件操作"); + } + $result = $build->delete(); + CliEcho::success('>>>>>>>>>>>>>>>'); + CliEcho::success('删除自动生成CURD文件成功'); + CliEcho::success('>>>>>>>>>>>>>>>'); + foreach ($result as $vo) { + CliEcho::success($vo); + } + }else { + $result = $build->delete(); + $output->writeln('>>>>>>>>>>>>>>>'); + $output->writeln('删除自动生成CURD文件成功'); + $output->writeln('>>>>>>>>>>>>>>>'); + foreach ($result as $vo) { + $output->writeln($vo); + } + } + } + if (PHP_SAPI == 'cli') { + $output->info(">>>>>>>>>>>>>>>"); + $output->info('执行成功'); + }else { + $output->writeln('执行成功'); + } + }catch (\Exception $e) { + if (PHP_SAPI == 'cli') + CliEcho::error($e->getMessage()); + else + $output->writeln($e->getMessage()); + } + return false; + } + + +} \ No newline at end of file diff --git a/app/common/command/Node.php b/app/common/command/Node.php new file mode 100644 index 0000000..b77fd0c --- /dev/null +++ b/app/common/command/Node.php @@ -0,0 +1,64 @@ +setName('node') + ->addOption('force', null, Option::VALUE_REQUIRED, '是否强制刷新', 0) + ->setDescription('系统节点刷新服务'); + } + + protected function execute(Input $input, Output $output) + { + $force = $input->getOption('force'); + $output->writeln("========正在刷新节点服务:=====" . date('Y-m-d H:i:s')); + $check = $this->refresh($force); + $check !== true && $output->writeln("节点刷新失败:" . $check); + $output->writeln("刷新完成:" . date('Y-m-d H:i:s')); + } + + protected function refresh($force) + { + $nodeList = (new NodeService())->getNodeList(); + if (empty($nodeList)) { + return true; + } + $model = new SystemNode(); + try { + if ($force == 1) { + $updateNodeList = $model->whereIn('node', array_column($nodeList, 'node'))->select(); + $formatNodeList = array_format_key($nodeList, 'node'); + foreach ($updateNodeList as $vo) { + isset($formatNodeList[$vo['node']]) && $model->where('id', $vo['id'])->update([ + 'title' => $formatNodeList[$vo['node']]['title'], + 'is_auth' => $formatNodeList[$vo['node']]['is_auth'], + ]); + } + } + $existNodeList = $model->field('node,title,type,is_auth')->select(); + foreach ($nodeList as $key => $vo) { + foreach ($existNodeList as $v) { + if ($vo['node'] == $v->node) { + unset($nodeList[$key]); + break; + } + } + } + $model->insertAll($nodeList); + } catch (\Exception $e) { + return $e->getMessage(); + } + return true; + } + +} \ No newline at end of file diff --git a/app/common/constants/AdminConstant.php b/app/common/constants/AdminConstant.php new file mode 100644 index 0000000..7af3ecd --- /dev/null +++ b/app/common/constants/AdminConstant.php @@ -0,0 +1,18 @@ + 'desc', + ]; + + /** + * 允许修改的字段 + * @var array + */ + protected array $allowModifyFields = [ + 'status', + 'sort', + 'remark', + 'is_delete', + 'is_auth', + 'title', + ]; + + /** + * 过滤节点更新 + * @var array + */ + protected array $ignoreNode = []; + + /** + * 不导出的字段信息 + * @var array + */ + protected array $noExportFields = ['delete_time', 'update_time']; + + /** + * 下拉选择条件 + * @var array + */ + protected array $selectWhere = []; + + /** + * 是否关联查询 + * @var bool + */ + protected bool $relationSearch = false; + + /** + * 模板布局, false取消 + * @var string|bool + */ + protected string|bool $layout = 'layout/default'; + + /** + * 是否为演示环境 + * @var bool + */ + protected bool $isDemo = false; + + /** + * @var int|string + */ + protected int|string $adminUid; + + + /** + * 初始化方法 + */ + protected function initialize(): void + { + parent::initialize(); + $this->adminUid = request()->adminUserInfo['id'] ?? 0; + $this->isDemo = env('EASYADMIN.IS_DEMO', false); + $this->setOrder(); + $this->viewInit(); + } + + /** + * 初始化排序 + * @return $this + */ + public function setOrder(): static + { + $tableOrder = $this->request->param('tableOrder/s', ''); + if (!empty($tableOrder)) { + [$orderField, $orderType] = explode(' ', $tableOrder); + $this->sort = [$orderField => $orderType]; + } + return $this; + } + + /** + * 模板变量赋值 + * @param array|string $name 模板变量 + * @param mixed|null $value 变量值 + */ + public function assign(array|string $name, mixed $value = null): void + { + View::assign($name, $value); + } + + /** + * 解析和获取模板内容 用于输出 + * @param string $template + * @param array $vars + * @param bool $layout 是否需要自动布局 + * @return string + */ + public function fetch(string $template = '', array $vars = [], bool $layout = true): string + { + if ($layout) View::instance()->engine()->layout('/layout/default'); + View::assign($vars); + return View::fetch($template); + } + + /** + * 重写验证规则 + * @param array $data + * @param array|string $validate + * @param array $message + * @param bool $batch + * @return bool + */ + public function validate(array $data, $validate, array $message = [], bool $batch = false): bool + { + try { + parent::validate($data, $validate, $message, $batch); + }catch (\Exception $e) { + $this->error($e->getMessage()); + } + return true; + } + + /** + * 构建请求参数 + * @param array $excludeFields 忽略构建搜索的字段 + * @return array + */ + protected function buildTableParams(array $excludeFields = []): array + { + $get = $this->request->get(); + $page = !empty($get['page']) ? $get['page'] : 1; + $limit = !empty($get['limit']) ? $get['limit'] : 15; + $filters = !empty($get['filter']) ? htmlspecialchars_decode($get['filter']) : '{}'; + $ops = !empty($get['op']) ? htmlspecialchars_decode($get['op']) : '{}'; + // json转数组 + $filters = json_decode($filters, true); + $ops = json_decode($ops, true); + $where = []; + $excludes = []; + // 判断是否关联查询 + $tableName = Str::snake(lcfirst((new self::$model)->getName())); + foreach ($filters as $key => $val) { + if (in_array($key, $excludeFields)) { + $excludes[$key] = $val; + continue; + } + $op = !empty($ops[$key]) ? $ops[$key] : '%*%'; + if ($this->relationSearch && count(explode('.', $key)) == 1) { + $key = "{$tableName}.{$key}"; + } + + switch (strtolower($op)) { + case '=': + $where[] = [$key, '=', $val]; + break; + case '%*%': + $where[] = [$key, 'LIKE', "%{$val}%"]; + break; + case '*%': + $where[] = [$key, 'LIKE', "{$val}%"]; + break; + case '%*': + $where[] = [$key, 'LIKE', "%{$val}"]; + break; + case 'in': + $where[] = [$key, 'IN', $val]; + break; + case 'find_in_set': + $where[] = ['', 'exp', Db::raw("FIND_IN_SET(:param,$key)", ['param' => $val])]; + break; + case 'range': + [$beginTime, $endTime] = explode(' - ', $val); + $where[] = [$key, '>=', strtotime($beginTime)]; + $where[] = [$key, '<=', strtotime($endTime)]; + break; + case 'datetime': + [$beginTime, $endTime] = explode(' - ', $val); + $where[] = [$key, '>=', $beginTime]; + $where[] = [$key, '<=', $endTime]; + break; + default: + $where[] = [$key, $op, "%{$val}"]; + } + } + return [(int)$page, (int)$limit, $where, $excludes]; + } + + /** + * 下拉选择列表 + * @return Json + */ + public function selectList(): Json + { + $fields = input('selectFields'); + $data = self::$model::where($this->selectWhere)->field($fields)->select()->toArray(); + $this->success(null, $data); + } + + /** + * 初始化视图参数 + */ + private function viewInit(): void + { + $request = app()->request; + list($thisModule, $thisController, $thisAction) = [app('http')->getName(), app()->request->controller(), $request->action()]; + list($thisControllerArr, $jsPath) = [explode('.', $thisController), null]; + foreach ($thisControllerArr as $vo) { + empty($jsPath) ? $jsPath = parse_name($vo) : $jsPath .= '/' . parse_name($vo); + } + $autoloadJs = file_exists(root_path('public') . "static/{$thisModule}/js/{$jsPath}.js"); + $thisControllerJsPath = "{$thisModule}/js/{$jsPath}.js"; + $adminModuleName = config('admin.alias_name'); + $isSuperAdmin = $this->adminUid == AdminConstant::SUPER_ADMIN_ID; + $data = [ + 'isDemo' => $this->isDemo, + 'adminModuleName' => $adminModuleName, + 'thisController' => parse_name($thisController), + 'thisAction' => $thisAction, + 'thisRequest' => parse_name("{$thisModule}/{$thisController}/{$thisAction}"), + 'thisControllerJsPath' => "{$thisControllerJsPath}", + 'autoloadJs' => $autoloadJs, + 'isSuperAdmin' => $isSuperAdmin, + 'version' => env('APP_DEBUG') ? time() : ConfigService::getVersion(), + 'adminUploadUrl' => url('ajax/upload', [], false), + 'adminEditor' => sysConfig('site', 'editor_type') ?: 'wangEditor', + 'iframeOpenTop' => sysConfig('site', 'iframe_open_top') ?: 0, + ]; + View::assign($data); + } + + + /** + * 严格校验接口是否为POST请求 + */ + protected function checkPostRequest(): void + { + if (!$this->request->isPost()) { + $this->error("当前请求不合法!"); + } + } + +} \ No newline at end of file diff --git a/app/common/entity/BaseEntity.php b/app/common/entity/BaseEntity.php new file mode 100644 index 0000000..8b20dc5 --- /dev/null +++ b/app/common/entity/BaseEntity.php @@ -0,0 +1,22 @@ + [ + 'create_time' => DateTime::class, + 'update_time' => DateTime::class, + 'delete_time' => DateTime::class, + ], + ]; + } + +} \ No newline at end of file diff --git a/app/common/model/ArticleCates.php b/app/common/model/ArticleCates.php new file mode 100644 index 0000000..d041ad8 --- /dev/null +++ b/app/common/model/ArticleCates.php @@ -0,0 +1,29 @@ + 'require|max:50|unique:article_cates', + 'sort' => 'integer|egt:0', + 'status' => 'in:0,1' + ]; + + protected array $message = [ + 'title.require' => '分类名称不能为空', + 'title.max' => '分类名称最多50个字符', + 'title.unique' => '分类名称已存在', + 'sort.integer' => '排序必须为整数', + 'sort.egt' => '排序不能小于0', + 'status.in' => '状态值错误' + ]; + + public function articles(): HasMany + { + return $this->hasMany(Articles::class, 'cate_id'); + } + +} \ No newline at end of file diff --git a/app/common/model/Articles.php b/app/common/model/Articles.php new file mode 100644 index 0000000..da030bd --- /dev/null +++ b/app/common/model/Articles.php @@ -0,0 +1,40 @@ + 'require|max:50', + 'cate_id' => 'require|integer|gt:0', + 'cover' => 'max:255', + 'summary' => 'max:255', + 'author' => 'max:50', + 'sort' => 'integer|egt:0', + 'status' => 'in:0,1' + ]; + protected array $message = [ + 'title.require' => '文章标题不能为空', + 'title.max' => '文章标题最多50个字符', + 'cate_id.require' => '分类ID不能为空', + 'cate_id.integer' => '分类ID必须为整数', + 'cate_id.gt' => '分类ID必须大于0', + 'cover.max' => '封面路径最多255个字符', + 'summary.max' => '简介最多255个字符', + 'author.max' => '作者最多50个字符', + 'sort.integer' => '排序必须为整数', + 'sort.egt' => '排序不能小于0', + 'status.in' => '状态值错误' + ]; + + public function cate() + { + return $this->belongsTo(ArticleCates::class, 'cate_id'); + } + + + public function getCateNameAttr($value, $data) + { + return $this->cate ? $this->cate->title : ''; + } +} \ No newline at end of file diff --git a/app/common/model/TimeModel.php b/app/common/model/TimeModel.php new file mode 100644 index 0000000..c9ccbd7 --- /dev/null +++ b/app/common/model/TimeModel.php @@ -0,0 +1,42 @@ + '启用', + -1 => '禁用', + 0 => '未启用', + ]; + /** + * 软删除 + */ + use SoftDelete; + + protected function getOptions(): array + { + return [ + 'autoWriteTimestamp' => true, + 'createTime' => 'create_time', + 'updateTime' => 'update_time', + 'deleteTime' => false, + ]; + } + + public function getStatusTextAttr($value): string + { + return $this->statusText[$value] ?? '未知状态'; + } + + +} \ No newline at end of file diff --git a/app/common/service/AuthService.php b/app/common/service/AuthService.php new file mode 100644 index 0000000..c7e77f7 --- /dev/null +++ b/app/common/service/AuthService.php @@ -0,0 +1,232 @@ + true, // 权限开关 + 'system_admin' => 'system_admin', // 用户表 + 'system_auth' => 'system_auth', // 权限表 + 'system_node' => 'system_node', // 节点表 + 'system_auth_node' => 'system_auth_node',// 权限-节点表 + ]; + + /** + * 管理员信息 + * @var array|\think\Model|null + */ + protected $adminInfo; + + /** + * 所有节点信息 + * @var array + */ + protected $nodeList; + + /** + * 管理员所有授权节点 + * @var array + */ + protected $adminNode; + + /*** + * 构造方法 + * AuthService constructor. + * @param null $adminId + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function __construct($adminId = null) + { + $this->adminId = $adminId; + $this->adminInfo = $this->getAdminInfo(); + $this->nodeList = $this->getNodeList(); + $this->adminNode = $this->getAdminNode(); + return $this; + } + + /** + * 检测检测权限 + * @param null $node + * @return bool + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function checkNode($node = null) + { + // 判断是否为超级管理员 + if ($this->adminId == AdminConstant::SUPER_ADMIN_ID) { + return true; + } + // 判断权限验证开关 + if ($this->config['auth_on'] == false) { + return true; + } + // 验证是否为URL + if (filter_var($node, FILTER_VALIDATE_URL)) { + return true; + } + // 判断是否需要获取当前节点 + if (empty($node)) { + $node = $this->getCurrentNode(); + }else { + $node = $this->parseNodeStr($node); + } + // 判断是否加入节点控制,优先获取缓存信息 + if (!isset($this->nodeList[$node])) { + return false; + } + $nodeInfo = $this->nodeList[$node]; + if ($nodeInfo['is_auth'] == 0) { + return true; + } + // 用户验证,优先获取缓存信息 + if (empty($this->adminInfo) || $this->adminInfo['status'] != 1 || empty($this->adminInfo['auth_ids'])) { + return false; + } + // 判断该节点是否允许访问 + if (in_array($node, $this->adminNode)) { + return true; + } + if ($this->checkNodeAnnotationAttrAuth($node)) return true; + return false; + } + + protected function checkNodeAnnotationAttrAuth(string $node): bool + { + $bool = false; + $controller = request()->controller(); + try { + $controllerExplode = explode('.', $controller); + [$_name, $_controller] = $controllerExplode; + $nodeExplode = explode('/', $node); + $action = end($nodeExplode); + $reflectionClass = new \ReflectionClass("app\admin\controller\\{$_name}\\{$_controller}"); + $attributes = $reflectionClass->getMethod($action)->getAttributes(NodeAnnotation::class); + foreach ($attributes as $attribute) { + $annotation = $attribute->newInstance(); + $bool = $annotation->auth === false; + } + }catch (\Throwable) { + } + return $bool; + } + + /** + * 获取当前节点 + * @return string + */ + public function getCurrentNode() + { + $node = $this->parseNodeStr(request()->controller() . '/' . request()->action()); + return $node; + } + + /** + * 获取当前管理员所有节点 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function getAdminNode() + { + $nodeList = []; + $adminInfo = Db::name($this->config['system_admin']) + ->where([ + 'id' => $this->adminId, + 'status' => 1, + ])->find(); + if (!empty($adminInfo) && !empty($adminInfo['auth_ids'])) { + $buildAuthSql = Db::name($this->config['system_auth']) + ->distinct(true) + ->whereIn('id', $adminInfo['auth_ids']) + ->field('id') + ->buildSql(true); + $buildAuthNodeSql = Db::name($this->config['system_auth_node']) + ->distinct(true) + ->where("auth_id IN {$buildAuthSql}") + ->field('node_id') + ->buildSql(true); + $nodeList = Db::name($this->config['system_node']) + ->distinct(true) + ->where("id IN {$buildAuthNodeSql}") + ->column('node'); + } + return $nodeList; + } + + /** + * 获取所有节点信息 + * @time 2021-01-07 + * @return array + * @author zhongshaofa + */ + public function getNodeList() + { + return Db::name($this->config['system_node']) + ->column('id,node,title,type,is_auth', 'node'); + } + + /** + * 获取管理员信息 + * @time 2021-01-07 + * @return array|\think\Model|null + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author zhongshaofa + */ + public function getAdminInfo() + { + return Db::name($this->config['system_admin']) + ->where('id', $this->adminId) + ->find(); + } + + /** + * 驼峰转下划线规则 + * @param string $node + * @return string + */ + public function parseNodeStr($node) + { + $array = explode('/', $node); + foreach ($array as $key => $val) { + if ($key == 0) { + $val = explode('.', $val); + foreach ($val as &$vo) { + $vo = \think\helper\Str::snake(lcfirst($vo)); + } + $val = implode('.', $val); + $array[$key] = $val; + } + } + $node = implode('/', $array); + return $node; + } + +} \ No newline at end of file diff --git a/app/common/service/MenuService.php b/app/common/service/MenuService.php new file mode 100644 index 0000000..f1e5875 --- /dev/null +++ b/app/common/service/MenuService.php @@ -0,0 +1,99 @@ +adminId = $adminId; + return $this; + } + + /** + * 获取首页信息 + * @return array|\think\Model|null + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function getHomeInfo() + { + $data = Db::name('system_menu') + ->field('title,icon,href') + ->where("delete_time is null") + ->where('pid', MenuConstant::HOME_PID) + ->find(); + !empty($data) && $data['href'] = __url($data['href']); + return $data; + } + + /** + * 获取后台菜单树信息 + * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function getMenuTree() + { + /** @var AuthService $authService */ + $authServer = app(AuthService::class, ['adminId' => $this->adminId]); + return $this->buildMenuChild(0, $this->getMenuData(), $authServer); + } + + private function buildMenuChild($pid, $menuList, AuthService $authServer) + { + $treeList = []; + foreach ($menuList as &$v) { + $check = empty($v['href']) || $authServer->checkNode($v['href']); + !empty($v['href']) && $v['href'] = __url($v['href']); + if ($pid == $v['pid'] && $check) { + $node = $v; + $child = $this->buildMenuChild($v['id'], $menuList, $authServer); + if (!empty($child)) { + $node['child'] = $child; + } + if (!empty($v['href']) || !empty($child)) { + $treeList[] = $node; + } + } + } + return $treeList; + } + + /** + * 获取所有菜单数据 + * @return \think\Collection + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + protected function getMenuData() + { + $menuData = Db::name('system_menu') + ->field('id,pid,title,icon,href,target') + ->where("delete_time is null") + ->where([ + ['status', '=', '1'], + ['pid', '<>', MenuConstant::HOME_PID], + ]) + ->order([ + 'sort' => 'desc', + 'id' => 'asc', + ]) + ->select(); + return $menuData; + } + +} \ No newline at end of file diff --git a/app/common/tpl/dispatch_jump.tpl b/app/common/tpl/dispatch_jump.tpl new file mode 100644 index 0000000..0a3daa3 --- /dev/null +++ b/app/common/tpl/dispatch_jump.tpl @@ -0,0 +1,161 @@ + + + + + + 跳转提示 + + + + +
      +
      + +
      +

      +

      + 页面将在 秒后自动跳转 +

      +

      + 返回上一页 + 立即跳转 +

      +
      + + + diff --git a/app/common/tpl/think_exception.tpl b/app/common/tpl/think_exception.tpl new file mode 100644 index 0000000..25b189f --- /dev/null +++ b/app/common/tpl/think_exception.tpl @@ -0,0 +1,101 @@ + 'IP禁止充值', +'Home' => '返回主页', +'Feedback' => '禁止充值', +'The page you are looking for is temporarily unavailable' => '您的IP已被禁止充值,如有疑问请联系管理员', +'You can return to the previous page and try again' => '你可以返回上一页重试,或直接向我们反馈错误报告' +]; + +$langSet = ''; + +if (isset($_GET['lang'])) { +$langSet = strtolower($_GET['lang']); +} elseif (isset($_COOKIE['think_var'])) { +$langSet = strtolower($_COOKIE['think_var']); +} elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { +preg_match('/^([a-z\d\-]+)/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches); +$langSet = strtolower($matches[1]); +} +$langSet = $langSet && in_array($langSet, ['zh-cn', 'en']) ? $langSet : 'zh-cn'; +$langSet == 'en' && $lang = array_combine(array_keys($lang), array_keys($lang)); + +?> + + + + + <?=$lang['An error occurred']?> + + + + + + +
      +
      + +
      +
      + +
      +
      +
      + +

      + +

      + +
      +
      + + +
      +
      + + \ No newline at end of file diff --git a/app/common/traits/JumpTrait.php b/app/common/traits/JumpTrait.php new file mode 100644 index 0000000..2e244c3 --- /dev/null +++ b/app/common/traits/JumpTrait.php @@ -0,0 +1,131 @@ +request->server('HTTP_REFERER'); + }elseif ($url) { + $url = (strpos($url, '://') || str_starts_with($url, '/')) ? $url : app('route')->buildUrl($url)->__toString(); + } + $result = [ + 'code' => 1, + 'msg' => $msg, + 'data' => $data, + 'url' => $url, + 'wait' => $wait, + '__token__' => request()->buildToken('__token__'), + ]; + + $type = $this->getResponseType(); + if ($type == 'html') { + $response = view(config('app.dispatch_success_tmpl'), $result); + }else { + $response = json($result); + } + throw new HttpResponseException($response); + } + + /** + * 操作错误跳转的快捷方法 + * @access protected + * @param string|null $msg 提示信息 + * @param mixed $data 返回的数据 + * @param string|null $url 跳转的 URL 地址 + * @param int $wait 跳转等待时间 + * @param array $header 发送的 Header 信息 + * @return void + */ + protected function error(?string $msg = null, mixed $data = '', ?string $url = null, int $wait = 3, array $header = []): void + { + if (is_null($url)) { + $url = request()->isAjax() ? '' : 'javascript:history.back(-1);'; + }elseif ($url) { + $url = (strpos($url, '://') || str_starts_with($url, '/')) ? $url : app('route')->buildUrl($url)->__toString(); + } + + $type = $this->getResponseType(); + $result = [ + 'code' => 0, + 'msg' => $msg, + 'data' => $data, + 'url' => $url, + 'wait' => $wait, + '__token__' => request()->buildToken('__token__'), + ]; + if ($type == 'html') { + $response = view(config('app.dispatch_error_tmpl'), $result); + }else { + $response = json($result); + } + throw new HttpResponseException($response); + } + + /** + * 返回封装后的 API 数据到客户端 + * @access protected + * @param mixed $data 要返回的数据 + * @param int $code 返回的 code + * @param string|null $msg 提示信息 + * @param string $type 返回数据格式 + * @param array $header 发送的 Header 信息 + * @return void + */ + protected function result(mixed $data, int $code = 0, ?string $msg = '', string $type = '', array $header = []): void + { + $result = [ + 'code' => $code, + 'msg' => $msg, + 'time' => time(), + 'data' => $data, + ]; + $type = $type ?: $this->getResponseType(); + $response = Response::create($result, $type)->header($header); + throw new HttpResponseException($response); + } + + /** + * URL 重定向 + * @access protected + * @param string $url 跳转的 URL 表达式 + * @param int $code http code + * @return void + * @throws HttpResponseException + */ + protected function redirect(string $url = '', int $code = 302): void + { + $response = Response::create($url, 'redirect', $code); + throw new HttpResponseException($response); + } + + /** + * 获取当前的 response 输出类型 + * @access protected + * @return string + */ + protected function getResponseType(): string + { + return (request()->isJson() || request()->isAjax() || request()->isPost()) ? 'json' : 'html'; + } +} diff --git a/app/common/utils/Helper.php b/app/common/utils/Helper.php new file mode 100644 index 0000000..cef2cf1 --- /dev/null +++ b/app/common/utils/Helper.php @@ -0,0 +1,28 @@ +ip(); + } + + /** + * 获取当前登录用户ID + * @return int|string + */ + public static function getAdminUid(): int|string + { + return session('admin.id') ?: 0; + } + +} \ No newline at end of file diff --git a/app/event.php b/app/event.php new file mode 100644 index 0000000..e9851bb --- /dev/null +++ b/app/event.php @@ -0,0 +1,17 @@ + [ + ], + + 'listen' => [ + 'AppInit' => [], + 'HttpRun' => [], + 'HttpEnd' => [], + 'LogLevel' => [], + 'LogWrite' => [], + ], + + 'subscribe' => [ + ], +]; diff --git a/app/index/config/lang.php b/app/index/config/lang.php new file mode 100644 index 0000000..45c281d --- /dev/null +++ b/app/index/config/lang.php @@ -0,0 +1,28 @@ + LangEnum::EN->value, + // 允许的语言列表 + 'allow_lang_list' => LangService::getAllowLang(), + // 多语言自动侦测变量名 + 'detect_var' => 'lang', + // 是否使用Cookie记录 + 'use_cookie' => false, + // 多语言cookie变量 + 'cookie_var' => 'lang', + // 多语言header变量 + 'header_var' => 'lang', + // 扩展语言包 + 'extend_list' => LangService::getLangExtend(), + // Accept-Language转义为对应语言包名称 + 'accept_language' => LangService::getAcceptLang(), + // 是否支持语言分组 + 'allow_group' => true, +]; diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php new file mode 100644 index 0000000..20071c9 --- /dev/null +++ b/app/index/controller/Index.php @@ -0,0 +1,64 @@ +request->isPost()){ + $param = $this->request->post(); + $ip = $this->request->ip(); + $black = BlackIp::where('ip',$ip)->find(); + if (!empty($black)){ + throw new Exception(); + exit(); + return error('您的IP已被禁止充值,如有疑问请联系管理员'); + } + $rid = Uuids::getUuid4(); + $data = [ + 'money'=>$param['amount'], + 'rid'=>$rid, + 'start_time'=>time(), + 'end_time'=>time()+180, + 'ip'=> $ip, + ]; + (new MallOrder())->save($data); + return redirect('index/index/reloads?rid='.$rid); + }else{ + return view(); + } + } + public function reloads() + { + return view(); + } + public function status() + { + $rid = $this->request->param('rid'); + $data = MallOrder::where('rid',$rid)->find(); + if (empty($data)) + return error(); + $status = match ($data['status']) { + 1 => 'yellow', + 2 => 'red', + default => 'blue', + }; + return success([ + 'status'=>$status, + 'color'=>$status, + 'url'=>$data['url'] + ]); + } +} \ No newline at end of file diff --git a/app/index/controller/Install.php b/app/index/controller/Install.php new file mode 100644 index 0000000..0a9640d --- /dev/null +++ b/app/index/controller/Install.php @@ -0,0 +1,224 @@ +redirect('/'); + $isInstall = true; + $errorInfo = '已安装系统,如需重新安装请删除文件:/config/install/lock/install.lock,或者删除 /install 路由'; + }elseif (version_compare(phpversion(), '8.1.0', '<')) { + $errorInfo = 'PHP版本不能小于8.1.0'; + }elseif (!extension_loaded("pdo_mysql")) { + $errorInfo = '当前未开启pdo_mysql,无法进行安装'; + } + if (!is_file(root_path() . '.env')) { + $errorInfo = '.env 文件不存在,请先配置 .env 文件'; + } + if (!$request->isAjax()) { + $envInfo = [ + 'DB_HOST' => $isInstall ? '' : env('DB_HOST', '127.0.0.1'), + 'DB_NAME' => $isInstall ? '' : env('DB_NAME', 'easyadmin8'), + 'DB_USER' => $isInstall ? '' : env('DB_USER', 'root'), + 'DB_PASS' => $isInstall ? '' : env('DB_PASS', 'root'), + 'DB_PORT' => $isInstall ? '' : env('DB_PORT', 3306), + 'DB_PREFIX' => $isInstall ? '' : env('DB_PREFIX', 'ea8_'), + ]; + $currentHost = '://'; + $result = compact('errorInfo', 'currentHost', 'isInstall', 'envInfo'); + return view('index@install/index', $result); + } + if ($errorInfo) $this->error($errorInfo); + $charset = 'utf8mb4'; + $post = $request->post(); + $cover = $post['cover'] == 1; + $database = $post['database']; + $hostname = $post['hostname']; + $hostport = $post['hostport']; + $dbUsername = $post['db_username']; + $dbPassword = $post['db_password']; + $prefix = $post['prefix']; + $adminUrl = $post['admin_url']; + $username = $post['username']; + $password = $post['password']; + // 参数验证 + $validateError = null; + // 判断是否有特殊字符 + $check = preg_match('/[0-9a-zA-Z]+$/', $adminUrl, $matches); + if (!$check) { + $validateError = '后台地址不能含有特殊字符, 只能包含字母或数字。'; + $this->error($validateError); + } + if (strlen($adminUrl) < 2) { + $validateError = '后台的地址不能小于2位数'; + }elseif (strlen($password) < 5) { + $validateError = '管理员密码不能小于5位数'; + }elseif (strlen($username) < 4) { + $validateError = '管理员账号不能小于4位数'; + } + if (!empty($validateError)) $this->error($validateError); + $config = [ + "driver" => 'mysql', + "host" => $hostname, + "database" => $database, + "port" => $hostport, + "username" => $dbUsername, + "password" => $dbPassword, + "prefix" => $prefix, + "charset" => $charset, + ]; + // 检测数据库连接 + $this->checkConnect($config); + // 检测数据库是否存在 + if (!$cover && $this->checkDatabase($database)) $this->error('数据库已存在,请选择覆盖安装或者修改数据库名'); + // 创建数据库 + $this->createDatabase($database, $config); + // 导入sql语句等等 + $config = array_merge($config, ['database' => $database]); + $this->install($username, $password, $config, $adminUrl); + $this->success('系统安装成功,正在跳转登录页面'); + } + + protected function install(string $username, string $password, array $config): ?bool + { + $installPath = config_path() . DIRECTORY_SEPARATOR . 'install' . DIRECTORY_SEPARATOR; + $sqlPath = file_get_contents($installPath . 'sql' . DIRECTORY_SEPARATOR . 'install.sql'); + $sqlArray = $this->parseSql($sqlPath, $config['prefix'], 'ea_'); + $dsn = $this->pdoDsn($config, true); + try { + $pdo = new \PDO($dsn, $config['username'] ?? 'root', $config['password'] ?? ''); + foreach ($sqlArray as $sql) { + $pdo->query($sql); + } + $hashedPassword = password_hash($password, PASSWORD_DEFAULT); + $tableName = 'system_admin'; + $update = [ + 'username' => $username, + 'head_img' => '/static/admin/images/head.jpg', + 'password' => $hashedPassword, + 'create_time' => time(), + 'update_time' => time() + ]; + foreach ($update as $_k => $_up) { + $pdo->query("UPDATE {$config['prefix']}{$tableName} SET {$_k} = '{$_up}' WHERE id = 1"); + } + // 处理安装文件 + !is_dir($installPath) && @mkdir($installPath); + !is_dir($installPath . 'lock' . DIRECTORY_SEPARATOR) && @mkdir($installPath . 'lock' . DIRECTORY_SEPARATOR); + @file_put_contents($installPath . 'lock' . DIRECTORY_SEPARATOR . 'install.lock', date('Y-m-d H:i:s')); + }catch (\Exception|\PDOException|\Throwable $e) { + $this->error("系统安装失败:" . $e->getMessage()); + } + return true; + } + + protected function parseSql($sql = '', $to = '', $from = ''): array + { + list($pure_sql, $comment) = [[], false]; + $sql = explode("\n", trim(str_replace(["\r\n", "\r"], "\n", $sql))); + foreach ($sql as $key => $line) { + if ($line == '') { + continue; + } + if (preg_match("/^(#|--)/", $line)) { + continue; + } + if (preg_match("/^\/\*(.*?)\*\//", $line)) { + continue; + } + if (str_starts_with($line, '/*')) { + $comment = true; + continue; + } + if (str_ends_with($line, '*/')) { + $comment = false; + continue; + } + if ($comment) { + continue; + } + if ($from != '') { + $line = str_replace('`' . $from, '`' . $to, $line); + } + if ($line == 'BEGIN;' || $line == 'COMMIT;') { + continue; + } + $pure_sql[] = $line; + } + //$pure_sql = implode($pure_sql, "\n"); + $pure_sql = implode("\n", $pure_sql); + return explode(";\n", $pure_sql); + } + + protected function createDatabase($database, $config): bool + { + $dsn = $this->pdoDsn($config); + try { + $pdo = new \PDO($dsn, $config['username'] ?? 'root', $config['password'] ?? ''); + $pdo->query("CREATE DATABASE IF NOT EXISTS `{$database}` DEFAULT CHARACTER SET {$config['charset']} COLLATE=utf8mb4_general_ci"); + }catch (\PDOException $e) { + return false; + } + return true; + } + + protected function checkDatabase($database): bool + { + try { + $check = Db::query("SELECT * FROM information_schema.schemata WHERE schema_name='{$database}'"); + }catch (\Throwable $exception) { + $check = false; + } + if (empty($check)) { + return false; + }else { + return true; + } + } + + protected function checkConnect(array $config): ?bool + { + $dsn = $this->pdoDsn($config); + try { + $pdo = new \PDO($dsn, $config['username'] ?? 'root', $config['password'] ?? ''); + $res = $pdo->query('select VERSION()'); + $_version = $res->fetch()[0] ?? 0; + if (version_compare($_version, '5.7.0', '<')) { + $this->error('mysql版本最低要求 5.7.x'); + } + }catch (\PDOException $e) { + $this->error($e->getMessage()); + } + return true; + } + + /** + * @param array $config + * @param bool $needDatabase + * @return string + */ + protected function pdoDsn(array $config, bool $needDatabase = false): string + { + $host = $config['host'] ?? '127.0.0.1'; + $database = $config['database'] ?? ''; + $port = $config['port'] ?? '3306'; + $charset = $config['charset'] ?? 'utf8mb4'; + if ($needDatabase) return "mysql:host=$host;port=$port;dbname=$database;charset=$charset"; + return "mysql:host=$host;port=$port;charset=$charset"; + } +} \ No newline at end of file diff --git a/app/index/view/index/index.html b/app/index/view/index/index.html new file mode 100644 index 0000000..27a6739 --- /dev/null +++ b/app/index/view/index/index.html @@ -0,0 +1,207 @@ + + + + + + + 移动端收银台 + + + +
      +
      +

      收银台

      +

      安全快捷的移动支付

      +
      + +
      +
      + +
      + ¥ + +
      +
      支付范围:¥{:sysConfig('site','site_mix')} - ¥{:sysConfig('site','site_max')}
      +
      请输入{:sysConfig('site','site_mix')}-{:sysConfig('site','site_max')}元之间的金额
      +
      + + +
      +
      + + + diff --git a/app/index/view/index/reloads.html b/app/index/view/index/reloads.html new file mode 100644 index 0000000..d9a7a57 --- /dev/null +++ b/app/index/view/index/reloads.html @@ -0,0 +1,80 @@ + + + + + + 获取支付状态 + + + + + +
      + +
      + 若取码失败,可以尝试重新发起支付 +
      + + +
      + 正在努力匹配订单中,已等待时间 0 秒 +
      + + +
      + 系统正在通过安全验证,取码时间较长,请您耐心等待,最长需要 180 秒。 +
      + +
      + + + +
      +
      + + + + diff --git a/app/middleware.php b/app/middleware.php new file mode 100644 index 0000000..32d02ce --- /dev/null +++ b/app/middleware.php @@ -0,0 +1,10 @@ + Request::class, + 'think\exception\Handle' => ExceptionHandle::class, +]; diff --git a/app/service.php b/app/service.php new file mode 100644 index 0000000..db1ee6a --- /dev/null +++ b/app/service.php @@ -0,0 +1,9 @@ +=8.1.0", + "topthink/framework": "^8.0", + "topthink/think-orm": "^4.0", + "topthink/think-multi-app": "^1.1.0", + "topthink/think-view": "^2.0", + "topthink/think-captcha": "^3.0", + "topthink/think-filesystem": "^2.0", + "aliyuncs/oss-sdk-php": "^2.7.2", + "qcloud/cos-sdk-v5": "^2.6", + "doctrine/annotations": "^2.0.0", + "phpoffice/phpspreadsheet": "^4.1.0", + "myclabs/php-enum": "^1.8", + "wolfcode/qiniu-php-sdk": "^8.0", + "wolf-leo/phplogviewer": "^0.11.3", + "wolfcode/authenticator": "^0.0.6", + "wolfcode/rate-limiting": "^0.1.0", + "wolfcode/php-ai": "^0.1.2", + "topthink/think-migration": "^3.1", + "kaadon/thinkbase": "^1.0", + "kaadon/helper": "^1.0", + "kaadon/uuid": "^1.0", + "ext-json": "*", + "ext-mysqli": "*", + "ext-pdo": "*" + + }, + "require-dev": { + "symfony/var-dumper": ">=4.2", + "topthink/think-trace": "^1.0" + }, + "autoload": { + "psr-4": { + "app\\": "app", + "jobs\\": "jobs", + "commands\\": "commands", + "enums\\": "enums" + }, + "psr-0": { + "": "extend/" + } + }, + "config": { + "preferred-install": "dist" + }, + "scripts": { + "post-autoload-dump": [ + "@php think service:discover", + "@php think vendor:publish" + ] + } +} diff --git a/config/app.php b/config/app.php new file mode 100644 index 0000000..22889e1 --- /dev/null +++ b/config/app.php @@ -0,0 +1,42 @@ + env('APP_HOST', ''), + // 应用的命名空间 + 'app_namespace' => '', + // 是否启用路由 + 'with_route' => true, + // 默认应用 + 'default_app' => 'index', + // 默认时区 + 'default_timezone' => 'Asia/Shanghai', + + // 应用映射(自动多应用模式有效) + 'app_map' => [ + Env::get('EASYADMIN.ADMIN', 'admin') => 'admin', + ], + // 域名绑定(自动多应用模式有效) + 'domain_bind' => [], + // 禁止URL访问的应用列表(自动多应用模式有效) + 'deny_app_list' => ['common'], + + // 异常页面的模板文件 + 'exception_tmpl' => Env::get('APP_DEBUG') == 1 ? app()->getThinkPath() . 'tpl/think_exception.tpl' : app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'think_exception.tpl', + // 跳转页面的成功模板文件 + 'dispatch_success_tmpl' => app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl', + // 跳转页面的失败模板文件 + 'dispatch_error_tmpl' => app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl', + + // 错误显示信息,非调试模式有效 + 'error_message' => '页面错误!请稍后再试~', + // 显示错误信息 + 'show_error_msg' => false, + // 静态资源上传到OSS前缀 + 'oss_static_prefix' => Env::get('EASYADMIN.OSS_STATIC_PREFIX', 'static_easyadmin'), +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 0000000..c1d8d48 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,28 @@ + 'file', + + // 缓存连接方式配置 + 'stores' => [ + 'file' => [ + // 驱动方式 + 'type' => 'File', + // 缓存保存目录 + 'path' => '', + // 缓存前缀 + 'prefix' => 'EA8TP', // 主要是为了区分不同版本安装后数据的残留 + // 缓存有效期 0表示永久缓存 + 'expire' => 0, + // 缓存标签前缀 + 'tag_prefix' => 'tag:', + // 序列化机制 例如 ['serialize', 'unserialize'] + 'serialize' => [], + ], + // 更多的缓存连接 + ], +]; diff --git a/config/captcha.php b/config/captcha.php new file mode 100644 index 0000000..9db5850 --- /dev/null +++ b/config/captcha.php @@ -0,0 +1,39 @@ + 4, + // 验证码字符集合 + 'codeSet' => '1234567890', + // 验证码过期时间 + 'expire' => 1800, + // 是否使用中文验证码 + 'useZh' => false, + // 是否使用算术验证码 + 'math' => false, + // 是否使用背景图 + 'useImgBg' => false, + //验证码字符大小 + 'fontSize' => 25, + // 是否使用混淆曲线 + 'useCurve' => true, + //是否添加杂点 + 'useNoise' => true, + // 验证码字体 不设置则随机 + 'fontttf' => '', + //背景颜色 + 'bg' => [243, 251, 254], + // 验证码图片高度 + 'imageH' => 0, + // 验证码图片宽度 + 'imageW' => 0, + + // 添加额外的验证码设置 + // verify => [ + // 'length'=>4, + // ... + //], +]; diff --git a/config/console.php b/config/console.php new file mode 100644 index 0000000..7a1bfb9 --- /dev/null +++ b/config/console.php @@ -0,0 +1,14 @@ + [ + 'curd' => 'app\common\command\Curd', + 'crud' => 'app\common\command\Curd', + 'node' => 'app\common\command\Node', + ], + +]; diff --git a/config/cookie.php b/config/cookie.php new file mode 100644 index 0000000..d3b3aab --- /dev/null +++ b/config/cookie.php @@ -0,0 +1,20 @@ + 0, + // cookie 保存路径 + 'path' => '/', + // cookie 有效域名 + 'domain' => '', + // cookie 启用安全传输 + 'secure' => false, + // httponly设置 + 'httponly' => false, + // 是否使用 setcookie + 'setcookie' => true, + // samesite 设置,支持 'strict' 'lax' + 'samesite' => '', +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..bd5ab81 --- /dev/null +++ b/config/database.php @@ -0,0 +1,63 @@ + env('DB_DRIVER', 'mysql'), + + // 自定义时间查询规则 + 'time_query_rule' => [], + + // 自动写入时间戳字段 + // true为自动识别类型 false关闭 + // 字符串则明确指定时间字段类型 支持 int timestamp datetime date + 'auto_timestamp' => true, + + // 时间字段取出后的默认时间格式 + 'datetime_format' => 'Y-m-d H:i:s', + + // 时间字段配置 配置格式:create_time,update_time + 'datetime_field' => '', + + // 数据库连接配置信息 + 'connections' => [ + 'mysql' => [ + // 数据库类型 + 'type' => env('DB_TYPE', 'mysql'), + // 服务器地址 + 'hostname' => env('DB_HOST', '127.0.0.1'), + // 数据库名 + 'database' => env('DB_NAME', ''), + // 用户名 + 'username' => env('DB_USER', 'root'), + // 密码 + 'password' => env('DB_PASS', ''), + // 端口 + 'hostport' => env('DB_PORT', '3306'), + // 数据库连接参数 + 'params' => [], + // 数据库编码默认采用utf8 + 'charset' => env('DB_CHARSET', 'utf8'), + // 数据库表前缀 + 'prefix' => env('DB_PREFIX', ''), + + // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) + 'deploy' => 0, + // 数据库读写是否分离 主从式有效 + 'rw_separate' => false, + // 读写分离后 主服务器数量 + 'master_num' => 1, + // 指定从服务器序号 + 'slave_no' => '', + // 是否严格检查字段是否存在 + 'fields_strict' => true, + // 是否需要断线重连 + 'break_reconnect' => false, + // 监听SQL + 'trigger_sql' => env('APP_DEBUG', true), + // 开启字段缓存 + 'fields_cache' => false, + ], + + // 更多的数据库配置信息 + ], +]; diff --git a/config/filesystem.php b/config/filesystem.php new file mode 100644 index 0000000..e1b24c0 --- /dev/null +++ b/config/filesystem.php @@ -0,0 +1,27 @@ + 'local', + 'image' =>[ + 'to_webp' => true, // 是否转换为webp格式 + ], + // 磁盘列表 + 'disks' => [ + 'local' => [ + 'type' => 'local', + 'root' => app()->getRuntimePath() . 'storage', + ], + 'public' => [ + // 磁盘类型 + 'type' => 'local', + // 磁盘路径 + 'root' => app()->getRootPath() . 'public/storage', + // 磁盘路径对应的外部URL路径 + 'url' => '/storage', + // 可见性 + 'visibility' => 'public', + ], + // 更多的磁盘配置信息 + ], +]; diff --git a/config/install/lock/.gitignore b/config/install/lock/.gitignore new file mode 100644 index 0000000..644c162 --- /dev/null +++ b/config/install/lock/.gitignore @@ -0,0 +1,2 @@ +install.lock +!.gitignore \ No newline at end of file diff --git a/config/install/sql/install.sql b/config/install/sql/install.sql new file mode 100644 index 0000000..259eef4 --- /dev/null +++ b/config/install/sql/install.sql @@ -0,0 +1,430 @@ +-- MySQL dump 10.13 Distrib 5.7.44, for osx10.19 (x86_64) +-- +-- Host: 127.0.0.1 Database: easyadmin8 +-- ------------------------------------------------------ +-- Server version 5.7.44 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `ea8_mall_cate` +-- + +DROP TABLE IF EXISTS `ea8_mall_cate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_mall_cate` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(20) NOT NULL COMMENT '分类名', + `image` varchar(500) DEFAULT NULL COMMENT '分类图片', + `sort` int(11) DEFAULT '0' COMMENT '排序', + `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态(1:禁用,2:启用)', + `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + `delete_time` int(11) DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`), + UNIQUE KEY `title` (`title`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品分类'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_mall_cate` +-- + +LOCK TABLES `ea8_mall_cate` WRITE; +/*!40000 ALTER TABLE `ea8_mall_cate` DISABLE KEYS */; +INSERT INTO `ea8_mall_cate` VALUES (9,'手机','/static/common/images/logo-1.png',0,1,'',1589440437,1589440437,NULL); +/*!40000 ALTER TABLE `ea8_mall_cate` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_mall_goods` +-- + +DROP TABLE IF EXISTS `ea8_mall_goods`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_mall_goods` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `cate_id` int(11) DEFAULT NULL COMMENT '分类ID', + `title` varchar(20) NOT NULL COMMENT '商品名称', + `logo` varchar(500) DEFAULT NULL COMMENT '商品logo', + `images` text COMMENT '商品图片 以 | 做分割符号', + `describe` text COMMENT '商品描述', + `market_price` decimal(10,2) DEFAULT '0.00' COMMENT '市场价', + `discount_price` decimal(10,2) DEFAULT '0.00' COMMENT '折扣价', + `sales` int(11) DEFAULT '0' COMMENT '销量', + `virtual_sales` int(11) DEFAULT '0' COMMENT '虚拟销量', + `stock` int(11) DEFAULT '0' COMMENT '库存', + `total_stock` int(11) DEFAULT '0' COMMENT '总库存', + `sort` int(11) DEFAULT '0' COMMENT '排序', + `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态(1:禁用,2:启用)', + `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + `delete_time` int(11) DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`), + KEY `cate_id` (`cate_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品列表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_mall_goods` +-- + +LOCK TABLES `ea8_mall_goods` WRITE; +/*!40000 ALTER TABLE `ea8_mall_goods` DISABLE KEYS */; +INSERT INTO `ea8_mall_goods` VALUES (8,10,'落地-风扇','/static/common/images/logo-1.png','/static/common/images/logo-1.png|/static/common/images/logo-1.png|/static/common/images/logo-1.png|/static/common/images/logo-1.png','

      76654757

      \n\n

      \"\"

      \n\n

      \"\"

      \n',599.00,368.00,0,594,0,0,675,1,'',1589454309,1589567016,NULL),(9,9,'电脑','/static/common/images/logo-1.png','/static/common/images/logo-1.png','

      477

      \n',0.00,0.00,0,0,115,320,0,1,'',1589465215,1589476345,NULL); +/*!40000 ALTER TABLE `ea8_mall_goods` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_admin` +-- + +DROP TABLE IF EXISTS `ea8_system_admin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_admin` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `auth_ids` varchar(255) DEFAULT NULL COMMENT '角色权限ID', + `head_img` varchar(255) DEFAULT NULL COMMENT '头像', + `username` varchar(50) NOT NULL DEFAULT '' COMMENT '用户登录名', + `password` varchar(255) NOT NULL DEFAULT '' COMMENT '用户登录密码', + `phone` varchar(16) DEFAULT NULL COMMENT '联系手机号', + `remark` varchar(255) DEFAULT '' COMMENT '备注说明', + `login_num` bigint(20) unsigned DEFAULT '0' COMMENT '登录次数', + `sort` int(11) DEFAULT '0' COMMENT '排序', + `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态(0:禁用,1:启用,)', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + `delete_time` int(11) DEFAULT NULL COMMENT '删除时间', + `login_type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '登录方式', + `ga_secret` varchar(32) NOT NULL DEFAULT '' COMMENT '谷歌验证码秘钥', + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`) USING BTREE, + KEY `phone` (`phone`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统用户表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_admin` +-- + +LOCK TABLES `ea8_system_admin` WRITE; +/*!40000 ALTER TABLE `ea8_system_admin` DISABLE KEYS */; +INSERT INTO `ea8_system_admin` VALUES (1,'','/static/admin/images/head.jpg','admin','$2y$10$bu28QbPJUGEfQwqfos9nlOX4i.X6SUbOM3/1NRIiIhhhfmMbI.Ny2','admin','admin',1,0,1,1750286098,1750290634,NULL,1,''),(2,'1,2','/storage/20250619/nAM1750286643FjDBHJ1.webp','zhangsan','d9bff24f71dba4d88c3c196b80d028046cf458eb','13333333333','zhangsan',0,0,1,1750290682,1750290682,NULL,1,''),(3,'1,2','/storage/20250619/nAM1750286643FjDBHJ1.webp','zhangsddd','bb0a750c23013d77bb32d52610c8dac35e898846','zhangsddd','zhangsddd',0,0,1,1750290771,1750290771,NULL,1,''),(4,'2','/storage/20250619/EtL1750286617DRgIsn1.webp','sdss','361fcbbfac8675dce0dc1d7554594d39a3942779','sdsds','sdss',0,0,1,1750290821,1750290821,NULL,1,''); +/*!40000 ALTER TABLE `ea8_system_admin` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_auth` +-- + +DROP TABLE IF EXISTS `ea8_system_auth`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_auth` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(20) NOT NULL COMMENT '权限名称', + `sort` int(11) DEFAULT '0' COMMENT '排序', + `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态(1:禁用,2:启用)', + `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + `delete_time` int(11) DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`), + UNIQUE KEY `title` (`title`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统权限表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_auth` +-- + +LOCK TABLES `ea8_system_auth` WRITE; +/*!40000 ALTER TABLE `ea8_system_auth` DISABLE KEYS */; +INSERT INTO `ea8_system_auth` VALUES (1,'管理员',1,1,'超级管理员',1588921753,1750289508,NULL),(2,'业务员',0,1,'业务员',1750288871,1750289671,NULL); +/*!40000 ALTER TABLE `ea8_system_auth` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_auth_node` +-- + +DROP TABLE IF EXISTS `ea8_system_auth_node`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_auth_node` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `auth_id` bigint(20) unsigned DEFAULT NULL COMMENT '角色ID', + `node_id` bigint(20) DEFAULT NULL COMMENT '节点ID', + PRIMARY KEY (`id`), + KEY `index_system_auth_auth` (`auth_id`) USING BTREE, + KEY `index_system_auth_node` (`node_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='角色与节点关系表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_auth_node` +-- + +LOCK TABLES `ea8_system_auth_node` WRITE; +/*!40000 ALTER TABLE `ea8_system_auth_node` DISABLE KEYS */; +INSERT INTO `ea8_system_auth_node` VALUES (1,6,1),(2,6,2),(3,6,9),(4,6,12),(5,6,18),(6,6,19),(7,6,21),(8,6,22),(9,6,29),(10,6,30),(11,6,38),(12,6,39),(13,6,45),(14,6,46),(15,6,52),(16,6,53); +/*!40000 ALTER TABLE `ea8_system_auth_node` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_config` +-- + +DROP TABLE IF EXISTS `ea8_system_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_config` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(30) NOT NULL DEFAULT '' COMMENT '变量名', + `group` varchar(30) NOT NULL DEFAULT '' COMMENT '分组', + `value` text COMMENT '变量值', + `remark` varchar(100) DEFAULT '' COMMENT '备注信息', + `sort` int(10) DEFAULT '0', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `group` (`group`) +) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统配置表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_config` +-- + +LOCK TABLES `ea8_system_config` WRITE; +/*!40000 ALTER TABLE `ea8_system_config` DISABLE KEYS */; +INSERT INTO `ea8_system_config` VALUES (41,'alisms_access_key_id','sms','填你的','阿里大于公钥',0,NULL,NULL),(42,'alisms_access_key_secret','sms','填你的','阿里大鱼私钥',0,NULL,NULL),(55,'upload_type','upload','cos','当前上传方式 (local,oss,cos)',0,NULL,NULL),(56,'upload_allow_ext','upload','doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,webp','允许上传的文件类型',0,NULL,1750287957),(57,'upload_allow_size','upload','1024000','允许上传的大小',0,NULL,NULL),(58,'upload_allow_mime','upload','image/gif,image/jpeg,video/x-msvideo,text/plain,image/png','允许上传的文件mime',0,NULL,NULL),(59,'upload_allow_type','upload','local,oss,cos,qnoss','可用的上传文件方式',0,NULL,NULL),(60,'oss_access_key_id','upload','填你的','阿里云oss公钥',0,NULL,NULL),(61,'oss_access_key_secret','upload','填你的','阿里云oss私钥',0,NULL,NULL),(62,'oss_endpoint','upload','填你的','阿里云oss数据中心',0,NULL,NULL),(63,'oss_bucket','upload','填你的','阿里云oss空间名称',0,NULL,NULL),(64,'oss_domain','upload','填你的','阿里云oss访问域名',0,NULL,NULL),(65,'logo_title','site','EasyAdmin','LOGO标题',0,NULL,NULL),(66,'logo_image','site','/static/common/images/logo-1.png','logo图片',0,NULL,NULL),(68,'site_name','site','EasyAdmin后台系统','站点名称',0,NULL,NULL),(69,'site_ico','site','/favicon.ico','浏览器图标',0,NULL,NULL),(70,'site_copyright','site','填你的','版权信息',0,NULL,NULL),(71,'site_beian','site','填你的','备案信息',0,NULL,NULL),(72,'site_version','site','2.0.0','版本信息',0,NULL,NULL),(75,'sms_type','sms','alisms','短信类型',0,NULL,NULL),(76,'miniapp_appid','wechat','填你的','小程序公钥',0,NULL,NULL),(77,'miniapp_appsecret','wechat','填你的','小程序私钥',0,NULL,NULL),(78,'web_appid','wechat','填你的','公众号公钥',0,NULL,NULL),(79,'web_appsecret','wechat','填你的','公众号私钥',0,NULL,NULL),(80,'cos_secret_id','upload','填你的','腾讯云cos密钥',0,NULL,NULL),(81,'cos_secret_key','upload','填你的','腾讯云cos私钥',0,NULL,NULL),(82,'cos_region','upload','填你的','存储桶地域',0,NULL,NULL),(83,'cos_bucket','upload','填你的','存储桶名称',0,NULL,NULL),(84,'qnoss_access_key','upload','填你的','访问密钥',0,NULL,NULL),(85,'qnoss_secret_key','upload','填你的','安全密钥',0,NULL,NULL),(86,'qnoss_bucket','upload','填你的','存储空间',0,NULL,NULL),(87,'qnoss_domain','upload','填你的','访问域名',0,NULL,NULL),(88,'admin_background','site','','',0,1750286981,1750286981),(89,'iframe_open_top','site','0','',0,1750286981,1750286981),(90,'editor_type','site','wangEditor','',0,1750286981,1750286981); +/*!40000 ALTER TABLE `ea8_system_config` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_log` +-- + +DROP TABLE IF EXISTS `ea8_system_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_log` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `admin_id` int(10) unsigned DEFAULT '0' COMMENT '管理员ID', + `url` varchar(1500) NOT NULL DEFAULT '' COMMENT '操作页面', + `method` varchar(50) NOT NULL COMMENT '请求方法', + `title` varchar(100) DEFAULT '' COMMENT '日志标题', + `content` json NOT NULL COMMENT '请求数据', + `response` json DEFAULT NULL COMMENT '回调数据', + `ip` varchar(50) NOT NULL DEFAULT '' COMMENT 'IP', + `useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent', + `create_time` int(11) DEFAULT NULL COMMENT '操作时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='后台操作日志表 - 202412'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_log` +-- + +LOCK TABLES `ea8_system_log` WRITE; +/*!40000 ALTER TABLE `ea8_system_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `ea8_system_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_log_202506` +-- + +DROP TABLE IF EXISTS `ea8_system_log_202506`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_log_202506` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `admin_id` int(10) unsigned DEFAULT '0' COMMENT '管理员ID', + `url` varchar(1500) NOT NULL DEFAULT '' COMMENT '操作页面', + `method` varchar(50) NOT NULL COMMENT '请求方法', + `title` varchar(100) DEFAULT '' COMMENT '日志标题', + `content` json NOT NULL COMMENT '请求数据', + `response` json DEFAULT NULL COMMENT '回调数据', + `ip` varchar(50) NOT NULL DEFAULT '' COMMENT 'IP', + `useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent', + `create_time` int(10) DEFAULT NULL COMMENT '操作时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='后台操作日志表 - 202506'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_log_202506` +-- + +LOCK TABLES `ea8_system_log_202506` WRITE; +/*!40000 ALTER TABLE `ea8_system_log_202506` DISABLE KEYS */; +INSERT INTO `ea8_system_log_202506` VALUES (1,1,'/admin/login/index','post',' - ','{\"ga_code\": \"\", \"password\": \"***********\", \"username\": \"admin\", \"keep_login\": \"1\"}','{\"msg\": \"登录成功\", \"url\": \"https://s.test.com/admin/login/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"b483e956e943d909b1d3f2aec37c823b\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286112),(2,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/OhX1750286139zQsvIZ1.png\"}, \"wait\": 3, \"__token__\": \"6ef5e519176b712394af9707934ed9ee\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286139),(3,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/gyS1750286153BEhYDJ1.png\"}, \"wait\": 3, \"__token__\": \"4e7ff0322bb1cfcded7ff50137885db2\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286153),(4,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/dJx1750286286KHyJYm1.png\"}, \"wait\": 3, \"__token__\": \"90dd12c06d414dee3fe4ae10f222faab\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286286),(5,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/yiM1750286312zPMYrZ1.jpg\"}, \"wait\": 3, \"__token__\": \"72ea231afdcdbc101bd99ae5a3774675\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286312),(6,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/EsK1750286339OcqWjv1.png\"}, \"wait\": 3, \"__token__\": \"2c429f051e89d04d1a242b8e80c3e39e\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286339),(7,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传文件后缀不允许\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"2f01cfcd4a2f84a3e3d7a2db89adb80d\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286373),(8,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/esa1750286418eHnRqo1.webp\"}, \"wait\": 3, \"__token__\": \"6b73b17d34a48a729eddf350393f3fbb\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286418),(9,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/system.uploadfile/add\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/PkV1750286439bQXiaD1.webp\"}, \"wait\": 3, \"__token__\": \"58f7b72a7bfc30284f60e412edad1b79\"}','127.0.0.1','Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',1750286439),(10,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/mall.goods/edit?id=9\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/EtL1750286617DRgIsn1.webp\"}, \"wait\": 3, \"__token__\": \"e757d88d770f43ffaf3fe3b6ce044a9a\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286617),(11,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"上传成功\", \"url\": \"https://s.test.com/admin/mall.goods/edit?id=9\", \"code\": 1, \"data\": {\"url\": \"/storage/20250619/nAM1750286643FjDBHJ1.webp\"}, \"wait\": 3, \"__token__\": \"73f8bff2cdbbc5ef71260cec8418ca28\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286643),(12,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"local\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,php\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"31a4361ab8ca1835d0ae0c8560105ada\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286949),(13,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"file\": \"\", \"group\": \"site\", \"site_ico\": \"/favicon.ico\", \"site_name\": \"EasyAdmin后台系统\", \"site_beian\": \"填你的\", \"editor_type\": \"wangEditor\", \"site_version\": \"2.0.0\", \"site_copyright\": \"填你的\", \"iframe_open_top\": \"0\", \"admin_background\": \"\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"8014ba8de7f0e720221cadc70d1bf109\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286981),(14,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"file\": \"\", \"group\": \"site\", \"site_ico\": \"/favicon.ico\", \"site_name\": \"EasyAdmin后台系统\", \"site_beian\": \"填你的\", \"editor_type\": \"wangEditor\", \"site_version\": \"2.0.0\", \"site_copyright\": \"填你的\", \"iframe_open_top\": \"0\", \"admin_background\": \"\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"4c638bc5f1b934a99ead0bf4474c4db2\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750286993),(15,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,php\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"36a453b3a81b7225da48f393316ae9ce\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287121),(16,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,php\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"316eb851200d3215d9ba4aa19f45f505\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287125),(17,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"1c8a03811a99ebd49080e16386179104\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287130),(18,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"f8e9bdd190c8a66fd6566de239a12345\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287496),(19,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"bb7e2d1e6a3c0bd705d5bb3bf3abe89c\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287647),(20,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,pHp,webP\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存失败Array to string conversion\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"c245bda056bb39885fe2aa5dba39e1ff\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287794),(21,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,pHp,webP\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"03772ce71306e4b51068e8343bd01e4c\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287836),(22,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,webP,phP\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"0df2ef281c88b397a1c19d399922ed0a\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287855),(23,1,'/admin/system.config/save','post','系统配置管理 - 保存','{\"group\": \"upload\", \"cos_bucket\": \"填你的\", \"cos_region\": \"填你的\", \"oss_bucket\": \"填你的\", \"oss_domain\": \"填你的\", \"upload_type\": \"cos\", \"oss_endpoint\": \"填你的\", \"qnoss_bucket\": \"填你的\", \"qnoss_domain\": \"填你的\", \"cos_secret_id\": \"填你的\", \"cos_secret_key\": \"填你的\", \"qnoss_access_key\": \"填你的\", \"qnoss_secret_key\": \"填你的\", \"upload_allow_ext\": \"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg,webP\", \"oss_access_key_id\": \"填你的\", \"upload_allow_size\": \"1024000\", \"oss_access_key_secret\": \"填你的\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.config/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"d2a664ca299d44ad60c19598ed7a12a5\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750287957),(24,1,'/admin/system.auth/add','post','角色权限管理 - 添加','{\"title\": \"代理\", \"remark\": \"代理\"}','{\"msg\": \"新增成功\", \"url\": \"https://s.test.com/admin/system.auth/add\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"bf641c87b7e233ab50c094471358803f\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750288871),(25,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"7\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"236b2ae625c247b51d4438941eb9950c\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750288922),(26,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"7\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"f1e368ee27bd194530438ae790c47312\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750289188),(27,1,'/admin/system.auth/delete?id=1','post','角色权限管理 - 删除','{\"id\": \"1\"}','{\"msg\": \"删除成功\", \"url\": \"https://s.test.com/admin/system.auth/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"a0a514501cf89bcfe63e06f0565eb30f\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750289508),(28,1,'/admin/system.auth/delete?id=2','post','角色权限管理 - 删除','{\"id\": \"2\"}','{\"msg\": \"删除成功\", \"url\": \"https://s.test.com/admin/system.auth/index\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"f06c07e502f6ff761208e262a7b580e8\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750289671),(29,1,'/admin/system.auth/delete?id=1','post','角色权限管理 - 删除','{\"id\": \"1\"}','{\"msg\": \"超级管理员和业务员角色不能删除\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"181785bb58a37cde0af53776291d81be\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290096),(30,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"7a43934457cbda8f4a5e6759b3af8d8f\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290120),(31,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"18d4c5acc4e1dca0f85c172293807710\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290313),(32,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存失败\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"92e180cf8dfbd65a36c9c87143abd9fb\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290425),(33,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"7647e502f9057b94646e5a338a56686b\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290468),(34,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"fc7be4cd083b07df4ceb6e4d4601040b\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290476),(35,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存失败\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"61981922b96145881d2e3bbf9d5d7430\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290480),(36,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存失败\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"e7c7d63c4d4d8a832cf209f8c340ee38\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290526),(37,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存失败业务员角色不能其他角色共存\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"ae70c01cfc3cbc3cbc68d262f0927999\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290588),(38,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存失败业务员角色不能其他角色共存\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"c2e8051be72cef67fa5318450c3c3c1e\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290598),(39,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存失败:业务员角色不能其他角色共存\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"311c34e1b36b381d216f7265028f8c1f\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290608),(40,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"e440166d65d4437cb2b39c10c4393033\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290615),(41,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"auth_ids\": {\"1\": \"on\"}, \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"aa4b4088021f6cd9be94064a7e2f4afb\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290628),(42,1,'/admin/system.admin/edit?id=1','post','管理员管理 - 编辑','{\"id\": \"1\", \"file\": \"\", \"phone\": \"***********\", \"remark\": \"admin\", \"head_img\": \"/static/admin/images/head.jpg\", \"username\": \"admin\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/edit?id=1\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"10ec0f1654577b588f9e0bfa7360fd48\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290634),(43,1,'/admin/ajax/upload','post',' - ','[]','{\"msg\": \"cURL error 3: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"f413593f27cb5cd99139f0adb6bcbfda\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290642),(44,1,'/admin/system.admin/add','post','管理员管理 - 添加','{\"file\": \"\", \"phone\": \"***********\", \"remark\": \"zhangsan\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/storage/20250619/nAM1750286643FjDBHJ1.webp\", \"password\": \"***********\", \"username\": \"zhangsan\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/add\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"ff9f82ffd56c277abb685b7e30c500c1\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290682),(45,1,'/admin/system.admin/add','post','管理员管理 - 添加','{\"file\": \"\", \"phone\": \"***********\", \"remark\": \"zhangsddd\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/storage/20250619/nAM1750286643FjDBHJ1.webp\", \"password\": \"***********\", \"username\": \"zhangsddd\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/add\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"64b1b618fb5acec35bdd0984b5a960ba\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290771),(46,1,'/admin/system.admin/add','post','管理员管理 - 添加','{\"file\": \"\", \"phone\": \"***********\", \"remark\": \"sdss\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/storage/20250619/EtL1750286617DRgIsn1.webp\", \"password\": \"***********\", \"username\": \"sdss\"}','{\"msg\": \"保存失败业务员角色不能其他角色共存\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"c419a31f8c9cebfb361c15f4b0b180e0\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290815),(47,1,'/admin/system.admin/add','post','管理员管理 - 添加','{\"file\": \"\", \"phone\": \"***********\", \"remark\": \"sdss\", \"auth_ids\": {\"1\": \"on\", \"2\": \"on\"}, \"head_img\": \"/storage/20250619/EtL1750286617DRgIsn1.webp\", \"password\": \"***********\", \"username\": \"sdss\"}','{\"msg\": \"保存失败业务员角色不能其他角色共存\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"b733b22309acb9805219034ff9686f80\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290817),(48,1,'/admin/system.admin/add','post','管理员管理 - 添加','{\"file\": \"\", \"phone\": \"***********\", \"remark\": \"sdss\", \"auth_ids\": {\"2\": \"on\"}, \"head_img\": \"/storage/20250619/EtL1750286617DRgIsn1.webp\", \"password\": \"***********\", \"username\": \"sdss\"}','{\"msg\": \"保存成功\", \"url\": \"https://s.test.com/admin/system.admin/add\", \"code\": 1, \"data\": \"\", \"wait\": 3, \"__token__\": \"ac6c9d8f6fad8179ac59bdaeb0cde363\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290821),(49,1,'/admin/system.auth/delete?id=1','post','角色权限管理 - 删除','{\"id\": \"1\"}','{\"msg\": \"超级管理员和业务员角色不能删除\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"8df12616fdb31e4b0a9397a13da6dfd5\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290966),(50,1,'/admin/system.auth/delete?id=2','post','角色权限管理 - 删除','{\"id\": \"2\"}','{\"msg\": \"超级管理员和业务员角色不能删除\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"643d453581669c713dc4e802a55bb99f\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290970),(51,1,'/admin/system.auth/delete?id=1','post','角色权限管理 - 删除','{\"id\": \"1\"}','{\"msg\": \"超级管理员和业务员角色不能删除\", \"url\": \"\", \"code\": 0, \"data\": \"\", \"wait\": 3, \"__token__\": \"824aa18ad287d485758af9450897b358\"}','127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',1750290974); +/*!40000 ALTER TABLE `ea8_system_log_202506` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_menu` +-- + +DROP TABLE IF EXISTS `ea8_system_menu`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_menu` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `pid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '父id', + `title` varchar(100) NOT NULL DEFAULT '' COMMENT '名称', + `icon` varchar(100) NOT NULL DEFAULT '' COMMENT '菜单图标', + `href` varchar(100) NOT NULL DEFAULT '' COMMENT '链接', + `params` varchar(500) DEFAULT '' COMMENT '链接参数', + `target` varchar(20) NOT NULL DEFAULT '_self' COMMENT '链接打开方式', + `sort` int(11) DEFAULT '0' COMMENT '菜单排序', + `status` tinyint(4) DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + `delete_time` int(11) DEFAULT NULL COMMENT '删除时间', + `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统添加', + PRIMARY KEY (`id`), + KEY `title` (`title`), + KEY `href` (`href`) +) ENGINE=InnoDB AUTO_INCREMENT=255 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统菜单表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_menu` +-- + +LOCK TABLES `ea8_system_menu` WRITE; +/*!40000 ALTER TABLE `ea8_system_menu` DISABLE KEYS */; +INSERT INTO `ea8_system_menu` VALUES (227,99999999,'后台首页','fa fa-home','index/welcome','','_self',0,1,NULL,NULL,1573120497,NULL,0),(228,0,'系统管理','fa fa-cog','','','_self',0,1,'',NULL,1588999529,NULL,0),(234,228,'菜单管理','fa fa-tree','system.menu/index','','_self',10,1,'',NULL,1588228555,NULL,0),(244,228,'管理员管理','fa fa-user','system.admin/index','','_self',12,1,'',1573185011,1588228573,NULL,0),(245,228,'角色管理','fa fa-bitbucket-square','system.auth/index','','_self',11,1,'',1573435877,1588228634,NULL,0),(246,228,'节点管理','fa fa-list','system.node/index','','_self',9,1,'',1573435919,1588228648,NULL,0),(247,228,'配置管理','fa fa-asterisk','system.config/index','','_self',8,1,'',1573457448,1588228566,NULL,0),(248,228,'上传管理','fa fa-arrow-up','system.uploadfile/index','','_self',0,1,'',1573542953,1588228043,NULL,0),(249,0,'商城管理','fa fa-list','','','_self',0,1,'',1589439884,1589439884,NULL,0),(250,249,'商品分类','fa fa-calendar-check-o','mall.cate/index','','_self',0,1,'',1589439910,1589439966,NULL,0),(251,249,'商品管理','fa fa-list','mall.goods/index','','_self',0,1,'',1589439931,1589439942,NULL,0),(252,228,'快捷入口','fa fa-list','system.quick/index','','_self',0,1,'',1589623683,1589623683,NULL,0),(253,228,'日志管理','fa fa-connectdevelop','system.log/index','','_self',0,1,'',1589623684,1589623684,NULL,0),(254,228,'CURD可视化','fa fa fa-shower','system.curd_generate/index','','_self',0,1,'',1589623684,1589623684,NULL,0); +/*!40000 ALTER TABLE `ea8_system_menu` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_node` +-- + +DROP TABLE IF EXISTS `ea8_system_node`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_node` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `node` varchar(100) DEFAULT NULL COMMENT '节点代码', + `title` varchar(500) DEFAULT NULL COMMENT '节点标题', + `type` tinyint(1) DEFAULT '3' COMMENT '节点类型(1:控制器,2:节点)', + `is_auth` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启动RBAC权限控制', + `create_time` int(10) DEFAULT NULL COMMENT '创建时间', + `update_time` int(10) DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`), + KEY `node` (`node`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统节点表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_node` +-- + +LOCK TABLES `ea8_system_node` WRITE; +/*!40000 ALTER TABLE `ea8_system_node` DISABLE KEYS */; +INSERT INTO `ea8_system_node` VALUES (1,'system.admin','管理员管理',1,1,1589580432,1589580432),(2,'system.admin/index','列表',2,1,1589580432,1589580432),(3,'system.admin/add','添加',2,1,1589580432,1589580432),(4,'system.admin/edit','编辑',2,1,1589580432,1589580432),(5,'system.admin/password','编辑',2,1,1589580432,1589580432),(6,'system.admin/delete','删除',2,1,1589580432,1589580432),(7,'system.admin/modify','属性修改',2,1,1589580432,1589580432),(8,'system.admin/export','导出',2,1,1589580432,1589580432),(9,'system.auth','角色权限管理',1,1,1589580432,1589580432),(10,'system.auth/authorize','授权',2,1,1589580432,1589580432),(11,'system.auth/saveAuthorize','授权保存',2,1,1589580432,1589580432),(12,'system.auth/index','列表',2,1,1589580432,1589580432),(13,'system.auth/add','添加',2,1,1589580432,1589580432),(14,'system.auth/edit','编辑',2,1,1589580432,1589580432),(15,'system.auth/delete','删除',2,1,1589580432,1589580432),(16,'system.auth/export','导出',2,1,1589580432,1589580432),(17,'system.auth/modify','属性修改',2,1,1589580432,1589580432),(18,'system.config','系统配置管理',1,1,1589580432,1589580432),(19,'system.config/index','列表',2,1,1589580432,1589580432),(20,'system.config/save','保存',2,1,1589580432,1589580432),(21,'system.menu','菜单管理',1,1,1589580432,1589580432),(22,'system.menu/index','列表',2,1,1589580432,1589580432),(23,'system.menu/add','添加',2,1,1589580432,1589580432),(24,'system.menu/edit','编辑',2,1,1589580432,1589580432),(25,'system.menu/delete','删除',2,1,1589580432,1589580432),(26,'system.menu/modify','属性修改',2,1,1589580432,1589580432),(27,'system.menu/getMenuTips','添加菜单提示',2,1,1589580432,1589580432),(28,'system.menu/export','导出',2,1,1589580432,1589580432),(29,'system.node','系统节点管理',1,1,1589580432,1589580432),(30,'system.node/index','列表',2,1,1589580432,1589580432),(31,'system.node/refreshNode','系统节点更新',2,1,1589580432,1589580432),(32,'system.node/clearNode','清除失效节点',2,1,1589580432,1589580432),(33,'system.node/add','添加',2,1,1589580432,1589580432),(34,'system.node/edit','编辑',2,1,1589580432,1589580432),(35,'system.node/delete','删除',2,1,1589580432,1589580432),(36,'system.node/export','导出',2,1,1589580432,1589580432),(37,'system.node/modify','属性修改',2,1,1589580432,1589580432),(38,'system.uploadfile','上传文件管理',1,1,1589580432,1589580432),(39,'system.uploadfile/index','列表',2,1,1589580432,1589580432),(40,'system.uploadfile/add','添加',2,1,1589580432,1589580432),(41,'system.uploadfile/edit','编辑',2,1,1589580432,1589580432),(42,'system.uploadfile/delete','删除',2,1,1589580432,1589580432),(43,'system.uploadfile/export','导出',2,1,1589580432,1589580432),(44,'system.uploadfile/modify','属性修改',2,1,1589580432,1589580432),(45,'mall.cate','商品分类管理',1,1,1589580432,1589580432),(46,'mall.cate/index','列表',2,1,1589580432,1589580432),(47,'mall.cate/add','添加',2,1,1589580432,1589580432),(48,'mall.cate/edit','编辑',2,1,1589580432,1589580432),(49,'mall.cate/delete','删除',2,1,1589580432,1589580432),(50,'mall.cate/export','导出',2,1,1589580432,1589580432),(51,'mall.cate/modify','属性修改',2,1,1589580432,1589580432),(52,'mall.goods','商城商品管理',1,1,1589580432,1589580432),(53,'mall.goods/index','列表',2,1,1589580432,1589580432),(54,'mall.goods/stock','入库',2,1,1589580432,1589580432),(55,'mall.goods/add','添加',2,1,1589580432,1589580432),(56,'mall.goods/edit','编辑',2,1,1589580432,1589580432),(57,'mall.goods/delete','删除',2,1,1589580432,1589580432),(58,'mall.goods/export','导出',2,1,1589580432,1589580432),(59,'mall.goods/modify','属性修改',2,1,1589580432,1589580432),(60,'system.quick','快捷入口管理',1,1,1589623188,1589623188),(61,'system.quick/index','列表',2,1,1589623188,1589623188),(62,'system.quick/add','添加',2,1,1589623188,1589623188),(63,'system.quick/edit','编辑',2,1,1589623188,1589623188),(64,'system.quick/delete','删除',2,1,1589623188,1589623188),(65,'system.quick/export','导出',2,1,1589623188,1589623188),(66,'system.quick/modify','属性修改',2,1,1589623188,1589623188),(67,'system.log','操作日志管理',1,1,1589623188,1589623188),(68,'system.log/index','列表',2,1,1589623188,1589623188),(69,'system.curd_generate','CURD可视化管理',1,1,1589623188,1589623188),(70,'system.curd_generate/index','列表',2,1,1589623188,1589623188),(71,'system.curd_generate/save','操作',2,1,1589623188,1589623188); +/*!40000 ALTER TABLE `ea8_system_node` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_quick` +-- + +DROP TABLE IF EXISTS `ea8_system_quick`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_quick` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(20) NOT NULL COMMENT '快捷入口名称', + `icon` varchar(100) DEFAULT NULL COMMENT '图标', + `href` varchar(255) DEFAULT NULL COMMENT '快捷链接', + `sort` int(11) DEFAULT '0' COMMENT '排序', + `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态(1:禁用,2:启用)', + `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + `delete_time` int(11) DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统快捷入口表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_quick` +-- + +LOCK TABLES `ea8_system_quick` WRITE; +/*!40000 ALTER TABLE `ea8_system_quick` DISABLE KEYS */; +INSERT INTO `ea8_system_quick` VALUES (1,'管理员管理','fa fa-user','system.admin/index',0,1,'',1589624097,1589624792,NULL),(2,'角色管理','fa fa-bitbucket-square','system.auth/index',0,1,'',1589624772,1589624781,NULL),(3,'菜单管理','fa fa-tree','system.menu/index',0,1,NULL,1589624097,1589624792,NULL),(6,'节点管理','fa fa-list','system.node/index',0,1,NULL,1589624772,1589624781,NULL),(7,'配置管理','fa fa-asterisk','system.config/index',0,1,NULL,1589624097,1589624792,NULL),(8,'上传管理','fa fa-arrow-up','system.uploadfile/index',0,1,NULL,1589624772,1589624781,NULL),(10,'商品分类','fa fa-calendar-check-o','mall.cate/index',0,1,NULL,1589624097,1589624792,NULL),(11,'商品管理','fa fa-list','mall.goods/index',0,1,NULL,1589624772,1589624781,NULL); +/*!40000 ALTER TABLE `ea8_system_quick` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ea8_system_uploadfile` +-- + +DROP TABLE IF EXISTS `ea8_system_uploadfile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ea8_system_uploadfile` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `upload_type` varchar(20) NOT NULL DEFAULT 'local' COMMENT '存储位置', + `original_name` varchar(255) DEFAULT '' COMMENT '文件原名', + `url` varchar(255) NOT NULL DEFAULT '' COMMENT '物理路径', + `image_width` varchar(30) NOT NULL DEFAULT '' COMMENT '宽度', + `image_height` varchar(30) NOT NULL DEFAULT '' COMMENT '高度', + `image_type` varchar(30) NOT NULL DEFAULT '' COMMENT '图片类型', + `image_frames` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '图片帧数', + `mime_type` varchar(100) NOT NULL DEFAULT '' COMMENT 'mime类型', + `file_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小', + `file_ext` varchar(100) DEFAULT '', + `sha1` varchar(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码', + `create_time` int(10) DEFAULT NULL COMMENT '创建日期', + `update_time` int(10) DEFAULT NULL COMMENT '更新时间', + `upload_time` int(10) DEFAULT NULL COMMENT '上传时间', + PRIMARY KEY (`id`), + KEY `upload_type` (`upload_type`) +) ENGINE=InnoDB AUTO_INCREMENT=306 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='上传文件表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ea8_system_uploadfile` +-- + +LOCK TABLES `ea8_system_uploadfile` WRITE; +/*!40000 ALTER TABLE `ea8_system_uploadfile` DISABLE KEYS */; +INSERT INTO `ea8_system_uploadfile` VALUES (286,'oss','image/jpeg','https://lxn-99php.oss-cn-shenzhen.aliyuncs.com/upload/20191111/0a6de1ac058ee134301501899b84ecb1.jpg','','','',0,'image/jpeg',0,'jpg','',1573612437,NULL,NULL),(287,'oss','image/jpeg','https://lxn-99php.oss-cn-shenzhen.aliyuncs.com/upload/20191111/46d7384f04a3bed331715e86a4095d15.jpg','','','',0,'image/jpeg',0,'jpg','',1573612437,NULL,NULL),(288,'oss','image/x-icon','https://lxn-99php.oss-cn-shenzhen.aliyuncs.com/upload/20191111/7d32671f4c1d1b01b0b28f45205763f9.ico','','','',0,'image/x-icon',0,'ico','',1573612437,NULL,NULL),(289,'oss','image/jpeg','https://lxn-99php.oss-cn-shenzhen.aliyuncs.com/upload/20191111/28cefa547f573a951bcdbbeb1396b06f.jpg','','','',0,'image/jpeg',0,'jpg','',1573612437,NULL,NULL),(290,'oss','image/jpeg','https://lxn-99php.oss-cn-shenzhen.aliyuncs.com/upload/20191111/2c412adf1b30c8be3a913e603c7b6e4a.jpg','','','',0,'image/jpeg',0,'jpg','',1573612437,NULL,NULL),(296,'cos','image/jpeg','https://easyadmin-1251997243.cos.ap-guangzhou.myqcloud.com/upload/20191114/2381eaf81208ac188fa994b6f2579953.jpg','','','',0,'image/jpeg',0,'jpg','',1573612437,NULL,NULL),(297,'local','v9 (1).png','/storage/20250619/OhX1750286139zQsvIZ1.png','','','',0,'image/webp',7090,'png','',1750286139,1750286139,1750286139),(298,'local','v8.png','/storage/20250619/gyS1750286153BEhYDJ1.png','','','',0,'image/webp',4296,'png','',1750286153,1750286153,1750286153),(299,'local','v5 (1).png','/storage/20250619/dJx1750286286KHyJYm1.png','','','',0,'image/webp',6464,'png','',1750286286,1750286286,1750286286),(300,'local','IMAGE 2025-05-10 14:18:34.jpg','/storage/20250619/yiM1750286312zPMYrZ1.jpg','','','',0,'image/webp',94586,'jpg','',1750286312,1750286312,1750286312),(301,'local','截屏2025-06-07 16.18.07.png','/storage/20250619/EsK1750286339OcqWjv1.png','','','',0,'image/webp',20206,'png','',1750286339,1750286339,1750286339),(302,'local','20250619064018_f491c1f07412ea4ebb8be07b0ea68c3d.webp','/storage/20250619/esa1750286418eHnRqo1.webp','','','',0,'image/webp',20474,'webp','',1750286418,1750286418,1750286418),(303,'local','20250619064039_fa2a16ced325179672ef8f180c3c457e.webp','/storage/20250619/PkV1750286439bQXiaD1.webp','','','',0,'image/webp',36518,'webp','',1750286439,1750286439,1750286439),(304,'local','20250619064337_fe07eee1f0268775c646e844b05bff2d.webp','/storage/20250619/EtL1750286617DRgIsn1.webp','','','',0,'image/webp',4796,'webp','',1750286617,1750286617,1750286617),(305,'local','20250619064403_0564d4ec4885448fc55b26b11c1ae743.webp','/storage/20250619/nAM1750286643FjDBHJ1.webp','','','',0,'image/webp',4796,'webp','',1750286643,1750286643,1750286643); +/*!40000 ALTER TABLE `ea8_system_uploadfile` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-07-20 22:15:16 diff --git a/config/lang.php b/config/lang.php new file mode 100644 index 0000000..0d8b693 --- /dev/null +++ b/config/lang.php @@ -0,0 +1,27 @@ + env('DEFAULT_LANG', 'zh-cn'), + // 允许的语言列表 + 'allow_lang_list' => [], + // 多语言自动侦测变量名 + 'detect_var' => 'lang', + // 是否使用Cookie记录 + 'use_cookie' => true, + // 多语言cookie变量 + 'cookie_var' => 'think_lang', + // 多语言header变量 + 'header_var' => 'think-lang', + // 扩展语言包 + 'extend_list' => [], + // Accept-Language转义为对应语言包名称 + 'accept_language' => [ + 'zh-hans-cn' => 'zh-cn', + ], + // 是否支持语言分组 + 'allow_group' => false, +]; diff --git a/config/log.php b/config/log.php new file mode 100644 index 0000000..0d406f8 --- /dev/null +++ b/config/log.php @@ -0,0 +1,45 @@ + 'file', + // 日志记录级别 + 'level' => [], + // 日志类型记录的通道 ['error'=>'email',...] + 'type_channel' => [], + // 关闭全局日志写入 + 'close' => false, + // 全局日志处理 支持闭包 + 'processor' => null, + + // 日志通道列表 + 'channels' => [ + 'file' => [ + // 日志记录方式 + 'type' => 'File', + // 日志保存目录 + 'path' => '', + // 单文件日志写入 + 'single' => false, + // 独立日志级别 + 'apart_level' => [], + // 最大日志文件数量 + 'max_files' => 0, + // 使用JSON格式记录 + 'json' => false, + // 日志处理 + 'processor' => null, + // 关闭通道日志写入 + 'close' => false, + // 日志输出格式化 + 'format' => '[%s][%s] %s', + // 是否实时写入 + 'realtime_write' => false, + ], + // 其它日志通道配置 + ], + +]; diff --git a/config/logviewer.php b/config/logviewer.php new file mode 100644 index 0000000..d51a087 --- /dev/null +++ b/config/logviewer.php @@ -0,0 +1,23 @@ + 'EasyAdmin8框架日志', + + // 默认显示日志应用模块 + 'default_module' => 'admin', + + // 常用的日志应用模块 + 'modules' => [ + 'admin', + 'home', + 'index', + 'api' + ], + + // layui css 路径 + 'layui_css_path' => '/static/plugs/layui-v2.x/css/layui.css', + // layui js 路径 + 'layui_js_path' => '/static/plugs/layui-v2.x/layui.js', + +]; \ No newline at end of file diff --git a/config/middleware.php b/config/middleware.php new file mode 100644 index 0000000..7e1972f --- /dev/null +++ b/config/middleware.php @@ -0,0 +1,8 @@ + [], + // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行 + 'priority' => [], +]; diff --git a/config/route.php b/config/route.php new file mode 100644 index 0000000..ada99d0 --- /dev/null +++ b/config/route.php @@ -0,0 +1,47 @@ + '/', + // URL伪静态后缀 + 'url_html_suffix' => '', + // URL普通方式参数 用于自动生成 + 'url_common_param' => true, + // 是否开启路由延迟解析 + 'url_lazy_route' => false, + // 是否强制使用路由 + 'url_route_must' => false, + // 合并路由规则 + 'route_rule_merge' => false, + // 路由是否完全匹配 + 'route_complete_match' => false, + // 访问控制器层名称 + 'controller_layer' => 'controller', + // 空控制器名 + 'empty_controller' => 'Error', + // 是否使用控制器后缀 + 'controller_suffix' => false, + // 默认的路由变量规则 + 'default_route_pattern' => '[\w\.]+', + // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 + 'request_cache_key' => false, + // 请求缓存有效期 + 'request_cache_expire' => null, + // 全局请求缓存排除规则 + 'request_cache_except' => [], + // 默认控制器名 + 'default_controller' => 'Index', + // 默认操作名 + 'default_action' => 'index', + // 操作方法后缀 + 'action_suffix' => '', + // 默认JSONP格式返回的处理方法 + 'default_jsonp_handler' => 'jsonpReturn', + // 默认JSONP处理方法 + 'var_jsonp_handler' => 'callback', + // 操作方法的参数绑定方式 route get param + 'action_bind_param' => 'param', +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..120cb90 --- /dev/null +++ b/config/session.php @@ -0,0 +1,19 @@ + 'PHPSESSID', + // SESSION_ID的提交变量,解决flash上传跨域 + 'var_session_id' => '', + // 驱动方式 支持file cache + 'type' => 'file', + // 存储连接标识 当type使用cache的时候有效 + 'store' => null, + // 过期时间 + 'expire' => 86400, + // 前缀 + 'prefix' => '', +]; diff --git a/config/trace.php b/config/trace.php new file mode 100644 index 0000000..fad2392 --- /dev/null +++ b/config/trace.php @@ -0,0 +1,10 @@ + 'Html', + // 读取的日志通道名 + 'channel' => '', +]; diff --git a/config/view.php b/config/view.php new file mode 100644 index 0000000..01259a0 --- /dev/null +++ b/config/view.php @@ -0,0 +1,25 @@ + 'Think', + // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 + 'auto_rule' => 1, + // 模板目录名 + 'view_dir_name' => 'view', + // 模板后缀 + 'view_suffix' => 'html', + // 模板文件名分隔符 + 'view_depr' => DIRECTORY_SEPARATOR, + // 模板引擎普通标签开始标记 + 'tpl_begin' => '{', + // 模板引擎普通标签结束标记 + 'tpl_end' => '}', + // 标签库标签开始标记 + 'taglib_begin' => '{', + // 标签库标签结束标记 + 'taglib_end' => '}', +]; diff --git a/database/migrations/20251004144951_article_cates.php b/database/migrations/20251004144951_article_cates.php new file mode 100644 index 0000000..b821380 --- /dev/null +++ b/database/migrations/20251004144951_article_cates.php @@ -0,0 +1,43 @@ +table('article_cates')->drop()->save(); + $this->table('article_cates', ['comment' => '文章分类表']) + ->addColumn('title', 'string', ['limit' => 50, 'null' => false, 'comment' => '分类名称']) + ->addColumn('sort', 'integer', ['default' => 0, 'null' => false, 'comment' => '排序']) + ->addColumn('status', 'boolean', ['default' => 1, 'null' => false, 'comment' => '状态 1:启用 0:禁用']) + ->addColumn('create_time', 'integer', ['null' => true, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['null' => true, 'comment' => '更新时间']) + ->addIndex(['title'], ['unique' => true, 'name' => 'idx_title']) + ->addIndex(['status','sort'], ['name' => 'idx_status_sort']) + ->addIndex(['create_time','sort'], ['name' => 'idx_create_time_sort']) + ->save(); + } +} diff --git a/database/migrations/20251004145027_articles.php b/database/migrations/20251004145027_articles.php new file mode 100644 index 0000000..405f57f --- /dev/null +++ b/database/migrations/20251004145027_articles.php @@ -0,0 +1,48 @@ +table('articles')->drop()->save(); + $this->table('articles', ['comment' => '文章表']) + ->addColumn('title', 'string', ['limit' => 50, 'null' => false, 'comment' => '分类名称']) + ->addColumn('cate_id', 'integer', ['null' => false, 'comment' => '分类ID']) + ->addColumn('cover', 'string', ['limit' => 255, 'null' => true, 'default' => '', 'comment' => '封面']) + ->addColumn('summary', 'string', ['limit' => 255, 'null' => true, 'default' => '', 'comment' => '简介']) + ->addColumn('content', 'text', ['null' => true, 'comment' => '内容']) + ->addColumn('author', 'string', ['limit' => 50, 'null' => true, 'default' => '', 'comment' => '作者']) + ->addColumn('sort', 'integer', ['default' => 0, 'null' => false, 'comment' => '排序']) + ->addColumn('status', 'boolean', ['default' => 1, 'null' => false, 'comment' => '状态 1:启用 0:禁用']) + ->addColumn('create_time', 'integer', ['null' => true, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['null' => true, 'comment' => '更新时间']) + ->addIndex(['title','cate_id'], ['unique' => true, 'name' => 'idx_title_cate_id']) + ->addIndex(['status','sort'], ['name' => 'idx_status_sort']) + ->addIndex(['create_time','sort'], ['name' => 'idx_create_time_sort']) + ->save(); + } +} diff --git a/enums/LangEnum.php b/enums/LangEnum.php new file mode 100644 index 0000000..e3f45cc --- /dev/null +++ b/enums/LangEnum.php @@ -0,0 +1,92 @@ + '中文', + self::EN => '英语', + self::AR => '阿拉伯语', + self::UR => '乌尔都语', + self::SI => '僧伽罗语', + self::ES => '西班牙语', + self::TR => '土耳其语', + self::UK => '乌克兰语', + self::SV => '瑞典语', + self::PT => '葡萄牙语', + self::KO => '韩语', + self::IT => '意大利语', + self::FR => '法语', + self::JA => '日语', + self::DE => '德语', + self::RU => '俄语', + self::RO => '罗马尼亚语', + + }; + } + + public function lang(): string + { + return match ($this) { + self::ZH => '中文', + self::EN => 'English', + self::AR => 'عربي', + self::UR => 'اردو', + self::SI => 'සිංහල', + self::ES => 'Español', + self::TR => 'Türkçe', + self::UK => 'українська', + self::SV => 'Svenska', + self::PT => 'Português', + self::KO => '한국인', + self::IT => 'Italiano', + self::FR => 'Français', + self::JA => '日本語', + self::DE => 'Deutsch', + self::RU => 'Русский', + self::RO => 'Română', + }; + } + public function is_open(): bool + { + return match ($this) { + self::EN,self::RU,self::AR,self::JA,self::RO,self::ZH,self::ES=> true, + default => false + }; + } + public function getLangList(): array + { + return match ($this) { + self::ZH => ['zh-cn', 'zh-hans-cn', 'zh-hant-cn', 'zh-hk', 'zh-mo', 'zh-tw','cn'], + self::EN => ['en-us'], + default => [] + }; + } + public function extend(): string + { + return config_path('lang') . $this->value . '.json';// + } + +} diff --git a/extend/.gitignore b/extend/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/extend/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/jobs/TestJob.php b/jobs/TestJob.php new file mode 100644 index 0000000..709fba2 --- /dev/null +++ b/jobs/TestJob.php @@ -0,0 +1,27 @@ +] + * +---------------------------------------------------------------------- + * | Tool: [ PhpStorm ] + * +---------------------------------------------------------------------- + * | Date: [ 2025/10/5 ] + * +---------------------------------------------------------------------- + * | 版权所有 [ 2020~2025 kaadon.com ] + * +---------------------------------------------------------------------- + **/ + +namespace jobs; + +use Kaadon\ThinkBase\abstracts\BaseJobs; +use Kaadon\ThinkBase\traits\JobsTrait; + +class TestJob extends BaseJobs +{ + use JobsTrait; + +} \ No newline at end of file diff --git a/log.md b/log.md new file mode 100644 index 0000000..9f7c264 --- /dev/null +++ b/log.md @@ -0,0 +1,5 @@ +> 2025年03月27日 重构了 `model` 的调用方式 原因查看 [https://github.com/top-think/think-orm/issues/704](https://github.com/top-think/think-orm/issues/704) +> +> 2025年01月01日 `PHP` 要求升级到 `8.1+` +> +> 2024年05月 更新 `EasyAdmin8` 重置版,多处语法、写法进行变更 \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..cbc7868 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,8 @@ + + Options +FollowSymlinks -Multiviews + RewriteEngine On + + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] + diff --git a/public/1.mp3 b/public/1.mp3 new file mode 100644 index 0000000..e36f64f Binary files /dev/null and b/public/1.mp3 differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..74d849f Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..e3c0fe9 --- /dev/null +++ b/public/index.php @@ -0,0 +1,24 @@ + +// +---------------------------------------------------------------------- + +// [ 应用入口文件 ] +namespace think; + +require __DIR__ . '/../vendor/autoload.php'; + +// 执行HTTP应用并响应 +$http = (new App())->http; + +$response = $http->run(); + +$response->send(); + +$http->end($response); diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/public/router.php b/public/router.php new file mode 100644 index 0000000..9b39a62 --- /dev/null +++ b/public/router.php @@ -0,0 +1,19 @@ + +// +---------------------------------------------------------------------- +// $Id$ + +if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { + return false; +} else { + $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php'; + + require __DIR__ . "/index.php"; +} diff --git a/public/static/.gitignore b/public/static/.gitignore new file mode 100644 index 0000000..b722e9e --- /dev/null +++ b/public/static/.gitignore @@ -0,0 +1 @@ +!.gitignore \ No newline at end of file diff --git a/public/static/addons/.keep b/public/static/addons/.keep new file mode 100644 index 0000000..e69de29 diff --git a/public/static/addons/alisms/js/config.js b/public/static/addons/alisms/js/config.js new file mode 100644 index 0000000..c957d08 --- /dev/null +++ b/public/static/addons/alisms/js/config.js @@ -0,0 +1,30 @@ +define(["jquery", "admin", "vue"], function ($, admin, Vue) { + + var Controller = { + index: function () { + + /** + * 添加模板 + */ + $('.add-template').on('click', function () { + var dataKey = document.querySelectorAll("tr[data-key]"), + key = 0; + if (dataKey.length > 0) key = parseInt($(dataKey[dataKey.length - 1]).attr('data-key')) + 1; + var html = ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' 删除\n' + + ' '; + $('.template-list').append(html); + }); + + $('body').on('click', '[delete-template]', function () { + $(this).parent().parent().remove(); + }); + + admin.listen(); + } + }; + return Controller; +}); \ No newline at end of file diff --git a/public/static/addons/alisms/js/record.js b/public/static/addons/alisms/js/record.js new file mode 100644 index 0000000..dcb8bb6 --- /dev/null +++ b/public/static/addons/alisms/js/record.js @@ -0,0 +1,37 @@ +define(["jquery", "admin",], function ($, admin) { + + var init = { + table_elem: 'currentTable', + table_render_id: 'currentTableRenderId', + index_url: '/addons/alisms/record/index', + delete_url: '/addons/alisms/record/del', + }; + + var Controller = { + + index: function () { + admin.table.render({ + elem: '#' + init.table_elem, + id: init.table_render_id, + url: init.index_url, + init: init, + toolbar: ['refresh', 'delete'], + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', sort: true, align: "center"}, + {field: 'phone', minWidth: 80, title: '发送手机', align: "center"}, + {field: 'content', minWidth: 80, title: '短信内容', align: "center"}, + {field: 'template', minWidth: 80, title: '短信模板', align: "center"}, + {field: 'result', minWidth: 80, title: '返回结果', align: "center"}, + {field: 'create_time', minWidth: 80, title: '发送时间', align: "center", search: 'range'}, + { + width: 250, align: 'center', title: '操作', init: init, templet: admin.table.tool, operat: ['delete'] + } + ]], + }); + + admin.listen(); + } + }; + return Controller; +}); \ No newline at end of file diff --git a/public/static/admin/css/color.css b/public/static/admin/css/color.css new file mode 100644 index 0000000..0cecb07 --- /dev/null +++ b/public/static/admin/css/color.css @@ -0,0 +1,59 @@ +.green { + color: #11c26d !important; +} + +.red { + color: #ff4c52 !important; +} + +.cyan { + color: #0bb2d4 !important; +} + +.purple { + color: #9463f7 !important; +} + +.blue { + color: #3e8ef7 !important; +} + +.orange { + color: #eb6709 !important; +} + +.indigo { + color: #6610f2 !important; +} + +.pink { + color: #e83e8c !important; +} + +.teal { + color: #20c997 !important; +} + +.white { + color: #fff !important; +} + +.gray { + color: #6c757d !important; +} + +.gray-dark { + color: #343a40 !important; +} + +.secondary { + color: #6c757d !important; +} + +.yellow { + color: rgb(255, 214, 102) !important; +} + +.magenta { + color: #eb2f96 !important; +} diff --git a/public/static/admin/css/iconfont.css b/public/static/admin/css/iconfont.css new file mode 100644 index 0000000..f4fc709 --- /dev/null +++ b/public/static/admin/css/iconfont.css @@ -0,0 +1,25 @@ + +@font-face {font-family: "iconfont"; + src: url('../fonts/iconfont/iconfont.eot?t=1487643189178'); /* IE9*/ + src: url('../fonts/iconfont/iconfont.eot?t=1487643189178#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/iconfont/iconfont.woff?t=1487643189178') format('woff'), /* chrome, firefox */ + url('../fonts/iconfont/iconfont.ttf?t=1487643189178') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('../fonts/iconfont/iconfont.svg?t=1487643189178#iconfont') format('svg'); /* iOS 4.1- */ +} + +.iconfont { + font-family:"iconfont" !important; + font-size:16px; + font-style:normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-max:before { content: "\e623"; } + +.icon-restore:before { content: "\e624"; } + +.icon-min:before { content: "\e625"; } + +.icon-close:before { content: "\e626"; } + diff --git a/public/static/admin/css/layui-theme-dark.css b/public/static/admin/css/layui-theme-dark.css new file mode 100644 index 0000000..a5c038d --- /dev/null +++ b/public/static/admin/css/layui-theme-dark.css @@ -0,0 +1,692 @@ +:root{ + /* =====色板===== */ + /*常量,不随明暗主题变化*/ + --color-white: #FFFFFF; + --color-black: #000000; + + --lay-color-white: #FAFAFA; + --lay-color-black: #333333; + + --lay-color-red-1: #FFF1E8; + --lay-color-red-2: #FFD7C0; + --lay-color-red-3: #FFBB99; + --lay-color-red-4: #FF9C71; + --lay-color-red-5: #FF7A4A; + --lay-color-red-6: #FF5722; + --lay-color-red-7: #D23B15; + --lay-color-red-8: #A6250B; + --lay-color-red-9: #791404; + --lay-color-red-10: #4D0800; + + --lay-color-blue-1: #E8F9FF; + --lay-color-blue-2: #C0ECFF; + --lay-color-blue-3: #97DCFF; + --lay-color-blue-4: #6FCAFF; + --lay-color-blue-5: #46B5FF; + --lay-color-blue-6: #1E9FFF; + --lay-color-blue-7: #1379D2; + --lay-color-blue-8: #0A58A6; + --lay-color-blue-9: #043A79; + --lay-color-blue-10: #00214D; + + --lay-color-lightblue-1: #E8FDFF; + --lay-color-lightblue-2: #C1F4FB; + --lay-color-lightblue-3: #9CEAF7; + --lay-color-lightblue-4: #77DDF4; + --lay-color-lightblue-5: #53CEF0; + --lay-color-lightblue-6: #31BDEC; + --lay-color-lightblue-7: #1F95C4; + --lay-color-lightblue-8: #10709C; + --lay-color-lightblue-9: #064E74; + --lay-color-lightblue-10: #002F4D; + + --lay-color-layuigreen-1: #E8FFF9; + --lay-color-layuigreen-2: #B5F1E3; + --lay-color-layuigreen-3: #87E3D1; + --lay-color-layuigreen-4: #5DD6C1; + --lay-color-layuigreen-5: #37C8B5; + --lay-color-layuigreen-6: #16BAAA; + --lay-color-layuigreen-7: #0E9F95; + --lay-color-layuigreen-8: #08837F; + --lay-color-layuigreen-9: #036868; + --lay-color-layuigreen-10: #004A4D; + + --lay-color-green-1: #E8FFF2; + --lay-color-green-2: #B5F1D1; + --lay-color-green-3: #86E2B4; + --lay-color-green-4: #5CD49C; + --lay-color-green-5: #37C588; + --lay-color-green-6: #16B777; + --lay-color-green-7: #0E9C68; + --lay-color-green-8: #088259; + --lay-color-green-9: #036749; + --lay-color-green-10: #004D38; + + --lay-color-orange-1: #FFFCE8; + --lay-color-orange-2: #FFF5BA; + --lay-color-orange-3: #FFEA8B; + --lay-color-orange-4: #FFDC5D; + --lay-color-orange-5: #FFCB2E; + --lay-color-orange-6: #FFB800; + --lay-color-orange-7: #D29000; + --lay-color-orange-8: #A66C00; + --lay-color-orange-9: #794B00; + --lay-color-orange-10: #4D2D00; + + --lay-color-cyan-1: #E8F6FF; + --lay-color-cyan-2: #B9CEDD; + --lay-color-cyan-3: #8FA7BB; + --lay-color-cyan-4: #6A829A; + --lay-color-cyan-5: #4A5F78; + --lay-color-cyan-6: #2F4056; + --lay-color-cyan-7: #223654; + --lay-color-cyan-8: #162C51; + --lay-color-cyan-9: #0B214F; + --lay-color-cyan-10: #00174D; + + --lay-color-purple-1: #FDE8FF; + --lay-color-purple-2: #EDBEF4; + --lay-color-purple-3: #DC97E8; + --lay-color-purple-4: #C972DD; + --lay-color-purple-5: #B651D1; + --lay-color-purple-6: #A233C6; + --lay-color-purple-7: #8120A8; + --lay-color-purple-8: #631289; + --lay-color-purple-9: #48076B; + --lay-color-purple-10: #2F004D; + + --lay-color-black-1: #E8F8FF; + --lay-color-black-2: #BFD0D8; + --lay-color-black-3: #98A8B1; + --lay-color-black-4: #73818A; + --lay-color-black-5: #505B63; + --lay-color-black-6: #2F363C; + --lay-color-black-7: #23303C; + --lay-color-black-8: #18293C; + --lay-color-black-9: #0C213C; + --lay-color-black-10: #00183C; + + --lay-color-gray-1: #FAFAFA; + --lay-color-gray-2: #F6F6F6; + --lay-color-gray-3: #EEEEEE; + --lay-color-gray-4: #E2E2E2; + --lay-color-gray-5: #DDDDDD; + --lay-color-gray-6: #D2D2D2; + --lay-color-gray-7: #CCCCCC; + --lay-color-gray-8: #C2C2C2; + --lay-color-gray-9: #AAAAAA; + --lay-color-gray-10: #939393; + + --lay-color-gray-11: #858585; + --lay-color-gray-12: #7b7b7b; + --lay-color-gray-13: #686868; + + /* =====语义===== */ + /* 主色 */ + --lay-color-primary: var(--lay-color-layuigreen-6); + --lay-color-primary-hover: var(--lay-color-layuigreen-5); + --lay-color-primary-active: var(--lay-color-layuigreen-7); + --lay-color-primary-disabled: var(--lay-color-layuigreen-3); + --lay-color-primary-light: var(--lay-color-layuigreen-4); + + /* 次色 */ + --lay-color-secondary: var(--lay-color-green-6); + --lay-color-secondary-hover: var(--lay-color-green-5); + --lay-color-secondary-active: var(--lay-color-green-7); + --lay-color-secondary-disabled: var(--lay-color-green-3); + --lay-color-secondary-light: var(--lay-color-green-4); + + /* 引导 */ + --lay-color-info: var(--lay-color-lightblue-6); + --lay-color-info-hover: var(--lay-color-lightblue-5); + --lay-color-info-active: var(--lay-color-lightblue-7); + --lay-color-info-disabled: var(--lay-color-lightblue-3); + --lay-color-info-light: var(--lay-color-lightblue-4); + + /* 百搭 */ + --lay-color-normal: var(--lay-color-blue-6); + --lay-color-normal-hover: var(--lay-color-blue-5); + --lay-color-normal-active: var(--lay-color-blue-7); + --lay-color-normal-disabled: var(--lay-color-blue-3); + --lay-color-normal-light: var(--lay-color-blue-4); + + /* 警示 */ + --lay-color-warning: var(--lay-color-orange-6); + --lay-color-warning-hover: var(--lay-color-orange-5); + --lay-color-warning-active: var(--lay-color-orange-7); + --lay-color-warning-disabled: var(--lay-color-orange-3); + --lay-color-warning-light: var(--lay-color-orange-4); + + /* 成功 */ + --lay-color-success: var(--lay-color-green-6); + --lay-color-success-hover: var(--lay-color-green-5); + --lay-color-success-active: var(--lay-color-green-7); + --lay-color-success-disabled: var(--lay-color-green-3); + --lay-color-success-light: var(--lay-color-green-4); + + /* 错误 */ + --lay-color-danger: var(--lay-color-red-6); + --lay-color-danger-hover: var(--lay-color-red-5); + --lay-color-danger-active: var(--lay-color-red-7); + --lay-color-danger-disabled: var(--lay-color-red-3); + --lay-color-danger-light: var(--lay-color-red-4); + + --lay-color-bg-1: #17171A; /*整体背景*/ + --lay-color-bg-2: #232324; /*一级容器背景,卡片,面板*/ + --lay-color-bg-3: #2a2a2b; /*二级容器背景*/ + --lay-color-bg-4: #313132; /*三级容器背景*/ + --lay-color-bg-5: #373739; /*下拉弹出框、Tooltip 背景颜色*/ + --lay-color-bg-white: #f6f6f6; /*白色背景*/ + + --lay-color-text-1: rgba(255,255,255,.9); /*强调/正文标题*/ + --lay-color-text-2: rgba(255,255,255,.7); /*次强调/语句*/ + --lay-color-text-3: rgba(255,255,255,.5); /*次要信息*/ + --lay-color-text-4: rgba(255,255,255,.3);/*禁用状态文字 */ + + --lay-color-border-1: #2e2e30; + --lay-color-border-2: #484849; + --lay-color-border-3: #5f5f60; + --lay-color-border-4: #929293; + + --lay-color-fill-1: rgba(255,255,255,.04);/*浅/禁用*/ + --lay-color-fill-2: rgba(255,255,255,.08);/*常规/白底悬浮*/ + --lay-color-fill-3: rgba(255,255,255,.12); /*深/灰底悬浮*/ + --lay-color-fill-4: rgba(255,255,255,.16);/*重/特殊场景*/ + + --lay-color-hover: var(--lay-color-fill-3); /*bg*/ + --lay-color-active: var(--lay-color-fill-3); /*bg*/ +} +blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{-webkit-tap-highlight-color: rgba(0, 0, 0, 0)} /*danger: 勿改*/ +body{color:var(--lay-color-text-2);background-color: var(--lay-color-bg-1); color-scheme: dark;} +hr{border-bottom:1px solid var(--lay-color-border-2)!important} +a{color:var(--lay-color-text-1);} +a:hover{color:var(--lay-color-text-3)} +/* 三角形 */ +.layui-edge{border-color:transparent} +.layui-edge-top{border-bottom-color:var(--lay-color-border-4)} +.layui-edge-right{border-left-color:var(--lay-color-border-4)} +.layui-edge-bottom{border-top-color:var(--lay-color-border-4)} +.layui-edge-left{border-right-color:var(--lay-color-border-4)} +/* 禁用文字 */ +.layui-disabled,.layui-disabled:hover{color:var(--lay-color-text-4)!important} +/* 图标 */ +.layui-icon{-moz-osx-font-smoothing:grayscale} +/* admin 布局 */ +.layui-layout-admin .layui-header{background-color:var(--lay-color-bg-2)} +.layui-layout-admin .layui-footer{box-shadow:-1px 0 4px rgb(0 0 0 / 12%);background-color:var(--lay-color-bg-2)} +.layui-layout-admin .layui-logo{color:var(--lay-color-primary);box-shadow:0 1px 2px 0 rgb(0 0 0 / 15%)} +/* 引用 */ +.layui-elem-quote{border-left:5px solid var(--lay-color-secondary);background-color:var(--lay-color-bg-2)} +/* 进度条 */ +.layui-progress{background-color: var(--lay-color-bg-3)} +.layui-progress-bar{background-color:var( --lay-color-secondary)} +.layui-progress-text{color:var(--lay-color-text-2)} +.layui-progress-big .layui-progress-text{color: var(--lay-color-text-1)} +/* 折叠面板 */ +.layui-colla-title{color: var(--lay-color-text-1);background-color: var(--lay-color-bg-2)} +.layui-colla-content{color:var(--lay-color-text-2)} +/* 卡片面板 */ +.layui-card{background-color: var(--lay-color-bg-2);box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} +.layui-card-header{border-bottom:1px solid var(--lay-color-border-2);color:var(--lay-color-text-1)} +/* 常规面板 */ +.layui-panel{box-shadow:1px 1px 4px rgb(0 0 0 / 8%);background-color: var( --lay-color-bg-2);color: var(--lay-color-text-1)} +/* 窗口面板 */ +.layui-panel-window{border-top:5px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-2)} +/* 背景颜色 */ +.layui-bg-red{background-color:var(--lay-color-red-6)!important;color: var(--lay-color-white)!important} +.layui-bg-orange{background-color:var(--lay-color-orange-6)!important;color: var(--lay-color-white)!important} +.layui-bg-green{background-color:var(--lay-color-layuigreen-6)!important;color: var(--lay-color-white)!important} +.layui-bg-cyan{background-color:var(--lay-color-cyan-6)!important;color: var(--lay-color-white)!important} +.layui-bg-blue{background-color: var(--lay-color-blue-6)!important;color: var(--lay-color-white)!important} +.layui-bg-black{background-color:var(--lay-color-black-6)!important;color: var(--lay-color-white)!important} +.layui-bg-purple{background-color: var(--lay-color-purple-6)!important; color: var(--lay-color-white)!important;} +.layui-bg-gray{background-color:var(--lay-color-gray-1)!important;color: var(--lay-color-black-6)!important} +/* 徽章 */ +.layui-badge-rim,.layui-border,.layui-colla-content,.layui-colla-item,.layui-collapse,.layui-elem-field,.layui-form-pane .layui-form-item[pane],.layui-form-pane .layui-form-label,.layui-input,.layui-input-split,.layui-panel,.layui-quote-nm,.layui-select,.layui-tab-bar,.layui-tab-card,.layui-tab-title,.layui-tab-title .layui-this:after,.layui-textarea{border-color: var(--lay-color-border-1)} +/* 边框颜色 */ +.layui-border{color:var(--lay-color-text-1)!important} +.layui-border-red{border-color:var(--lay-color-red-6)!important;color:var(--lay-color-red-6)!important} +.layui-border-orange{border-color:var(--lay-color-orange-6)!important;color:var(--lay-color-orange-6)!important} +.layui-border-green{border-color:var(--lay-color-layuigreen-6)!important;color:var(--lay-color-layuigreen-6)!important} +.layui-border-cyan{border-color:var(--lay-color-cyan-6)!important;color:var(--lay-color-cyan-6)!important} +.layui-border-blue{border-color: var(--lay-color-blue-6)!important;color: var(--lay-color-blue-6)!important} +.layui-border-purple{border-color: var(--lay-color-purple-6)!important; color: var(--lay-color-purple-6)!important;} +.layui-border-black{border-color:var(--lay-color-black-6)!important;color:var(--lay-color-text-1)!important} +/* 文本区域 */ +.layui-text{color:var(--lay-color-text-3)} +.layui-text h1,.layui-text h2,.layui-text h3,.layui-text h4,.layui-text h5,.layui-text h6{color: var(--lay-color-text-2)} +.layui-text-em,.layui-word-aux{color: var(--lay-color-text-2)!important} +.layui-text a:not(.layui-btn){color:var(--lay-color-lightblue-6)} +.layui-text blockquote:not(.layui-elem-quote){border-left:5px solid var(--lay-color-border-4)} +.layui-text pre>code:not(.layui-code){background-color:var(--lay-color-bg-white)} +/* 字体颜色 */ +.layui-font-red{color:var(--lay-color-red-6)!important} +.layui-font-orange{color:var(--lay-color-orange-6)!important} +.layui-font-green{color:var(--lay-color-layuigreen-6)!important} +.layui-font-cyan{color:var(--lay-color-cyan-6)!important} +.layui-font-blue{color:var(--lay-color-lightblue-6)!important} +.layui-font-black{color:var(--lay-color-black)!important} +.layui-font-purple{color:var(--lay-color-purple-6)!important;} +.layui-font-gray{color:var(--lay-color-gray-7)!important} +/* 按钮 */ +.layui-btn{border:1px solid transparent;background-color:var(--lay-color-primary);color: var(--lay-color-text-1)} +.layui-btn:hover{color: var(--lay-color-text-2)} +.layui-btn-primary{border-color:var(--lay-color-border-2);color:var(--lay-color-text-1);background-color: var(--lay-color-bg-4)} +.layui-btn-primary:hover{border-color: transparent;color:var(--lay-color-text-2)} +.layui-btn-normal{background-color: var(--lay-color-normal)} +.layui-btn-warm{background-color:var(--lay-color-warning)} +.layui-btn-danger{background-color:var(--lay-color-danger)} +.layui-btn-checked{background-color:var(--lay-color-success)} +.layui-btn-disabled,.layui-btn-disabled:active,.layui-btn-disabled:hover{border-color: var(--lay-color-border-2)!important;background-color: var(--lay-color-bg-2)!important;color: var(--lay-color-text-4)!important} +.layui-btn-group .layui-btn{border-left:1px solid var(--lay-color-border-2)} +.layui-btn-group .layui-btn-primary:hover{border-color:var(--lay-color-border-2);color:var(--lay-color-primary)} +.layui-btn-group .layui-btn-primary:first-child{border-left:1px solid var(--lay-color-gray-5)} +/*表单*/ +.layui-input,.layui-select,.layui-textarea{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.layui-input[disabled],.layui-select[disabled],.layui-textarea[disabled]{background-color: var(--lay-color-fill-1);color: var(--lay-color-text-4);border-color: var(--lay-color-border-1)!important;} +.layui-input:hover,.layui-textarea:hover{border-color: var(--lay-color-border-2)!important} +.layui-input:focus,.layui-textarea:focus{border-color: var(--lay-color-secondary-hover)!important;box-shadow: 0 0 0 3px rgba(22, 183, 119, 0.08);} +.layui-input:hover[disabled],.layui-textarea:hover[disabled]{border-color: var(--lay-color-border-1)!important} +.layui-input:focus[disabled],.layui-textarea:focus[disabled]{border-color: var(--lay-color-border-1)!important;} +.layui-input:focus.layui-disabled,.layui-textarea:focus.layui-disabled{border-color: var(--lay-color-border-1)!important;box-shadow: 0 0 0 0} +.layui-form-danger+.layui-form-select .layui-input,.layui-form-danger:focus{border-color:var(--lay-color-danger)!important;box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.08);} +/* 输入框点缀 */ +.layui-input-prefix .layui-icon,.layui-input-split .layui-icon,.layui-input-suffix .layui-icon{color: var(--lay-color-gray-8)} +.layui-input-wrap .layui-input:hover+.layui-input-split{border-color: var(--lay-color-border-2)} +.layui-input-wrap .layui-input[disabled]:hover+.layui-input-split{border-color: var(--lay-color-border-1)} +.layui-input-wrap .layui-input:focus+.layui-input-split{border-color: var(--lay-color-secondary-hover)} +.layui-input-affix .layui-icon{color: var(--lay-color-text-2)} +.layui-input-affix .layui-icon-clear{color:var(--lay-color-text-2)} +.layui-input-affix .layui-icon:hover{color:var(--lay-color-text-3)} +/* 数字输入框动态点缀 */ +.layui-input-number .layui-icon:first-child{border-bottom-color:var(--lay-color-border-1)} +/* 下拉选择 */ +.layui-form-select{color:var(--lay-color-text-2)} +.layui-form-select .layui-edge{border-top-color:var(--lay-color-gray-8)} +.layui-form-select dl{border:1px solid var( --lay-color-border-2);background-color: var(--lay-color-bg-5);box-shadow:1px 1px 4px rgb(0 0 0 / 8%)} +.layui-form-select dl dt{color:var(--lay-color-gray-8)} +.layui-form-select dl dd:hover{background-color:var(--lay-color-active)} +.layui-form-select dl dd.layui-select-tips{color:var(--lay-color-text-2)} +.layui-form-select dl dd.layui-this{background-color: var(--lay-color-active);color: var(--lay-color-text-1)} +.layui-form-select dl dd.layui-disabled,.layui-form-select dl dd:hover.layui-disabled{background-color: var(--lay-color-bg-5)} +.layui-select-none{color:var(--lay-color-black-8)} +.layui-select-disabled .layui-disabled{border-color:var(--lay-color-border-1)!important} +.layui-select-disabled .layui-edge{border-top-color:var(--lay-color-gray-6)} +/* 复选框 */ +.layui-form-checkbox{background-color:var(--lay-color-fill-2)} +.layui-form-checkbox > div{background-color:var(--lay-color-fill-3);color:var(--lay-color-text-2)} +.layui-form-checkbox:hover > div{background-color: var(--lay-color-active)} +.layui-form-checkbox > i{background-color: var(--lay-color-fill-1);border-top-color:var(--lay-color-border-1);border-right-color:var(--lay-color-border-1);border-bottom-color:var(--lay-color-border-1);border-left-color:initial;color:var(--lay-color-text-1)} +.layui-form-checkbox:hover > i{border-color:var(--lay-color-border-2);color:var(--lay-color-text-4)} +.layui-form-checked,.layui-form-checked:hover{border-color:var(--lay-color-secondary-active)} +.layui-form-checked > div,.layui-form-checked:hover > div{background-color:var(--lay-color-secondary)} +.layui-form-checked > i,.layui-form-checked:hover > i{color:var(--lay-color-secondary-hover)} +.layui-form-checkbox.layui-checkbox-disabled > div{background-color: var(--lay-color-fill-3) !important;} +/* 复选框-默认风格 */ +.layui-form-checkbox[lay-skin=primary]{background-image:none;background-color:initial;border-color:initial!important} +.layui-form-checkbox[lay-skin=primary] > div{background-image:none;background-color:initial;color:var(--lay-color-text-2)} +.layui-form-checkbox[lay-skin=primary] > i{border-color:var(--lay-color-border-1);background-color:var(--lay-color-fill-2)} +.layui-form-checkbox[lay-skin=primary]:hover > i{border-color:var(--lay-color-secondary-hover);color:var(--lay-color-text-1)} +.layui-form-checked[lay-skin=primary] > i{background-color:var(--lay-color-secondary);color:var(--lay-color-text-1);border-color:var(--lay-color-secondary-active)!important} +.layui-checkbox-disabled[lay-skin=primary] > div{background:none!important;color:var(--lay-color-text-4)!important} +.layui-form-checked.layui-checkbox-disabled[lay-skin=primary] > i{background-color:var(--lay-color-fill-1)!important;border-color:var(--lay-color-border-2)!important} +.layui-checkbox-disabled[lay-skin=primary]:hover > i{border-color:var(--lay-color-border-1)} +.layui-form-checkbox[lay-skin="primary"] > .layui-icon-indeterminate:before{background-color: var(--lay-color-secondary-hover);opacity: 1;} +.layui-form-checkbox[lay-skin="primary"]:hover > .layui-icon-indeterminate:before{opacity: 1;} +.layui-form-checkbox[lay-skin="primary"] > .layui-icon-indeterminate{border-color: var(--lay-color-secondary-hover);} +/* 复选框-开关风格 */ +.layui-form-switch{border-color:var(--lay-color-border-2);background-color:var(--lay-color-fill-2)} +.layui-form-switch > i{background-color:var(--lay-color-gray-4)} +.layui-form-switch.layui-checkbox-disabled > i{background-color:var(--lay-color-gray-4)} +.layui-form-switch > div{color:var(--lay-color-gray-8)!important} +.layui-form-onswitch{border-color:var(--lay-color-secondary-active);background-color:var(--lay-color-secondary)} +.layui-form-onswitch > i{background-color:var(--lay-color-gray-4)} +.layui-form-onswitch > div{color:var(--lay-color-text-1)!important} +.layui-checkbox-disabled{border-color:var(--lay-color-border-2)!important} +.layui-checkbox-disabled > div{background-color:var(--lay-color-fill-3)!important;color: var(--lay-color-text-4)!important;} +.layui-checkbox-disabled > i{border-color:var(--lay-color-border-2)!important} +.layui-checkbox-disabled:hover > i{color:var(--lay-color-text-1)!important} +.layui-form-switch.layui-checkbox-disabled > div{background-color:initial!important;} +/*复选框背景优化*/ +.layui-form-checkbox > i:before{opacity:0;filter:alpha(opacity=0)} +.layui-form-checkbox:hover > i:before{opacity:1;filter:alpha(opacity=100)} +.layui-form-checked.layui-checkbox-disabled:hover > i:before,.layui-form-checked:hover > i:before,.layui-form-checked > i:before{opacity:1;filter:alpha(opacity=100)} +.layui-form-checkbox[lay-skin=primary]:hover > i:before{opacity:0;filter:alpha(opacity=0)} +.layui-form-checked[lay-skin=primary]:hover > i:before{opacity:1;filter:alpha(opacity=100)} +.layui-checkbox-disabled:hover > i:before{opacity:0;filter:alpha(opacity=0)} +/*单选框*/ +.layui-form-radio > i{color:var(--lay-color-gray-8)} +.layui-form-radio:hover > *,.layui-form-radioed,.layui-form-radioed > i{color:var(--lay-color-secondary)} +.layui-radio-disabled > i{color:var(--lay-color-text-4)!important} +.layui-radio-disabled > *{color:var(--lay-color-text-4)!important} +/* 表单方框风格 */ +.layui-form-pane .layui-form-label{background-color:var(--lay-color-bg-2)} +/** 分页 **/ +.layui-laypage a,.layui-laypage button,.layui-laypage input,.layui-laypage select,.layui-laypage span{border:1px solid var(--lay-color-border-2)} +.layui-laypage a,.layui-laypage span{background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2)} +.layui-laypage a[data-page]{color:var(--lay-color-text-2)} +.layui-laypage a:hover{color: var(--lay-color-primary)} +.layui-laypage .layui-laypage-spr{color:var(--lay-color-text-3)} +.layui-laypage .layui-laypage-curr em{color: var(--lay-color-white)} +.layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: var(--lay-color-primary)} +.layui-laypage .layui-laypage-skip{color:var(--lay-color-text-3)} +.layui-laypage button,.layui-laypage input{background-color: var(--lay-color-bg-2)} +.layui-laypage input:focus,.layui-laypage select:focus{border-color: var(--lay-color-primary)!important} +/** 流加载 **/ +.layui-flow-more{color:var(--lay-color-text-1)} +.layui-flow-more a cite{background-color: var(--lay-color-bg-4);color: var(--lay-color-text-1)} +.layui-flow-more a i{color:var(--lay-color-text-2)} +/** 表格 **/ +.layui-table{background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2)} +.layui-table-mend{background-color: var(--lay-color-bg-2)} +.layui-table-click,.layui-table-hover,.layui-table[lay-even] tbody tr:nth-child(even){background-color:var(--lay-color-bg-2)} +.layui-table-checked{background-color: var(--lay-color-gray-13);color: var(--lay-color-text-1)} +.layui-table-checked.layui-table-hover,.layui-table-checked.layui-table-click{background-color: var(--lay-color-gray-12);} +.layui-table td,.layui-table th,.layui-table-col-set,.layui-table-fixed-r,.layui-table-grid-down,.layui-table-header,.layui-table-mend,.layui-table-page,.layui-table-tips-main,.layui-table-tool,.layui-table-total,.layui-table-view,.layui-table[lay-skin=line],.layui-table[lay-skin=row]{border-color: var(--lay-color-border-2)} +.layui-table-view .layui-table td[data-edit]:hover:after{border:1px solid var(--lay-color-primary-active)} +.layui-table-init{background-color: var(--lay-color-bg-2);} +.layui-table-init .layui-icon{color:var(--lay-color-gray-8);} +.layui-table-page{background-color: var(--lay-color-bg-2);} +.layui-table-tool{background-color: var(--lay-color-bg-2);} +.layui-table-tool .layui-inline[lay-event]{color:var(--lay-color-text-3);border:1px solid var(--lay-color-border-2)} +.layui-table-tool .layui-inline[lay-event]:hover{border:1px solid var(--lay-color-border-3)} +.layui-table-tool-panel{color: var(--lay-color-text-1); border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-5);box-shadow:0 2px 4px rgba(0,0,0,.12)} +.layui-table-tool-panel li:hover{background-color:var(--lay-color-active)} +.layui-table-col-set{background-color: var(--lay-color-white)} +.layui-table-sort .layui-table-sort-asc{border-bottom-color:var(--lay-color-border-4)} +.layui-table-sort .layui-table-sort-asc:hover{border-bottom-color:var(--lay-color-border-3)} +.layui-table-sort .layui-table-sort-desc{border-top-color:var(--lay-color-border-4)} +.layui-table-sort .layui-table-sort-desc:hover{border-top-color:var(--lay-color-border-3)} +.layui-table-sort[lay-sort=asc] .layui-table-sort-asc{border-bottom-color:var(--lay-color-bg-5)} +.layui-table-sort[lay-sort=desc] .layui-table-sort-desc{border-top-color:var(--lay-color-bg-5)} +.layui-table-cell .layui-table-link{color: var(--lay-color-lightblue-5)} +.layui-table-body .layui-none{color:var(--lay-color-gray-8)} +.layui-table-fixed-l{box-shadow:1px 0 8px rgba(0,0,0,1)} +.layui-table-fixed-r{box-shadow:-1px 0 8px rgba(0,0,0,1)} +.layui-table-edit{box-shadow:1px 1px 20px rgba(0,0,0,.15);background-color: var(--lay-color-bg-2)} +.layui-table-edit:focus{border-color:var(--lay-color-secondary)!important} +select.layui-table-edit{border-color:var(--lay-color-border-2)} +.layui-table-grid-down{background-color: var(--lay-color-bg-5);color:var(--lay-color-gray-8)} +.layui-table-grid-down:hover{background-color:var(--lay-color-bg-5)} +body .layui-table-tips .layui-layer-content{box-shadow:0 1px 6px rgba(0,0,0,.12)} +.layui-table-tips-main{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-3)} +.layui-table-tips-c{background-color:var(--lay-color-gray-7);color: var(--lay-color-text-1)} +.layui-table-tips-c:hover{background-color:var(--lay-color-gray-8)} +/** 文件上传 **/ +.layui-upload-choose{color:var(--lay-color-gray-8)} +.layui-upload-drag{border:1px dashed var( --lay-color-border-2);background-color: var(--lay-color-bg-4);color: var(--lay-color-text-2)} +.layui-upload-drag .layui-icon{color: var(--lay-color-primary)} +.layui-upload-drag[lay-over]{border-color: var(--lay-color-primary)} +/* 基础菜单元素 */ +.layui-menu{background-color: var( --lay-color-bg-2)} +.layui-menu li{color: var(--lay-color-text-1)} +.layui-menu li:hover{background-color: var( --lay-color-bg-5)} +.layui-menu li.layui-disabled,.layui-menu li.layui-disabled *{color:var(--lay-color-text-4)!important} +.layui-menu .layui-menu-item-group>.layui-menu-body-title{color: var(--lay-color-text-1)} +.layui-menu .layui-menu-item-none{color:var(--lay-color-black)} +.layui-menu .layui-menu-item-divider{border-bottom:1px solid var( --lay-color-border-2)} +.layui-menu .layui-menu-item-up>.layui-menu-body-title{color: var(--lay-color-text-1)} +.layui-menu .layui-menu-item-down:hover>.layui-menu-body-title>.layui-icon,.layui-menu .layui-menu-item-up>.layui-menu-body-title:hover>.layui-icon{color: var(--lay-color-text-1)} +.layui-menu .layui-menu-item-checked,.layui-menu .layui-menu-item-checked2{background-color:var(--lay-color-active)!important;color:var(--lay-color-secondary)} +.layui-menu .layui-menu-item-checked a,.layui-menu .layui-menu-item-checked2 a{color:var(--lay-color-secondary)} +.layui-menu .layui-menu-item-checked:after{border-right:3px solid var(--lay-color-secondary)} +.layui-menu-body-title a{color: var(--lay-color-text-1)} +.layui-menu-lg .layui-menu-body-title a:hover,.layui-menu-lg li:hover{color:var(--lay-color-secondary)} +/* 下拉菜单 */ +.layui-dropdown{background-color: var(--lay-color-bg-5)} +.layui-dropdown.layui-panel,.layui-dropdown .layui-panel{background-color: var(--lay-color-bg-5)} +.layui-dropdown.layui-panel .layui-menu{background-color: var(--lay-color-bg-5)} +/** 导航菜单 **/ +.layui-nav{background-color:var(--lay-color-black-6);color: var(--lay-color-white)} +.layui-nav .layui-nav-item a{color: var(--lay-color-text-1);} +.layui-nav .layui-this:after,.layui-nav-bar{background-color:var(--lay-color-secondary)} +.layui-nav .layui-nav-item a:hover,.layui-nav .layui-this a{color: var(--lay-color-text-1)} +.layui-nav-child{box-shadow:0 2px 4px rgba(0,0,0,.12);border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-5)} +.layui-nav .layui-nav-child a{color: var(--lay-color-text-1)} +.layui-nav .layui-nav-child a:hover{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.layui-nav-child dd.layui-this{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.layui-nav-tree .layui-nav-child dd.layui-this,.layui-nav-tree .layui-nav-child dd.layui-this a,.layui-nav-tree .layui-this,.layui-nav-tree .layui-this>a,.layui-nav-tree .layui-this>a:hover{background-color: var(--lay-color-primary);color: var(--lay-color-white)} +.layui-nav-itemed>a,.layui-nav-tree .layui-nav-title a,.layui-nav-tree .layui-nav-title a:hover{color: var(--lay-color-white)!important} +.layui-nav-tree .layui-nav-bar{background-color:var(--lay-color-primary)} +.layui-nav-tree .layui-nav-child a{color: var(--lay-color-white);color: var(--lay-color-white)} +.layui-nav-tree .layui-nav-child,.layui-nav-tree .layui-nav-child a:hover{color: var(--lay-color-white)} +.layui-nav-itemed>.layui-nav-child{background-color:rgba(0, 0, 0, .3) !important} +.layui-nav-tree.layui-bg-gray a,.layui-nav.layui-bg-gray .layui-nav-item a{color: var(--lay-color-black-4)} +.layui-nav.layui-bg-gray .layui-nav-child{background-color: var(--lay-color-gray-1);} +.layui-nav-tree.layui-bg-gray .layui-nav-itemed>a{color:#333!important} +.layui-nav.layui-bg-gray .layui-this a{color:var(--lay-color-secondary)} +.layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this,.layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this a,.layui-nav-tree.layui-bg-gray .layui-this,.layui-nav-tree.layui-bg-gray .layui-this>a{color:var(--lay-color-secondary)!important} +.layui-nav-tree.layui-bg-gray .layui-nav-bar{background-color:var( --lay-color-secondary)} +/** 面包屑 **/ +.layui-breadcrumb a{color:var(--lay-color-gray-7)!important} +.layui-breadcrumb a:hover{color:var(--lay-color-secondary)!important} +.layui-breadcrumb a cite{color:var(--lay-color-gray-8)} +.layui-breadcrumb span[lay-separator]{color:var(--lay-color-gray-7)} +/** Tab 选项卡 **/ +.layui-tab-title .layui-this{color: var(--lay-color-text-2)} +.layui-tab-title .layui-this:after{border-bottom-color: var(--lay-color-border-2)} +.layui-tab-bar{background-color: var(--lay-color-bg-3)} +.layui-tab-more li.layui-this:after{border-bottom-color:var(--lay-color-gray-3)} +.layui-tab-title li .layui-tab-close{color:var(--lay-color-gray-8)} +.layui-tab-title li .layui-tab-close:hover{background-color:var(--lay-color-danger);color: var(--lay-color-white)} +.layui-tab-brief>.layui-tab-title .layui-this{color:var( --lay-color-primary)} +.layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after{border-bottom:2px solid var(--lay-color-secondary)} +.layui-tab-card{box-shadow:0 2px 5px 0 rgba(0,0,0,.1)} +.layui-tab-card>.layui-tab-title{background-color: var(--lay-color-bg-2)} +.layui-tab-card>.layui-tab-title .layui-this{background-color: var(--lay-color-bg-1)} +.layui-tab-card>.layui-tab-title .layui-this:after{border-bottom-color: var(--lay-color-bg-1)} +.layui-tab-card>.layui-tab-more .layui-this{color:var(--lay-color-secondary)} +/*时间线*/ +.layui-timeline-axis{background-color: var(--lay-color-bg-4);color:var(--lay-color-secondary)} +.layui-timeline-axis:hover{color:var(--lay-color-red-6)} +.layui-timeline-item:before{background-color: var(--lay-color-bg-3)} +/*徽章*/ +.layui-badge,.layui-badge-dot,.layui-badge-rim{background-color:var(--lay-color-red-6);color: var(--lay-color-white)} +.layui-badge-rim{background-color: var(--lay-color-white);color:var(--lay-color-black-6)} +/* carousel 轮播 */ +.layui-carousel{background-color:var(--lay-color-gray-2)} +.layui-carousel>[carousel-item]:before{color:var(--lay-color-gray-8);-moz-osx-font-smoothing:grayscale} +.layui-carousel>[carousel-item]>*{background-color:var(--lay-color-gray-2)} +.layui-carousel-arrow{background-color:rgba(0,0,0,.2);color: var(--lay-color-white)} +.layui-carousel-arrow:hover,.layui-carousel-ind ul:hover{background-color:var(--lay-color-black)} +.layui-carousel[lay-indicator=outside] .layui-carousel-ind ul{background-color:var(--lay-color-black)} +.layui-carousel-ind ul{background-color:rgba(0,0,0,.2)} +.layui-carousel-ind ul li{background-color:var(--lay-color-gray-3);background-color: var(--lay-color-text-3)} +.layui-carousel-ind ul li:hover{background-color: var(--lay-color-white)} +.layui-carousel-ind ul li.layui-this{background-color: var(--lay-color-white)} +/** fixbar **/ +.layui-fixbar li{background-color:var(--lay-color-black-5);color: var(--lay-color-text-1)} +/** 表情面板 **/ +body .layui-util-face .layui-layer-content{background-color: var(--lay-color-bg-5);color:var(--lay-color-text-2)} +.layui-util-face ul{border:1px solid var(--lay-color-border-3);background-color: var(--lay-color-bg-5);box-shadow:0 0 20px rgba(0,0,0,.2)} +.layui-util-face ul li{border:1px solid var(--lay-color-border-2)} +.layui-util-face ul li:hover{border:1px solid var(--lay-color-red-7);background: var(--lay-color-text-1)} +/** 代码文本修饰 **/ +.layui-code{border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-white);color: var(--lay-color-black-5)} +/** 穿梭框 **/ +.layui-transfer-box,.layui-transfer-header,.layui-transfer-search{border-color: var(--lay-color-border-2)} +.layui-transfer-box{background-color: var(--lay-color-bg-2)} +.layui-transfer-search .layui-icon-search{color:var(--lay-color-gray-8)} +.layui-transfer-active .layui-btn{background-color:var( --lay-color-secondary);border-color:var( --lay-color-secondary);color: var(--lay-color-white)} +.layui-transfer-active .layui-btn-disabled{background-color:var(--lay-color-gray-2);border-color:var(--lay-color-gray-3);color:var(--lay-color-gray-8)} +.layui-transfer-data li:hover{background-color:var(--lay-color-active)} +/* chrome 105 */ +.layui-transfer-data li:hover:has([lay-filter="layTransferCheckbox"][disabled]){background-color:var(--lay-color-bg-2)} +.layui-transfer-data .layui-none{color:var(--lay-color-gray-7)} +/** 评分组件 **/ +.layui-rate li i.layui-icon{color:var(--lay-color-orange-6)} +/** 颜色选择器 **/ +.layui-colorpicker{border:1px solid var(--lay-color-border-2)} +.layui-colorpicker:hover{border-color: var( --lay-color-border-2)} +.layui-colorpicker-trigger-span{border:1px solid var(--lay-color-black)} +.layui-colorpicker-trigger-i{color: var(--lay-color-white)} +.layui-colorpicker-trigger-i.layui-icon-close{color:var(--lay-color-black-7)} +.layui-colorpicker-main{background: var(--lay-color-bg-2);border:1px solid var( --lay-color-border-2);box-shadow:0 2px 4px rgba(0,0,0,.12)} +.layui-colorpicker-basis-white{background:linear-gradient(90deg, #fff,hsla(0,0%,100%,0))} /* danger: 勿改*/ +.layui-colorpicker-basis-black{background:linear-gradient(0deg,#000,transparent)} /* danger: 勿改*/ +.layui-colorpicker-basis-cursor{border:1px solid var(--lay-color-white)} +.layui-colorpicker-side{background:linear-gradient(linear-gradient(#F00, #FF0, #0F0, #0FF, #00F, #F0F, #F00))} /* danger: 勿改*/ +.layui-colorpicker-side-slider{box-shadow:0 0 1px #888;background: var(--lay-color-white);border:1px solid var(--lay-color-gray-2)} +.layui-colorpicker-alpha-slider{box-shadow:0 0 1px #888;background: var(--lay-color-white);border:1px solid var(--lay-color-gray-2)} +.layui-colorpicker-pre.layui-this{box-shadow:0 0 3px 2px rgba(0,0,0,.15)} +.layui-colorpicker-main-input input.layui-input{color: var(--lay-color-text-2)} +/** 滑块 **/ +.layui-slider{background: var( --lay-color-bg-5)} +.layui-slider-step{background: var(--lay-color-fill-4)} +.layui-slider-wrap-btn{background: var(--lay-color-bg-4)} +.layui-slider-tips{color: var(--lay-color-text-1);background:var(--lay-color-black)} +.layui-slider-tips:after{border-color:var(--lay-color-black) transparent transparent transparent} +.layui-slider-input{border:1px solid var(--lay-color-border-2)} +.layui-slider-input-btn{border-left:1px solid var(--lay-color-border-2)} +.layui-slider-input-btn i{color:var(--lay-color-gray-9)} +.layui-slider-input-btn i:first-child{border-bottom:1px solid var(--lay-color-border-2)} +.layui-slider-input-btn i:hover{color:var(--lay-color-primary)} +/** 树组件 **/ +.layui-tree-line .layui-tree-set .layui-tree-set:after{border-top:1px dotted var(--lay-color-gray-7)} +.layui-tree-entry:hover{background-color: var(--lay-color-bg-4)} +.layui-tree-line .layui-tree-entry:hover{background-color:var(--lay-color-black)} +.layui-tree-line .layui-tree-entry:hover .layui-tree-txt{color:var(--lay-color-text-3)} +.layui-tree-entry:hover:has(span.layui-tree-txt.layui-disabled){background-color: transparent !important} +.layui-tree-line .layui-tree-set:before{border-left:1px dotted var(--lay-color-gray-7)} +.layui-tree-iconClick{color:var(--lay-color-gray-7)} +.layui-tree-icon{border:1px solid var(--lay-color-gray-8)} +.layui-tree-icon .layui-icon{color:var(--lay-color-text-1)} +.layui-tree-iconArrow:after{border-color:transparent transparent transparent var(--lay-color-gray-7)} +.layui-tree-txt{color:var(--lay-color-text-2)} +.layui-tree-search{color:var(--lay-color-black-7)} +.layui-tree-btnGroup .layui-icon:hover{color:var(--lay-color-text-2)} +.layui-tree-editInput{background-color:var(--lay-color-fill-2)} +.layui-tree-emptyText{color:var(--lay-color-text-2)} +/*code 不处理*/ +.layui-code-view{border:1px solid var(--lay-color-border-1);background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2); border-left-width: 6px;} +.layui-code-title{border-bottom:1px solid var(--lay-color-border-2)} +.layui-code-title>.layui-code-about{color:#c5c5c5} +.layui-code-view>.layui-code-ol>li{border-left:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-2)} +.layui-code-view>.layui-code-ul>li{background-color: var(--lay-color-bg-2)} +.layui-code-dark{border:1px solid #3d3d3d;border-left-color:#656565;background-color:#3d3d3d;color:var(--lay-color-gray-8)} +.layui-code-dark>.layui-code-ol>li,.layui-code-dark>.layui-code-ul>li{background-color:#3f3f3f} +.layui-code-full{background-color: var(--lay-color-bg-1)} +/*日期选择器*/ +.layui-laydate-header i{color:var(--lay-color-gray-8)} +.laydate-day-holidays:before{color:var(--lay-color-red-6)} +.layui-laydate .layui-this .laydate-day-holidays:before{color: var(--lay-color-white)} +.layui-laydate-footer span{border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-5)} +.layui-laydate-footer span:hover{color:var(--lay-color-secondary)} +.layui-laydate-footer span.layui-laydate-preview{border-color:transparent!important;} +.layui-laydate-footer span.layui-laydate-preview:hover{color:var(--lay-color-black-7)} +.layui-laydate-shortcut+.layui-laydate-main{border-left:1px solid var(--lay-color-border-2)} +.layui-laydate .layui-laydate-list{background-color: var(--lay-color-bg-5)} +.layui-laydate-hint{color:var(--lay-color-danger)} +.layui-laydate-range .laydate-main-list-1 .layui-laydate-content,.layui-laydate-range .laydate-main-list-1 .layui-laydate-header{border-left:1px solid var(--lay-color-border-2)} +.layui-laydate,.layui-laydate-hint{border:1px solid var(--lay-color-border-2);box-shadow:0 2px 4px rgba(0,0,0,.12);background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.layui-laydate-header{border-bottom:1px solid var( --lay-color-border-2)} +.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:var(--lay-color-secondary)} +.layui-laydate-content th{color: var(--lay-color-text-1)} +.layui-laydate-content td{color: var(--lay-color-text-1)} +.layui-laydate-content td.laydate-day-now{color:var(--lay-color-secondary)} +.layui-laydate-content td.laydate-day-now:after{border:1px solid var(--lay-color-secondary)} +.layui-laydate-linkage .layui-laydate-content td.laydate-selected>div{background-color:var(--lay-color-secondary-light)} +.layui-laydate-linkage .laydate-selected:hover>div{background-color:var(--lay-color-green-4)!important} +.layui-laydate-content td>div:hover,.layui-laydate-list li:hover,.layui-laydate-shortcut>li:hover{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.laydate-time-list li ol{border:1px solid var(--lay-color-border-2)} +.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color: var(--lay-color-text-4)} +.layui-laydate-linkage .laydate-selected.laydate-day-next>div,.layui-laydate-linkage .laydate-selected.laydate-day-prev>div{background-color: var(--lay-color-bg-5)!important} +.layui-laydate-footer{border-top:1px solid var(--lay-color-border-2)} +.layui-laydate-hint{color:var(--lay-color-danger)} +.laydate-day-mark::after{background-color:var(--lay-color-secondary)} +.layui-laydate-footer span[lay-type=date]{color:var(--lay-color-secondary)} +.layui-laydate .layui-this,.layui-laydate .layui-this>div{background-color:var(--lay-color-primary)!important;color: var(--lay-color-white)!important} +.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{color: var(--lay-color-text-4)!important} +.laydate-theme-molv .layui-laydate-header{background-color:var(--lay-color-primary)} +.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:var(--lay-color-gray-2)} +.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color: var(--lay-color-white)} +.laydate-theme-molv .layui-laydate-content{border:1px solid var(--lay-color-border-2)} +.laydate-theme-molv .layui-laydate-footer{border:1px solid var(--lay-color-border-2)} +.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead{border:1px solid var(--lay-color-border-2)} +.layui-laydate-linkage.laydate-theme-grid .laydate-selected,.layui-laydate-linkage.laydate-theme-grid .laydate-selected:hover{background-color:var(--lay-color-gray-3)!important;color:var(--lay-color-primary)!important} +.layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-next,.layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-prev{color:var(--lay-color-gray-6)!important} +.layui-laydate.laydate-theme-circle .layui-laydate-content table td.layui-this{background-color:transparent!important} +/*layer*/ +.layui-layer{background-color: var(--lay-color-bg-3);box-shadow:1px 1px 50px rgba(0,0,0,.3)} +.layui-layer-border{border:1px solid var(--lay-color-border-2);box-shadow:1px 1px 5px rgba(0,0,0,.2)} +.layui-layer-move{background-color: var(--lay-color-bg-5)} +.layui-layer-title{border-bottom:1px solid var(--lay-color-border-2);color: var(--lay-color-text-1)} +.layui-layer-setwin span{color: var(--lay-color-text-1)} +.layui-layer-setwin .layui-layer-min:before{background-color:var(--lay-color-text-3)} +.layui-layer-setwin .layui-layer-min:hover:before{background-color:var(--lay-color-info-hover)} +.layui-layer-setwin .layui-layer-max:after,.layui-layer-setwin .layui-layer-max:before{border:1px solid var(--lay-color-text-3)} +.layui-layer-setwin .layui-layer-max:hover:after,.layui-layer-setwin .layui-layer-max:hover:before{border-color:var(--lay-color-info-hover)} +.layui-layer-setwin .layui-layer-min:hover:before{background-color:var(--lay-color-info-hover)} +.layui-layer-setwin .layui-layer-maxmin:after,.layui-layer-setwin .layui-layer-maxmin:before{background-color: var(--lay-color-bg-5)} +.layui-layer-setwin .layui-layer-close2{color:var(--lay-color-text-1);background-color:var(--lay-color-gray-10)} +.layui-layer-setwin .layui-layer-close2:hover{background-color:var(--lay-color-normal)} +.layui-layer-btn a{border:1px solid var(--lay-color-border-2);background-color: var( --lay-color-bg-3);color: var(--lay-color-text-2)} +.layui-layer-btn .layui-layer-btn0{border-color: var(--lay-color-normal);background-color: var(--lay-color-normal);color: var(--lay-color-text-1)} +.layui-layer-dialog .layui-layer-content .layui-layer-face{color:var(--lay-color-gray-9)} +.layui-layer-dialog .layui-layer-content .layui-icon-tips{color:var(--lay-color-warning)} +.layui-layer-dialog .layui-layer-content .layui-icon-success{color: var(--lay-color-success)} +.layui-layer-dialog .layui-layer-content .layui-icon-error{top: 19px; color: var(--lay-color-danger)} +.layui-layer-dialog .layui-layer-content .layui-icon-question{color: var(--lay-color-warning);} +.layui-layer-dialog .layui-layer-content .layui-icon-lock{color: var(--lay-color-gray-10)} +.layui-layer-dialog .layui-layer-content .layui-icon-face-cry{color:var(--lay-color-danger)} +.layui-layer-dialog .layui-layer-content .layui-icon-face-smile{color:var(--lay-color-success)} +.layui-layer-rim{border:6px solid var(--lay-color-gray-8);border:6px solid var(--lay-color-border-2)} +.layui-layer-msg{border:1px solid var( --lay-color-border-2)} +.layui-layer-hui{background-color: var(--lay-color-bg-3);color: var(--lay-color-text-1)} +.layui-layer-hui .layui-layer-close{color: var(--lay-color-white)} +.layui-layer-loading-icon{color:var(--lay-color-gray-9)} +.layui-layer-loading-2:after,.layui-layer-loading-2:before{border:3px solid var(--lay-color-gray-6)} +.layui-layer-loading-2:after{border-color:transparent;border-left-color: var(--lay-color-normal)} +.layui-layer-tips .layui-layer-content{box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.layui-layer-tips i.layui-layer-TipsG{border-color:transparent} +.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{border-right-color:var(--lay-color-black)} +.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{border-bottom-color:var(--lay-color-black)} +.layui-layer-lan .layui-layer-title{background:var(--lay-color-blue-5);color: var(--lay-color-text-1)} +.layui-layer-lan .layui-layer-btn{border-top:1px solid var(--lay-color-border-3)} +.layui-layer-lan .layui-layer-btn a{background: var(--lay-color-white);border-color:var(--lay-color-border-3);color: var(--lay-color-black-7)} +.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background: var(--lay-color-gray-7)} +.layui-layer-molv .layui-layer-title{background:var(--lay-color-layuigreen-6);color: var(--lay-color-text-1)} +.layui-layer-molv .layui-layer-btn a{background:var(--lay-color-layuigreen-6);border-color:var(--lay-color-layuigreen-6)} +.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:var(--lay-color-gray-7)} +.layui-layer-prompt .layui-layer-input{border:1px solid var(--lay-color-border-2);color: var(--lay-color-text-2)} +.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)} +.layui-layer-tab .layui-layer-title span.layui-this{border-left:1px solid var(--lay-color-border-2);border-right:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-3)} +.layui-layer-imgnext,.layui-layer-imgprev{color:var(--lay-color-gray-9)} +.layui-layer-imgnext:hover,.layui-layer-imgprev:hover{color:var(--lay-color-gray-8)} +.layui-layer-imgbar{background-color:#333\9;background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.layui-layer-imgtit *{color: var(--lay-color-text-1)} +.layui-layer-imgtit a:hover{color: var(--lay-color-text-2)} +.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{border-right-color: var(--lay-color-bg-5)} +.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{border-bottom-color: var(--lay-color-bg-5)} +.layui-layer-prompt .layui-layer-input{border:1px solid var(--lay-color-border-2);color:var(--lay-color-text-1);background-color:var(--lay-color-black)} +.layui-layer-prompt .layui-layer-input:focus{outline:0} + +/*fix style*/ +.layui-layer-loading{background:0 0} +.layui-btn-primary{border-color:transparent} +.layui-btn-group .layui-btn:first-child{border-left:none} +.layui-btn-group .layui-btn-primary:hover{border-top-color:transparent; border-bottom-color: transparent;} +.layui-menu li:hover{background-color:var(--lay-color-fill-2)} +.layui-nav-child dd.layui-this{background-color:var(--lay-color-fill-2)} +.layui-nav .layui-nav-child a:hover{background-color:var(--lay-color-fill-2)} +.layui-nav .layui-nav-item a:hover,.layui-nav .layui-this a{background-color: var(--lay-color-fill-2)} +.layui-nav-child dd.layui-this{background-color: var(--lay-color-fill-2)} +.layui-tab-card>.layui-tab-title .layui-this:after,.layui-tab-title .layui-this:after{border-bottom-color:var(--lay-color-bg-1)} +.layui-form-select dl dd:hover{background-color:var(--lay-color-fill-2)} +.layui-form-select dl dd.layui-this{background-color:var(--lay-color-fill-2)} +.layui-laypage button{color:var(--lay-color-text-1)} +.layui-table-click,.layui-table-hover,.layui-table[lay-even] tbody tr:nth-child(even){background-color:var(--lay-color-fill-3)} +.layui-menu .layui-menu-item-checked,.layui-menu .layui-menu-item-checked2{background-color:var(--lay-color-fill-2)!important} +.layui-input-split{background-color: var(--lay-color-bg-2);} +.layui-layer-tab .layui-layer-title span:first-child{border-left: none !important;} +.layui-slider-input.layui-input, +.layui-slider-input .layui-input {background-color: var(--lay-color-bg-2);} + +a { + color: var(--lay-color-text-1) +} + +.layui-code, +pre>code { + background-color: var(--lay-color-bg-2) +} diff --git a/public/static/admin/css/login.css b/public/static/admin/css/login.css new file mode 100644 index 0000000..e0a629c --- /dev/null +++ b/public/static/admin/css/login.css @@ -0,0 +1,289 @@ +body { + background: #333333; +} + +.demo { + padding-top: 20px; + text-align: center; + color: #9abcda !important; + font-size: 14px; +} + +.main-body { + top: 50%; + left: 50%; + position: absolute; + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + -o-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + overflow: hidden; +} + +.login-main .login-bottom .center .item input { + display: inline-block; + width: 227px; + height: 22px; + padding: 0; + position: absolute; + border: 0; + outline: 0; + font-size: 14px; + letter-spacing: 0; +} + +.login-main .login-bottom .center .item .icon-1 { + background: url(../images/icon-login.png) no-repeat 1px 0; +} + +.login-main .login-bottom .center .item .icon-2 { + background: url(../images/icon-login.png) no-repeat -54px 0; +} + +.login-main .login-bottom .center .item .icon-3 { + background: url(../images/icon-login.png) no-repeat -106px 0; +} + +.login-main .login-bottom .center .item .icon-4 { + background: url(../images/icon-login.png) no-repeat 0 -43px; + position: absolute; + right: -10px; + cursor: pointer; +} + +.login-main .login-bottom .center .item .icon-5 { + background: url(../images/icon-login.png) no-repeat -55px -43px; +} + +.login-main .login-bottom .center .item .icon-6 { + background: url(../images/icon-login.png) no-repeat 0 -93px; + position: absolute; + right: -10px; + margin-top: 8px; + cursor: pointer; +} + + +.login-main .login-bottom .tip .icon-nocheck { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 2px; + border: solid 1px #9abcda; + position: relative; + top: 2px; + margin: 1px 8px 1px 1px; + cursor: pointer; +} + +.login-main .login-bottom .tip .icon-check { + margin: 0 7px 0 0; + width: 14px; + height: 14px; + border: none; + background: url(../images/icon-login.png) no-repeat -111px -48px; +} + +.login-main .login-bottom .center .item .icon { + display: inline-block; + width: 33px; + height: 22px; +} + +.login-main .login-bottom .center .item { + width: 288px; + height: 35px; + border-bottom: 1px solid #dae1e6; + margin-bottom: 35px; +} + +.login-main { + width: 428px; + position: relative; + float: left; +} + +.login-main .login-top { + height: 117px; + background-color: #148be4; + border-radius: 12px 12px 0 0; + font-family: SourceHanSansCN-Regular; + font-size: 30px; + font-weight: 400; + font-stretch: normal; + letter-spacing: 0; + color: #fff; + line-height: 117px; + text-align: center; + overflow: hidden; + -webkit-transform: rotate(0); + -moz-transform: rotate(0); + -ms-transform: rotate(0); + -o-transform: rotate(0); + transform: rotate(0); +} + +.login-main .login-top .bg1 { + display: inline-block; + width: 74px; + height: 74px; + background: #fff; + opacity: .1; + border-radius: 0 74px 0 0; + position: absolute; + left: 0; + top: 43px; +} + + +.login-main .login-top .bg2 { + display: inline-block; + width: 94px; + height: 94px; + background: #fff; + opacity: .1; + border-radius: 50%; + position: absolute; + right: -16px; + top: -16px; +} + +.login-main .login-bottom { + width: 428px; + background: #fff; + border-radius: 0 0 12px 12px; + padding-bottom: 53px; +} + +.login-main .login-bottom .center { + width: 288px; + margin: 0 auto; + padding-top: 40px; + padding-bottom: 15px; + position: relative; +} + +.login-main .login-bottom .tip { + clear: both; + height: 16px; + line-height: 16px; + width: 288px; + margin: 0 auto; +} + +.container { + position: static; + font-size: 12px; + height: 100%; +} + +input::-webkit-input-placeholder { + color: #a6aebf; +} + +input::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #a6aebf; +} + +input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #a6aebf; +} + +input:-ms-input-placeholder { /* Internet Explorer 10-11 */ + color: #a6aebf; +} + +input:-webkit-autofill { /* 取消Chrome记住密码的背景颜色 */ + -webkit-box-shadow: 0 0 0 1000px white inset !important; +} + +html { + height: 100%; +} + +.login-main .login-bottom .tip { + clear: both; + height: 16px; + line-height: 16px; + width: 288px; + margin: 0 auto; +} + +.login-main .login-bottom .tip .login-tip { + font-family: MicrosoftYaHei; + font-size: 12px; + font-weight: 400; + font-stretch: normal; + letter-spacing: 0; + color: #9abcda; + cursor: pointer; +} + +.login-main .login-bottom .tip .forget-password { + font-stretch: normal; + letter-spacing: 0; + color: #1391ff; + text-decoration: none; + position: absolute; + right: 62px; +} + +.login-main .login-bottom .login-btn { + width: 288px; + height: 40px; + background-color: #1E9FFF; + border-radius: 16px; + margin: 24px auto 0; + text-align: center; + line-height: 40px; + color: #fff; + font-size: 14px; + letter-spacing: 0; + cursor: pointer; + border: none; +} + +.login-main .login-bottom .center .item .validateImg { + position: absolute; + right: 1px; + cursor: pointer; + height: 36px; + border: 1px solid #e6e6e6; +} + +.footer { + left: 0; + bottom: 0; + color: #fff; + width: 100%; + position: absolute; + text-align: center; + line-height: 30px; + padding-bottom: 10px; + text-shadow: #000 0.1em 0.1em 0.1em; + font-size: 14px; +} + +.padding-5 { + padding: 5px !important; +} + +.footer a, .footer span { + color: #fff; +} + + +@media screen and (max-width: 428px) { + .login-main { + width: 360px !important; + } + + .login-main .login-top { + width: 360px !important; + } + + .login-main .login-bottom { + width: 360px !important; + } +} \ No newline at end of file diff --git a/public/static/admin/css/public.css b/public/static/admin/css/public.css new file mode 100644 index 0000000..40ed2b0 --- /dev/null +++ b/public/static/admin/css/public.css @@ -0,0 +1,540 @@ +@import url("../../plugs/layui-v2.x/css/layui.css"); +@import url("../../plugs/font-awesome-6.x/css/all.min.css"); +@import url("../css/color.css"); +@import url("../css/themes/index.css"); +@import url("../css/iconfont.css"); + +:root { + --ea8-theme-main-color: #16b777; +} + +html, +body { + font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.ws-header-theme .layui-form-switch { + vertical-align: baseline; +} + +.ws-header-theme .layui-form-onswitch { + background: #333333; + border: 1px solid rgba(255, 255, 255, .7); +} + +.layuimini-container { + min-height: 250px; + padding: 15px; + margin: 0 auto; +} + +.layuimini-main { + position: relative; + padding: 15px 15px; + background-color: #ffffff; + border: 1px solid #f2f2f2; + border-radius: 5px; +} + +.dark .layuimini-main { + position: relative; + padding: 15px 15px; + background-color: var(--lay-color-bg-1); + border: 1px solid #363636; + border-radius: 5px; +} + +.layuimini-form .layui-form-item { + position: relative; + padding: 0 60px 0 0; + line-height: 24px; +} + +.text-center { + text-align: center; +} + +.layuimini-form { + margin-top: 10px; +} + +.easy-bg-white { + background-color: #ffffff; + height: auto; +} + +.hr-line { + height: 1px; + margin: 30px 0; + border-top: 1px dashed #e7eaec; +} + +.dark .hr-line { + color: #363636; + height: 1px; + margin: 30px 0; + background-color: #363636; + border-top: 1px dashed #363636; +} + +/**重写layui表格自适应*/ +.layuimini-container .layui-table-cell { + height: auto; + line-height: 30px; +} + +/**数据表格-搜索表单样式*/ +.layuimini-container .table-search-fieldset { + margin: 0; + border: 1px solid #e6e6e6; + padding: 10px 20px 5px 20px; +} + +/**数据表格-搜索表单样式*/ +.dark .layuimini-container .table-search-fieldset { + margin: 0; + border: 1px solid #363636; + padding: 10px 20px 5px 20px; + color: #bdbdbd; +} + +.layuimini-container .table-search-fieldset input::-webkit-input-placeholder { + color: #a9a9a9; +} + +.layuimini-container .table-search-fieldset input:-ms-input-placeholder { + color: #a9a9a9; +} + +.layuimini-container .table-search-fieldset input::-ms-input-placeholder { + color: #a9a9a9; +} + +/**图标选择器*/ +.layui-iconpicker-body.layui-iconpicker-body-page .hide { + display: none; +} + +/**必填红点 */ +.layuimini-form > .layui-form-item .required:after { + content: '*'; + color: red; + position: absolute; + margin-left: 4px; + font-weight: bold; + line-height: 1.8em; + top: 6px; + right: 5px; +} + +/*.layuimini-form>.layui-form-item>.layui-form-label {width:120px !important;}*/ +/*.layuimini-form>.layui-form-item>.layui-input-block {margin-left:150px !important;}*/ +.layuimini-form > .layui-form-item > .layui-input-block tip, .layuimini-form > .layui-form-item > .layui-inline tip { + display: inline-block; + margin-top: 10px; + line-height: 15px; + font-size: 10px; + color: #a29c9c; +} + +.tableSearch-xmSelect xm-select { + min-height: 30px !important; + line-height: 30px !important; + margin: 0 !important; + background-color: var(--lay-color-fill-2); +} + +.elem-style-dark .tableSearch-xmSelect xm-select { + background-color: var(--lay-color-fill-2); + color: var(--lay-color-text-2); + border-color: var(--lay-color-border-1) !important; +} + +/** 按钮背景色 */ +.layuimini-container .layuimini-btn-primary { + color: #fff; + background-color: #2c3e50; +} + +.layuimini-container .layui-btn-sm i { + font-size: 12px !important; +} + +/**文件上传样式*/ +.layuimini-upload { + position: relative; +} + +.layuimini-upload .layuimini-upload-btn { + display: inline-block; + position: absolute; + right: 0px; + background-color: #fff; +} + +.dark .layuimini-upload .layuimini-upload-btn { + display: inline-block; + position: absolute; + right: 0px; + background-color: #363636; +} + +.layuimini-upload-show { + margin-top: 10px; + margin-bottom: 0; +} + +.layuimini-upload-show li { + position: relative; + display: inline-block; + padding: 5px 0 5px 0; + padding-left: 10px; + padding-right: 10px; + border: 1px solid #e2e2e2; +} + +.layuimini-upload-show a img { + height: 80px; + object-fit: cover; +} + +.layuimini-upload-show .uploads-delete-tip { + position: absolute; + right: 10px; + font-size: 12px; +} + +.bg-red { + background-color: #e74c3c !important; +} + +.color-red { + color: #e74c3c !important; +} + +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 11px; + font-weight: bold; + color: #fff; + line-height: 1; + vertical-align: middle; + white-space: nowrap; + text-align: center; + background-color: #777777; + border-radius: 10px; +} + +/**vue隐藏样式*/ +[v-cloak] { + display: none; +} + +/**表格url样式*/ +.layuimini-table-url { + color: #1497f3; + border-radius: 3px; + size: 8px !important; + padding: 2px +} + +.layuimini-table-url:hover { + color: #1497f3; + border-radius: 3px; + size: 8px !important; + padding: 2px +} + +/**后台权限隐藏*/ +/*[auth] { display: none; }*/ + +.layui-form-label { + width: 100px; +} + +.layui-input-block { + margin-left: 130px; + min-height: 36px +} + +/** +table样式 + */ +.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em { + border-radius: 30px !important; + background-color: #1e9fff !important; +} + +.layuimini-container .layui-table-tool { + background-color: #ffffff; + padding: 10px; + padding-bottom: 15px !important; +} + +.layuimini-container .layui-table-box .layui-table-header th { + font-weight: bold !important; +} + +/** +搜索 + */ +.form-search .layui-btn { + height: 32px; + line-height: 28px; + font-size: 12px; + padding: 0 10px; +} + +.form-search .layui-form-label { + padding: 0 8px; + height: 32px; + line-height: 30px; +} + +.form-search .layui-input-inline { + min-width: 170px; + max-width: 300px; + width: auto; +} + +.form-search .layui-input-inline input, +.form-search .layui-input-inline select { + width: 100%; + height: 32px; + padding: 2px 8px; + line-height: 1em; +} + +.layui-form-select dl { + border: 1px var(--ea8-theme-main-color) solid; + border-top: none; + z-index: 99999; + padding: 0; + border-radius: 0; +} + +.layui-form-select dl dd.layui-this { + background-color: var(--ea8-theme-main-color); + border-top: none; + color: #ffffff; +} + +.form-search .layui-form-select dl { + top: 31px; + padding: 0; +} + +.layuimini-container .layui-btn-success { + color: #fff; + background-color: #4bb368; + border-color: #4bb368; +} + +.layuimini-container .layui-btn-danger { + color: #fff; + background-color: #f56c6c; + border-color: #f56c6c; +} + +.layuimini-container .layui-table-tool .layui-btn + .layui-btn { + margin-left: 5px; +} + +.layuimini-container .layui-table-tool .layui-inline[lay-event] { + width: 30px; + height: 30px; + line-height: 30px; + padding: 0px; +} + +.layuimini-container .layui-table-tool .layui-inline .layui-icon { + font-size: 16px; +} + +/** +弹出层样式 + */ +.layui-layer-easy .layui-layer-title { + background: var(--lay-color-bg-5); + color: #fff !important; + border-bottom: none; +} + +.layui-layer-easy.layui-layer-border { + border: none !important; + box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important; +} + +.layui-layer-easy.layui-layer-iframe { + overflow: visible; +} + +.layui-layer-easy .layui-layer-moves { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.layui-layer-easy .layui-layer-btn { + text-align: center !important; + padding: 10px !important; + overflow: hidden; +} + +.layui-layer-easy .layui-layer-btn a { + background-color: #95a5a6; + color: #fff !important; + height: 31px; + margin-top: 0; + border: 1px solid #95a5a6; +} + +.layui-layer-easy .layui-layer-btn .layui-layer-btn0 { + background-color: #1E9FFF; + border-color: #1E9FFF; +} + +.layui-layer-easy .layui-layer-footer { + padding: 8px 20px; + background-color: #ecf0f1; + height: auto; + text-align: inherit !important; +} + +.layui-layer-easy .layui-layer-setwin > a { + background: none !important; +} + +.layui-layer-easy .layui-layer-setwin > a cite { + display: none; +} + +.layui-layer-easy .layui-layer-setwin > a:after { + content: "\e625"; + font-family: iconfont; + font-style: normal; + font-weight: normal; + text-decoration: inherit; + position: absolute; + font-size: 18px; + color: #fff; + margin: 0; + z-index: 1; +} + +.layui-layer-easy .layui-layer-setwin > a:hover { + text-decoration: none !important; + background: none !important; +} + +.layui-layer-easy .layui-layer-setwin > a:focus { + text-decoration: none !important; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-min:before, +.layui-layer-easy .layui-layer-setwin .layui-layer-min:after { + border-color: #FFFFFF; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-max:before, +.layui-layer-easy .layui-layer-setwin .layui-layer-max:after { + border-color: #FFFFFF; +} + + +.layui-layer-easy .layui-layer-setwin .layui-layer-close1, +.layui-layer-easy .layui-layer-setwin .layui-layer-close1:hover { + color: #FFFFFF; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-close1:after, +.layui-layer-easy .layui-layer-setwin .layui-layer-close1:hover:after { + display: none; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-close2, +.layui-layer-easy .layui-layer-setwin .layui-layer-close2:hover { + color: #FFFFFF; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-close2:after, +.layui-layer-easy .layui-layer-setwin .layui-layer-close2:hover:after { + display: none; +} + +.layui-layer-content { + clear: both; +} + +.layui-layer-easy-msg { + min-width: 100px; +} + +.layui-layer-easy-tab .layui-layer-title .layui-this { + color: #333; +} + +.layui-layer-easy-tab .layui-layer-content .layui-layer-tabmain { + margin: 0; + padding: 0; +} + +@media screen and (max-width: 1024px) { + .layuimini-form .layui-form-item { + position: relative; + padding: 0 30px 0 0; + line-height: 24px; + } +} + +@media screen and (max-width: 768px) { + .easyadmin-export-btn { + display: none; + } + + .form-search .layui-input-inline input, .form-search .layui-input-inline select { + width: 100% !important; + } + + .tableSelect { + margin: 5px !important; + min-width: auto !important; + left: 1px !important; + right: 1px !important; + } + + .tableSelect img { + object-fit: cover; + height: 100%; + } +} + +/** +资源加载锁 + */ +.easy-load-lock { + cursor: not-allowed; +} + +.line-limit-length { + width: 200px; + overflow: hidden; + text-overflow: ellipsis; + background: goldenrod; + white-space: nowrap; +} + +.wangEditor_div { + z-index: 99999; + border: 1px solid var(--w-e-textarea-slight-border-color); +} + +.layui-input:focus, .layui-textarea:focus { + border-color: var(--ea8-theme-main-color) !important; +} + +.layui-tabs-item { + height: 100%; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_dark.scss b/public/static/admin/css/themes/_dark.scss new file mode 100644 index 0000000..34ebc1a --- /dev/null +++ b/public/static/admin/css/themes/_dark.scss @@ -0,0 +1,802 @@ +// 通常用于背景色 +$black-color :rgb(2, 17, 20); +// 通常用于字体颜色 +$main-color :rgb(126, 252, 246); +// 通常用于边框 +$less-main-color:rgb(6, 216, 215); + +$plus-main-color:rgb(0, 125, 124); + +// 通常用于激活状态,通常跟背景色搭配 +$cover-color :rgba(62, 251, 251, 0.05); +// 更强的激活状态,适合做选项操作时使用 +$active-color :rgba(62, 251, 251, 0.5); + + +$red-color :rgb(255, 0, 0); +$yellow-color:rgb(255, 255, 153); +$green-color :rgb(0, 255, 0); + +& { + background-color: $black-color; + color: $main-color; +} + +.layuimini-main { + background-color: $black-color; +} + +.layuimini-container { + background-color: $black-color; +} + +.layuimini-container .layui-table-tool { + background-color: $black-color; +} + +$box-shape: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + +.layui-btn { + + &.layui-btn-lg { + + padding-right: 25px; + } + + clip-path : $box-shape; + padding-right : 10px; + position : relative; + background-color: transparent; + border : 1px solid; + color : rgb(126, 252, 246); + text-shadow : rgb(126, 252, 246) 0px 0px 1px; + background-color: rgb(126, 252, 246); + + + &::before { + content: ''; + display: block; + position: absolute; + z-index: -1; + clip-path: $box-shape; + width: 100%; + height: 100%; + left: -0.5px; + top: -0.5px; + background-color: $black-color; + } + + &:hover::after { + content: ''; + display: block; + position: absolute; + z-index: -1; + clip-path: $box-shape; + width: 100%; + height: 100%; + left: -0.5px; + top: -0.5px; + background-color: rgba(126, 252, 246, 0.2); + } + + &.layui-btn-disabled { + &::after { + // todo:实现按钮禁用样式 + } + } + + &.layui-btn-success { + text-shadow: rgb(0, 255, 0) 0px 0px 1px; + color: rgb(0, 255, 0); + background-color: rgba(0, 255, 0); + border: unset; + + &:hover::after { + background-color: rgba(0, 255, 0, 0.2); + } + } + + &.layui-btn-danger { + text-shadow: rgb(255, 0, 0) 0px 0px 1px; + color: rgb(255, 0, 0); + background-color: rgb(255, 0, 0); + border: unset; + + &:hover::after { + background-color: rgba(255, 0, 0, 0.2); + } + } + + &.layuimini-btn-primary { + text-shadow: rgb(255, 255, 153) 0px 0px 1px; + color: rgb(255, 255, 153); + background-color: rgb(255, 255, 153); + border: unset; + + &:hover::after { + background-color: rgba(255, 255, 153, 0.2); + } + + } + + &.layui-btn-primary { + border: unset; + } + + &.layui-btn-normal { + color: $black-color; + background-color: $main-color; + border: unset; + + &::before { + background-color: $main-color; + } + + &:hover::after { + background-color: $main-color; + } + } +} + +.layui-table { + background: $black-color; + color: $main-color; + + + tr { + background-color: $cover-color; + } + + td { + border-color: $less-main-color; + } + +} + +.layui-table-header { + background-color: $black-color; +} + +.layuimini-container .layui-table-box { + border-color: $less-main-color; +} + +.layuimini-container .layui-table-box .layui-table-header th { + color: $main-color !important; +} + +.layui-table-tool .layui-inline[lay-event] { + color: $main-color; + border: none; + position: relative; + + &::after { + border-color: $main-color; + border-width: 1px; + border-style: solid; + clip-path: $box-shape; + position: absolute; + left: 0; + top: 0; + width: calc(100% - 1px); + height: calc(100% - 1px); + content: ''; + display: block; + } +} + +.layui-table tbody tr:hover { + background-color: rgba(126, 252, 246, 0.1); +} + +.layuimini-main { + border-color: $less-main-color; +} + +.layui-table-header { + border-color: $less-main-color; +} + + + +.color-content>ul>li>a>div>span:nth-child(2) { + background-color: $black-color !important; +} + +.layuimini-color .elem-content li { + clip-path: $box-shape; +} + +.layuimini-color .elem-content li.layui-this { + background-color: $main-color; + color: $black-color !important; + border-color: $less-main-color; +} + +.layuimini-color .more-menu-item { + color: $main-color; + + &:hover { + background-color: rgba(62, 251, 251, 0.05); + } +} + +.layui-layout-admin .layui-header { + background-color: $cover-color !important; +} + +.layuimini-tab .layui-tab-title { + background-color: $cover-color !important; + border-color: $less-main-color; + +} + +.layuimini-tab .layui-tab-title span { + color: $active-color; +} + +.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, +.layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { + color: $black-color !important; +} + +.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { + color: $main-color !important; +} + +.layui-layout-admin .layui-header .layui-nav .layui-nav-item { + background-color: $active-color; + +} + + +.layui-layout-admin .layui-header .layuimini-header-content>ul>.layui-nav-item.layui-this, +.layuimini-tool i:hover { + background-color: $main-color !important; +} + +.layuimini-tab .layui-tab-control>li { + background-color: $black-color; + border-color: $less-main-color; +} + +.layuimini-tab .layui-tab-title li { + border-color: $less-main-color; +} + +.layui-flow-more a *, +.layui-laypage input, +.layui-table-view select[lay-ignore] { + border-color: $less-main-color; + background-color: $black-color; + color: $main-color; +} + +.layui-laypage button, +.layui-laypage input { + border-color: $less-main-color; + background-color: $black-color; + color: $main-color; + +} + +.layuimini-container .layui-form-switch { + border-color: $less-main-color !important; + background-color: $black-color !important; + +} + +.layuimini-container .layui-form-onswitch { + background-color: $main-color !important; +} + +.layuimini-container .layui-form-switch.layui-form-onswitch i { + background-color: $black-color !important; +} +.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: $main-color !important; +} + +.layui-laypage .layui-laypage-curr em { + color: $black-color !important; +} + +.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + background-color: $less-main-color; + +} + +.layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin="primary"] i { + border-color: $main-color; + background-color: $main-color; + color: $black-color; +} + +.layui-table-view .layui-form-checkbox[lay-skin="primary"] i { + background-color: $cover-color; +} + +.layui-table-init { + background-color: $black-color; +} + +.box-border-line { + position: relative; + border: 1px solid $less-main-color; + border-width: 1px; + $border-offset: 3px; + + &::before { + content: ''; + position: absolute; + width: 50px; + height: 20px; + transition: all 0.2s; + border: 1px solid $less-main-color; + top: -$border-offset; + left: -$border-offset; + border-right: none; + border-bottom: none; + pointer-events: none; + } + + &::after { + content: ""; + position: absolute; + width: 50px; + height: 20px; + transition: all 0.2s; + border: 1px solid $less-main-color; + bottom: -$border-offset; + right: -$border-offset; + border-left: none; + border-top: none; + pointer-events: none; + } + + &:hover { + + &::after, + &::before { + width: calc(100% + $border-offset); + height: calc(100% + $border-offset); + } + } +} + +.table-search-fieldset { + .layui-input-inline { + margin-right: 0; + } + + + + .layui-form-item:not(:last-child) { + margin-right: 10px; + @extend .box-border-line; + } + + .layui-form-label { + border: unset; + } +} + +.layui-form-pane .layui-form-label { + background-color: $cover-color; + color: $main-color; +} + +.layuimini-container .table-search-fieldset { + color: $main-color; + border-color: $less-main-color; + +} + +.layui-form-select, +.layui-form-autocomplete { + dl { + + color: $main-color; + background-color: $black-color; + border-color: $less-main-color; + + dd { + &.layui-this { + background-color: $main-color !important; + color: $black-color; + } + + &:hover { + background-color: $less-main-color !important; + color: $black-color; + } + } + } +} + +.layui-iconpicker-item, +.layui-iconpicker-item:hover { + border-color: $less-main-color !important; + color: $black-color; + + .layui-iconpicker-icon:hover { + border-color: $less-main-color !important; + } +} + + +.layui-nav-child { + background-color: $black-color; + color: $main-color; +} + +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { + color: $main-color !important; +} + +.layui-badge, +.layui-badge-dot, +.layui-badge-rim { + background-color: $main-color; +} + +.layui-nav .layui-nav-child a:hover { + background-color: $active-color; +} + +.layui-table-tool-panel { + background-color: $black-color; +} + +.layui-form-checkbox[lay-skin="primary"] span { + color: $main-color; +} + +.layui-table-tool-panel li:hover { + background-color: $active-color; +} + +.layui-side.layui-bg-black, +.layui-side.layui-bg-black>.layuimini-menu-left>ul, +.layuimini-menu-left-zoom>ul { + background-color: $black-color !important; + +} + +.layui-side { + border-right: 1px solid $main-color; +} + +.layui-bg-blue { + background-color: #0000ff !important; +} + +.layui-bg-orange { + background-color: $yellow-color !important; + color: $black-color !important; +} + +.layui-bg-green { + background-color: $green-color !important; + color: $black-color !important; +} + +.layui-table-hover { + background-color: $cover-color; +} + +.layui-table-grid-down { + background-color: $black-color; + color: $main-color; + border-color: unset; +} + +.layui-table-tips-main { + background-color: $main-color; + color: $black-color; +} + +.layui-layout-admin .layui-header .layuimini-tool i { + color: $main-color; +} + +.color-red { + color: $red-color !important; +} + +.layuimini-tab .layui-tab-title .layui-this span { + color: $main-color; +} + +.layui-card { + + background-color: $cover-color; + border-radius: 0; + + @extend .box-border-line; + + .layui-card-header { + color: $main-color; + } +} + +.layui-text { + color: $main-color; +} + + +.layuimini-qiuck-module { + cursor: pointer; + + a i { + background-color: $cover-color; + color: $active-color; + } + + a cite { + color: $active-color; + } + + + &:hover { + a i { + background-color: $active-color; + color: $main-color; + } + + a cite { + color: $main-color; + } + + } +} + +.layui-bg-number { + background-color: $cover-color; +} + +.layui-input, +.layui-select, +.layui-textarea, +.city-picker-span, +.main-input { + background-color: $cover-color; + color: $main-color; +} + +.city-picker-span>.title>span { + color: $main-color; + + &:hover { + background-color: $main-color; + color: $black-color; + } +} + +.layui-form-radio:hover *, +.layui-form-radioed, +.layui-form-radioed>i { + color: $main-color; +} + +.layui-form-checked[lay-skin="primary"] i { + border-color: $main-color !important; + background-color: $main-color; + color: $black-color; +} + +.layui-input:focus, +.layui-textarea:focus { + border-color: $main-color !important; +} + +.layui-input:hover, +.layui-textarea:hover { + border-color: $main-color !important; + +} + +.layui-badge-rim, +.layui-border, +.layui-colla-content, +.layui-colla-item, +.layui-collapse, +.layui-elem-field, +.layui-form-pane .layui-form-item[pane], +.layui-form-pane .layui-form-label, +.layui-input, +.layui-layedit, +.layui-layedit-tool, +.layui-panel, +.layui-quote-nm, +.layui-select, +.layui-tab-bar, +.layui-tab-card, +.layui-tab-title, +.layui-tab-title .layui-this::after, +.layui-textarea { + border-color: $main-color !important; +} + +.form-search .layui-input-inline input, +.form-search .layui-input-inline select { + border-width: 0 0 0 1px; +} + +.layuimini-tab .layui-tab-tool .layui-nav-child { + border-color: $main-color; +} + +.layui-nav .layui-nav-child a { + color: $main-color; +} + +.layui-form-item { + margin-bottom: 12px; +} + +.layuimini-upload .layuimini-upload-btn { + background-color: $black-color; +} + +.layui-layer { + border: 1px solid $main-color; + background-color: $black-color; +} + +.layui-layer-easy .layui-layer-title { + background-color: $plus-main-color !important; + color: $main-color !important; +} + + + +.layui-table td, +.layui-table th, +.layui-table-col-set, +.layui-table-fixed-r, +.layui-table-grid-down, +.layui-table-header, +.layui-table-page, +.layui-table-tips-main, +.layui-table-tool, +.layui-table-total, +.layui-table-view, +.layui-table[lay-skin="line"], +.layui-table[lay-skin="row"] { + border-color: $less-main-color; +} + +.layui-table tbody tr:hover, +.layui-table thead tr, +.layui-table-click, +.layui-table-header, +.layui-table-hover, +.layui-table-mend, +.layui-table-patch, +.layui-table-tool, +.layui-table-total, +.layui-table-total tr { + background-color: $black-color; +} + +.hr-line { + color: $main-color; + border-color: $less-main-color; + background-color: $main-color; +} + +.layui-layer-easy .layui-layer-btn { + background-color: $black-color; + border-top: 1px solid $less-main-color; +} + +.layui-layer-easy .layui-layer-btn .layui-layer-btn0 { + background-color: $main-color; + border-color: $less-main-color; + color: $main-color !important; + clip-path: $box-shape; +} + +.layui-layer-easy .layui-layer-btn a { + @extend .layui-btn +} + +.layui-layer-shade { + background-color: #fff !important; +} + +.layuimini-menu-left { + .layui-nav-tree .layui-nav-item { + + margin: 5px; + width: calc(100% - 10px); + } + + .layui-nav .layui-nav-item { + clip-path: $box-shape; + color: $main-color; + background-color: $active-color; + + &.layui-this a { + background-color: $main-color !important; + color: $black-color !important; + } + + &.layui-this { + background-color: $main-color !important; + color: $black-color !important; + + span { + background-color: $main-color !important; + color: $black-color !important; + + } + } + } + + .layui-nav .layui-nav-item a:hover { + background-color: $active-color !important; + } + +} + +.layuimini-menu-left .layui-nav .layui-nav-item a, +.layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: $main-color !important; +} + +.layuimini-menu-left .layui-nav-item a span { + color: $main-color !important; + +} + +.layuimini-menu-left .layui-nav-item:hover a span { + color: $black-color !important; + +} + +.layui-layout-admin .layuimini-logo { + background-color: $black-color !important; + +} + +.layuimini-menu-left .layui-nav-itemed>.layui-nav-child { + background-color: $black-color !important; +} + +.layuimini-menu-left .layui-nav-tree .layui-this, +.layuimini-menu-left .layui-nav-tree .layui-this>a, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: $main-color !important; + color: $black-color !important; + + .layui-left-nav { + color: $black-color !important; + } +} + + +.layui-iconpicker-icon { + border-color: $less-main-color !important; + background-color: $less-main-color !important; +} + +.layui-iconpicker .layui-anim { + background-color: $black-color; +} + +.layui-iconpicker .layui-iconpicker-list { + background-color: $black-color; +} + +.layui-header .layui-nav .layui-nav-child dd.layui-this a, +.layui-header .layui-nav-child dd.layui-this, +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: $active-color !important; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_demo.scss b/public/static/admin/css/themes/_demo.scss new file mode 100644 index 0000000..ee16320 --- /dev/null +++ b/public/static/admin/css/themes/_demo.scss @@ -0,0 +1,81 @@ +.layui-btn { + color : #808185 !important; + background-color: #cde7ff !important; + border : 1px solid #d3dde6 !important; +} + +.layui-layer-easy .layui-layer-title { + background-color: rgb(215, 215, 215) !important; + color : #6C6E71 !important; +} + +.layui-layer-easy .layui-layer-setwin>a::after { + color: #6C6E71 !important; +} + +.layui-layer-easy .layui-layer-btn .layui-layer-btn0 { + color : #808185 !important; + background-color: #cde7ff !important; + border : 1px solid #d3dde6 !important; +} + +.layuimini-tab .layui-tab-title .layuimini-tab-active { + display: none !important; +} + +.layuimini-tab .layui-tab-title li { + padding : 0 5px !important; + font-size : 12px; + border-width: 1px 1px 1px 0 !important; + border-style: solid !important; + +} + +.layuimini-tab .layui-tab-title li.layui-this { + color : #fff !important; + border-color: rgba(0, 0, 255, 1) !important; + background : rgba(90, 173, 255, 1) !important; +} + +.layuimini-tab .layui-tab-title .layui-this span { + color: #fff !important; +} + +.layuimini-tab>.layui-tab-title li, +.layuimini-tab>.close-box li { + line-height: 27px !important; +} + +.layuimini-tab>.layui-tab-title, +.layuimini-tab>.close-box { + height: 28px !important; +} + +.layuimini-tab .layui-tab-control>li { + height : 28px !important; + line-height: 28px !important; +} + +.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: #6C6E71 !important; +} + +.layuimini-container .layui-form-onswitch { + background-color: #cde7ff !important; + border-color : #cde7ff !important; +} + +.layuimini-container .layui-form-switch { + + background-color: #6C6E71; + border-color : #6C6E71; +} + +.layui-table-tool .layui-inline[lay-event] { + border-color: transparent; +} + +.layui-form-checked[lay-skin="primary"] i { + border-color : #cde7ff !important; + background-color: #cde7ff !important; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_gtk.scss b/public/static/admin/css/themes/_gtk.scss new file mode 100644 index 0000000..d4d348a --- /dev/null +++ b/public/static/admin/css/themes/_gtk.scss @@ -0,0 +1,708 @@ +& { + background-color: #f6f5f4; + color : #2e3436; +} + +.layuimini-container {} + +.layuimini-main { + padding: 0; +} + +.layuimini-container .layui-table-box .layui-table-header th { + color : #979a9b !important; + font-weight : 700 !important; + font-weight : bold; + text-shadow : none; + border-color : #d7d2ce; + border-bottom: 1px solid; + + &:not(:last-child) { + + border-right: 1px solid #d7d2ce; + } +} + +.layui-table-view .layui-table td { + + border-bottom: unset; + + &:not(:last-child) { + border-right: 1px solid #d7d2ce; + + } +} + +.layui-table { + color : #2e3436; + background: #f6f5f4; +} + +.layui-table-view .layui-table[lay-size="sm"] .layui-table-cell { + line-height: 30px; +} + +.layui-table tbody tr:hover, +.layui-table thead tr, +.layui-table-click, +.layui-table-header, +.layui-table-hover, +.layui-table-mend, +.layui-table-patch, +.layui-table-tool, +.layui-table-total, +.layui-table-total tr { + background-color: unset; +} + +.layui-table-cell { + padding: 0 4px; +} + +.layui-table img { + height: 25px !important; + width : auto !important; +} + +.layui-btn { + position : relative; + outline : none; + overflow : visible; + line-height : 28px; + border-radius : 5px; + transition : all .15s cubic-bezier(.25, .46, .45, .94); + padding : 4px 9px; + user-select : none; + color : #2e3436; + outline-color : rgba(53, 132, 228, .5); + border : 1px solid #cdc7c2; + border-bottom-color: rgb(205, 199, 194); + border-bottom-color: #bfb8b1; + background-color : #f6f5f4; + box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07); + + &::before { + content : ' '; + position : absolute; + pointer-events: none; + width : 100%; + height : 100%; + top : 0px; + left : 0px; + background : linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent); + transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + } + + &::after { + content : ''; + position : absolute; + pointer-events: none; + z-index : 2; + display : inline-block; + border : 2px solid transparent; + border-radius : inherit; + transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + top : -4px; + left : -4px; + width : calc(100% - -4px); + height : calc(100% - -4px); + } + + &.layui-btn-normal { + color : #fff; + border-color : #1b6acb #1b6acb #15539e; + background-color: #3c88e5; + box-shadow : inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, .07); + } + + &.layui-btn-danger { + color : #fff; + border-color : #b2161d #b2161d #851015; + background-color: #e41f28; + box-shadow : inset 0 1px #db1a23, 0 1px 2px rgba(0, 0, 0, .07); + } + + &.layui-btn-sm { + line-height: 20px; + } + + &.layui-btn-xs { + line-height: 12px + } +} + +.layuimini-container .layui-table-tool .layui-inline[lay-event] { + @extend .layui-btn; + + line-height : 32px; + min-width : 32px; + min-height : 32px; + padding : 0; + border-radius: 9999px; +} + +.layui-laydate .layui-this { + background-color: #3584e4 !important; + +} + +.layui-laydate-content td, +.layui-laydate-content th { + + width : 36px; + height : 36px; + border-radius: 100%; +} + +.laydate-footer-btns span { + @extend .layui-btn; + + line-height: 16px; + + &:not(:last-child) { + border-right-style : none; + border-top-right-radius : 0; + border-bottom-right-radius: 0; + } + + &:not(:first-child) { + border-top-left-radius : 0; + border-bottom-left-radius: 0; + } +} + +.layui-laydate-footer span { + @extend .layui-btn; + line-height: 16px; +} + +.layui-laydate-footer span.layui-laydate-preview { + line-height: 22px; +} + +.layui-form-checked[lay-skin="primary"] i { + border-color : #185fb4 !important; + background-color: #5094e8; + background-image: linear-gradient(0deg, #3987e5, #5094e8); +} + +.layui-form-checkbox[lay-skin="primary"]:hover i { + border-color : #185fb4; + background-image: linear-gradient(0deg, #5094e8, #6ba5eb); +} + +.layui-table-view .layui-form-checkbox[lay-skin="primary"] i { + border-radius: 3px; +} + +.layui-table-view .layui-form-checkbox i { + font-weight: bold; +} + +.layui-layer-title { + padding : 0 6px; + min-height : 46px; + border : 1px solid #bfb8b1; + border-top-left-radius : 8px; + border-top-right-radius: 8px; + background : #f1f0ee linear-gradient(0deg, #dfdcd8, #f4f2f1) !important; + color : #2e3436 !important; + padding-left : 12px; + padding-right : 12px; + font-weight : bold; +} + +.layui-layer { + background-color: #f6f5f4; +} + +.layui-layer-easy .layui-layer-title~.layui-layer-setwin>a { + position : relative; + outline : none; + overflow : visible; + border-radius: 5px; + transition : all .15s cubic-bezier(.25, .46, .45, .94); + user-select : none; + + outline-color : rgba(53, 132, 228, .5); + border : 1px solid #cdc7c2; + border-bottom-color: rgb(205, 199, 194); + border-bottom-color: #bfb8b1; + background-color : #f6f5f4; + box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07); + height : 20px; + line-height : 20px; + width : 20px; + text-align : center; + display : inline-flex; + align-items : center; + justify-content : center; + + &::after { + color: #2e3436 !important; + } +} + +.layui-layer-setwin { + display : flex; + align-items: center; +} + +.layuimini-container .layui-form-switch.layui-form-onswitch { + color : #ffffff; + border-color : #185fb4; + background-color: #3584e4; + text-shadow : 0 1px rgba(53, 132, 228, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); +} + +.layuimini-container .layui-form-switch { + + border : 1px solid #cdc7c2; + border-radius : 20px; + color : rgba(46, 52, 54, 0.2); + background-color: #e1dedb; + text-shadow : 0 1px rgba(0, 0, 0, 0.1); + transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +.layui-form-switch { + height: 20px; + width : 40px; +} + +.layui-form-switch { + + padding : 0; + line-height: 20px; +} + +.layui-form-switch.layui-form-onswitch i { + top : 0; + height : 20px; + width : 20px; + margin-left: -20px; + + +} + +.layui-form-switch i { + top : 0; + height : 20px; + width : 20px; + margin-left : -5px; + border-radius : 50%; + transition : all 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + color : #2e3436; + outline-color : rgba(53, 132, 228, 0.5); + border-color : #cdc7c2; + border-bottom-color: #bfb8b1; + background-color : #f6f5f4; + box-shadow : inset 0 1px white, 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.07); +} + +.layuimini-main { + background-color: unset; +} + +.layui-tab-title li { + transition : none; + padding : 3px 12px; + min-height : 30px; + min-width : 65px; + display : flex; + justify-content : center; + align-items : center; + white-space : nowrap; + color : #2e3436; + font-weight : normal; + user-select : none; + border : 0; + border-top-style : none; + border-right-style : none; + border-bottom-style: none; + border-left-style : none; + + + + &:hover { + box-shadow : inset 0 -3px #c8c2bc; + background-color: #edebe9; + } + + &.layui-this { + box-shadow : inset 0 -3px #3584e4; + background-color: #f1f0ee; + } +} + +.layui-tab-title { + display : flex; + align-items : center; + flex-direction: row; + padding-left : 4px; + padding-right : 4px; +} + +.layuimini-tab>.layui-tab-title li, +.layuimini-tab>.close-box li { + line-height: 20px !important; +} + +.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + display: none; +} + +.layuimini-tab .layui-tab-title .layui-this span { + color: #2e3436 !important +} + +.layuimini-tab .layui-tab-title span { + color: #2e3436 !important +} + +.layuimini-tab .layui-tab-title .layuimini-tab-active { + display: none; +} + +.layuimini-tab .layui-tab-title { + background-color: #e1dedb; + border-color : #cdc7c2; +} + +.layui-layer-easy .layui-layer-btn { + background-color: #f2f2f2; +} + +.layui-layer-dialog .layui-layer-content { + background-color: #f2f2f2; + +} + +.layui-layer-easy .layui-layer-btn a { + position : relative; + outline : none; + overflow : visible; + line-height : 22px; + height : 22px; + border-radius : 5px; + transition : all .15s cubic-bezier(.25, .46, .45, .94); + padding : 4px 9px; + user-select : none; + color : #2e3436 !important; + outline-color : rgba(53, 132, 228, .5); + border : 1px solid #cdc7c2; + border-bottom-color: rgb(205, 199, 194); + border-bottom-color: #bfb8b1; + background-color : #f6f5f4; + box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07); + + &::before { + content : ' '; + position : absolute; + pointer-events: none; + width : 100%; + height : 100%; + top : 0px; + left : 0px; + background : linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent); + transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + } + + &::after { + content : ''; + position : absolute; + pointer-events: none; + z-index : 2; + display : inline-block; + border : 2px solid transparent; + border-radius : inherit; + transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + top : -4px; + left : -4px; + width : calc(100% - -4px); + height : calc(100% - -4px); + } + + + &.layui-layer-btn0 { + color : #fff !important; + border-color : #1b6acb #1b6acb #15539e; + background-color: #3c88e5; + box-shadow : inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, .07); + } +} + +.layui-tab-brief { + + &>.layui-tab-title { + + li { + @extend .layui-btn; + + + &:not(:last-child) { + border-right-style : none; + border-top-right-radius : 0; + border-bottom-right-radius: 0; + } + + &:not(:first-child) { + border-top-left-radius : 0; + border-bottom-left-radius: 0; + } + + &.layui-this { + color : unset; + color : #2e3436; + border-color : #cdc7c2; + background-color: #d6d1cd; + box-shadow : inset 0 1px rgba(255, 255, 255, 0); + + &::after { + display: none; + } + } + + &:hover { + box-shadow : unset; + background-color: #edebe9; + } + } + + } + +} + +.layui-form-radio:hover *, +.layui-form-radioed, +.layui-form-radioed>i { + color: #5094e8; +} + +.layui-card { + .layui-card-header { + padding : 0 6px; + min-height : 46px; + border-width : 1px; + border-style : solid; + border-color : #bfb8b1; + border-top-left-radius : 8px; + border-top-right-radius: 8px; + background : #f1f0ee linear-gradient(to top, #dfdcd8, #f4f2f1); + box-shadow : inset 0 1px rgba(255, 255, 255, 0.8), inset 0 -2px 2px rgba(0, 0, 0, 0.02); + + .icon { + color: #979a9b !important; + } + } + + .layui-card-body { + background-color: #f6f5f4; + border : 1px solid #cdc7c2; + } +} + +.layui-btn, +.layui-input, +.layui-select, +.layui-textarea, +.layui-upload-button, +.city-picker-span { + border-radius: 5px; + border : 1px solid #cdc7c2; +} + +.layui-side.layui-bg-black, +.layui-side.layui-bg-black>.layuimini-menu-left>ul, +.layuimini-menu-left-zoom>ul { + background-color: #f6f5f4 !important; +} + +.layuimini-menu-left { + background-color: #fbfafa; + border-right : 1px solid #cdc7c2; + + .layui-nav { + + li { + &:not(:first-child) { + border-top: 1px solid #cdc7c2; + } + + + &.layui-this { + a { + background-color: #347cd3 !important; + color : #fff !important; + } + } + } + } +} + + +.layuimini-menu-left .layui-nav .layui-this a, + +.layuimini-menu-left-zoom.layui-nav .layui-this a { + color: #2e3436 !important; +} + + +.layuimini-menu-left .layui-nav .layui-nav-item.layui-this a:hover, +.layuimini-menu-left-zoom.layui-nav .layui-nav-item.layui-this a:hover { + color: #fff !important; +} + +.layuimini-menu-left .layui-nav .layui-nav-item a, +.layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: #2e3436 !important; + + &:hover { + color: #2e3436 !important; + } + +} + +.layuimini-menu-left .layui-nav .layui-nav-item a { + height : 30px; + line-height: 30px; +} + +.layuimini-menu-left .layui-nav-itemed>.layui-nav-child { + background-color: rgba(46, 52, 54, 0.05) !important; + border-top : 1px solid #d7d2ce; + + dd { + border-bottom: 1px solid #d7d2ce; + } +} + +.layuimini-menu-left .layui-nav-tree .layui-this, +.layuimini-menu-left .layui-nav-tree .layui-this>a, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #347cd3 !important; + color : #fff !important; +} + +.layui-layout-admin .layuimini-logo { + background-color: unset !important; +} + + +.layuimini-header-menu>li.layui-nav-item { + @extend .layui-btn; + margin-top : 10px; + height : 30px !important; + line-height: 30px !important; + + + &::after { + background-color: transparent; + } + + &:not(:last-child) { + border-right-style : none; + border-top-right-radius : 0; + border-bottom-right-radius: 0; + } + + &:not(:first-child) { + border-top-left-radius : 0; + border-bottom-left-radius: 0; + } + + &:nth-last-child(2) { + border-right-style : solid; + border-radius : 5px; + border-top-left-radius : 0; + border-bottom-left-radius: 0; + } +} + +.layui-layout-admin .layui-header { + background-color: #f6f5f4 !important; +} + +.layui-layer-dialog { + border-radius: 20px; +} + +.layui-layer-iframe { + border-radius: 20px; +} + +.layuimini-tab .layui-tab-control>li { + background-color: #e1dedb; + border-style : solid; + border-color : #cdc7c2; +} + +.form-search .layui-btn { + height : 32px; + line-height: 22px; +} + +.form-search .layui-form-select dl { + transition : all 80ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + background-color : #ffffff; + background-clip : padding-box; + border : 1px solid rgba(0, 0, 0, 0.23); + border-top-left-radius : 0; + border-top-right-radius: 0; + border-radius : 9px; + border-top-left-radius : 0px; + border-top-right-radius: 0px; + box-shadow : 0 1px 3px 2px rgba(0, 0, 0, 0.08); + top : 28px; +} + +.layui-form-select dl dd, +.layui-form-select dl dt { + height : 30px; + line-height: 30px; + padding : 0 10px; +} + +.layuimini-container .layui-form-select dl dd.layui-this { + background-color: #3c88e5 !important; +} + +.layui-table-header .layui-table { + margin-bottom: 0; +} + +.layui-header .layui-nav .layui-nav-child dd.layui-this a, +.layui-header .layui-nav-child dd.layui-this, +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: #3c88e5 !important; +} + +.layuimini-mobile-show { + .layui-nav-more { + top: 4px; + } +} + + +.layui-layer-easy .layui-layer-setwin>span { + color: #2e3436; +} + +.layui-layer-easy .layui-layer-setwin>span:after { + + color: #2e3436; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-max::after, +.layui-layer-easy .layui-layer-setwin .layui-layer-max::before { + border-color: #2e3436; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-min::before { + background-color: #2e3436; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_neomorphic.scss b/public/static/admin/css/themes/_neomorphic.scss new file mode 100644 index 0000000..c949200 --- /dev/null +++ b/public/static/admin/css/themes/_neomorphic.scss @@ -0,0 +1,284 @@ +$main-color:#61677C; + +& { + background-color: #EBECF0; +} + +.layui-layout-admin .layui-header { + background-color: #EBECF0 !important; + +} + +.layuimini-container .layui-btn-success { + + color: #4bb368; +} + +.layuimini-container .layui-btn-danger { + color: #f56c6c; +} + +.layuimini-container .layuimini-btn-primary { + color: #2c3e50; +} + +.layuimini-container .layui-btn-primary { + color: #5f5f5f; +} + +.layuimini-container .layui-btn-normal { + color: #1e9fff; +} + +.layui-btn { + border: 0; + outline: 0; + border-radius: 10px; + background-color: #EBECF0; + text-shadow: 1px 1px 0 #FFF; + color: $main-color; + box-shadow: -5px -5px 20px #FFF, 5px 5px 20px #BABECC; + transition: all 0.2s ease-in-out; + cursor: pointer; + font-weight: 600; + + &:hover { + box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC; + } +} + + +.layui-table-tool .layui-inline[lay-event] { + @extend .layui-btn; +} + +.layuimini-main { + @extend .layui-btn; + text-shadow: 0.5px 0.5px 0 #fff; +} + +.layui-layer { + @extend .layui-btn; +} + +.layui-layer-easy .layui-layer-title { + background-color: transparent !important; + color: $main-color !important; +} + +.layui-layer-easy .layui-layer-setwin>span { + color: $main-color !important; + + &::before { + border-color: $main-color !important; + } + + &::after { + border-color: $main-color !important; + } + +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-min::before { + background-color: $main-color !important; +} + +.layui-card { + @extend .layui-btn; + text-shadow: 0.5px 0.5px 0 #fff; +} + +.layuimini-container .layui-table-tool { + background-color: transparent; +} + +.layui-table { + background-color: #EBECF0; +} + +.panel { + @extend .layui-btn; + text-shadow: 0.5px 0.5px 0 #fff; +} + +.layuimini-qiuck-module { + @extend .layui-btn; + + i { + background-color: transparent + } +} + +.layui-side.layui-bg-black, +.layui-side.layui-bg-black>.layuimini-menu-left>ul, +.layuimini-menu-left-zoom>ul { + @extend .layui-btn; + background-color: #EBECF0 !important; + border-radius: 0; +} + + +.layuimini-menu-left .layui-nav .layui-nav-item a, +.layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + @extend .layui-btn; + + &:hover { + box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC; + } +} + +.layui-nav-tree .layui-nav-item { + margin: 10px; + width: calc(100% - 20px); +} + +.layuimini-menu-left .layui-nav-itemed>.layui-nav-child { + background-color: transparent !important; +} + +.layui-nav-tree .layui-nav-child dd { + margin: 10px; + width: calc(100% - 20px); +} + +.layuimini-menu-left .layui-nav-tree .layui-this, +.layuimini-menu-left .layui-nav-tree .layui-this>a, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: inherit !important; +} + +.layuimini-menu-left .layui-nav .layui-nav-item a:hover, +.layuimini-menu-left .layui-nav .layui-this a, +.layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, +.layuimini-menu-left-zoom.layui-nav .layui-this a { + color: $main-color !important; +} + +.layui-layout-admin .layuimini-logo { + background-color: transparent !important; +} + +.layui-header { + .layuimini-header-menu>.layui-nav-item { + @extend .layui-btn; + margin: 10px; + line-height: 40px !important; + height: 40px !important; + } + + .layui-nav .layui-nav-item { + @extend .layui-btn; + margin: 10px; + line-height: 40px !important; + height: 40px !important; + } +} + + +.layui-btn-xs { + padding: 0 9px; +} + +.layui-input, +.layui-textarea { + border: 0; + outline: 0; + font-size: 16px; + border-radius: 320px; + padding: 16px; + background-color: #EBECF0; + text-shadow: 1px 1px 0 #FFF; + margin-right: 8px; + box-shadow: inset 2px 2px 5px #BABECC, inset -5px -5px 10px #FFF; + width: 100%; + box-sizing: border-box; + transition: all 0.2s ease-in-out; + appearance: none; + -webkit-appearance: none; +} + +.layuimini-upload .layuimini-upload-btn { + background-color: transparent !important; +} + +.layui-form-pane .layui-form-label { + background-color: transparent; + text-align: right; +} + +.layuimini-container .layui-form-select dl dd.layui-this { + background-color: transparent !important; + color: #2c3e50 +} + +.layuimini-color .elem-content li.layui-this { + text-shadow: 0.5px 0.5px 0 #FFF; +} + +.layui-form-select dl { + @extend .layui-btn; +} + +.layui-form-checkbox { + + @extend .layui-btn; + padding: 10px 10px 10px 24px; +} + +.layui-form-checkbox>i { + left: 6px; + top: 10px; + text-shadow: 0.5px 0.5px 0 #fff; +} + +.layui-form-checked:hover>div, +.layui-form-checked>div { + + color: #16b777; +} + +.layui-tree, +.laytable-cell-checkbox { + + .layui-form-checkbox[lay-skin="primary"] { + padding: 13px; + } + + .layui-form-checkbox[lay-skin="primary"]>i { + left: 5px; + top: 5px + } +} + +.layui-tree-txt { + margin-left: 10px +} + +.layui-form-radio { + @extend .layui-btn; + +} + +.layui-form-radio:hover>*, +.layui-form-radioed, +.layui-form-radioed>i { + color: #16b777; +} + +.layui-table-tips-c { + text-shadow: 0.5px 0.5px 0 #fff; + +} + +.layuimini-tab .layui-tab-title { + background-color: #EBECF0; +} + +.layuimini-tab .layui-tab-control>li { + background-color: #EBECF0; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_nes.scss b/public/static/admin/css/themes/_nes.scss new file mode 100644 index 0000000..d3d7e87 --- /dev/null +++ b/public/static/admin/css/themes/_nes.scss @@ -0,0 +1,344 @@ +a, +button { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer +} + +& { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABFklEQVRYR9WXURLDIAhE6/0PbSdOtUpcd1Gnpv1KGpTHBpCE1/cXq+vrMph7dGvXZTtpfW10DCA5jrH1H0Jhs5E0hnZdCR+vb5S8Nn8mQCeS9BdSalYJqMBjAGzq59xAESN7VFVUgV8AZB/dZBR7QTFDCqGquvUBVVoEtgIwpQRzmANSFHgWQKExHdIrPeuMvQNDarXe6nC/AutgV3JW+6bgqQLeV8FekRtgV+ToDKEKnACYKsfZjjkam7a0ZpYTytwmgainpC3HvwBocgKOxqRjehoR9DFKNFYtOwCGYCszobeCbl26N6yyQ6g8X/Wex/rBPsNEV6qAMaJPMynIHQCoSqS9JSMmwef51LflTgCRszU7DvAGiV6mHWfsaVUAAAAASUVORK5CYII=), auto; + font-family: "ark-pixel"; +} + +$border-line-width:3px; + +.public-border { + border-style: solid; + border-width: $border-line-width; + border-image-slice: 2; + border-image-width: 2; + border-image-repeat: stretch; + border-image-source: url('data:image/svg+xml;utf8,'); + border-image-outset: 2; +} + + + +.layui-btn { + + @extend .public-border; + line-height: 32px; + + position: relative; + display: inline-block; + text-align: center; + vertical-align: middle; + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: #212529; + background-color: #fff; + border-image-repeat: stretch; + + &::after { + position: absolute; + top: -$border-line-width; + right: -$border-line-width; + bottom: -$border-line-width; + left: -$border-line-width; + content: ""; + box-shadow: inset (-$border-line-width) (-$border-line-width) #adafbc; + } + + &:hover { + color: #212529; + text-decoration: none; + background-color: #e7e7e7; + } + + &.layui-btn-sm { + line-height: 100%; + } + + &.layui-btn-xs { + line-height: 16px; + } + + &.layui-btn-normal { + color: #fff; + background-color: #209cee; + + &::after { + box-shadow: inset (-$border-line-width) (-$border-line-width) #006bb3; + } + + &:hover { + background-color: #108de0; + } + } + + &.layui-btn-success { + color: #fff; + background-color: #92cc41; + + &::after { + box-shadow: inset (-$border-line-width) (-$border-line-width) #4aa52e; + } + + &:hover { + background-color: #92cc41; + } + } + + &.layui-btn-danger { + color: #fff; + background-color: #e76e55; + + &::after { + box-shadow: inset (-$border-line-width) (-$border-line-width) #8c2022; + } + + &:hover { + background-color: #ce372b; + } + } + + &.layui-btn-warm { + color: #212529; + background-color: #f7d51d; + + &::after { + box-shadow: inset (-$border-line-width) (-$border-line-width) #e59400; + } + + &:hover { + color: #212529; + background-color: #f2c409; + } + } +} + +.form-search .layui-btn { + line-height: 16px; + font-size: 14px; +} + + +.layuimini-container .layui-table-tool .layui-inline[lay-event] { + @extend .layui-btn; + line-height: 24px; +} + +.layui-table img { + image-rendering: pixelated; +} + +.layui-form-checkbox[lay-skin="primary"] i { + @extend .public-border; + position: relative; +} + +.layui-form-checked[lay-skin="primary"] i { + background-color: unset; + color: #212529; + font-weight: bold; + font-size: 28px; +} + +.layui-btn { + font-size: 18px; +} + +.layui-btn-sm { + font-size: 16px; +} + +.layui-btn-xs { + font-size: 14px; +} + +.layui-nav * { + font-size: 16px; + +} + +.layui-tab-title li { + font-size: 18px; +} + +.layui-nav-tree .layui-nav-item { + border-bottom: 3px solid #212529; +} + +.layuimini-header-menu>.layui-nav-item { + + @extend .public-border; + + border-image-outset: 0; +} + +.layui-table td, +.layui-table th { + font-size: 16px; + border-width: 0 2px 2px 0; + border-style: solid; + border-color: #212529 +} + +.layui-input, +.layui-select, +.layui-textarea { + @extend .public-border; +} + +.layui-form-label { + background-color: unset; + border: unset; + text-align: right; + color: #212529; + font-size: 16px; + font-weight: bold; +} + +.layuimini-form>.layui-form-item>.layui-input-block tip, +.layuimini-form>.layui-form-item>.layui-inline tip { + font-size: 14px; +} + +.layui-layer-easy .layui-layer-title { + background: unset !important; + color: #212529 !important; + font-size: 16px; + border-bottom: 1px solid #f0f0f0; +} + +.layui-layer-easy .layui-layer-btn { + background: unset !important; +} + +.layui-layer-easy .layui-layer-btn a { + @extend .layui-btn; + color: #212529 !important; + + &.layui-layer-btn0 { + color: #fff !important; + background-color: #209cee; + + &::after { + box-shadow: inset (-$border-line-width) (-$border-line-width) #006bb3; + } + + &:hover { + background-color: #108de0; + } + } +} + + +.layui-layer-dialog .layui-layer-content { + font-size: 16px; +} + +.layui-layer-easy .layui-layer-setwin>span { + color: #212529; +} + +.layui-layer-easy .layui-layer-setwin>span:after { + + color: #212529; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-max::after, +.layui-layer-easy .layui-layer-setwin .layui-layer-max::before { + border-color: #212529; +} + +.layui-layer-easy .layui-layer-setwin .layui-layer-min::before { + background-color: #212529; +} + + +.layui-layer { + @extend .public-border; + +} + +.layui-card { + @extend .public-border; + + .layui-card-header { + font-size: 18px; + } + +} + +.layuimini-main { + @extend .public-border; +} + +.layui-table-box { + @extend .public-border; + border-image-outset: 1; + margin-top: 5px; +} + +.layuimini-container .layui-table-box .layui-table-header th { + + color: #212529 !important; +} + +.layui-table tbody tr:hover, +.layui-table thead tr, +.layui-table-click, +.layui-table-header, +.layui-table-hover, +.layui-table-mend, +.layui-table-patch, +.layui-table-tool, +.layui-table-total, +.layui-table-total tr { + background-color: unset; +} + +.layui-table-header .layui-table { + margin-bottom: 0; +} + +.layui-badge, +.layui-badge-rim { + position: relative; + border-radius: 0; + + &::after { + content: ''; + position: absolute; + left: 0; + width: 100%; + height: 100%; + top: 0; + pointer-events: none; + box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee; + } + + &.layui-bg-blue { + background-color: #209cee; + + &::after { + box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee; + + } + } + + &.layui-bg-gray { + background-color: #92cc41; + + &::after { + box-shadow: 0 4px #92cc41, 0 -4px #92cc41, 4px 0 #92cc41, -4px 0 #92cc41; + + } + } +} + +.layuimini-color .elem-content li { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_normal.scss b/public/static/admin/css/themes/_normal.scss new file mode 100644 index 0000000..e69de29 diff --git a/public/static/admin/css/themes/_sicfi.scss b/public/static/admin/css/themes/_sicfi.scss new file mode 100644 index 0000000..ed87c40 --- /dev/null +++ b/public/static/admin/css/themes/_sicfi.scss @@ -0,0 +1,802 @@ +// 通常用于背景色 +$black-color :rgb(2, 17, 20); +// 通常用于字体颜色 +$main-color :rgb(126, 252, 246); +// 通常用于边框 +$less-main-color:rgb(6, 216, 215); + +$plus-main-color:rgb(0, 125, 124); + +// 通常用于激活状态,通常跟背景色搭配 +$cover-color :rgba(62, 251, 251, 0.05); +// 更强的激活状态,适合做选项操作时使用 +$active-color :rgba(62, 251, 251, 0.5); + + +$red-color :rgb(255, 0, 0); +$yellow-color:rgb(255, 255, 153); +$green-color :rgb(0, 255, 0); + +& { + background-color: $black-color; + color: $main-color; +} + +.layuimini-main { + background-color: $black-color; +} + +.layuimini-container { + background-color: $black-color; +} + +.layuimini-container .layui-table-tool { + background-color: $black-color; +} + +$box-shape: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + +.layui-btn { + + &.layui-btn-lg { + + padding-right: 25px; + } + + clip-path : $box-shape; + padding-right : 10px; + position : relative; + background-color: transparent; + border : 1px solid; + color : rgb(126, 252, 246); + text-shadow : rgb(126, 252, 246) 0px 0px 1px; + background-color: rgb(126, 252, 246); + + + &::before { + content: ''; + display: block; + position: absolute; + z-index: -1; + clip-path: $box-shape; + width: 100%; + height: 100%; + left: -0.5px; + top: -0.5px; + background-color: $black-color; + } + + &:hover::after { + content: ''; + display: block; + position: absolute; + z-index: -1; + clip-path: $box-shape; + width: 100%; + height: 100%; + left: -0.5px; + top: -0.5px; + background-color: rgba(126, 252, 246, 0.2); + } + + &.layui-btn-disabled { + &::after { + // todo:实现按钮禁用样式 + } + } + + &.layui-btn-success { + text-shadow: rgb(0, 255, 0) 0px 0px 1px; + color: rgb(0, 255, 0); + background-color: rgba(0, 255, 0); + border: unset; + + &:hover::after { + background-color: rgba(0, 255, 0, 0.2); + } + } + + &.layui-btn-danger { + text-shadow: rgb(255, 0, 0) 0px 0px 1px; + color: rgb(255, 0, 0); + background-color: rgb(255, 0, 0); + border: unset; + + &:hover::after { + background-color: rgba(255, 0, 0, 0.2); + } + } + + &.layuimini-btn-primary { + text-shadow: rgb(255, 255, 153) 0px 0px 1px; + color: rgb(255, 255, 153); + background-color: rgb(255, 255, 153); + border: unset; + + &:hover::after { + background-color: rgba(255, 255, 153, 0.2); + } + + } + + &.layui-btn-primary { + border: unset; + } + + &.layui-btn-normal { + color: $black-color; + background-color: $main-color; + border: unset; + + &::before { + background-color: $main-color; + } + + &:hover::after { + background-color: $main-color; + } + } +} + +.layui-table { + background: $black-color; + color: $main-color; + + + tr { + background-color: $cover-color; + } + + td { + border-color: $less-main-color; + } + +} + +.layui-table-header { + background-color: $black-color; +} + +.layuimini-container .layui-table-box { + border-color: $less-main-color; +} + +.layuimini-container .layui-table-box .layui-table-header th { + color: $main-color !important; +} + +.layui-table-tool .layui-inline[lay-event] { + color: $main-color; + border: none; + position: relative; + + &::after { + border-color: $main-color; + border-width: 1px; + border-style: solid; + clip-path: $box-shape; + position: absolute; + left: 0; + top: 0; + width: calc(100% - 1px); + height: calc(100% - 1px); + content: ''; + display: block; + } +} + +.layui-table tbody tr:hover { + background-color: rgba(126, 252, 246, 0.1); +} + +.layuimini-main { + border-color: $less-main-color; +} + +.layui-table-header { + border-color: $less-main-color; +} + + + +.color-content>ul>li>a>div>span:nth-child(2) { + background-color: $black-color !important; +} + +.layuimini-color .elem-content li { + clip-path: $box-shape; +} + +.layuimini-color .elem-content li.layui-this { + background-color: $main-color; + color: $black-color !important; + border-color: $less-main-color; +} + +.layuimini-color .more-menu-item { + color: $main-color; + + &:hover { + background-color: rgba(62, 251, 251, 0.05); + } +} + +.layui-layout-admin .layui-header { + background-color: $cover-color !important; +} + +.layuimini-tab .layui-tab-title { + background-color: $cover-color !important; + border-color: $less-main-color; + +} + +.layuimini-tab .layui-tab-title span { + color: $active-color; +} + +.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, +.layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { + color: $black-color !important; +} + +.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { + color: $main-color !important; +} + +.layui-layout-admin .layui-header .layui-nav .layui-nav-item { + background-color: $active-color; + +} + + +.layui-layout-admin .layui-header .layuimini-header-content>ul>.layui-nav-item.layui-this, +.layuimini-tool i:hover { + background-color: $main-color !important; +} + +.layuimini-tab .layui-tab-control>li { + background-color: $black-color; + border-color: $less-main-color; +} + +.layuimini-tab .layui-tab-title li { + border-color: $less-main-color; +} + +.layui-flow-more a *, +.layui-laypage input, +.layui-table-view select[lay-ignore] { + border-color: $less-main-color; + background-color: $black-color; + color: $main-color; +} + +.layui-laypage button, +.layui-laypage input { + border-color: $less-main-color; + background-color: $black-color; + color: $main-color; + +} + +.layuimini-container .layui-form-switch { + border-color: $less-main-color !important; + background-color: $black-color !important; + +} + +.layuimini-container .layui-form-onswitch { + background-color: $main-color !important; +} + +.layuimini-container .layui-form-switch.layui-form-onswitch i { + background-color: $black-color !important; +} +.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: $main-color !important; +} + +.layui-laypage .layui-laypage-curr em { + color: $black-color !important; +} + +.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + background-color: $less-main-color; + +} + +.layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin="primary"] i { + border-color: $main-color; + background-color: $main-color; + color: $black-color; +} + +.layui-table-view .layui-form-checkbox[lay-skin="primary"] i { + background-color: $cover-color; +} + +.layui-table-init { + background-color: $black-color; +} + +.box-border-line { + position: relative; + border: 1px solid $less-main-color; + border-width: 1px; + $border-offset: 3px; + + &::before { + content: ''; + position: absolute; + width: 50px; + height: 20px; + transition: all 0.2s; + border: 1px solid $less-main-color; + top: -$border-offset; + left: -$border-offset; + border-right: none; + border-bottom: none; + pointer-events: none; + } + + &::after { + content: ""; + position: absolute; + width: 50px; + height: 20px; + transition: all 0.2s; + border: 1px solid $less-main-color; + bottom: -$border-offset; + right: -$border-offset; + border-left: none; + border-top: none; + pointer-events: none; + } + + &:hover { + + &::after, + &::before { + width: calc(100% + $border-offset); + height: calc(100% + $border-offset); + } + } +} + +.table-search-fieldset { + .layui-input-inline { + margin-right: 0; + } + + + + .layui-form-item:not(:last-child) { + margin-right: 10px; + @extend .box-border-line; + } + + .layui-form-label { + border: unset; + } +} + +.layui-form-pane .layui-form-label { + background-color: $cover-color; + color: $main-color; +} + +.layuimini-container .table-search-fieldset { + color: $main-color; + border-color: $less-main-color; + +} + +.layui-form-select, +.layui-form-autocomplete { + dl { + + color: $main-color; + background-color: $black-color; + border-color: $less-main-color; + + dd { + &.layui-this { + background-color: $main-color !important; + color: $black-color; + } + + &:hover { + background-color: $less-main-color !important; + color: $black-color; + } + } + } +} + +.layui-iconpicker-item, +.layui-iconpicker-item:hover { + border-color: $less-main-color !important; + color: $black-color; + + .layui-iconpicker-icon:hover { + border-color: $less-main-color !important; + } +} + + +.layui-nav-child { + background-color: $black-color; + color: $main-color; +} + +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { + color: $main-color !important; +} + +.layui-badge, +.layui-badge-dot, +.layui-badge-rim { + background-color: $main-color; +} + +.layui-nav .layui-nav-child a:hover { + background-color: $active-color; +} + +.layui-table-tool-panel { + background-color: $black-color; +} + +.layui-form-checkbox[lay-skin="primary"] span { + color: $main-color; +} + +.layui-table-tool-panel li:hover { + background-color: $active-color; +} + +.layui-side.layui-bg-black, +.layui-side.layui-bg-black>.layuimini-menu-left>ul, +.layuimini-menu-left-zoom>ul { + background-color: $black-color !important; + +} + +.layui-side { + border-right: 1px solid $main-color; +} + +.layui-bg-blue { + background-color: #0000ff !important; +} + +.layui-bg-orange { + background-color: $yellow-color !important; + color: $black-color !important; +} + +.layui-bg-green { + background-color: $green-color !important; + color: $black-color !important; +} + +.layui-table-hover { + background-color: $cover-color; +} + +.layui-table-grid-down { + background-color: $black-color; + color: $main-color; + border-color: unset; +} + +.layui-table-tips-main { + background-color: $main-color; + color: $black-color; +} + +.layui-layout-admin .layui-header .layuimini-tool i { + color: $main-color; +} + +.color-red { + color: $red-color !important; +} + +.layuimini-tab .layui-tab-title .layui-this span { + color: $main-color; +} + +.layui-card { + + background-color: $cover-color; + border-radius: 0; + + @extend .box-border-line; + + .layui-card-header { + color: $main-color; + } +} + +.layui-text { + color: $main-color; +} + + +.layuimini-qiuck-module { + cursor: pointer; + + a i { + background-color: $cover-color; + color: $active-color; + } + + a cite { + color: $active-color; + } + + + &:hover { + a i { + background-color: $active-color; + color: $main-color; + } + + a cite { + color: $main-color; + } + + } +} + +.layui-bg-number { + background-color: $cover-color; +} + +.layui-input, +.layui-select, +.layui-textarea, +.city-picker-span, +.main-input { + background-color: $cover-color; + color: $main-color; +} + +.city-picker-span>.title>span { + color: $main-color; + + &:hover { + background-color: $main-color; + color: $black-color; + } +} + +.layui-form-radio:hover *, +.layui-form-radioed, +.layui-form-radioed>i { + color: $main-color; +} + +.layui-form-checked[lay-skin="primary"] i { + border-color: $main-color !important; + background-color: $main-color; + color: $black-color; +} + +.layui-input:focus, +.layui-textarea:focus { + border-color: $main-color !important; +} + +.layui-input:hover, +.layui-textarea:hover { + border-color: $main-color !important; + +} + +.layui-badge-rim, +.layui-border, +.layui-colla-content, +.layui-colla-item, +.layui-collapse, +.layui-elem-field, +.layui-form-pane .layui-form-item[pane], +.layui-form-pane .layui-form-label, +.layui-input, +.layui-layedit, +.layui-layedit-tool, +.layui-panel, +.layui-quote-nm, +.layui-select, +.layui-tab-bar, +.layui-tab-card, +.layui-tab-title, +.layui-tab-title .layui-this::after, +.layui-textarea { + border-color: $main-color !important; +} + +.form-search .layui-input-inline input, +.form-search .layui-input-inline select { + border-width: 0 0 0 1px; +} + +.layuimini-tab .layui-tab-tool .layui-nav-child { + border-color: $main-color; +} + +.layui-nav .layui-nav-child a { + color: $main-color; +} + +.layui-form-item { + margin-bottom: 12px; +} + +.layuimini-upload .layuimini-upload-btn { + background-color: $black-color; +} + +.layui-layer { + border: 1px solid $main-color; + background-color: $black-color; +} + +.layui-layer-easy .layui-layer-title { + background-color: $plus-main-color !important; + color: $main-color !important; +} + + + +.layui-table td, +.layui-table th, +.layui-table-col-set, +.layui-table-fixed-r, +.layui-table-grid-down, +.layui-table-header, +.layui-table-page, +.layui-table-tips-main, +.layui-table-tool, +.layui-table-total, +.layui-table-view, +.layui-table[lay-skin="line"], +.layui-table[lay-skin="row"] { + border-color: $less-main-color; +} + +.layui-table tbody tr:hover, +.layui-table thead tr, +.layui-table-click, +.layui-table-header, +.layui-table-hover, +.layui-table-mend, +.layui-table-patch, +.layui-table-tool, +.layui-table-total, +.layui-table-total tr { + background-color: $black-color; +} + +.hr-line { + color: $main-color; + border-color: $less-main-color; + background-color: $main-color; +} + +.layui-layer-easy .layui-layer-btn { + background-color: $black-color; + border-top: 1px solid $less-main-color; +} + +.layui-layer-easy .layui-layer-btn .layui-layer-btn0 { + background-color: $main-color; + border-color: $less-main-color; + color: $main-color !important; + clip-path: $box-shape; +} + +.layui-layer-easy .layui-layer-btn a { + @extend .layui-btn +} + +.layui-layer-shade { + background-color: #fff !important; +} + +.layuimini-menu-left { + .layui-nav-tree .layui-nav-item { + + margin: 5px; + width: calc(100% - 10px); + } + + .layui-nav .layui-nav-item { + clip-path: $box-shape; + color: $main-color; + background-color: $active-color; + + &.layui-this a { + background-color: $main-color !important; + color: $black-color !important; + } + + &.layui-this { + background-color: $main-color !important; + color: $black-color !important; + + span { + background-color: $main-color !important; + color: $black-color !important; + + } + } + } + + .layui-nav .layui-nav-item a:hover { + background-color: $active-color !important; + } + +} + +.layuimini-menu-left .layui-nav .layui-nav-item a, +.layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: $main-color !important; +} + +.layuimini-menu-left .layui-nav-item a span { + color: $main-color !important; + +} + +.layuimini-menu-left .layui-nav-item:hover a span { + color: $black-color !important; + +} + +.layui-layout-admin .layuimini-logo { + background-color: $black-color !important; + +} + +.layuimini-menu-left .layui-nav-itemed>.layui-nav-child { + background-color: $black-color !important; +} + +.layuimini-menu-left .layui-nav-tree .layui-this, +.layuimini-menu-left .layui-nav-tree .layui-this>a, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: $main-color !important; + color: $black-color !important; + + .layui-left-nav { + color: $black-color !important; + } +} + + +.layui-iconpicker-icon { + border-color: $less-main-color !important; + background-color: $less-main-color !important; +} + +.layui-iconpicker .layui-anim { + background-color: $black-color; +} + +.layui-iconpicker .layui-iconpicker-list { + background-color: $black-color; +} + +.layui-header .layui-nav .layui-nav-child dd.layui-this a, +.layui-header .layui-nav-child dd.layui-this, +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: $active-color !important; +} \ No newline at end of file diff --git a/public/static/admin/css/themes/_win7.scss b/public/static/admin/css/themes/_win7.scss new file mode 100644 index 0000000..e5a089a --- /dev/null +++ b/public/static/admin/css/themes/_win7.scss @@ -0,0 +1,288 @@ +& { + color: #222; + background-color: #f0f0f0; +} + +.layui-btn { + background: linear-gradient(180deg, #eee 45%, #ddd 0, #bbb); + border: 1.5px solid #888; + border-radius: 3px; + box-shadow: inset 0 -1px 1px hsla(0, 0%, 100%, .8), inset 0 1px 1px #fff; + box-sizing: border-box; + color: #222; + + + &:hover { + background: linear-gradient(180deg, #e5f4fd 45%, #b3e0f9 0); + border-color: #72a2c5; + } +} + +.layui-layer-easy .layui-layer-btn a { + @extend .layui-btn; + color: #222 !important; + + height: 26px; + line-height: 26px; + font-size: 12px; +} + +.layui-layer-title { + background: linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4 !important; + border: 1px solid rgba(0, 0, 0, .6); + border-radius: 6px 6px 0 0; + // box-shadow : inset 0 0 .5px .5px #fff; + + height: 27px; + line-height: 27px; + + color: #000 !important; + letter-spacing: 0; + font-size: 12px; + text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff; + + padding: 0 80px 0 8px; + + border: 0; + box-shadow: inset 0 .5px #fff; + + +} + +.layui-layer-easy .layui-layer-title~.layui-layer-setwin { + height: 27px !important; + top: 1px; +} + +.layui-layer-easy .layui-layer-title~.layui-layer-setwin>span { + height: 20px !important; + line-height: 20px !important; + + background: linear-gradient(hsla(0, 0%, 100%, .3), hsla(0, 0%, 100%, .3) 45%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .1) 75%, hsla(0, 0%, 100%, .5)) !important; + border: 0; + border-radius: 0; + border-bottom-right-radius: 0px; + border-right: 1px solid rgba(0, 0, 0, .6); + box-shadow: inset 0 0 0 .5px #eee; + box-sizing: border-box; + + padding: 0; + position: relative; + + margin-left: 0; + + min-width: 26px; + text-align: center; + + &:hover { + background: radial-gradient(circle at 50% 100%, #2aceda, transparent 60%), linear-gradient(#a9d2e8 50%, #196c9b 0) !important; + } + + + &:last-child { + border: 0; + border-bottom-right-radius: 5px; + + } + + &:first-child { + border-bottom-left-radius: 5px; + } + + &.layui-layer-close1 { + background-color: #d04a37 !important; + min-width: 45px !important; + + + &:hover { + filter: contrast(1.3); + background-image: linear-gradient(hsla(0, 0%, 100%, .3), hsla(0, 0%, 100%, .3) 45%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .1) 75%, hsla(0, 0%, 100%, .5)) !important; + } + } + +} + +.layui-layer-dialog { + border-radius: 20px; +} + +.layui-layer-iframe { + border-radius: 20px; +} + +.layui-layer:not(.layui-layer-loading) { + + .layui-layer-content { + background: #f0f0f0; + border: 1px solid rgba(0, 0, 0, .6); + box-shadow: 0 -1px 1px .5px #fff; + margin: 0 6px 0 6px; + padding: 6px; + border-bottom-width: 0; + } + + &::before { + background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, .7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4; + border-radius: 6px; + content: ""; + height: 100%; + position: absolute; + width: 100%; + z-index: -1; + + } + + &.layui-layer-iframe { + + &::before { + height: calc(100% + 20px); + } + } +} + +.layui-layer-easy .layui-layer-btn { + background: #f0f0f0; + border: 1px solid rgba(0, 0, 0, .6); + box-shadow: 0 0 1px .5px #fff; + margin: 0 6px 6px; + padding: 6px; + border-top: 0; + text-align: right !important; +} + +.layui-card { + + border: 1px solid rgba(0, 0, 0, .6); + border-radius: 6px; + box-shadow: 0 0 5px 1px rgba(0, 0, 0, .6); + font: 9pt Segoe UI, sans-serif; + position: relative; + z-index: 0; + + &::before { + background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, .7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4; + border-radius: 6px; + content: ""; + height: 100%; + position: absolute; + width: 100%; + z-index: -1; + } + + + .layui-card-header { + align-items: center; + background: linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4; + border-radius: 6px 6px 0 0; + font: 9pt Segoe UI, sans-serif; + justify-content: space-between; + padding: 6px; + border: 0; + box-shadow: inset 0 .5px #fff; + height: 15px; + + color: #000; + letter-spacing: 0; + line-height: 15px; + text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff; + + } + + .layui-card-body { + background: #f0f0f0; + border: 1px solid rgba(0, 0, 0, .6); + box-shadow: 0 0 1px .5px #fff; + margin: 0 6px 6px; + padding: 6px; + } +} + + + +.layui-tab-brief>.layui-tab-title .layui-this { + color: #222; +} + +.layuimini-tab .layui-tab-control>li { + height: 27px !important; + line-height: 27px !important; +} + +.layui-form-checkbox[lay-skin="primary"] i { + background: #ddd; + border: 1px solid #888; + box-shadow: inset 0 0 0 1.5px #eee, inset 0 2px 4px #888, inset -2px -3px 4px #fff; + box-sizing: border-box; + content: ""; + display: inline-block; + height: 13px; + margin-right: 6px; + width: 13px; + color: transparent; +} + +.layui-form-checked[lay-skin="primary"] i { + color: #16638f; + border-color: #888; + display: block; + font-weight: 700; + position: absolute; + + &::before { + font-size: 14px; + } + +} + +.layui-form-radio:hover *, +.layui-form-radioed, +.layui-form-radioed>i { + color: #16638f; +} + +.layui-input { + background-color: #fff; + border: 1px solid #ccc; + border-top-color: rgb(204, 204, 204); + border-radius: 2px; + border-top-color: #888; + box-sizing: border-box; + font: 9pt Segoe UI, sans-serif; + padding: 3px 4px 5px; +} + +.layui-input, +.layui-select, +.layui-textarea { + height: unset +} + +.layui-form-label { + padding: 3px 15px; + font: 9pt Segoe UI, sans-serif; +} + + +.layuimini-form>.layui-form-item .required::after { + top: 2px; +} + +.form-search .layui-input-inline input, +.form-search .layui-input-inline select { + height: unset; + line-height: unset; +} + +.form-search .layui-form-label { + height: unset; + background: unset; + text-align: right; + border: unset; +} + +.layuimini-upload-btn { + .layui-btn { + height: 25px; + line-height: 25px; + } +} \ No newline at end of file diff --git a/public/static/admin/css/themes/default.css b/public/static/admin/css/themes/default.css new file mode 100644 index 0000000..4f3cefb --- /dev/null +++ b/public/static/admin/css/themes/default.css @@ -0,0 +1,95 @@ +/*头部右侧背景色 headerRightBg */ +.layui-layout-admin .layui-header { + background-color: #ffffff !important; +} + +/*头部右侧选中背景色 headerRightBgThis */ +.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #e4e4e4 !important; +} + +/*头部右侧字体颜色 headerRightColor */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { + color: rgba(107, 107, 107, 0.7); +} + +/**头部右侧下拉字体颜色 headerRightChildColor */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { + color: rgba(107, 107, 107, 0.7) !important; +} + +/*头部右侧鼠标选中 headerRightColorThis */ +.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { + color: #565656 !important; +} + +/*头部右侧更多下拉颜色 headerRightNavMore */ +.layui-header .layui-nav .layui-nav-more { + border-top-color: rgba(160, 160, 160, 0.7) !important; +} + +/*头部右侧更多下拉颜色 headerRightNavMore */ +.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more { + border-color: transparent transparent rgba(160, 160, 160, 0.7) !important; +} + +/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */ +.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: #1E9FFF !important; + color: #ffffff !important; +} + +/*头部缩放按钮样式 headerRightToolColor */ +.layui-layout-admin .layui-header .layuimini-tool i { + color: #565656; +} + +/*logo背景颜色 headerLogoBg */ +.layui-layout-admin .layuimini-logo { + background-color: #192027 !important; +} + +/*logo字体颜色 headerLogoColor */ +.layui-layout-admin .layuimini-logo h1 { + color: rgb(191, 187, 187); +} + +/*左侧菜单更多下拉样式 leftMenuNavMore */ +.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more { + border-top-color: rgb(191, 187, 187); +} + +/*左侧菜单更多下拉样式 leftMenuNavMore */ +.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { + border-color: transparent transparent rgb(191, 187, 187) !important; +} + +/*左侧菜单背景 leftMenuBg */ +.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul { + background-color: #28333E !important; +} + +/*左侧菜单选中背景 leftMenuBgThis */ +.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #1E9FFF !important +} + +/*左侧菜单子菜单背景 leftMenuChildBg */ +.layuimini-menu-left .layui-nav-itemed > .layui-nav-child { + background-color: #0c0f13 !important; +} + +/*左侧菜单字体颜色 leftMenuColor */ +.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: rgb(191, 187, 187) !important; +} + +/*左侧菜单选中字体颜色 leftMenuColorThis */ +.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a { + color: #ffffff !important; +} + +/**tab选项卡选中颜色 tabActiveColor */ +.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + background-color: #1e9fff; +} diff --git a/public/static/admin/css/themes/index.css b/public/static/admin/css/themes/index.css new file mode 100644 index 0000000..0adb386 --- /dev/null +++ b/public/static/admin/css/themes/index.css @@ -0,0 +1,3050 @@ +.elem-style-demo .layui-btn, .elem-style-demo .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-demo .layui-form-radio, .elem-style-demo .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-demo .layui-form-checkbox, .elem-style-demo .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-demo dl, .elem-style-demo .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-demo .layui-nav-item, .elem-style-demo .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-demo .layuimini-header-menu > .layui-nav-item, .elem-style-demo .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-demo a, +.elem-style-demo .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-demo a, .elem-style-demo .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-demo .layui-side.layui-bg-black, +.elem-style-demo .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-demo .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-demo .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-demo .layuimini-menu-left-zoom > ul, .elem-style-demo .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-demo .layuimini-qiuck-module, .elem-style-demo .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-demo .panel, .elem-style-demo .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-demo .layui-card, .elem-style-demo .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-demo .layui-layer, .elem-style-demo .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-demo .layuimini-main, .elem-style-demo .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-demo .layui-inline[lay-event], .elem-style-demo .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-demo a, .elem-style-demo .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-demo a, .elem-style-demo .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-demo .layui-inline[lay-event], .elem-style-demo .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-demo .layuimini-header-menu > li.layui-nav-item, .elem-style-demo .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-demo li, .elem-style-demo .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-demo span, .elem-style-demo .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-demo span, .elem-style-demo .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-demo .layui-inline[lay-event], .elem-style-demo .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-demo a { + color: #808185 !important; + background-color: #cde7ff !important; + border: 1px solid #d3dde6 !important; +} +.elem-style-demo .layui-layer-easy .layui-layer-title { + background-color: rgb(215, 215, 215) !important; + color: #6C6E71 !important; +} +.elem-style-demo .layui-layer-easy .layui-layer-setwin > a::after { + color: #6C6E71 !important; +} +.elem-style-demo .layui-layer-easy .layui-layer-btn .layui-layer-btn0 { + color: #808185 !important; + background-color: #cde7ff !important; + border: 1px solid #d3dde6 !important; +} +.elem-style-demo .layuimini-tab .layui-tab-title .layuimini-tab-active { + display: none !important; +} +.elem-style-demo .layuimini-tab .layui-tab-title li { + padding: 0 5px !important; + font-size: 12px; + border-width: 1px 1px 1px 0 !important; + border-style: solid !important; +} +.elem-style-demo .layuimini-tab .layui-tab-title li.layui-this { + color: #fff !important; + border-color: rgb(0, 0, 255) !important; + background: rgb(90, 173, 255) !important; +} +.elem-style-demo .layuimini-tab .layui-tab-title .layui-this span { + color: #fff !important; +} +.elem-style-demo .layuimini-tab > .layui-tab-title li, +.elem-style-demo .layuimini-tab > .close-box li { + line-height: 27px !important; +} +.elem-style-demo .layuimini-tab > .layui-tab-title, +.elem-style-demo .layuimini-tab > .close-box { + height: 28px !important; +} +.elem-style-demo .layuimini-tab .layui-tab-control > li { + height: 28px !important; + line-height: 28px !important; +} +.elem-style-demo .layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: #6C6E71 !important; +} +.elem-style-demo .layuimini-container .layui-form-onswitch { + background-color: #cde7ff !important; + border-color: #cde7ff !important; +} +.elem-style-demo .layuimini-container .layui-form-switch { + background-color: #6C6E71; + border-color: #6C6E71; +} +.elem-style-demo .layui-table-tool .layui-inline[lay-event] { + border-color: transparent; +} +.elem-style-demo .layui-form-checked[lay-skin=primary] i { + border-color: #cde7ff !important; + background-color: #cde7ff !important; +} + +.elem-style-sicfi { + background-color: rgb(2, 17, 20); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layuimini-main { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layuimini-container { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layuimini-container .layui-table-tool { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-btn, .elem-style-sicfi .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a, .elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul, .elem-style-sicfi .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-sicfi .panel, .elem-style-sicfi .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-sicfi .layui-card, .elem-style-sicfi .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-sicfi .layui-layer, .elem-style-sicfi .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-inline[lay-event], .elem-style-sicfi .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a, .elem-style-sicfi .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a { + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + padding-right: 10px; + position: relative; + background-color: transparent; + border: 1px solid; + color: rgb(126, 252, 246); + text-shadow: rgb(126, 252, 246) 0px 0px 1px; + background-color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-btn.layui-btn-lg, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-lg, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-lg, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-lg.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-lg.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-lg.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-lg.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-lg, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-lg, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-lg, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-lg, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-lg, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-lg, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-lg, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-lg, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.panel, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.panel, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layui-card, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layui-card, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layui-layer, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layui-layer, .elem-style-sicfi .elem-style-neomorphic .layui-btn-lg.layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layui-btn-lg.layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-lg.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-lg.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-lg, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-lg, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-lg.layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-lg.layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-lg.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-lg.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-lg, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-lg, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-lg, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-lg, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-lg, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-lg, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-lg.layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-lg.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-lg { + padding-right: 25px; +} +.elem-style-sicfi .layui-btn::before, .elem-style-sicfi .elem-style-neomorphic .layui-form-radio::before, .elem-style-neomorphic .elem-style-sicfi .layui-form-radio::before, .elem-style-sicfi .elem-style-neomorphic .layui-form-checkbox::before, .elem-style-neomorphic .elem-style-sicfi .layui-form-checkbox::before, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl::before, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl::before, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item::before, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-nav-item::before, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item::before, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-nav-item::before, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a::before, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a::before, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a::before, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a::before, .elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black::before, .elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black::before, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul::before, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul::before, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul::before, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul::before, .elem-style-sicfi .elem-style-neomorphic .layuimini-qiuck-module::before, .elem-style-neomorphic .elem-style-sicfi .layuimini-qiuck-module::before, .elem-style-sicfi .elem-style-neomorphic .panel::before, .elem-style-neomorphic .elem-style-sicfi .panel::before, .elem-style-sicfi .elem-style-neomorphic .layui-card::before, .elem-style-neomorphic .elem-style-sicfi .layui-card::before, .elem-style-sicfi .elem-style-neomorphic .layui-layer::before, .elem-style-neomorphic .elem-style-sicfi .layui-layer::before, .elem-style-sicfi .elem-style-neomorphic .layuimini-main::before, .elem-style-neomorphic .elem-style-sicfi .layuimini-main::before, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]::before, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-inline[lay-event]::before, .elem-style-sicfi .elem-style-win7 .layui-layer-easy .layui-layer-btn a::before, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a::before, .elem-style-sicfi .elem-style-nes .layui-layer-easy .layui-layer-btn a::before, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a::before, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event]::before, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-inline[lay-event]::before, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-nav-item::before, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-nav-item::before, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li::before, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li::before, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span::before, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span::before, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span::before, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span::before, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event]::before, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-inline[lay-event]::before, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a::before { + content: ""; + display: block; + position: absolute; + z-index: -1; + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + width: 100%; + height: 100%; + left: -0.5px; + top: -0.5px; + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-btn:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-radio:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-form-radio:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-checkbox:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-form-checkbox:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl:hover::after, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a:hover::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-qiuck-module:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-qiuck-module:hover::after, .elem-style-sicfi .elem-style-neomorphic .panel:hover::after, .elem-style-neomorphic .elem-style-sicfi .panel:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-card:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-card:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-layer:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-layer:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-main:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-main:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]:hover::after, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-inline[lay-event]:hover::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a:hover::after, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a:hover::after, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event]:hover::after, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-inline[lay-event]:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-nav-item:hover::after, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li:hover::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li:hover::after, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span:hover::after, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span:hover::after, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span:hover::after, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event]:hover::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-inline[lay-event]:hover::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a:hover::after { + content: ""; + display: block; + position: absolute; + z-index: -1; + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + width: 100%; + height: 100%; + left: -0.5px; + top: -0.5px; + background-color: rgba(126, 252, 246, 0.2); +} +.elem-style-sicfi .layui-btn.layui-btn-success, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-success, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-success, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-success.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-success.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-success.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-success.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-success, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-success, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-success, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-success, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-success, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-success, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.panel, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.panel, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-card, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-card, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-layer, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-layer, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-success.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-success.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-success, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-success, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-success.layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-success.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-success.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-success, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-success, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-success, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-success, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-success, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-success, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-success.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-success { + text-shadow: rgb(0, 255, 0) 0px 0px 1px; + color: rgb(0, 255, 0); + background-color: rgb(0, 255, 0); + border: unset; +} +.elem-style-sicfi .layui-btn.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-form-radio:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-form-radio:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-form-checkbox:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-form-checkbox:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-success:hover::after, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-success.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-success.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-success.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-success.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-success:hover::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-success:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-success:hover::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-side.layui-bg-black:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-side.layui-bg-black:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-success:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layuimini-qiuck-module:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layuimini-qiuck-module:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.panel:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.panel:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-card:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-card:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layui-layer:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layui-layer:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-success.layuimini-main:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-success.layuimini-main:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-success.layui-inline[lay-event]:hover::after, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-success.layui-inline[lay-event]:hover::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-success:hover::after, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event]:hover::after, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-success.layui-inline[lay-event]:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-success.layui-nav-item:hover::after, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-success.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-success:hover::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-success:hover::after, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-success:hover::after, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-success:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event]:hover::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-success.layui-inline[lay-event]:hover::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-success:hover::after { + background-color: rgba(0, 255, 0, 0.2); +} +.elem-style-sicfi .layui-btn.layui-btn-danger, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-danger, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-danger, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-danger.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-danger.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-danger.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-danger.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-danger, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-danger, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-danger, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-danger, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-danger, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-danger, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.panel, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.panel, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-card, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-card, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-layer, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-layer, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-danger.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-danger, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-danger, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-danger.layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-danger.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-danger.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-danger, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-danger, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-danger, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-danger, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-danger, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-danger, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-danger.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-danger { + text-shadow: rgb(255, 0, 0) 0px 0px 1px; + color: rgb(255, 0, 0); + background-color: rgb(255, 0, 0); + border: unset; +} +.elem-style-sicfi .layui-btn.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-form-radio:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-form-radio:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-form-checkbox:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-form-checkbox:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-danger:hover::after, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-danger.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-danger.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-danger.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-danger.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-danger:hover::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-danger:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-danger:hover::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-side.layui-bg-black:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-side.layui-bg-black:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-danger:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layuimini-qiuck-module:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layuimini-qiuck-module:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.panel:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.panel:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-card:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-card:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layui-layer:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layui-layer:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-danger.layuimini-main:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-danger.layuimini-main:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-danger.layui-inline[lay-event]:hover::after, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-danger.layui-inline[lay-event]:hover::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-danger:hover::after, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event]:hover::after, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-danger.layui-inline[lay-event]:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-danger.layui-nav-item:hover::after, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-danger.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-danger:hover::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-danger:hover::after, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-danger:hover::after, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-danger:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event]:hover::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-danger.layui-inline[lay-event]:hover::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-danger:hover::after { + background-color: rgba(255, 0, 0, 0.2); +} +.elem-style-sicfi .layui-btn.layuimini-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layuimini-btn-primary, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layuimini-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layuimini-btn-primary.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layuimini-btn-primary.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layuimini-btn-primary.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layuimini-btn-primary.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layuimini-btn-primary, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layuimini-btn-primary, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layuimini-btn-primary, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layuimini-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layuimini-btn-primary, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layuimini-btn-primary, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layuimini-btn-primary, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layuimini-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.panel, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.panel, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-card, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-card, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-layer, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-layer, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layuimini-btn-primary.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layuimini-btn-primary.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layuimini-btn-primary, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layuimini-btn-primary, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layuimini-btn-primary.layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layuimini-btn-primary.layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layuimini-btn-primary.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layuimini-btn-primary.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layuimini-btn-primary, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layuimini-btn-primary, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layuimini-btn-primary, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layuimini-btn-primary, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layuimini-btn-primary, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layuimini-btn-primary, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layuimini-btn-primary.layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layuimini-btn-primary.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layuimini-btn-primary { + text-shadow: rgb(255, 255, 153) 0px 0px 1px; + color: rgb(255, 255, 153); + background-color: rgb(255, 255, 153); + border: unset; +} +.elem-style-sicfi .layui-btn.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-form-radio:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-form-radio:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-form-checkbox:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-form-checkbox:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layuimini-btn-primary:hover::after, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layuimini-btn-primary.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layuimini-btn-primary.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layuimini-btn-primary.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layuimini-btn-primary.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layuimini-btn-primary:hover::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layuimini-btn-primary:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layuimini-btn-primary:hover::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-side.layui-bg-black:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-side.layui-bg-black:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layuimini-btn-primary:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layuimini-btn-primary:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layuimini-btn-primary:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layuimini-qiuck-module:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layuimini-qiuck-module:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.panel:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.panel:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-card:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-card:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layui-layer:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layui-layer:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-btn-primary.layuimini-main:hover::after, .elem-style-neomorphic .elem-style-sicfi .layuimini-btn-primary.layuimini-main:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layuimini-btn-primary.layui-inline[lay-event]:hover::after, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layuimini-btn-primary.layui-inline[lay-event]:hover::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layuimini-btn-primary:hover::after, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layuimini-btn-primary.layui-inline[lay-event]:hover::after, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layuimini-btn-primary.layui-inline[lay-event]:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layuimini-btn-primary.layui-nav-item:hover::after, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layuimini-btn-primary.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layuimini-btn-primary:hover::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layuimini-btn-primary:hover::after, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layuimini-btn-primary:hover::after, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layuimini-btn-primary:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layuimini-btn-primary.layui-inline[lay-event]:hover::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layuimini-btn-primary.layui-inline[lay-event]:hover::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layuimini-btn-primary:hover::after { + background-color: rgba(255, 255, 153, 0.2); +} +.elem-style-sicfi .layui-btn.layui-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-primary, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-primary.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-primary.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-primary.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-primary.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-primary, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-primary, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-primary, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-primary, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-primary, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-primary, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-primary, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.panel, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.panel, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layui-card, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layui-card, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layui-layer, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layui-layer, .elem-style-sicfi .elem-style-neomorphic .layui-btn-primary.layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layui-btn-primary.layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-primary.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-primary.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-primary, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-primary, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-primary.layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-primary.layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-primary.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-primary.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-primary, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-primary, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-primary, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-primary, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-primary, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-primary, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-primary.layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-primary.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-primary { + border: unset; +} +.elem-style-sicfi .layui-btn.layui-btn-normal, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-form-radio, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-form-radio, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-form-checkbox, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-normal, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-normal, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-normal.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-normal.layui-nav-item, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-normal, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-normal, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-side.layui-bg-black, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-normal, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layuimini-qiuck-module, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.panel, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.panel, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-card, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-card, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-layer, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-layer, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layuimini-main, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layuimini-main, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-normal, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-normal, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event], .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-normal.layui-nav-item, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-normal, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-normal, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-normal, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-normal, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-normal, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-normal { + color: rgb(2, 17, 20); + background-color: rgb(126, 252, 246); + border: unset; +} +.elem-style-sicfi .layui-btn.layui-btn-normal::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-form-radio::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-form-radio::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-form-checkbox::before, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-normal::before, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-normal::before, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item::before, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-normal.layui-nav-item::before, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item::before, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-normal.layui-nav-item::before, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal::before, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-normal::before, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal::before, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-normal::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-side.layui-bg-black::before, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal::before, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal::before, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal::before, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-normal::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layuimini-qiuck-module::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.panel::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.panel::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-card::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-card::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-layer::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-layer::before, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layuimini-main::before, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layuimini-main::before, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event]::before, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event]::before, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-normal::before, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-normal::before, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event]::before, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event]::before, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item::before, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-normal.layui-nav-item::before, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal::before, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-normal::before, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-normal::before, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-normal::before, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-normal::before, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-normal::before, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event]::before, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event]::before, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-normal::before { + background-color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-btn.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-form-radio:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-form-radio:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-form-checkbox:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-form-select dl.layui-btn-normal:hover::after, .elem-style-neomorphic .layui-form-select .elem-style-sicfi dl.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-sicfi .layui-btn-normal.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item:hover::after, .elem-style-neomorphic .layui-header .elem-style-sicfi .layuimini-header-menu > .layui-btn-normal.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal:hover::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-normal:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal:hover::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-sicfi a.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-side.layui-bg-black:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal:hover::after, +.elem-style-sicfi .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal:hover::after, +.elem-style-neomorphic .elem-style-sicfi .layuimini-menu-left-zoom > ul.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layuimini-qiuck-module:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.panel:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.panel:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-card:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-card:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layui-layer:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layui-layer:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-btn-normal.layuimini-main:hover::after, .elem-style-neomorphic .elem-style-sicfi .layui-btn-normal.layuimini-main:hover::after, .elem-style-sicfi .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event]:hover::after, .elem-style-neomorphic .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event]:hover::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-normal:hover::after, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-sicfi a.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event]:hover::after, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event]:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item:hover::after, .elem-style-gtk .elem-style-sicfi .layuimini-header-menu > li.layui-btn-normal.layui-nav-item:hover::after, .elem-style-sicfi .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal:hover::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-sicfi li.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-gtk .layui-laydate-footer span.layui-btn-normal:hover::after, .elem-style-gtk .layui-laydate-footer .elem-style-sicfi span.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-gtk .laydate-footer-btns span.layui-btn-normal:hover::after, .elem-style-gtk .laydate-footer-btns .elem-style-sicfi span.layui-btn-normal:hover::after, .elem-style-sicfi .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event]:hover::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-sicfi .layui-btn-normal.layui-inline[lay-event]:hover::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-normal:hover::after { + background-color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-table { + background: rgb(2, 17, 20); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-table tr { + background-color: rgba(62, 251, 251, 0.05); +} +.elem-style-sicfi .layui-table td { + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-table-header { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layuimini-container .layui-table-box { + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layuimini-container .layui-table-box .layui-table-header th { + color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-table-tool .layui-inline[lay-event] { + color: rgb(126, 252, 246); + border: none; + position: relative; +} +.elem-style-sicfi .layui-table-tool .layui-inline[lay-event]::after { + border-color: rgb(126, 252, 246); + border-width: 1px; + border-style: solid; + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + position: absolute; + left: 0; + top: 0; + width: calc(100% - 1px); + height: calc(100% - 1px); + content: ""; + display: block; +} +.elem-style-sicfi .layui-table tbody tr:hover { + background-color: rgba(126, 252, 246, 0.1); +} +.elem-style-sicfi .layuimini-main { + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-table-header { + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .color-content > ul > li > a > div > span:nth-child(2) { + background-color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-color .elem-content li { + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); +} +.elem-style-sicfi .layuimini-color .elem-content li.layui-this { + background-color: rgb(126, 252, 246); + color: rgb(2, 17, 20) !important; + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layuimini-color .more-menu-item { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layuimini-color .more-menu-item:hover { + background-color: rgba(62, 251, 251, 0.05); +} +.elem-style-sicfi .layui-layout-admin .layui-header { + background-color: rgba(62, 251, 251, 0.05) !important; +} +.elem-style-sicfi .layuimini-tab .layui-tab-title { + background-color: rgba(62, 251, 251, 0.05) !important; + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layuimini-tab .layui-tab-title span { + color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, +.elem-style-sicfi .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layui-layout-admin .layui-header .layui-nav .layui-nav-item a { + color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-layout-admin .layui-header .layui-nav .layui-nav-item { + background-color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, +.elem-style-sicfi .layuimini-tool i:hover { + background-color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layuimini-tab .layui-tab-control > li { + background-color: rgb(2, 17, 20); + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layuimini-tab .layui-tab-title li { + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-flow-more a *, +.elem-style-sicfi .layui-laypage input, +.elem-style-sicfi .layui-table-view select[lay-ignore] { + border-color: rgb(6, 216, 215); + background-color: rgb(2, 17, 20); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-laypage button, +.elem-style-sicfi .layui-laypage input { + border-color: rgb(6, 216, 215); + background-color: rgb(2, 17, 20); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layuimini-container .layui-form-switch { + border-color: rgb(6, 216, 215) !important; + background-color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-container .layui-form-onswitch { + background-color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layuimini-container .layui-form-switch.layui-form-onswitch i { + background-color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-laypage .layui-laypage-curr em { + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + background-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin=primary] i { + border-color: rgb(126, 252, 246); + background-color: rgb(126, 252, 246); + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-table-view .layui-form-checkbox[lay-skin=primary] i { + background-color: rgba(62, 251, 251, 0.05); +} +.elem-style-sicfi .layui-table-init { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .box-border-line, .elem-style-sicfi .layui-card, .elem-style-sicfi .table-search-fieldset .layui-form-item:not(:last-child) { + position: relative; + border: 1px solid rgb(6, 216, 215); + border-width: 1px; +} +.elem-style-sicfi .box-border-line::before, .elem-style-sicfi .layui-card::before, .elem-style-sicfi .table-search-fieldset .layui-form-item:not(:last-child)::before { + content: ""; + position: absolute; + width: 50px; + height: 20px; + transition: all 0.2s; + border: 1px solid rgb(6, 216, 215); + top: -3px; + left: -3px; + border-right: none; + border-bottom: none; + pointer-events: none; +} +.elem-style-sicfi .box-border-line::after, .elem-style-sicfi .layui-card::after, .elem-style-sicfi .table-search-fieldset .layui-form-item:not(:last-child)::after { + content: ""; + position: absolute; + width: 50px; + height: 20px; + transition: all 0.2s; + border: 1px solid rgb(6, 216, 215); + bottom: -3px; + right: -3px; + border-left: none; + border-top: none; + pointer-events: none; +} +.elem-style-sicfi .box-border-line:hover::after, .elem-style-sicfi .layui-card:hover::after, .elem-style-sicfi .table-search-fieldset .layui-form-item:hover:not(:last-child)::after, .elem-style-sicfi .box-border-line:hover::before, .elem-style-sicfi .layui-card:hover::before, .elem-style-sicfi .table-search-fieldset .layui-form-item:hover:not(:last-child)::before { + width: calc(100% + 3px); + height: calc(100% + 3px); +} +.elem-style-sicfi .table-search-fieldset .layui-input-inline { + margin-right: 0; +} +.elem-style-sicfi .table-search-fieldset .layui-form-item:not(:last-child) { + margin-right: 10px; +} +.elem-style-sicfi .table-search-fieldset .layui-form-label { + border: unset; +} +.elem-style-sicfi .layui-form-pane .layui-form-label { + background-color: rgba(62, 251, 251, 0.05); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layuimini-container .table-search-fieldset { + color: rgb(126, 252, 246); + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-form-select dl, +.elem-style-sicfi .layui-form-autocomplete dl { + color: rgb(126, 252, 246); + background-color: rgb(2, 17, 20); + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-form-select dl dd.layui-this, +.elem-style-sicfi .layui-form-autocomplete dl dd.layui-this { + background-color: rgb(126, 252, 246) !important; + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-form-select dl dd:hover, +.elem-style-sicfi .layui-form-autocomplete dl dd:hover { + background-color: rgb(6, 216, 215) !important; + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-iconpicker-item, +.elem-style-sicfi .layui-iconpicker-item:hover { + border-color: rgb(6, 216, 215) !important; + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-iconpicker-item .layui-iconpicker-icon:hover, +.elem-style-sicfi .layui-iconpicker-item:hover .layui-iconpicker-icon:hover { + border-color: rgb(6, 216, 215) !important; +} +.elem-style-sicfi .layui-nav-child { + background-color: rgb(2, 17, 20); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { + color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-badge, +.elem-style-sicfi .layui-badge-dot, +.elem-style-sicfi .layui-badge-rim { + background-color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-nav .layui-nav-child a:hover { + background-color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layui-table-tool-panel { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-form-checkbox[lay-skin=primary] span { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-table-tool-panel li:hover { + background-color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layui-side.layui-bg-black, +.elem-style-sicfi .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-sicfi .layuimini-menu-left-zoom > ul { + background-color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layui-side { + border-right: 1px solid rgb(126, 252, 246); +} +.elem-style-sicfi .layui-bg-blue { + background-color: #0000ff !important; +} +.elem-style-sicfi .layui-bg-orange { + background-color: rgb(255, 255, 153) !important; + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layui-bg-green { + background-color: rgb(0, 255, 0) !important; + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layui-table-hover { + background-color: rgba(62, 251, 251, 0.05); +} +.elem-style-sicfi .layui-table-grid-down { + background-color: rgb(2, 17, 20); + color: rgb(126, 252, 246); + border-color: unset; +} +.elem-style-sicfi .layui-table-tips-main { + background-color: rgb(126, 252, 246); + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-layout-admin .layui-header .layuimini-tool i { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .color-red { + color: rgb(255, 0, 0) !important; +} +.elem-style-sicfi .layuimini-tab .layui-tab-title .layui-this span { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-card { + background-color: rgba(62, 251, 251, 0.05); + border-radius: 0; +} +.elem-style-sicfi .layui-card .layui-card-header { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-text { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layuimini-qiuck-module { + cursor: pointer; +} +.elem-style-sicfi .layuimini-qiuck-module a i { + background-color: rgba(62, 251, 251, 0.05); + color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layuimini-qiuck-module a cite { + color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layuimini-qiuck-module:hover a i { + background-color: rgba(62, 251, 251, 0.5); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layuimini-qiuck-module:hover a cite { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-bg-number { + background-color: rgba(62, 251, 251, 0.05); +} +.elem-style-sicfi .layui-input, +.elem-style-sicfi .layui-select, +.elem-style-sicfi .layui-textarea, +.elem-style-sicfi .city-picker-span, +.elem-style-sicfi .main-input { + background-color: rgba(62, 251, 251, 0.05); + color: rgb(126, 252, 246); +} +.elem-style-sicfi .city-picker-span > .title > span { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .city-picker-span > .title > span:hover { + background-color: rgb(126, 252, 246); + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-form-radio:hover *, +.elem-style-sicfi .layui-form-radioed, +.elem-style-sicfi .layui-form-radioed > i { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-form-checked[lay-skin=primary] i { + border-color: rgb(126, 252, 246) !important; + background-color: rgb(126, 252, 246); + color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-input:focus, +.elem-style-sicfi .layui-textarea:focus { + border-color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-input:hover, +.elem-style-sicfi .layui-textarea:hover { + border-color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-badge-rim, +.elem-style-sicfi .layui-border, +.elem-style-sicfi .layui-colla-content, +.elem-style-sicfi .layui-colla-item, +.elem-style-sicfi .layui-collapse, +.elem-style-sicfi .layui-elem-field, +.elem-style-sicfi .layui-form-pane .layui-form-item[pane], +.elem-style-sicfi .layui-form-pane .layui-form-label, +.elem-style-sicfi .layui-input, +.elem-style-sicfi .layui-layedit, +.elem-style-sicfi .layui-layedit-tool, +.elem-style-sicfi .layui-panel, +.elem-style-sicfi .layui-quote-nm, +.elem-style-sicfi .layui-select, +.elem-style-sicfi .layui-tab-bar, +.elem-style-sicfi .layui-tab-card, +.elem-style-sicfi .layui-tab-title, +.elem-style-sicfi .layui-tab-title .layui-this::after, +.elem-style-sicfi .layui-textarea { + border-color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .form-search .layui-input-inline input, +.elem-style-sicfi .form-search .layui-input-inline select { + border-width: 0 0 0 1px; +} +.elem-style-sicfi .layuimini-tab .layui-tab-tool .layui-nav-child { + border-color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-nav .layui-nav-child a { + color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-form-item { + margin-bottom: 12px; +} +.elem-style-sicfi .layuimini-upload .layuimini-upload-btn { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-layer { + border: 1px solid rgb(126, 252, 246); + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-layer-easy .layui-layer-title { + background-color: rgb(0, 125, 124) !important; + color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layui-table td, +.elem-style-sicfi .layui-table th, +.elem-style-sicfi .layui-table-col-set, +.elem-style-sicfi .layui-table-fixed-r, +.elem-style-sicfi .layui-table-grid-down, +.elem-style-sicfi .layui-table-header, +.elem-style-sicfi .layui-table-page, +.elem-style-sicfi .layui-table-tips-main, +.elem-style-sicfi .layui-table-tool, +.elem-style-sicfi .layui-table-total, +.elem-style-sicfi .layui-table-view, +.elem-style-sicfi .layui-table[lay-skin=line], +.elem-style-sicfi .layui-table[lay-skin=row] { + border-color: rgb(6, 216, 215); +} +.elem-style-sicfi .layui-table tbody tr:hover, +.elem-style-sicfi .layui-table thead tr, +.elem-style-sicfi .layui-table-click, +.elem-style-sicfi .layui-table-header, +.elem-style-sicfi .layui-table-hover, +.elem-style-sicfi .layui-table-mend, +.elem-style-sicfi .layui-table-patch, +.elem-style-sicfi .layui-table-tool, +.elem-style-sicfi .layui-table-total, +.elem-style-sicfi .layui-table-total tr { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .hr-line { + color: rgb(126, 252, 246); + border-color: rgb(6, 216, 215); + background-color: rgb(126, 252, 246); +} +.elem-style-sicfi .layui-layer-easy .layui-layer-btn { + background-color: rgb(2, 17, 20); + border-top: 1px solid rgb(6, 216, 215); +} +.elem-style-sicfi .layui-layer-easy .layui-layer-btn .layui-layer-btn0 { + background-color: rgb(126, 252, 246); + border-color: rgb(6, 216, 215); + color: rgb(126, 252, 246) !important; + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); +} +.elem-style-sicfi .layui-layer-shade { + background-color: #fff !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-nav-item { + margin: 5px; + width: calc(100% - 10px); +} +.elem-style-sicfi .layuimini-menu-left .layui-nav .layui-nav-item { + -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0); + color: rgb(126, 252, 246); + background-color: rgba(62, 251, 251, 0.5); +} +.elem-style-sicfi .layuimini-menu-left .layui-nav .layui-nav-item.layui-this a { + background-color: rgb(126, 252, 246) !important; + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav .layui-nav-item.layui-this { + background-color: rgb(126, 252, 246) !important; + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav .layui-nav-item.layui-this span { + background-color: rgb(126, 252, 246) !important; + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav .layui-nav-item a:hover { + background-color: rgba(62, 251, 251, 0.5) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav .layui-nav-item a, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav-item a span { + color: rgb(126, 252, 246) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav-item:hover a span { + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layui-layout-admin .layuimini-logo { + background-color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav-itemed > .layui-nav-child { + background-color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-this, +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-this > a, +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: rgb(126, 252, 246) !important; + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-this .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-this > a .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-this .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this .layui-left-nav, +.elem-style-sicfi .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a .layui-left-nav { + color: rgb(2, 17, 20) !important; +} +.elem-style-sicfi .layui-iconpicker-icon { + border-color: rgb(6, 216, 215) !important; + background-color: rgb(6, 216, 215) !important; +} +.elem-style-sicfi .layui-iconpicker .layui-anim { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-iconpicker .layui-iconpicker-list { + background-color: rgb(2, 17, 20); +} +.elem-style-sicfi .layui-header .layui-nav .layui-nav-child dd.layui-this a, +.elem-style-sicfi .layui-header .layui-nav-child dd.layui-this, +.elem-style-sicfi .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: rgba(62, 251, 251, 0.5) !important; +} + +.elem-style-gtk { + background-color: #f6f5f4; + color: #2e3436; +} +.elem-style-gtk .layuimini-main { + padding: 0; +} +.elem-style-gtk .layuimini-container .layui-table-box .layui-table-header th { + color: #979a9b !important; + font-weight: 700 !important; + font-weight: bold; + text-shadow: none; + border-color: #d7d2ce; + border-bottom: 1px solid; +} +.elem-style-gtk .layuimini-container .layui-table-box .layui-table-header th:not(:last-child) { + border-right: 1px solid #d7d2ce; +} +.elem-style-gtk .layui-table-view .layui-table td { + border-bottom: unset; +} +.elem-style-gtk .layui-table-view .layui-table td:not(:last-child) { + border-right: 1px solid #d7d2ce; +} +.elem-style-gtk .layui-table { + color: #2e3436; + background: #f6f5f4; +} +.elem-style-gtk .layui-table-view .layui-table[lay-size=sm] .layui-table-cell { + line-height: 30px; +} +.elem-style-gtk .layui-table tbody tr:hover, +.elem-style-gtk .layui-table thead tr, +.elem-style-gtk .layui-table-click, +.elem-style-gtk .layui-table-header, +.elem-style-gtk .layui-table-hover, +.elem-style-gtk .layui-table-mend, +.elem-style-gtk .layui-table-patch, +.elem-style-gtk .layui-table-tool, +.elem-style-gtk .layui-table-total, +.elem-style-gtk .layui-table-total tr { + background-color: unset; +} +.elem-style-gtk .layui-table-cell { + padding: 0 4px; +} +.elem-style-gtk .layui-table img { + height: 25px !important; + width: auto !important; +} +.elem-style-gtk .layui-btn, .elem-style-gtk .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-gtk .layui-form-radio, .elem-style-gtk .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .layui-form-checkbox, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a, .elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul, .elem-style-gtk .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .layuimini-qiuck-module, .elem-style-gtk .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-gtk .panel, .elem-style-gtk .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-gtk .layui-card, .elem-style-gtk .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-gtk .layui-layer, .elem-style-gtk .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-gtk .layuimini-main, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-inline[lay-event], .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-inline[lay-event], .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a { + position: relative; + outline: none; + overflow: visible; + line-height: 28px; + border-radius: 5px; + transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); + padding: 4px 9px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color: #2e3436; + outline-color: rgba(53, 132, 228, 0.5); + border: 1px solid #cdc7c2; + border-bottom-color: rgb(205, 199, 194); + border-bottom-color: #bfb8b1; + background-color: #f6f5f4; + box-shadow: inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.07); +} +.elem-style-gtk .layui-btn::before, .elem-style-gtk .elem-style-neomorphic .layui-form-radio::before, .elem-style-neomorphic .elem-style-gtk .layui-form-radio::before, .elem-style-gtk .elem-style-neomorphic .layui-form-checkbox::before, .elem-style-neomorphic .elem-style-gtk .layui-form-checkbox::before, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl::before, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl::before, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item::before, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-nav-item::before, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item::before, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-nav-item::before, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a::before, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a::before, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a::before, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a::before, .elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black::before, .elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black::before, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul::before, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul::before, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul::before, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul::before, .elem-style-gtk .elem-style-neomorphic .layuimini-qiuck-module::before, .elem-style-neomorphic .elem-style-gtk .layuimini-qiuck-module::before, .elem-style-gtk .elem-style-neomorphic .panel::before, .elem-style-neomorphic .elem-style-gtk .panel::before, .elem-style-gtk .elem-style-neomorphic .layui-card::before, .elem-style-neomorphic .elem-style-gtk .layui-card::before, .elem-style-gtk .elem-style-neomorphic .layui-layer::before, .elem-style-neomorphic .elem-style-gtk .layui-layer::before, .elem-style-gtk .elem-style-neomorphic .layuimini-main::before, .elem-style-neomorphic .elem-style-gtk .layuimini-main::before, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]::before, .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-inline[lay-event]::before, .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a::before, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a::before, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a::before, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a::before, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-inline[lay-event]::before, .elem-style-gtk .layuimini-header-menu > li.layui-nav-item::before, .elem-style-gtk .layui-tab-brief > .layui-tab-title li::before, .elem-style-gtk .layui-laydate-footer span::before, .elem-style-gtk .laydate-footer-btns span::before, .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event]::before, .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a::before, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a::before { + content: " "; + position: absolute; + pointer-events: none; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + background: linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent); + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); +} +.elem-style-gtk .layui-btn::after, .elem-style-gtk .elem-style-neomorphic .layui-form-radio::after, .elem-style-neomorphic .elem-style-gtk .layui-form-radio::after, .elem-style-gtk .elem-style-neomorphic .layui-form-checkbox::after, .elem-style-neomorphic .elem-style-gtk .layui-form-checkbox::after, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl::after, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl::after, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-nav-item::after, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item::after, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-nav-item::after, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a::after, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a::after, .elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black::after, .elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black::after, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul::after, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul::after, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul::after, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul::after, .elem-style-gtk .elem-style-neomorphic .layuimini-qiuck-module::after, .elem-style-neomorphic .elem-style-gtk .layuimini-qiuck-module::after, .elem-style-gtk .elem-style-neomorphic .panel::after, .elem-style-neomorphic .elem-style-gtk .panel::after, .elem-style-gtk .elem-style-neomorphic .layui-card::after, .elem-style-neomorphic .elem-style-gtk .layui-card::after, .elem-style-gtk .elem-style-neomorphic .layui-layer::after, .elem-style-neomorphic .elem-style-gtk .layui-layer::after, .elem-style-gtk .elem-style-neomorphic .layuimini-main::after, .elem-style-neomorphic .elem-style-gtk .layuimini-main::after, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]::after, .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-inline[lay-event]::after, .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a::after, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a::after, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a::after, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-inline[lay-event]::after, .elem-style-gtk .layuimini-header-menu > li.layui-nav-item::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title li::after, .elem-style-gtk .layui-laydate-footer span::after, .elem-style-gtk .laydate-footer-btns span::after, .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event]::after, .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a::after { + content: ""; + position: absolute; + pointer-events: none; + z-index: 2; + display: inline-block; + border: 2px solid transparent; + border-radius: inherit; + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + top: -4px; + left: -4px; + width: calc(100% + 4px); + height: calc(100% + 4px); +} +.elem-style-gtk .layui-btn.layui-btn-normal, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layui-form-radio, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layui-form-radio, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layui-form-checkbox, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl.layui-btn-normal, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl.layui-btn-normal, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-btn-normal.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-btn-normal.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-normal, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-normal, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layui-side.layui-bg-black, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul.layui-btn-normal, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layuimini-qiuck-module, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.panel, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.panel, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layui-card, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layui-card, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layui-layer, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layui-layer, .elem-style-gtk .elem-style-neomorphic .layui-btn-normal.layuimini-main, .elem-style-neomorphic .elem-style-gtk .layui-btn-normal.layuimini-main, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-btn-normal.layui-inline[lay-event], .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a.layui-btn-normal, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-normal, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-normal, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-normal, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-btn-normal.layui-inline[lay-event], .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item, .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal, .elem-style-gtk .layui-laydate-footer span.layui-btn-normal, .elem-style-gtk .laydate-footer-btns span.layui-btn-normal, .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-normal, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-normal { + color: #fff; + border-color: #1b6acb #1b6acb #15539e; + background-color: #3c88e5; + box-shadow: inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, 0.07); +} +.elem-style-gtk .layui-btn.layui-btn-danger, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layui-form-radio, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layui-form-radio, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layui-form-checkbox, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl.layui-btn-danger, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl.layui-btn-danger, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-btn-danger.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-btn-danger.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-danger.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-btn-danger.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-danger, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-danger, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-danger, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-danger, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layui-side.layui-bg-black, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-danger, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul.layui-btn-danger, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layuimini-qiuck-module, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.panel, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.panel, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layui-card, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layui-card, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layui-layer, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layui-layer, .elem-style-gtk .elem-style-neomorphic .layui-btn-danger.layuimini-main, .elem-style-neomorphic .elem-style-gtk .layui-btn-danger.layuimini-main, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-btn-danger.layui-inline[lay-event], .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a.layui-btn-danger, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-danger, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-danger, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-danger, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-btn-danger.layui-inline[lay-event], .elem-style-gtk .layuimini-header-menu > li.layui-btn-danger.layui-nav-item, .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-danger, .elem-style-gtk .layui-laydate-footer span.layui-btn-danger, .elem-style-gtk .laydate-footer-btns span.layui-btn-danger, .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-danger, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-danger { + color: #fff; + border-color: #b2161d #b2161d #851015; + background-color: #e41f28; + box-shadow: inset 0 1px #db1a23, 0 1px 2px rgba(0, 0, 0, 0.07); +} +.elem-style-gtk .layui-btn.layui-btn-sm, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layui-form-radio, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layui-form-radio, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layui-form-checkbox, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl.layui-btn-sm, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl.layui-btn-sm, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-btn-sm.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-btn-sm.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-sm.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-btn-sm.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-sm, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-sm, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-sm, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-sm, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layui-side.layui-bg-black, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-sm, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-sm, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-sm, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul.layui-btn-sm, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layuimini-qiuck-module, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.panel, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.panel, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layui-card, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layui-card, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layui-layer, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layui-layer, .elem-style-gtk .elem-style-neomorphic .layui-btn-sm.layuimini-main, .elem-style-neomorphic .elem-style-gtk .layui-btn-sm.layuimini-main, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-btn-sm.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-btn-sm.layui-inline[lay-event], .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a.layui-btn-sm, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-sm, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-sm, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-sm, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-btn-sm.layui-inline[lay-event], .elem-style-gtk .layuimini-header-menu > li.layui-btn-sm.layui-nav-item, .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-sm, .elem-style-gtk .layui-laydate-footer span.layui-btn-sm, .elem-style-gtk .laydate-footer-btns span.layui-btn-sm, .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-sm.layui-inline[lay-event], .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-sm, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-sm { + line-height: 20px; +} +.elem-style-gtk .layui-btn.layui-btn-xs, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layui-form-radio, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layui-form-radio, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layui-form-checkbox, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl.layui-btn-xs, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl.layui-btn-xs, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-btn-xs.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-btn-xs.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-xs.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-btn-xs.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-xs, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-xs, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-xs, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a.layui-btn-xs, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layui-side.layui-bg-black, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-xs, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-xs, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-xs, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul.layui-btn-xs, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layuimini-qiuck-module, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.panel, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.panel, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layui-card, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layui-card, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layui-layer, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layui-layer, .elem-style-gtk .elem-style-neomorphic .layui-btn-xs.layuimini-main, .elem-style-neomorphic .elem-style-gtk .layui-btn-xs.layuimini-main, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-btn-xs.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-btn-xs.layui-inline[lay-event], .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a.layui-btn-xs, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-xs, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-xs, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-xs, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-btn-xs.layui-inline[lay-event], .elem-style-gtk .layuimini-header-menu > li.layui-btn-xs.layui-nav-item, .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-xs, .elem-style-gtk .layui-laydate-footer span.layui-btn-xs, .elem-style-gtk .laydate-footer-btns span.layui-btn-xs, .elem-style-gtk .layuimini-container .layui-table-tool .layui-btn-xs.layui-inline[lay-event], .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a.layui-btn-xs, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a.layui-btn-xs { + line-height: 12px; +} +.elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event] { + line-height: 32px; + min-width: 32px; + min-height: 32px; + padding: 0; + border-radius: 9999px; +} +.elem-style-gtk .layui-laydate .layui-this { + background-color: #3584e4 !important; +} +.elem-style-gtk .layui-laydate-content td, +.elem-style-gtk .layui-laydate-content th { + width: 36px; + height: 36px; + border-radius: 100%; +} +.elem-style-gtk .laydate-footer-btns span { + line-height: 16px; +} +.elem-style-gtk .laydate-footer-btns span:not(:last-child) { + border-right-style: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.elem-style-gtk .laydate-footer-btns span:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.elem-style-gtk .layui-laydate-footer span { + line-height: 16px; +} +.elem-style-gtk .layui-laydate-footer span.layui-laydate-preview { + line-height: 22px; +} +.elem-style-gtk .layui-form-checked[lay-skin=primary] i { + border-color: #185fb4 !important; + background-color: #5094e8; + background-image: linear-gradient(0deg, #3987e5, #5094e8); +} +.elem-style-gtk .layui-form-checkbox[lay-skin=primary]:hover i { + border-color: #185fb4; + background-image: linear-gradient(0deg, #5094e8, #6ba5eb); +} +.elem-style-gtk .layui-table-view .layui-form-checkbox[lay-skin=primary] i { + border-radius: 3px; +} +.elem-style-gtk .layui-table-view .layui-form-checkbox i { + font-weight: bold; +} +.elem-style-gtk .layui-layer-title { + padding: 0 6px; + min-height: 46px; + border: 1px solid #bfb8b1; + border-top-left-radius: 8px; + border-top-right-radius: 8px; + background: #f1f0ee linear-gradient(0deg, #dfdcd8, #f4f2f1) !important; + color: #2e3436 !important; + padding-left: 12px; + padding-right: 12px; + font-weight: bold; +} +.elem-style-gtk .layui-layer { + background-color: #f6f5f4; +} +.elem-style-gtk .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > a { + position: relative; + outline: none; + overflow: visible; + border-radius: 5px; + transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + outline-color: rgba(53, 132, 228, 0.5); + border: 1px solid #cdc7c2; + border-bottom-color: rgb(205, 199, 194); + border-bottom-color: #bfb8b1; + background-color: #f6f5f4; + box-shadow: inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.07); + height: 20px; + line-height: 20px; + width: 20px; + text-align: center; + display: inline-flex; + align-items: center; + justify-content: center; +} +.elem-style-gtk .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > a::after { + color: #2e3436 !important; +} +.elem-style-gtk .layui-layer-setwin { + display: flex; + align-items: center; +} +.elem-style-gtk .layuimini-container .layui-form-switch.layui-form-onswitch { + color: #ffffff; + border-color: #185fb4; + background-color: #3584e4; + text-shadow: 0 1px rgba(53, 132, 228, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); +} +.elem-style-gtk .layuimini-container .layui-form-switch { + border: 1px solid #cdc7c2; + border-radius: 20px; + color: rgba(46, 52, 54, 0.2); + background-color: #e1dedb; + text-shadow: 0 1px rgba(0, 0, 0, 0.1); + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); +} +.elem-style-gtk .layui-form-switch { + height: 20px; + width: 40px; +} +.elem-style-gtk .layui-form-switch { + padding: 0; + line-height: 20px; +} +.elem-style-gtk .layui-form-switch.layui-form-onswitch i { + top: 0; + height: 20px; + width: 20px; + margin-left: -20px; +} +.elem-style-gtk .layui-form-switch i { + top: 0; + height: 20px; + width: 20px; + margin-left: -5px; + border-radius: 50%; + transition: all 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + color: #2e3436; + outline-color: rgba(53, 132, 228, 0.5); + border-color: #cdc7c2; + border-bottom-color: #bfb8b1; + background-color: #f6f5f4; + box-shadow: inset 0 1px white, 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.07); +} +.elem-style-gtk .layuimini-main { + background-color: unset; +} +.elem-style-gtk .layui-tab-title li { + transition: none; + padding: 3px 12px; + min-height: 30px; + min-width: 65px; + display: flex; + justify-content: center; + align-items: center; + white-space: nowrap; + color: #2e3436; + font-weight: normal; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border: 0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; +} +.elem-style-gtk .layui-tab-title li:hover { + box-shadow: inset 0 -3px #c8c2bc; + background-color: #edebe9; +} +.elem-style-gtk .layui-tab-title li.layui-this { + box-shadow: inset 0 -3px #3584e4; + background-color: #f1f0ee; +} +.elem-style-gtk .layui-tab-title { + display: flex; + align-items: center; + flex-direction: row; + padding-left: 4px; + padding-right: 4px; +} +.elem-style-gtk .layuimini-tab > .layui-tab-title li, +.elem-style-gtk .layuimini-tab > .close-box li { + line-height: 20px !important; +} +.elem-style-gtk .layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + display: none; +} +.elem-style-gtk .layuimini-tab .layui-tab-title .layui-this span { + color: #2e3436 !important; +} +.elem-style-gtk .layuimini-tab .layui-tab-title span { + color: #2e3436 !important; +} +.elem-style-gtk .layuimini-tab .layui-tab-title .layuimini-tab-active { + display: none; +} +.elem-style-gtk .layuimini-tab .layui-tab-title { + background-color: #e1dedb; + border-color: #cdc7c2; +} +.elem-style-gtk .layui-layer-easy .layui-layer-btn { + background-color: #f2f2f2; +} +.elem-style-gtk .layui-layer-dialog .layui-layer-content { + background-color: #f2f2f2; +} +.elem-style-gtk .layui-layer-easy .layui-layer-btn a { + position: relative; + outline: none; + overflow: visible; + line-height: 22px; + height: 22px; + border-radius: 5px; + transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); + padding: 4px 9px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color: #2e3436 !important; + outline-color: rgba(53, 132, 228, 0.5); + border: 1px solid #cdc7c2; + border-bottom-color: rgb(205, 199, 194); + border-bottom-color: #bfb8b1; + background-color: #f6f5f4; + box-shadow: inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.07); +} +.elem-style-gtk .layui-layer-easy .layui-layer-btn a::before { + content: " "; + position: absolute; + pointer-events: none; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + background: linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent); + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); +} +.elem-style-gtk .layui-layer-easy .layui-layer-btn a::after { + content: ""; + position: absolute; + pointer-events: none; + z-index: 2; + display: inline-block; + border: 2px solid transparent; + border-radius: inherit; + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + top: -4px; + left: -4px; + width: calc(100% + 4px); + height: calc(100% + 4px); +} +.elem-style-gtk .layui-layer-easy .layui-layer-btn a.layui-layer-btn0 { + color: #fff !important; + border-color: #1b6acb #1b6acb #15539e; + background-color: #3c88e5; + box-shadow: inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, 0.07); +} +.elem-style-gtk .layui-tab-brief > .layui-tab-title li:not(:last-child) { + border-right-style: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.elem-style-gtk .layui-tab-brief > .layui-tab-title li:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-this { + color: unset; + color: #2e3436; + border-color: #cdc7c2; + background-color: #d6d1cd; + box-shadow: inset 0 1px rgba(255, 255, 255, 0); +} +.elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-this::after { + display: none; +} +.elem-style-gtk .layui-tab-brief > .layui-tab-title li:hover { + box-shadow: unset; + background-color: #edebe9; +} +.elem-style-gtk .layui-form-radio:hover *, +.elem-style-gtk .layui-form-radioed, +.elem-style-gtk .layui-form-radioed > i { + color: #5094e8; +} +.elem-style-gtk .layui-card .layui-card-header { + padding: 0 6px; + min-height: 46px; + border-width: 1px; + border-style: solid; + border-color: #bfb8b1; + border-top-left-radius: 8px; + border-top-right-radius: 8px; + background: #f1f0ee linear-gradient(to top, #dfdcd8, #f4f2f1); + box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), inset 0 -2px 2px rgba(0, 0, 0, 0.02); +} +.elem-style-gtk .layui-card .layui-card-header .icon { + color: #979a9b !important; +} +.elem-style-gtk .layui-card .layui-card-body { + background-color: #f6f5f4; + border: 1px solid #cdc7c2; +} +.elem-style-gtk .layui-btn, .elem-style-gtk .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-gtk .layui-form-radio, .elem-style-gtk .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .layui-form-checkbox, .elem-style-gtk .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-gtk dl, .elem-style-gtk .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .layuimini-header-menu > .layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk a, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk a, .elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black, +.elem-style-gtk .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-gtk .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-gtk .layuimini-menu-left-zoom > ul, .elem-style-gtk .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .layuimini-qiuck-module, .elem-style-gtk .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-gtk .panel, .elem-style-gtk .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-gtk .layui-card, .elem-style-gtk .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-gtk .layui-layer, .elem-style-gtk .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-gtk .layuimini-main, .elem-style-gtk .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .layui-inline[lay-event], .elem-style-gtk .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk a, .elem-style-gtk .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk a, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .layui-inline[lay-event], .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk a, .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-tab-brief > .layui-tab-title li, +.elem-style-gtk .layui-input, +.elem-style-gtk .layui-select, +.elem-style-gtk .layui-textarea, +.elem-style-gtk .layui-upload-button, +.elem-style-gtk .city-picker-span { + border-radius: 5px; + border: 1px solid #cdc7c2; +} +.elem-style-gtk .layui-side.layui-bg-black, +.elem-style-gtk .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-gtk .layuimini-menu-left-zoom > ul { + background-color: #f6f5f4 !important; +} +.elem-style-gtk .layuimini-menu-left { + background-color: #fbfafa; + border-right: 1px solid #cdc7c2; +} +.elem-style-gtk .layuimini-menu-left .layui-nav li:not(:first-child) { + border-top: 1px solid #cdc7c2; +} +.elem-style-gtk .layuimini-menu-left .layui-nav li.layui-this a { + background-color: #347cd3 !important; + color: #fff !important; +} +.elem-style-gtk .layuimini-menu-left .layui-nav .layui-this a, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav .layui-this a { + color: #2e3436 !important; +} +.elem-style-gtk .layuimini-menu-left .layui-nav .layui-nav-item.layui-this a:hover, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav .layui-nav-item.layui-this a:hover { + color: #fff !important; +} +.elem-style-gtk .layuimini-menu-left .layui-nav .layui-nav-item a, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: #2e3436 !important; +} +.elem-style-gtk .layuimini-menu-left .layui-nav .layui-nav-item a:hover, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover { + color: #2e3436 !important; +} +.elem-style-gtk .layuimini-menu-left .layui-nav .layui-nav-item a { + height: 30px; + line-height: 30px; +} +.elem-style-gtk .layuimini-menu-left .layui-nav-itemed > .layui-nav-child { + background-color: rgba(46, 52, 54, 0.05) !important; + border-top: 1px solid #d7d2ce; +} +.elem-style-gtk .layuimini-menu-left .layui-nav-itemed > .layui-nav-child dd { + border-bottom: 1px solid #d7d2ce; +} +.elem-style-gtk .layuimini-menu-left .layui-nav-tree .layui-this, +.elem-style-gtk .layuimini-menu-left .layui-nav-tree .layui-this > a, +.elem-style-gtk .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.elem-style-gtk .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.elem-style-gtk .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #347cd3 !important; + color: #fff !important; +} +.elem-style-gtk .layui-layout-admin .layuimini-logo { + background-color: unset !important; +} +.elem-style-gtk .layuimini-header-menu > li.layui-nav-item { + margin-top: 10px; + height: 30px !important; + line-height: 30px !important; +} +.elem-style-gtk .layuimini-header-menu > li.layui-nav-item::after { + background-color: transparent; +} +.elem-style-gtk .layuimini-header-menu > li.layui-nav-item:not(:last-child) { + border-right-style: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.elem-style-gtk .layuimini-header-menu > li.layui-nav-item:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.elem-style-gtk .layuimini-header-menu > li.layui-nav-item:nth-last-child(2) { + border-right-style: solid; + border-radius: 5px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.elem-style-gtk .layui-layout-admin .layui-header { + background-color: #f6f5f4 !important; +} +.elem-style-gtk .layui-layer-dialog { + border-radius: 20px; +} +.elem-style-gtk .layui-layer-iframe { + border-radius: 20px; +} +.elem-style-gtk .layuimini-tab .layui-tab-control > li { + background-color: #e1dedb; + border-style: solid; + border-color: #cdc7c2; +} +.elem-style-gtk .form-search .layui-btn, .elem-style-gtk .form-search .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-gtk .form-search .layui-form-radio, .elem-style-gtk .form-search .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-gtk .form-search .layui-form-checkbox, .elem-style-gtk .form-search .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-gtk .form-search dl, .elem-style-gtk .form-search .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-gtk .form-search .layui-nav-item, .elem-style-gtk .form-search .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-gtk .form-search .layuimini-header-menu > .layui-nav-item, .elem-style-gtk .form-search .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-gtk .form-search a, +.elem-style-gtk .form-search .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-gtk .form-search a, .elem-style-gtk .form-search .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-gtk .form-search .layui-side.layui-bg-black, +.elem-style-gtk .form-search .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-gtk .form-search .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-gtk .form-search .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-gtk .form-search .layuimini-menu-left-zoom > ul, .elem-style-gtk .form-search .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-gtk .form-search .layuimini-qiuck-module, .elem-style-gtk .form-search .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-gtk .form-search .panel, .elem-style-gtk .form-search .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-gtk .form-search .layui-card, .elem-style-gtk .form-search .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-gtk .form-search .layui-layer, .elem-style-gtk .form-search .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-gtk .form-search .layuimini-main, .elem-style-gtk .form-search .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-gtk .form-search .layui-inline[lay-event], .elem-style-gtk .form-search .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-gtk .form-search a, .elem-style-gtk .form-search .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-gtk .form-search a, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-gtk .form-search .layui-inline[lay-event], .elem-style-gtk .form-search .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-gtk .form-search a, .elem-style-gtk .form-search .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .form-search .layui-inline[lay-event], .elem-style-gtk .form-search .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .form-search span, .elem-style-gtk .form-search .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .form-search span, .elem-style-gtk .form-search .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .form-search li, .elem-style-gtk .form-search .layuimini-header-menu > li.layui-nav-item { + height: 32px; + line-height: 22px; +} +.elem-style-gtk .form-search .layui-form-select dl { + transition: all 80ms cubic-bezier(0.25, 0.46, 0.45, 0.94); + background-color: #ffffff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.23); + border-top-left-radius: 0; + border-top-right-radius: 0; + border-radius: 9px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + box-shadow: 0 1px 3px 2px rgba(0, 0, 0, 0.08); + top: 28px; +} +.elem-style-gtk .layui-form-select dl dd, +.elem-style-gtk .layui-form-select dl dt { + height: 30px; + line-height: 30px; + padding: 0 10px; +} +.elem-style-gtk .layuimini-container .layui-form-select dl dd.layui-this { + background-color: #3c88e5 !important; +} +.elem-style-gtk .layui-table-header .layui-table { + margin-bottom: 0; +} +.elem-style-gtk .layui-header .layui-nav .layui-nav-child dd.layui-this a, +.elem-style-gtk .layui-header .layui-nav-child dd.layui-this, +.elem-style-gtk .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: #3c88e5 !important; +} +.elem-style-gtk .layuimini-mobile-show .layui-nav-more { + top: 4px; +} +.elem-style-gtk .layui-layer-easy .layui-layer-setwin > span { + color: #2e3436; +} +.elem-style-gtk .layui-layer-easy .layui-layer-setwin > span:after { + color: #2e3436; +} +.elem-style-gtk .layui-layer-easy .layui-layer-setwin .layui-layer-max::after, +.elem-style-gtk .layui-layer-easy .layui-layer-setwin .layui-layer-max::before { + border-color: #2e3436; +} +.elem-style-gtk .layui-layer-easy .layui-layer-setwin .layui-layer-min::before { + background-color: #2e3436; +} + +.elem-style-nes a, +.elem-style-nes button { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer; +} +.elem-style-nes { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABFklEQVRYR9WXURLDIAhE6/0PbSdOtUpcd1Gnpv1KGpTHBpCE1/cXq+vrMph7dGvXZTtpfW10DCA5jrH1H0Jhs5E0hnZdCR+vb5S8Nn8mQCeS9BdSalYJqMBjAGzq59xAESN7VFVUgV8AZB/dZBR7QTFDCqGquvUBVVoEtgIwpQRzmANSFHgWQKExHdIrPeuMvQNDarXe6nC/AutgV3JW+6bgqQLeV8FekRtgV+ToDKEKnACYKsfZjjkam7a0ZpYTytwmgainpC3HvwBocgKOxqRjehoR9DFKNFYtOwCGYCszobeCbl26N6yyQ6g8X/Wex/rBPsNEV6qAMaJPMynIHQCoSqS9JSMmwef51LflTgCRszU7DvAGiV6mHWfsaVUAAAAASUVORK5CYII=), auto; + font-family: "ark-pixel"; +} +.elem-style-nes .public-border, .elem-style-nes .layui-table-box, .elem-style-nes .layuimini-main, .elem-style-nes .layui-card, .elem-style-nes .layui-layer, .elem-style-nes .layui-input, +.elem-style-nes .layui-select, +.elem-style-nes .layui-textarea, .elem-style-nes .layuimini-header-menu > .layui-nav-item, .elem-style-nes .layui-form-checkbox[lay-skin=primary] i, .elem-style-nes .layui-btn, .elem-style-nes .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-nes dl, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a, .elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul, .elem-style-nes .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-nes .panel, .elem-style-nes .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-nes .layui-card, .elem-style-nes .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-nes .layui-layer, .elem-style-nes .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-nes .layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a, .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-nes span, .elem-style-nes .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-nes span, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-nav-item { + border-style: solid; + border-width: 3px; + border-image-slice: 2; + border-image-width: 2; + border-image-repeat: stretch; + border-image-source: url('data:image/svg+xml;utf8,'); + border-image-outset: 2; +} +.elem-style-nes .layui-btn, .elem-style-nes .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-nes dl, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a, .elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul, .elem-style-nes .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-nes .panel, .elem-style-nes .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-nes .layui-card, .elem-style-nes .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-nes .layui-layer, .elem-style-nes .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-nes .layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a, .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-nes span, .elem-style-nes .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-nes span, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-nav-item { + line-height: 32px; + position: relative; + display: inline-block; + text-align: center; + vertical-align: middle; + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color: #212529; + background-color: #fff; + border-image-repeat: stretch; +} +.elem-style-nes .layui-btn::after, .elem-style-nes .elem-style-neomorphic .layui-form-radio::after, .elem-style-neomorphic .elem-style-nes .layui-form-radio::after, .elem-style-nes .elem-style-neomorphic .layui-form-checkbox::after, .elem-style-neomorphic .elem-style-nes .layui-form-checkbox::after, .elem-style-nes .elem-style-neomorphic .layui-form-select dl::after, .elem-style-neomorphic .layui-form-select .elem-style-nes dl::after, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item::after, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a::after, .elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black::after, .elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black::after, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul::after, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul::after, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul::after, .elem-style-nes .elem-style-neomorphic .layuimini-qiuck-module::after, .elem-style-neomorphic .elem-style-nes .layuimini-qiuck-module::after, .elem-style-nes .elem-style-neomorphic .panel::after, .elem-style-neomorphic .elem-style-nes .panel::after, .elem-style-nes .elem-style-neomorphic .layui-card::after, .elem-style-neomorphic .elem-style-nes .layui-card::after, .elem-style-nes .elem-style-neomorphic .layui-layer::after, .elem-style-neomorphic .elem-style-nes .layui-layer::after, .elem-style-nes .elem-style-neomorphic .layuimini-main::after, .elem-style-neomorphic .elem-style-nes .layuimini-main::after, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]::after, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-inline[lay-event]::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a::after, .elem-style-nes .layui-layer-easy .layui-layer-btn a::after, .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event]::after, .elem-style-nes .elem-style-sicfi .layui-layer-easy .layui-layer-btn a::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-inline[lay-event]::after, .elem-style-nes .elem-style-gtk .laydate-footer-btns span::after, .elem-style-gtk .laydate-footer-btns .elem-style-nes span::after, .elem-style-nes .elem-style-gtk .layui-laydate-footer span::after, .elem-style-gtk .layui-laydate-footer .elem-style-nes span::after, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li::after, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-nav-item::after, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-nav-item::after { + position: absolute; + top: -3px; + right: -3px; + bottom: -3px; + left: -3px; + content: ""; + box-shadow: inset -3px -3px #adafbc; +} +.elem-style-nes .layui-btn:hover, .elem-style-nes .elem-style-neomorphic .layui-form-radio:hover, .elem-style-neomorphic .elem-style-nes .layui-form-radio:hover, .elem-style-nes .elem-style-neomorphic .layui-form-checkbox:hover, .elem-style-neomorphic .elem-style-nes .layui-form-checkbox:hover, .elem-style-nes .elem-style-neomorphic .layui-form-select dl:hover, .elem-style-neomorphic .layui-form-select .elem-style-nes dl:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item:hover, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item:hover, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a:hover, .elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black:hover, .elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black:hover, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul:hover, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul:hover, .elem-style-nes .elem-style-neomorphic .layuimini-qiuck-module:hover, .elem-style-neomorphic .elem-style-nes .layuimini-qiuck-module:hover, .elem-style-nes .elem-style-neomorphic .panel:hover, .elem-style-neomorphic .elem-style-nes .panel:hover, .elem-style-nes .elem-style-neomorphic .layui-card:hover, .elem-style-neomorphic .elem-style-nes .layui-card:hover, .elem-style-nes .elem-style-neomorphic .layui-layer:hover, .elem-style-neomorphic .elem-style-nes .layui-layer:hover, .elem-style-nes .elem-style-neomorphic .layuimini-main:hover, .elem-style-neomorphic .elem-style-nes .layuimini-main:hover, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]:hover, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-inline[lay-event]:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn a:hover, .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event]:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-inline[lay-event]:hover, .elem-style-nes .elem-style-gtk .laydate-footer-btns span:hover, .elem-style-gtk .laydate-footer-btns .elem-style-nes span:hover, .elem-style-nes .elem-style-gtk .layui-laydate-footer span:hover, .elem-style-gtk .layui-laydate-footer .elem-style-nes span:hover, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li:hover, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-nav-item:hover, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-nav-item:hover { + color: #212529; + text-decoration: none; + background-color: #e7e7e7; +} +.elem-style-nes .layui-btn.layui-btn-sm, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-sm, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-sm, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-sm.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-sm.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-sm.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-sm.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-sm, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-sm, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-sm, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-sm, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-sm, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-sm, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-sm, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-sm, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.panel, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.panel, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layui-card, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layui-card, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layui-layer, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layui-layer, .elem-style-nes .elem-style-neomorphic .layui-btn-sm.layuimini-main, .elem-style-neomorphic .elem-style-nes .layui-btn-sm.layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-sm.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-sm.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-sm, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-sm, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-sm.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-sm, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-sm.layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-sm, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-sm, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-sm, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-sm, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-sm, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-sm, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-sm.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-sm.layui-nav-item { + line-height: 100%; +} +.elem-style-nes .layui-btn.layui-btn-xs, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-xs, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-xs, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-xs.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-xs.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-xs.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-xs.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-xs, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-xs, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-xs, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-xs, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-xs, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-xs, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-xs, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-xs, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.panel, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.panel, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layui-card, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layui-card, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layui-layer, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layui-layer, .elem-style-nes .elem-style-neomorphic .layui-btn-xs.layuimini-main, .elem-style-neomorphic .elem-style-nes .layui-btn-xs.layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-xs.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-xs.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-xs, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-xs, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-xs.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-xs, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-xs.layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-xs, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-xs, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-xs, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-xs, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-xs, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-xs, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-xs.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-xs.layui-nav-item { + line-height: 16px; +} +.elem-style-nes .layui-btn.layui-btn-normal, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-normal, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-normal, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-normal.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-normal.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-normal, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-normal, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-normal, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.panel, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.panel, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-card, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-card, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-layer, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-layer, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layuimini-main, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-normal.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-normal, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-normal, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-normal, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-normal.layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-normal, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-normal, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-normal, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-normal, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-normal, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-normal.layui-nav-item { + color: #fff; + background-color: #209cee; +} +.elem-style-nes .layui-btn.layui-btn-normal::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-form-radio::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-form-radio::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-form-checkbox::after, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-normal::after, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-normal::after, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-normal.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item::after, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-normal.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-normal::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-normal::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-side.layui-bg-black::after, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal::after, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal::after, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-normal::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layuimini-qiuck-module::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.panel::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.panel::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-card::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-card::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-layer::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-layer::after, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layuimini-main::after, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layuimini-main::after, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event]::after, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-normal.layui-inline[lay-event]::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-normal::after, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-normal::after, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event]::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-normal::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-normal.layui-inline[lay-event]::after, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-normal::after, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-normal::after, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-normal::after, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-normal::after, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-normal::after, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item::after, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-normal.layui-nav-item::after { + box-shadow: inset -3px -3px #006bb3; +} +.elem-style-nes .layui-btn.layui-btn-normal:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-form-radio:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-form-radio:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-form-checkbox:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-form-checkbox:hover, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-normal:hover, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-normal:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-normal.layui-nav-item:hover, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-normal.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-normal.layui-nav-item:hover, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-normal.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-normal:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-normal:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-normal:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-normal:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-side.layui-bg-black:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-side.layui-bg-black:hover, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal:hover, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-normal:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-normal:hover, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-normal:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layuimini-qiuck-module:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layuimini-qiuck-module:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.panel:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.panel:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-card:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-card:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layui-layer:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layui-layer:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-normal.layuimini-main:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-normal.layuimini-main:hover, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-normal.layui-inline[lay-event]:hover, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-normal.layui-inline[lay-event]:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-normal:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-normal:hover, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-normal.layui-inline[lay-event]:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-normal:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-normal.layui-inline[lay-event]:hover, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-normal:hover, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-normal:hover, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-normal:hover, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-normal:hover, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-normal:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-normal:hover, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-normal.layui-nav-item:hover, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-normal.layui-nav-item:hover { + background-color: #108de0; +} +.elem-style-nes .layui-btn.layui-btn-success, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-success, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-success, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-success.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-success.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-success.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-success.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-success, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-success, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-success, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-success, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-success, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-success, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .layui-btn-success.panel, .elem-style-neomorphic .elem-style-nes .layui-btn-success.panel, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-card, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-card, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-layer, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-layer, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layuimini-main, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-success.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-success.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-success, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-success, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-success, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-success.layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-success, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-success, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-success, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-success, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-success, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-success, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-success.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-success.layui-nav-item { + color: #fff; + background-color: #92cc41; +} +.elem-style-nes .layui-btn.layui-btn-success::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-form-radio::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-form-radio::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-form-checkbox::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-form-checkbox::after, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-success::after, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-success::after, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-success.layui-nav-item::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-success.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-success.layui-nav-item::after, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-success.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-success::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-success::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-success::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-success::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-side.layui-bg-black::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-side.layui-bg-black::after, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success::after, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-success::after, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-success::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layuimini-qiuck-module::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layuimini-qiuck-module::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.panel::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.panel::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-card::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-card::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-layer::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-layer::after, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layuimini-main::after, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layuimini-main::after, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-success.layui-inline[lay-event]::after, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-success.layui-inline[lay-event]::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-success::after, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-success::after, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event]::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-success::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-success.layui-inline[lay-event]::after, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-success::after, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-success::after, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-success::after, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-success::after, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-success::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-success::after, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-success.layui-nav-item::after, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-success.layui-nav-item::after { + box-shadow: inset -3px -3px #4aa52e; +} +.elem-style-nes .layui-btn.layui-btn-success:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-form-radio:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-form-radio:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-form-checkbox:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-form-checkbox:hover, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-success:hover, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-success:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-success.layui-nav-item:hover, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-success.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-success.layui-nav-item:hover, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-success.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-success:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-success:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-success:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-success:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-side.layui-bg-black:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-side.layui-bg-black:hover, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success:hover, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-success:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-success:hover, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-success:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layuimini-qiuck-module:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layuimini-qiuck-module:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.panel:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.panel:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-card:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-card:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layui-layer:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layui-layer:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-success.layuimini-main:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-success.layuimini-main:hover, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-success.layui-inline[lay-event]:hover, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-success.layui-inline[lay-event]:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-success:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-success:hover, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-success.layui-inline[lay-event]:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-success:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-success.layui-inline[lay-event]:hover, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-success:hover, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-success:hover, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-success:hover, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-success:hover, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-success:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-success:hover, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-success.layui-nav-item:hover, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-success.layui-nav-item:hover { + background-color: #92cc41; +} +.elem-style-nes .layui-btn.layui-btn-danger, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-danger, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-danger, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-danger.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-danger.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-danger.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-danger.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-danger, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-danger, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-danger, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-danger, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-danger, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-danger, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.panel, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.panel, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-card, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-card, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-layer, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-layer, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layuimini-main, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-danger.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-danger, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-danger, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-danger, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-danger.layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-danger, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-danger, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-danger, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-danger, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-danger, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-danger, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-danger.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-danger.layui-nav-item { + color: #fff; + background-color: #e76e55; +} +.elem-style-nes .layui-btn.layui-btn-danger::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-form-radio::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-form-radio::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-form-checkbox::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-form-checkbox::after, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-danger::after, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-danger::after, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-danger.layui-nav-item::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-danger.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-danger.layui-nav-item::after, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-danger.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-danger::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-danger::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-danger::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-danger::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-side.layui-bg-black::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-side.layui-bg-black::after, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger::after, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-danger::after, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-danger::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layuimini-qiuck-module::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layuimini-qiuck-module::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.panel::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.panel::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-card::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-card::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-layer::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-layer::after, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layuimini-main::after, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layuimini-main::after, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-danger.layui-inline[lay-event]::after, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-danger.layui-inline[lay-event]::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-danger::after, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-danger::after, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event]::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-danger::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-danger.layui-inline[lay-event]::after, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-danger::after, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-danger::after, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-danger::after, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-danger::after, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-danger::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-danger::after, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-danger.layui-nav-item::after, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-danger.layui-nav-item::after { + box-shadow: inset -3px -3px #8c2022; +} +.elem-style-nes .layui-btn.layui-btn-danger:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-form-radio:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-form-radio:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-form-checkbox:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-form-checkbox:hover, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-danger:hover, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-danger:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-danger.layui-nav-item:hover, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-danger.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-danger.layui-nav-item:hover, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-danger.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-danger:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-danger:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-danger:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-danger:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-side.layui-bg-black:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-side.layui-bg-black:hover, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger:hover, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-danger:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-danger:hover, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-danger:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layuimini-qiuck-module:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layuimini-qiuck-module:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.panel:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.panel:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-card:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-card:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layui-layer:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layui-layer:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-danger.layuimini-main:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-danger.layuimini-main:hover, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-danger.layui-inline[lay-event]:hover, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-danger.layui-inline[lay-event]:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-danger:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-danger:hover, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-danger.layui-inline[lay-event]:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-danger:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-danger.layui-inline[lay-event]:hover, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-danger:hover, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-danger:hover, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-danger:hover, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-danger:hover, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-danger:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-danger:hover, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-danger.layui-nav-item:hover, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-danger.layui-nav-item:hover { + background-color: #ce372b; +} +.elem-style-nes .layui-btn.layui-btn-warm, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-warm, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-warm, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-warm.layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-warm.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-warm.layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-warm.layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-warm, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-warm, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-warm, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-warm, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-warm, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-warm, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-warm, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-warm, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.panel, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.panel, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-card, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-card, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-layer, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-layer, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layuimini-main, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-warm.layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-warm.layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-warm, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-warm, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-warm.layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-warm, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-warm.layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-warm, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-warm, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-warm, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-warm, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-warm, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-warm, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-warm.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-warm.layui-nav-item { + color: #212529; + background-color: #f7d51d; +} +.elem-style-nes .layui-btn.layui-btn-warm::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-form-radio::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-form-radio::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-form-checkbox::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-form-checkbox::after, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-warm::after, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-warm::after, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-warm.layui-nav-item::after, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-warm.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-warm.layui-nav-item::after, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-warm.layui-nav-item::after, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-warm::after, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-warm::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-warm::after, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-warm::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-side.layui-bg-black::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-side.layui-bg-black::after, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-warm::after, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-warm::after, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-warm::after, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-warm::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layuimini-qiuck-module::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layuimini-qiuck-module::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.panel::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.panel::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-card::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-card::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-layer::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-layer::after, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layuimini-main::after, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layuimini-main::after, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-warm.layui-inline[lay-event]::after, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-warm.layui-inline[lay-event]::after, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-warm::after, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-warm::after, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-warm.layui-inline[lay-event]::after, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-warm::after, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-warm.layui-inline[lay-event]::after, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-warm::after, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-warm::after, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-warm::after, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-warm::after, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-warm::after, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-warm::after, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-warm.layui-nav-item::after, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-warm.layui-nav-item::after { + box-shadow: inset -3px -3px #e59400; +} +.elem-style-nes .layui-btn.layui-btn-warm:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-form-radio:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-form-radio:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-form-checkbox:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-form-checkbox:hover, .elem-style-nes .elem-style-neomorphic .layui-form-select dl.layui-btn-warm:hover, .elem-style-neomorphic .layui-form-select .elem-style-nes dl.layui-btn-warm:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-btn-warm.layui-nav-item:hover, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-btn-warm.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-btn-warm.layui-nav-item:hover, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-btn-warm.layui-nav-item:hover, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a.layui-btn-warm:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a.layui-btn-warm:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a.layui-btn-warm:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a.layui-btn-warm:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-side.layui-bg-black:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-side.layui-bg-black:hover, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-warm:hover, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul.layui-btn-warm:hover, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul.layui-btn-warm:hover, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul.layui-btn-warm:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layuimini-qiuck-module:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layuimini-qiuck-module:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.panel:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.panel:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-card:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-card:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layui-layer:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layui-layer:hover, .elem-style-nes .elem-style-neomorphic .layui-btn-warm.layuimini-main:hover, .elem-style-neomorphic .elem-style-nes .layui-btn-warm.layuimini-main:hover, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-btn-warm.layui-inline[lay-event]:hover, .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-btn-warm.layui-inline[lay-event]:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-warm:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-btn-warm:hover, .elem-style-nes .layuimini-container .layui-table-tool .layui-btn-warm.layui-inline[lay-event]:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a.layui-btn-warm:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-btn-warm.layui-inline[lay-event]:hover, .elem-style-nes .elem-style-gtk .laydate-footer-btns span.layui-btn-warm:hover, .elem-style-gtk .laydate-footer-btns .elem-style-nes span.layui-btn-warm:hover, .elem-style-nes .elem-style-gtk .layui-laydate-footer span.layui-btn-warm:hover, .elem-style-gtk .layui-laydate-footer .elem-style-nes span.layui-btn-warm:hover, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li.layui-btn-warm:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li.layui-btn-warm:hover, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-btn-warm.layui-nav-item:hover, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-btn-warm.layui-nav-item:hover { + color: #212529; + background-color: #f2c409; +} +.elem-style-nes .form-search .layui-btn, .elem-style-nes .form-search .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-nes .form-search .layui-form-radio, .elem-style-nes .form-search .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .form-search .layui-form-checkbox, .elem-style-nes .form-search .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-nes .form-search dl, .elem-style-nes .form-search .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .form-search .layui-nav-item, .elem-style-nes .form-search .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .form-search .layuimini-header-menu > .layui-nav-item, .elem-style-nes .form-search .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes .form-search a, +.elem-style-nes .form-search .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes .form-search a, .elem-style-nes .form-search .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .form-search .layui-side.layui-bg-black, +.elem-style-nes .form-search .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-nes .form-search .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-nes .form-search .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-nes .form-search .layuimini-menu-left-zoom > ul, .elem-style-nes .form-search .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .form-search .layuimini-qiuck-module, .elem-style-nes .form-search .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-nes .form-search .panel, .elem-style-nes .form-search .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-nes .form-search .layui-card, .elem-style-nes .form-search .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-nes .form-search .layui-layer, .elem-style-nes .form-search .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-nes .form-search .layuimini-main, .elem-style-nes .form-search .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .form-search .layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes .form-search a, .elem-style-nes .form-search .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .form-search a, .elem-style-nes .form-search .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .form-search .layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes .form-search a, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .form-search .layui-inline[lay-event], .elem-style-nes .form-search .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-nes .form-search span, .elem-style-nes .form-search .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-nes .form-search span, .elem-style-nes .form-search .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes .form-search li, .elem-style-nes .form-search .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-nes .form-search .layuimini-header-menu > li.layui-nav-item { + line-height: 16px; + font-size: 14px; +} +.elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event] { + line-height: 24px; +} +.elem-style-nes .layui-table img { + image-rendering: pixelated; +} +.elem-style-nes .layui-form-checkbox[lay-skin=primary] i { + position: relative; +} +.elem-style-nes .layui-form-checked[lay-skin=primary] i { + background-color: unset; + color: #212529; + font-weight: bold; + font-size: 28px; +} +.elem-style-nes .layui-btn, .elem-style-nes .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-nes .layui-form-radio, .elem-style-nes .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-nes .layui-form-checkbox, .elem-style-nes .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-nes dl, .elem-style-nes .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-nes .layui-nav-item, .elem-style-nes .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-nes .layuimini-header-menu > .layui-nav-item, .elem-style-nes .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-nes a, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-nes a, .elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black, +.elem-style-nes .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-nes .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-nes .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-nes .layuimini-menu-left-zoom > ul, .elem-style-nes .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-nes .layuimini-qiuck-module, .elem-style-nes .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-nes .panel, .elem-style-nes .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-nes .layui-card, .elem-style-nes .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-nes .layui-layer, .elem-style-nes .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-nes .layuimini-main, .elem-style-nes .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-nes .layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-nes a, .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-nes a, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-nes .layui-inline[lay-event], .elem-style-nes .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-nes span, .elem-style-nes .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-nes span, .elem-style-nes .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-nes li, .elem-style-nes .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-nes .layuimini-header-menu > li.layui-nav-item, .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event] { + font-size: 18px; +} +.elem-style-nes .layui-btn-sm { + font-size: 16px; +} +.elem-style-nes .layui-btn-xs { + font-size: 14px; +} +.elem-style-nes .layui-nav * { + font-size: 16px; +} +.elem-style-nes .layui-tab-title li { + font-size: 18px; +} +.elem-style-nes .layui-nav-tree .layui-nav-item { + border-bottom: 3px solid #212529; +} +.elem-style-nes .layuimini-header-menu > .layui-nav-item { + border-image-outset: 0; +} +.elem-style-nes .layui-table td, +.elem-style-nes .layui-table th { + font-size: 16px; + border-width: 0 2px 2px 0; + border-style: solid; + border-color: #212529; +} +.elem-style-nes .layui-form-label { + background-color: unset; + border: unset; + text-align: right; + color: #212529; + font-size: 16px; + font-weight: bold; +} +.elem-style-nes .layuimini-form > .layui-form-item > .layui-input-block tip, +.elem-style-nes .layuimini-form > .layui-form-item > .layui-inline tip { + font-size: 14px; +} +.elem-style-nes .layui-layer-easy .layui-layer-title { + background: unset !important; + color: #212529 !important; + font-size: 16px; + border-bottom: 1px solid #f0f0f0; +} +.elem-style-nes .layui-layer-easy .layui-layer-btn { + background: unset !important; +} +.elem-style-nes .layui-layer-easy .layui-layer-btn a { + color: #212529 !important; +} +.elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-layer-btn0 { + color: #fff !important; + background-color: #209cee; +} +.elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-layer-btn0::after { + box-shadow: inset -3px -3px #006bb3; +} +.elem-style-nes .layui-layer-easy .layui-layer-btn a.layui-layer-btn0:hover { + background-color: #108de0; +} +.elem-style-nes .layui-layer-dialog .layui-layer-content { + font-size: 16px; +} +.elem-style-nes .layui-layer-easy .layui-layer-setwin > span { + color: #212529; +} +.elem-style-nes .layui-layer-easy .layui-layer-setwin > span:after { + color: #212529; +} +.elem-style-nes .layui-layer-easy .layui-layer-setwin .layui-layer-max::after, +.elem-style-nes .layui-layer-easy .layui-layer-setwin .layui-layer-max::before { + border-color: #212529; +} +.elem-style-nes .layui-layer-easy .layui-layer-setwin .layui-layer-min::before { + background-color: #212529; +} +.elem-style-nes .layui-card .layui-card-header { + font-size: 18px; +} +.elem-style-nes .layui-table-box { + border-image-outset: 1; + margin-top: 5px; +} +.elem-style-nes .layuimini-container .layui-table-box .layui-table-header th { + color: #212529 !important; +} +.elem-style-nes .layui-table tbody tr:hover, +.elem-style-nes .layui-table thead tr, +.elem-style-nes .layui-table-click, +.elem-style-nes .layui-table-header, +.elem-style-nes .layui-table-hover, +.elem-style-nes .layui-table-mend, +.elem-style-nes .layui-table-patch, +.elem-style-nes .layui-table-tool, +.elem-style-nes .layui-table-total, +.elem-style-nes .layui-table-total tr { + background-color: unset; +} +.elem-style-nes .layui-table-header .layui-table { + margin-bottom: 0; +} +.elem-style-nes .layui-badge, +.elem-style-nes .layui-badge-rim { + position: relative; + border-radius: 0; +} +.elem-style-nes .layui-badge::after, +.elem-style-nes .layui-badge-rim::after { + content: ""; + position: absolute; + left: 0; + width: 100%; + height: 100%; + top: 0; + pointer-events: none; + box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee; +} +.elem-style-nes .layui-badge.layui-bg-blue, +.elem-style-nes .layui-badge-rim.layui-bg-blue { + background-color: #209cee; +} +.elem-style-nes .layui-badge.layui-bg-blue::after, +.elem-style-nes .layui-badge-rim.layui-bg-blue::after { + box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee; +} +.elem-style-nes .layui-badge.layui-bg-gray, +.elem-style-nes .layui-badge-rim.layui-bg-gray { + background-color: #92cc41; +} +.elem-style-nes .layui-badge.layui-bg-gray::after, +.elem-style-nes .layui-badge-rim.layui-bg-gray::after { + box-shadow: 0 4px #92cc41, 0 -4px #92cc41, 4px 0 #92cc41, -4px 0 #92cc41; +} +.elem-style-nes .layuimini-color .elem-content li { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer; +} + +.elem-style-win7 { + color: #222; + background-color: #f0f0f0; +} +.elem-style-win7 .layui-btn, .elem-style-win7 .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-win7 .layui-form-radio, .elem-style-win7 .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-win7 .layui-form-checkbox, .elem-style-win7 .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-win7 dl, .elem-style-win7 .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-win7 .layui-nav-item, .elem-style-win7 .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-win7 .layuimini-header-menu > .layui-nav-item, .elem-style-win7 .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-win7 a, +.elem-style-win7 .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-win7 a, .elem-style-win7 .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-win7 .layui-side.layui-bg-black, +.elem-style-win7 .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-win7 .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-win7 .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-win7 .layuimini-menu-left-zoom > ul, .elem-style-win7 .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-win7 .layuimini-qiuck-module, .elem-style-win7 .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-win7 .panel, .elem-style-win7 .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-win7 .layui-card, .elem-style-win7 .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-win7 .layui-layer, .elem-style-win7 .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-win7 .layuimini-main, .elem-style-win7 .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-win7 .layui-inline[lay-event], .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-win7 a, .elem-style-win7 .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-win7 .layui-inline[lay-event], .elem-style-win7 .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-win7 span, .elem-style-win7 .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-win7 span, .elem-style-win7 .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-win7 li, .elem-style-win7 .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-win7 .layuimini-header-menu > li.layui-nav-item, .elem-style-win7 .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-win7 .layui-inline[lay-event], .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-win7 a { + background: linear-gradient(180deg, #eee 45%, #ddd 0, #bbb); + border: 1.5px solid #888; + border-radius: 3px; + box-shadow: inset 0 -1px 1px hsla(0, 0%, 100%, 0.8), inset 0 1px 1px #fff; + box-sizing: border-box; + color: #222; +} +.elem-style-win7 .layui-btn:hover, .elem-style-win7 .elem-style-neomorphic .layui-form-radio:hover, .elem-style-neomorphic .elem-style-win7 .layui-form-radio:hover, .elem-style-win7 .elem-style-neomorphic .layui-form-checkbox:hover, .elem-style-neomorphic .elem-style-win7 .layui-form-checkbox:hover, .elem-style-win7 .elem-style-neomorphic .layui-form-select dl:hover, .elem-style-neomorphic .layui-form-select .elem-style-win7 dl:hover, .elem-style-win7 .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item:hover, .elem-style-neomorphic .layui-header .layui-nav .elem-style-win7 .layui-nav-item:hover, .elem-style-win7 .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item:hover, .elem-style-neomorphic .layui-header .elem-style-win7 .layuimini-header-menu > .layui-nav-item:hover, .elem-style-win7 .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-win7 a:hover, +.elem-style-win7 .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-win7 a:hover, .elem-style-win7 .elem-style-neomorphic .layui-side.layui-bg-black:hover, .elem-style-neomorphic .elem-style-win7 .layui-side.layui-bg-black:hover, +.elem-style-win7 .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover, +.elem-style-neomorphic .elem-style-win7 .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover, +.elem-style-win7 .elem-style-neomorphic .layuimini-menu-left-zoom > ul:hover, +.elem-style-neomorphic .elem-style-win7 .layuimini-menu-left-zoom > ul:hover, .elem-style-win7 .elem-style-neomorphic .layuimini-qiuck-module:hover, .elem-style-neomorphic .elem-style-win7 .layuimini-qiuck-module:hover, .elem-style-win7 .elem-style-neomorphic .panel:hover, .elem-style-neomorphic .elem-style-win7 .panel:hover, .elem-style-win7 .elem-style-neomorphic .layui-card:hover, .elem-style-neomorphic .elem-style-win7 .layui-card:hover, .elem-style-win7 .elem-style-neomorphic .layui-layer:hover, .elem-style-neomorphic .elem-style-win7 .layui-layer:hover, .elem-style-win7 .elem-style-neomorphic .layuimini-main:hover, .elem-style-neomorphic .elem-style-win7 .layuimini-main:hover, .elem-style-win7 .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]:hover, .elem-style-neomorphic .layui-table-tool .elem-style-win7 .layui-inline[lay-event]:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn a:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-win7 a:hover, .elem-style-win7 .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event]:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-win7 .layui-inline[lay-event]:hover, .elem-style-win7 .elem-style-gtk .laydate-footer-btns span:hover, .elem-style-gtk .laydate-footer-btns .elem-style-win7 span:hover, .elem-style-win7 .elem-style-gtk .layui-laydate-footer span:hover, .elem-style-gtk .layui-laydate-footer .elem-style-win7 span:hover, .elem-style-win7 .elem-style-gtk .layui-tab-brief > .layui-tab-title li:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-win7 li:hover, .elem-style-win7 .elem-style-gtk .layuimini-header-menu > li.layui-nav-item:hover, .elem-style-gtk .elem-style-win7 .layuimini-header-menu > li.layui-nav-item:hover, .elem-style-win7 .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event]:hover, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-win7 .layui-inline[lay-event]:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-win7 a:hover { + background: linear-gradient(180deg, #e5f4fd 45%, #b3e0f9 0); + border-color: #72a2c5; +} +.elem-style-win7 .layui-layer-easy .layui-layer-btn a { + color: #222 !important; + height: 26px; + line-height: 26px; + font-size: 12px; +} +.elem-style-win7 .layui-layer-title { + background: linear-gradient(90deg, hsla(0, 0%, 100%, 0.4), rgba(0, 0, 0, 0.1), hsla(0, 0%, 100%, 0.2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, 0.1) 20%, rgba(0, 0, 0, 0.1) 50%, transparent 53%), #4580c4 !important; + border: 1px solid rgba(0, 0, 0, 0.6); + border-radius: 6px 6px 0 0; + height: 27px; + line-height: 27px; + color: #000 !important; + letter-spacing: 0; + font-size: 12px; + text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff; + padding: 0 80px 0 8px; + border: 0; + box-shadow: inset 0 0.5px #fff; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin { + height: 27px !important; + top: 1px; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > span { + height: 20px !important; + line-height: 20px !important; + background: linear-gradient(hsla(0, 0%, 100%, 0.3), hsla(0, 0%, 100%, 0.3) 45%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, hsla(0, 0%, 100%, 0.5)) !important; + border: 0; + border-radius: 0; + border-bottom-right-radius: 0px; + border-right: 1px solid rgba(0, 0, 0, 0.6); + box-shadow: inset 0 0 0 0.5px #eee; + box-sizing: border-box; + padding: 0; + position: relative; + margin-left: 0; + min-width: 26px; + text-align: center; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > span:hover { + background: radial-gradient(circle at 50% 100%, #2aceda, transparent 60%), linear-gradient(#a9d2e8 50%, #196c9b 0) !important; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > span:last-child { + border: 0; + border-bottom-right-radius: 5px; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > span:first-child { + border-bottom-left-radius: 5px; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > span.layui-layer-close1 { + background-color: #d04a37 !important; + min-width: 45px !important; +} +.elem-style-win7 .layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > span.layui-layer-close1:hover { + filter: contrast(1.3); + background-image: linear-gradient(hsla(0, 0%, 100%, 0.3), hsla(0, 0%, 100%, 0.3) 45%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, hsla(0, 0%, 100%, 0.5)) !important; +} +.elem-style-win7 .layui-layer-dialog { + border-radius: 20px; +} +.elem-style-win7 .layui-layer-iframe { + border-radius: 20px; +} +.elem-style-win7 .layui-layer:not(.layui-layer-loading) .layui-layer-content { + background: #f0f0f0; + border: 1px solid rgba(0, 0, 0, 0.6); + box-shadow: 0 -1px 1px 0.5px #fff; + margin: 0 6px 0 6px; + padding: 6px; + border-bottom-width: 0; +} +.elem-style-win7 .layui-layer:not(.layui-layer-loading)::before { + background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, 0.7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, 0.4), rgba(0, 0, 0, 0.1), hsla(0, 0%, 100%, 0.2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, 0.1) 20%, rgba(0, 0, 0, 0.1) 50%, transparent 53%), #4580c4; + border-radius: 6px; + content: ""; + height: 100%; + position: absolute; + width: 100%; + z-index: -1; +} +.elem-style-win7 .layui-layer:not(.layui-layer-loading).layui-layer-iframe::before { + height: calc(100% + 20px); +} +.elem-style-win7 .layui-layer-easy .layui-layer-btn { + background: #f0f0f0; + border: 1px solid rgba(0, 0, 0, 0.6); + box-shadow: 0 0 1px 0.5px #fff; + margin: 0 6px 6px; + padding: 6px; + border-top: 0; + text-align: right !important; +} +.elem-style-win7 .layui-card { + border: 1px solid rgba(0, 0, 0, 0.6); + border-radius: 6px; + box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.6); + font: 9pt Segoe UI, sans-serif; + position: relative; + z-index: 0; +} +.elem-style-win7 .layui-card::before { + background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, 0.7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, 0.4), rgba(0, 0, 0, 0.1), hsla(0, 0%, 100%, 0.2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, 0.1) 20%, rgba(0, 0, 0, 0.1) 50%, transparent 53%), #4580c4; + border-radius: 6px; + content: ""; + height: 100%; + position: absolute; + width: 100%; + z-index: -1; +} +.elem-style-win7 .layui-card .layui-card-header { + align-items: center; + background: linear-gradient(90deg, hsla(0, 0%, 100%, 0.4), rgba(0, 0, 0, 0.1), hsla(0, 0%, 100%, 0.2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, 0.1) 20%, rgba(0, 0, 0, 0.1) 50%, transparent 53%), #4580c4; + border-radius: 6px 6px 0 0; + font: 9pt Segoe UI, sans-serif; + justify-content: space-between; + padding: 6px; + border: 0; + box-shadow: inset 0 0.5px #fff; + height: 15px; + color: #000; + letter-spacing: 0; + line-height: 15px; + text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff; +} +.elem-style-win7 .layui-card .layui-card-body { + background: #f0f0f0; + border: 1px solid rgba(0, 0, 0, 0.6); + box-shadow: 0 0 1px 0.5px #fff; + margin: 0 6px 6px; + padding: 6px; +} +.elem-style-win7 .layui-tab-brief > .layui-tab-title .layui-this { + color: #222; +} +.elem-style-win7 .layuimini-tab .layui-tab-control > li { + height: 27px !important; + line-height: 27px !important; +} +.elem-style-win7 .layui-form-checkbox[lay-skin=primary] i { + background: #ddd; + border: 1px solid #888; + box-shadow: inset 0 0 0 1.5px #eee, inset 0 2px 4px #888, inset -2px -3px 4px #fff; + box-sizing: border-box; + content: ""; + display: inline-block; + height: 13px; + margin-right: 6px; + width: 13px; + color: transparent; +} +.elem-style-win7 .layui-form-checked[lay-skin=primary] i { + color: #16638f; + border-color: #888; + display: block; + font-weight: 700; + position: absolute; +} +.elem-style-win7 .layui-form-checked[lay-skin=primary] i::before { + font-size: 14px; +} +.elem-style-win7 .layui-form-radio:hover *, +.elem-style-win7 .layui-form-radioed, +.elem-style-win7 .layui-form-radioed > i { + color: #16638f; +} +.elem-style-win7 .layui-input { + background-color: #fff; + border: 1px solid #ccc; + border-top-color: rgb(204, 204, 204); + border-radius: 2px; + border-top-color: #888; + box-sizing: border-box; + font: 9pt Segoe UI, sans-serif; + padding: 3px 4px 5px; +} +.elem-style-win7 .layui-input, +.elem-style-win7 .layui-select, +.elem-style-win7 .layui-textarea { + height: unset; +} +.elem-style-win7 .layui-form-label { + padding: 3px 15px; + font: 9pt Segoe UI, sans-serif; +} +.elem-style-win7 .layuimini-form > .layui-form-item .required::after { + top: 2px; +} +.elem-style-win7 .form-search .layui-input-inline input, +.elem-style-win7 .form-search .layui-input-inline select { + height: unset; + line-height: unset; +} +.elem-style-win7 .form-search .layui-form-label { + height: unset; + background: unset; + text-align: right; + border: unset; +} +.elem-style-win7 .layuimini-upload-btn .layui-btn, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layui-form-radio, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layui-form-checkbox, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-form-select .elem-style-win7 .layuimini-upload-btn dl, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layui-nav .elem-style-win7 .layuimini-upload-btn .layui-nav-item, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layui-header .elem-style-win7 .layuimini-upload-btn .layuimini-header-menu > .layui-nav-item, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item .elem-style-win7 .layuimini-upload-btn a, +.elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item .elem-style-win7 .layuimini-upload-btn a, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-side.layui-bg-black, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layui-side.layui-bg-black, +.elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layuimini-menu-left-zoom > ul, +.elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layuimini-menu-left-zoom > ul, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layuimini-qiuck-module, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .panel, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .panel, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-card, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layui-card, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layui-layer, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .elem-style-win7 .layuimini-upload-btn .layuimini-main, .elem-style-win7 .layuimini-upload-btn .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .layui-table-tool .elem-style-win7 .layuimini-upload-btn .layui-inline[lay-event], .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-win7 .layuimini-upload-btn a, .elem-style-win7 .layuimini-upload-btn .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-win7 .layuimini-upload-btn .layui-inline[lay-event], .elem-style-win7 .layuimini-upload-btn .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-win7 .layuimini-upload-btn span, .elem-style-win7 .layuimini-upload-btn .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-win7 .layuimini-upload-btn span, .elem-style-win7 .layuimini-upload-btn .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-win7 .layuimini-upload-btn li, .elem-style-win7 .layuimini-upload-btn .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-win7 .layuimini-upload-btn .layuimini-header-menu > li.layui-nav-item, .elem-style-win7 .layuimini-upload-btn .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-win7 .layuimini-upload-btn .layui-inline[lay-event], .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-win7 .layuimini-upload-btn a, .elem-style-win7 .layuimini-upload-btn .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .layuimini-upload-btn a { + height: 25px; + line-height: 25px; +} + +.elem-style-neomorphic { + background-color: #EBECF0; +} +.elem-style-neomorphic .layui-layout-admin .layui-header { + background-color: #EBECF0 !important; +} +.elem-style-neomorphic .layuimini-container .layui-btn-success { + color: #4bb368; +} +.elem-style-neomorphic .layuimini-container .layui-btn-danger { + color: #f56c6c; +} +.elem-style-neomorphic .layuimini-container .layuimini-btn-primary { + color: #2c3e50; +} +.elem-style-neomorphic .layuimini-container .layui-btn-primary { + color: #5f5f5f; +} +.elem-style-neomorphic .layuimini-container .layui-btn-normal { + color: #1e9fff; +} +.elem-style-neomorphic .layui-btn, .elem-style-neomorphic .layui-form-radio, .elem-style-neomorphic .layui-form-checkbox, .elem-style-neomorphic .layui-form-select dl, .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item, .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a, .elem-style-neomorphic .layui-side.layui-bg-black, +.elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .layuimini-menu-left-zoom > ul, .elem-style-neomorphic .layuimini-qiuck-module, .elem-style-neomorphic .panel, .elem-style-neomorphic .layui-card, .elem-style-neomorphic .layui-layer, .elem-style-neomorphic .layuimini-main, .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event], .elem-style-neomorphic .elem-style-sicfi .layui-layer-easy .layui-layer-btn a, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-neomorphic a, .elem-style-neomorphic .elem-style-gtk .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-neomorphic .layui-inline[lay-event], .elem-style-neomorphic .elem-style-gtk .laydate-footer-btns span, .elem-style-gtk .laydate-footer-btns .elem-style-neomorphic span, .elem-style-neomorphic .elem-style-gtk .layui-laydate-footer span, .elem-style-gtk .layui-laydate-footer .elem-style-neomorphic span, .elem-style-neomorphic .elem-style-gtk .layui-tab-brief > .layui-tab-title li, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-neomorphic li, .elem-style-neomorphic .elem-style-gtk .layuimini-header-menu > li.layui-nav-item, .elem-style-gtk .elem-style-neomorphic .layuimini-header-menu > li.layui-nav-item, .elem-style-neomorphic .elem-style-nes .layuimini-container .layui-table-tool .layui-inline[lay-event], .elem-style-nes .layuimini-container .layui-table-tool .elem-style-neomorphic .layui-inline[lay-event], .elem-style-neomorphic .elem-style-nes .layui-layer-easy .layui-layer-btn a, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-neomorphic a, .elem-style-neomorphic .elem-style-win7 .layui-layer-easy .layui-layer-btn a, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-neomorphic a { + border: 0; + outline: 0; + border-radius: 10px; + background-color: #EBECF0; + text-shadow: 1px 1px 0 #FFF; + color: #61677C; + box-shadow: -5px -5px 20px #FFF, 5px 5px 20px #BABECC; + transition: all 0.2s ease-in-out; + cursor: pointer; + font-weight: 600; +} +.elem-style-neomorphic .layui-btn:hover, .elem-style-neomorphic .layui-form-radio:hover, .elem-style-neomorphic .layui-form-checkbox:hover, .elem-style-neomorphic .layui-form-select dl:hover, .elem-style-neomorphic .layui-header .layui-nav .layui-nav-item:hover, .elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item:hover, .elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .elem-style-neomorphic .layui-side.layui-bg-black:hover, +.elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom > ul:hover, .elem-style-neomorphic .layuimini-qiuck-module:hover, .elem-style-neomorphic .panel:hover, .elem-style-neomorphic .layui-card:hover, .elem-style-neomorphic .layui-layer:hover, .elem-style-neomorphic .layuimini-main:hover, .elem-style-neomorphic .layui-table-tool .layui-inline[lay-event]:hover, .elem-style-neomorphic .elem-style-sicfi .layui-layer-easy .layui-layer-btn a:hover, .elem-style-sicfi .layui-layer-easy .layui-layer-btn .elem-style-neomorphic a:hover, .elem-style-gtk .layuimini-container .layui-table-tool .elem-style-neomorphic .layui-inline[lay-event]:hover, .elem-style-neomorphic .elem-style-gtk .laydate-footer-btns span:hover, .elem-style-gtk .laydate-footer-btns .elem-style-neomorphic span:hover, .elem-style-neomorphic .elem-style-gtk .layui-laydate-footer span:hover, .elem-style-gtk .layui-laydate-footer .elem-style-neomorphic span:hover, .elem-style-neomorphic .elem-style-gtk .layui-tab-brief > .layui-tab-title li:hover, .elem-style-gtk .layui-tab-brief > .layui-tab-title .elem-style-neomorphic li:hover, .elem-style-neomorphic .elem-style-gtk .layuimini-header-menu > li.layui-nav-item:hover, .elem-style-gtk .elem-style-neomorphic .layuimini-header-menu > li.layui-nav-item:hover, .elem-style-nes .layuimini-container .layui-table-tool .elem-style-neomorphic .layui-inline[lay-event]:hover, .elem-style-neomorphic .elem-style-nes .layui-layer-easy .layui-layer-btn a:hover, .elem-style-nes .layui-layer-easy .layui-layer-btn .elem-style-neomorphic a:hover, .elem-style-neomorphic .elem-style-win7 .layui-layer-easy .layui-layer-btn a:hover, .elem-style-win7 .layui-layer-easy .layui-layer-btn .elem-style-neomorphic a:hover { + box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC; +} +.elem-style-neomorphic .layuimini-main { + text-shadow: 0.5px 0.5px 0 #fff; +} +.elem-style-neomorphic .layui-layer-easy .layui-layer-title { + background-color: transparent !important; + color: #61677C !important; +} +.elem-style-neomorphic .layui-layer-easy .layui-layer-setwin > span { + color: #61677C !important; +} +.elem-style-neomorphic .layui-layer-easy .layui-layer-setwin > span::before { + border-color: #61677C !important; +} +.elem-style-neomorphic .layui-layer-easy .layui-layer-setwin > span::after { + border-color: #61677C !important; +} +.elem-style-neomorphic .layui-layer-easy .layui-layer-setwin .layui-layer-min::before { + background-color: #61677C !important; +} +.elem-style-neomorphic .layui-card { + text-shadow: 0.5px 0.5px 0 #fff; +} +.elem-style-neomorphic .layuimini-container .layui-table-tool { + background-color: transparent; +} +.elem-style-neomorphic .layui-table { + background-color: #EBECF0; +} +.elem-style-neomorphic .panel { + text-shadow: 0.5px 0.5px 0 #fff; +} +.elem-style-neomorphic .layuimini-qiuck-module i { + background-color: transparent; +} +.elem-style-neomorphic .layui-side.layui-bg-black, +.elem-style-neomorphic .layui-side.layui-bg-black > .layuimini-menu-left > ul, +.elem-style-neomorphic .layuimini-menu-left-zoom > ul { + background-color: #EBECF0 !important; + border-radius: 0; +} +.elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover { + box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC; +} +.elem-style-neomorphic .layui-nav-tree .layui-nav-item { + margin: 10px; + width: calc(100% - 20px); +} +.elem-style-neomorphic .layuimini-menu-left .layui-nav-itemed > .layui-nav-child { + background-color: transparent !important; +} +.elem-style-neomorphic .layui-nav-tree .layui-nav-child dd { + margin: 10px; + width: calc(100% - 20px); +} +.elem-style-neomorphic .layuimini-menu-left .layui-nav-tree .layui-this, +.elem-style-neomorphic .layuimini-menu-left .layui-nav-tree .layui-this > a, +.elem-style-neomorphic .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, +.elem-style-neomorphic .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav-tree .layui-this, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: inherit !important; +} +.elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-nav-item a:hover, +.elem-style-neomorphic .layuimini-menu-left .layui-nav .layui-this a, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, +.elem-style-neomorphic .layuimini-menu-left-zoom.layui-nav .layui-this a { + color: #61677C !important; +} +.elem-style-neomorphic .layui-layout-admin .layuimini-logo { + background-color: transparent !important; +} +.elem-style-neomorphic .layui-header .layuimini-header-menu > .layui-nav-item { + margin: 10px; + line-height: 40px !important; + height: 40px !important; +} +.elem-style-neomorphic .layui-header .layui-nav .layui-nav-item { + margin: 10px; + line-height: 40px !important; + height: 40px !important; +} +.elem-style-neomorphic .layui-btn-xs { + padding: 0 9px; +} +.elem-style-neomorphic .layui-input, +.elem-style-neomorphic .layui-textarea { + border: 0; + outline: 0; + font-size: 16px; + border-radius: 320px; + padding: 16px; + background-color: #EBECF0; + text-shadow: 1px 1px 0 #FFF; + margin-right: 8px; + box-shadow: inset 2px 2px 5px #BABECC, inset -5px -5px 10px #FFF; + width: 100%; + box-sizing: border-box; + transition: all 0.2s ease-in-out; + -moz-appearance: none; + appearance: none; + -webkit-appearance: none; +} +.elem-style-neomorphic .layuimini-upload .layuimini-upload-btn { + background-color: transparent !important; +} +.elem-style-neomorphic .layui-form-pane .layui-form-label { + background-color: transparent; + text-align: right; +} +.elem-style-neomorphic .layuimini-container .layui-form-select dl dd.layui-this { + background-color: transparent !important; + color: #2c3e50; +} +.elem-style-neomorphic .layuimini-color .elem-content li.layui-this { + text-shadow: 0.5px 0.5px 0 #FFF; +} +.elem-style-neomorphic .layui-form-checkbox { + padding: 10px 10px 10px 24px; +} +.elem-style-neomorphic .layui-form-checkbox > i { + left: 6px; + top: 10px; + text-shadow: 0.5px 0.5px 0 #fff; +} +.elem-style-neomorphic .layui-form-checked:hover > div, +.elem-style-neomorphic .layui-form-checked > div { + color: #16b777; +} +.elem-style-neomorphic .layui-tree .layui-form-checkbox[lay-skin=primary], +.elem-style-neomorphic .laytable-cell-checkbox .layui-form-checkbox[lay-skin=primary] { + padding: 13px; +} +.elem-style-neomorphic .layui-tree .layui-form-checkbox[lay-skin=primary] > i, +.elem-style-neomorphic .laytable-cell-checkbox .layui-form-checkbox[lay-skin=primary] > i { + left: 5px; + top: 5px; +} +.elem-style-neomorphic .layui-tree-txt { + margin-left: 10px; +} +.elem-style-neomorphic .layui-form-radio:hover > *, +.elem-style-neomorphic .layui-form-radioed, +.elem-style-neomorphic .layui-form-radioed > i { + color: #16b777; +} +.elem-style-neomorphic .layui-table-tips-c { + text-shadow: 0.5px 0.5px 0 #fff; +} +.elem-style-neomorphic .layuimini-tab .layui-tab-title { + background-color: #EBECF0; +} +.elem-style-neomorphic .layuimini-tab .layui-tab-control > li { + background-color: #EBECF0; +} + +@font-face { + font-family: "ark-pixel"; + src: url("./nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf") format("truetype"), url("./nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf") format("truetype"), url("./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf") format("truetype"), url("./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf") format("truetype"), url("./nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf") format("truetype"), url("./nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf") format("truetype"), url("./nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf") format("truetype"); +} + +/**暗黑主题**/ +:root{ + /* =====色板===== */ + /*常量,不随明暗主题变化*/ + --color-white: #FFFFFF; + --color-black: #000000; + + --lay-color-white: #FAFAFA; + --lay-color-black: #333333; + + --lay-color-red-1: #FFF1E8; + --lay-color-red-2: #FFD7C0; + --lay-color-red-3: #FFBB99; + --lay-color-red-4: #FF9C71; + --lay-color-red-5: #FF7A4A; + --lay-color-red-6: #FF5722; + --lay-color-red-7: #D23B15; + --lay-color-red-8: #A6250B; + --lay-color-red-9: #791404; + --lay-color-red-10: #4D0800; + + --lay-color-blue-1: #E8F9FF; + --lay-color-blue-2: #C0ECFF; + --lay-color-blue-3: #97DCFF; + --lay-color-blue-4: #6FCAFF; + --lay-color-blue-5: #46B5FF; + --lay-color-blue-6: #1E9FFF; + --lay-color-blue-7: #1379D2; + --lay-color-blue-8: #0A58A6; + --lay-color-blue-9: #043A79; + --lay-color-blue-10: #00214D; + + --lay-color-lightblue-1: #E8FDFF; + --lay-color-lightblue-2: #C1F4FB; + --lay-color-lightblue-3: #9CEAF7; + --lay-color-lightblue-4: #77DDF4; + --lay-color-lightblue-5: #53CEF0; + --lay-color-lightblue-6: #31BDEC; + --lay-color-lightblue-7: #1F95C4; + --lay-color-lightblue-8: #10709C; + --lay-color-lightblue-9: #064E74; + --lay-color-lightblue-10: #002F4D; + + --lay-color-layuigreen-1: #E8FFF9; + --lay-color-layuigreen-2: #B5F1E3; + --lay-color-layuigreen-3: #87E3D1; + --lay-color-layuigreen-4: #5DD6C1; + --lay-color-layuigreen-5: #37C8B5; + --lay-color-layuigreen-6: #16BAAA; + --lay-color-layuigreen-7: #0E9F95; + --lay-color-layuigreen-8: #08837F; + --lay-color-layuigreen-9: #036868; + --lay-color-layuigreen-10: #004A4D; + + --lay-color-green-1: #E8FFF2; + --lay-color-green-2: #B5F1D1; + --lay-color-green-3: #86E2B4; + --lay-color-green-4: #5CD49C; + --lay-color-green-5: #37C588; + --lay-color-green-6: #16B777; + --lay-color-green-7: #0E9C68; + --lay-color-green-8: #088259; + --lay-color-green-9: #036749; + --lay-color-green-10: #004D38; + + --lay-color-orange-1: #FFFCE8; + --lay-color-orange-2: #FFF5BA; + --lay-color-orange-3: #FFEA8B; + --lay-color-orange-4: #FFDC5D; + --lay-color-orange-5: #FFCB2E; + --lay-color-orange-6: #FFB800; + --lay-color-orange-7: #D29000; + --lay-color-orange-8: #A66C00; + --lay-color-orange-9: #794B00; + --lay-color-orange-10: #4D2D00; + + --lay-color-cyan-1: #E8F6FF; + --lay-color-cyan-2: #B9CEDD; + --lay-color-cyan-3: #8FA7BB; + --lay-color-cyan-4: #6A829A; + --lay-color-cyan-5: #4A5F78; + --lay-color-cyan-6: #2F4056; + --lay-color-cyan-7: #223654; + --lay-color-cyan-8: #162C51; + --lay-color-cyan-9: #0B214F; + --lay-color-cyan-10: #00174D; + + --lay-color-purple-1: #FDE8FF; + --lay-color-purple-2: #EDBEF4; + --lay-color-purple-3: #DC97E8; + --lay-color-purple-4: #C972DD; + --lay-color-purple-5: #B651D1; + --lay-color-purple-6: #A233C6; + --lay-color-purple-7: #8120A8; + --lay-color-purple-8: #631289; + --lay-color-purple-9: #48076B; + --lay-color-purple-10: #2F004D; + + --lay-color-black-1: #E8F8FF; + --lay-color-black-2: #BFD0D8; + --lay-color-black-3: #98A8B1; + --lay-color-black-4: #73818A; + --lay-color-black-5: #505B63; + --lay-color-black-6: #2F363C; + --lay-color-black-7: #23303C; + --lay-color-black-8: #18293C; + --lay-color-black-9: #0C213C; + --lay-color-black-10: #00183C; + + --lay-color-gray-1: #FAFAFA; + --lay-color-gray-2: #F6F6F6; + --lay-color-gray-3: #EEEEEE; + --lay-color-gray-4: #E2E2E2; + --lay-color-gray-5: #DDDDDD; + --lay-color-gray-6: #D2D2D2; + --lay-color-gray-7: #CCCCCC; + --lay-color-gray-8: #C2C2C2; + --lay-color-gray-9: #AAAAAA; + --lay-color-gray-10: #939393; + + --lay-color-gray-11: #858585; + --lay-color-gray-12: #7b7b7b; + --lay-color-gray-13: #686868; + + /* =====语义===== */ + /* 主色 */ + --lay-color-primary: var(--lay-color-layuigreen-6); + --lay-color-primary-hover: var(--lay-color-layuigreen-5); + --lay-color-primary-active: var(--lay-color-layuigreen-7); + --lay-color-primary-disabled: var(--lay-color-layuigreen-3); + --lay-color-primary-light: var(--lay-color-layuigreen-4); + + /* 次色 */ + --lay-color-secondary: var(--lay-color-green-6); + --lay-color-secondary-hover: var(--lay-color-green-5); + --lay-color-secondary-active: var(--lay-color-green-7); + --lay-color-secondary-disabled: var(--lay-color-green-3); + --lay-color-secondary-light: var(--lay-color-green-4); + + /* 引导 */ + --lay-color-info: var(--lay-color-lightblue-6); + --lay-color-info-hover: var(--lay-color-lightblue-5); + --lay-color-info-active: var(--lay-color-lightblue-7); + --lay-color-info-disabled: var(--lay-color-lightblue-3); + --lay-color-info-light: var(--lay-color-lightblue-4); + + /* 百搭 */ + --lay-color-normal: var(--lay-color-blue-6); + --lay-color-normal-hover: var(--lay-color-blue-5); + --lay-color-normal-active: var(--lay-color-blue-7); + --lay-color-normal-disabled: var(--lay-color-blue-3); + --lay-color-normal-light: var(--lay-color-blue-4); + + /* 警示 */ + --lay-color-warning: var(--lay-color-orange-6); + --lay-color-warning-hover: var(--lay-color-orange-5); + --lay-color-warning-active: var(--lay-color-orange-7); + --lay-color-warning-disabled: var(--lay-color-orange-3); + --lay-color-warning-light: var(--lay-color-orange-4); + + /* 成功 */ + --lay-color-success: var(--lay-color-green-6); + --lay-color-success-hover: var(--lay-color-green-5); + --lay-color-success-active: var(--lay-color-green-7); + --lay-color-success-disabled: var(--lay-color-green-3); + --lay-color-success-light: var(--lay-color-green-4); + + /* 错误 */ + --lay-color-danger: var(--lay-color-red-6); + --lay-color-danger-hover: var(--lay-color-red-5); + --lay-color-danger-active: var(--lay-color-red-7); + --lay-color-danger-disabled: var(--lay-color-red-3); + --lay-color-danger-light: var(--lay-color-red-4); + + --lay-color-bg-1: #17171A; /*整体背景*/ + --lay-color-bg-2: #232324; /*一级容器背景,卡片,面板*/ + --lay-color-bg-3: #2a2a2b; /*二级容器背景*/ + --lay-color-bg-4: #313132; /*三级容器背景*/ + --lay-color-bg-5: #373739; /*下拉弹出框、Tooltip 背景颜色*/ + --lay-color-bg-white: #f6f6f6; /*白色背景*/ + + --lay-color-text-1: rgba(255,255,255,.9); /*强调/正文标题*/ + --lay-color-text-2: rgba(255,255,255,.7); /*次强调/语句*/ + --lay-color-text-3: rgba(255,255,255,.5); /*次要信息*/ + --lay-color-text-4: rgba(255,255,255,.3);/*禁用状态文字 */ + + --lay-color-border-1: #2e2e30; + --lay-color-border-2: #484849; + --lay-color-border-3: #5f5f60; + --lay-color-border-4: #929293; + + --lay-color-fill-1: rgba(255,255,255,.04);/*浅/禁用*/ + --lay-color-fill-2: rgba(255,255,255,.08);/*常规/白底悬浮*/ + --lay-color-fill-3: rgba(255,255,255,.12); /*深/灰底悬浮*/ + --lay-color-fill-4: rgba(255,255,255,.16);/*重/特殊场景*/ + + --lay-color-hover: var(--lay-color-fill-3); /*bg*/ + --lay-color-active: var(--lay-color-fill-3); /*bg*/ + + --lay-shadow-1: 0 4px 6px rgba(0, 0, 0, 6%), 0 1px 10px rgba(0, 0, 0, 8%), 0 2px 4px rgba(0, 0, 0, 12%);/*基础/下层投影 卡片面板*/ + --lay-shadow-2: 0 8px 10px rgba(0, 0, 0, 12%), 0 3px 14px rgba(0, 0, 0, 10%), 0 5px 5px rgba(0, 0, 0, 16%);/*中层投影 下拉菜单,选择器*/ + --lay-shadow-3: 0 16px 24px rgba(0, 0, 0, 14%), 0 6px 30px rgba(0, 0, 0, 12%), 0 8px 10px rgba(0, 0, 0, 20%);/*上层投影 弹窗*/ +} +.elem-style-dark blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{-webkit-tap-highlight-color: rgba(0, 0, 0, 0)} /*danger: 勿改*/ +.elem-style-dark body{color:var(--lay-color-text-2)!important;background-color: var(--lay-color-bg-1) !important; color-scheme: dark;} +.elem-style-dark hr{border-bottom:1px solid var(--lay-color-border-2)!important} +.elem-style-dark a{color:var(--lay-color-text-1);} +.elem-style-dark a:hover{color:var(--lay-color-text-3)} +/* 三角形 */ +.elem-style-dark .layui-edge{border-color:transparent} +.elem-style-dark .layui-edge-top{border-bottom-color:var(--lay-color-border-4)} +.elem-style-dark .layui-edge-right{border-left-color:var(--lay-color-border-4)} +.elem-style-dark .layui-edge-bottom{border-top-color:var(--lay-color-border-4)} +.elem-style-dark .layui-edge-left{border-right-color:var(--lay-color-border-4)} +/* 禁用文字 */ +.elem-style-dark .layui-disabled,.layui-disabled:hover{color:var(--lay-color-text-4)!important} +/* 图标 */ +.elem-style-dark .layui-icon{-moz-osx-font-smoothing:grayscale} +/* admin 布局 */ +.elem-style-dark .layui-layout-admin .layui-header{background-color:var(--lay-color-bg-2)} +.elem-style-dark .layui-layout-admin .layui-footer{box-shadow:-1px 0 4px rgb(0 0 0 / 12%);background-color:var(--lay-color-bg-2)} +.elem-style-dark .layui-layout-admin .layui-logo{color:var(--lay-color-primary);box-shadow:0 1px 2px 0 rgb(0 0 0 / 15%)} +/* 引用 */ +.elem-style-dark .layui-elem-quote{border-left:5px solid var(--lay-color-secondary);background-color:var(--lay-color-fill-1)} +.elem-style-dark .layui-quote-nm{border-color: var(--lay-color-fill-1)} +/* 进度条 */ +.elem-style-dark .layui-progress{background-color: var(--lay-color-bg-3)} +.elem-style-dark .layui-progress-bar{background-color:var( --lay-color-secondary)} +.elem-style-dark .layui-progress-text{color:var(--lay-color-text-2)} +.elem-style-dark .layui-progress-big .layui-progress-text{color: var(--lay-color-text-1)} +/* 折叠面板 */ +.elem-style-dark .layui-colla-title{color: var(--lay-color-text-1);background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-colla-content{color:var(--lay-color-text-2)} +/* 卡片面板 */ +.elem-style-dark .layui-card{background-color: var(--lay-color-bg-2);box-shadow:var(--lay-shadow-1)} +.elem-style-dark .layui-card-header{border-bottom:1px solid var(--lay-color-border-2);color:var(--lay-color-text-1)} +/* 常规面板 */ +.elem-style-dark .layui-panel{box-shadow:var(--lay-shadow-1);background-color: var( --lay-color-bg-2);color: var(--lay-color-text-1)} +.elem-style-dark .layui-menu-body-panel{box-shadow: var(--lay-shadow-2)} +/* 窗口面板 */ +.elem-style-dark .layui-panel-window{border-top:5px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-2)} +/* 背景颜色 */ +.elem-style-dark .layui-bg-red{background-color:var(--lay-color-red-6)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-bg-orange{background-color:var(--lay-color-orange-6)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-bg-green{background-color:var(--lay-color-layuigreen-6)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-bg-cyan{background-color:var(--lay-color-cyan-6)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-bg-blue{background-color: var(--lay-color-blue-6)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-bg-black{background-color:var(--lay-color-black-6)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-bg-purple{background-color: var(--lay-color-purple-6)!important; color: var(--lay-color-white)!important;} +.elem-style-dark .layui-bg-gray{background-color:var(--lay-color-gray-1)!important;color: var(--lay-color-black-6)!important} +/* 徽章 */ +.elem-style-dark .layui-badge-rim{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-border{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-colla-content{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-colla-item{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-collapse{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-elem-field{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-form-pane .layui-form-item[pane]{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-form-pane .layui-form-label{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-input{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-input-split{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-panel{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-select{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-tab-bar{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-tab-card{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-tab-title{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-tab-title .layui-this:after{border-color: var(--lay-color-border-1)!important;} +.elem-style-dark .layui-textarea{border-color: var(--lay-color-border-1)!important;} +/* 边框颜色 */ +.elem-style-dark .layui-border{color:var(--lay-color-text-1)!important} +.elem-style-dark .layui-border-red{border-color:var(--lay-color-red-6)!important;color:var(--lay-color-red-6)!important} +.elem-style-dark .layui-border-orange{border-color:var(--lay-color-orange-6)!important;color:var(--lay-color-orange-6)!important} +.elem-style-dark .layui-border-green{border-color:var(--lay-color-layuigreen-6)!important;color:var(--lay-color-layuigreen-6)!important} +.elem-style-dark .layui-border-cyan{border-color:var(--lay-color-cyan-6)!important;color:var(--lay-color-cyan-6)!important} +.elem-style-dark .layui-border-blue{border-color: var(--lay-color-blue-6)!important;color: var(--lay-color-blue-6)!important} +.elem-style-dark .layui-border-purple{border-color: var(--lay-color-purple-6)!important; color: var(--lay-color-purple-6)!important;} +.elem-style-dark .layui-border-black{border-color:var(--lay-color-black-6)!important;color:var(--lay-color-text-1)!important} +/* 文本区域 */ +.elem-style-dark .layui-text{color:var(--lay-color-text-3)} +.elem-style-dark .layui-text h1{color: var(--lay-color-text-2)} +.elem-style-dark .layui-text h2{color: var(--lay-color-text-2)} +.elem-style-dark .layui-text h3{color: var(--lay-color-text-2)} +.elem-style-dark .layui-text h4{color: var(--lay-color-text-2)} +.elem-style-dark .layui-text h5{color: var(--lay-color-text-2)} +.elem-style-dark .layui-text h6{color: var(--lay-color-text-2)} +.elem-style-dark .elem-style-dark .layui-text-em{color: var(--lay-color-text-2)!important} +.elem-style-dark .layui-word-aux{color: var(--lay-color-text-2)!important} +.elem-style-dark .layui-text a:not(.layui-btn){color:var(--lay-color-lightblue-6)} +.elem-style-dark .layui-text blockquote:not(.layui-elem-quote){border-left:5px solid var(--lay-color-border-4)} +/* 字体颜色 */ +.elem-style-dark .layui-font-red{color:var(--lay-color-red-6)!important} +.elem-style-dark .layui-font-orange{color:var(--lay-color-orange-6)!important} +.elem-style-dark .layui-font-green{color:var(--lay-color-layuigreen-6)!important} +.elem-style-dark .layui-font-cyan{color:var(--lay-color-cyan-6)!important} +.elem-style-dark .layui-font-blue{color:var(--lay-color-lightblue-6)!important} +.elem-style-dark .layui-font-black{color:var(--lay-color-black)!important} +.elem-style-dark .layui-font-purple{color:var(--lay-color-purple-6)!important;} +.elem-style-dark .layui-font-gray{color:var(--lay-color-gray-7)!important} +/* 按钮 */ +.elem-style-dark .layui-btn{border:1px solid transparent;background-color:var(--lay-color-primary);color: var(--lay-color-text-1)} +.elem-style-dark .layui-btn:hover{color: var(--lay-color-text-2)} +.elem-style-dark .layui-btn-primary{border-color:var(--lay-color-border-2);color:var(--lay-color-text-1);background-color: var(--lay-color-bg-4)} +.elem-style-dark .layui-btn-primary:hover{border-color: transparent;color:var(--lay-color-text-2)} +.elem-style-dark .layui-btn-normal{background-color: var(--lay-color-normal)} +.elem-style-dark .layui-btn-warm{background-color:var(--lay-color-warning)} +.elem-style-dark .layui-btn-danger{background-color:var(--lay-color-danger)} +.elem-style-dark .layui-btn-checked{background-color:var(--lay-color-success)} +.elem-style-dark .layui-btn-disabled{border-color: var(--lay-color-border-2)!important;background-color: var(--lay-color-bg-2)!important;color: var(--lay-color-text-4)!important} +.elem-style-dark .layui-btn-disabled:active{border-color: var(--lay-color-border-2)!important;background-color: var(--lay-color-bg-2)!important;color: var(--lay-color-text-4)!important} +.elem-style-dark .layui-btn-disabled:hover{border-color: var(--lay-color-border-2)!important;background-color: var(--lay-color-bg-2)!important;color: var(--lay-color-text-4)!important} +.elem-style-dark .layui-btn-group .layui-btn{border-left:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-btn-group .layui-btn-primary:hover{border-color:var(--lay-color-border-2);color:var(--lay-color-primary)} +.elem-style-dark .layui-btn-group .layui-btn-primary:first-child{border-left:1px solid var(--lay-color-gray-5)} +/*表单*/ +.elem-style-dark .layui-input{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-select{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-textarea{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-input:hover{border-color: var(--lay-color-border-2)!important} +.elem-style-dark .layui-textarea:hover{border-color: var(--lay-color-border-2)!important} +.elem-style-dark .layui-input:focus{border-color: var(--lay-color-secondary-hover)!important;background-color: var(--lay-color-bg-2);box-shadow: 0 0 0 3px rgba(22, 183, 119, 0.08);} +.elem-style-dark .layui-textarea:focus{border-color: var(--lay-color-secondary-hover)!important;background-color: var(--lay-color-bg-2);box-shadow: 0 0 0 3px rgba(22, 183, 119, 0.08);} +.elem-style-dark .layui-input[disabled]{background-color: var(--lay-color-fill-1);color: var(--lay-color-text-4);border-color: var(--lay-color-border-1)!important;box-shadow: 0 0 0 0;} +.elem-style-dark .layui-select[disabled]{background-color: var(--lay-color-fill-1);color: var(--lay-color-text-4);border-color: var(--lay-color-border-1)!important;box-shadow: 0 0 0 0;} +.elem-style-dark .layui-textarea[disabled]{background-color: var(--lay-color-fill-1);color: var(--lay-color-text-4);border-color: var(--lay-color-border-1)!important;box-shadow: 0 0 0 0;} +.elem-style-dark .layui-input.layui-disabled{background-color: var(--lay-color-fill-1);color: var(--lay-color-text-4);border-color: var(--lay-color-border-1)!important;box-shadow: 0 0 0 0;} +.elem-style-dark .layui-textarea.layui-disabled{background-color: var(--lay-color-fill-1);color: var(--lay-color-text-4);border-color: var(--lay-color-border-1)!important;box-shadow: 0 0 0 0;} +.elem-style-dark .layui-form-danger+.layui-form-select .layui-input{border-color:var(--lay-color-danger)!important;box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.08);} +.elem-style-dark .layui-form-danger:focus{border-color:var(--lay-color-danger)!important;box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.08);} +/* 输入框点缀 */ +.elem-style-dark .layui-input-prefix .layui-icon{color: var(--lay-color-gray-8)} +.elem-style-dark .layui-input-split .layui-icon{color: var(--lay-color-gray-8)} +.elem-style-dark .layui-input-suffix .layui-icon{color: var(--lay-color-gray-8)} +.elem-style-dark .layui-input-wrap .layui-input:hover+.layui-input-split{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-input-wrap .layui-input[disabled]:hover+.layui-input-split{border-color: var(--lay-color-border-1)} +.elem-style-dark .layui-input-wrap .layui-input:focus+.layui-input-split{border-color: var(--lay-color-secondary-hover)} +.elem-style-dark .layui-input-wrap .layui-input.layui-form-danger:focus + .layui-input-split{border-color: var(--lay-color-danger);} +.elem-style-dark .layui-input-affix .layui-icon{color: var(--lay-color-text-2)} +.elem-style-dark .layui-input-affix .layui-icon-clear{color:var(--lay-color-text-2)} +.elem-style-dark .layui-input-affix .layui-icon:hover{color:var(--lay-color-text-3)} +/* 数字输入框动态点缀 */ +.elem-style-dark .layui-input-wrap .layui-input-number .layui-icon-up{border-bottom-color:var(--lay-color-border-1)} +.elem-style-dark .layui-input-wrap .layui-input[type="number"].layui-input-number-out-of-range{color:var(--lay-color-danger)} +/* 下拉选择 */ +.elem-style-dark .layui-form-select{color:var(--lay-color-text-2)} +.elem-style-dark .layui-form-select .layui-edge{border-top-color:var(--lay-color-gray-8)} +.elem-style-dark .layui-form-select dl{border:1px solid var( --lay-color-border-2);background-color: var(--lay-color-bg-5);box-shadow:var(--lay-shadow-2)} +.elem-style-dark .layui-form-select dl dt{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-form-select dl dd:hover{background-color:var(--lay-color-active)} +.elem-style-dark .layui-form-select dl dd.layui-select-tips{color:var(--lay-color-text-2)} +.elem-style-dark .layui-form-select dl dd.layui-this{background-color: var(--lay-color-active);color: var(--lay-color-text-1)} +.elem-style-dark .layui-form-select dl dd.layui-disabled{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-form-select dl dd:hover.layui-disabled{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-select-none{color:var(--lay-color-black-8)} +.elem-style-dark .layui-select-disabled .layui-disabled{border-color:var(--lay-color-border-1)!important} +.elem-style-dark .layui-select-disabled .layui-edge{border-top-color:var(--lay-color-gray-6)} +/* 复选框 */ +.elem-style-dark .layui-form-checkbox{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-form-checkbox>div{background-color:var(--lay-color-fill-3);color:var(--lay-color-text-2)} +.elem-style-dark .layui-form-checkbox:hover>div{background-color: var(--lay-color-active)} +.elem-style-dark .layui-form-checkbox>i{background-color: var(--lay-color-fill-1);border-top-color:var(--lay-color-border-1);border-right-color:var(--lay-color-border-1);border-bottom-color:var(--lay-color-border-1);border-left-color:initial;color:var(--lay-color-text-1)} +.elem-style-dark .layui-form-checkbox:hover>i{border-color:var(--lay-color-border-2);color:var(--lay-color-text-4)} +.elem-style-dark .layui-form-checked,.layui-form-checked:hover{border-color:var(--lay-color-secondary-active)} +.elem-style-dark .layui-form-checked>div,.layui-form-checked:hover>div{background-color:var(--lay-color-secondary)} +.elem-style-dark .layui-form-checked>i,.layui-form-checked:hover>i{color:var(--lay-color-secondary-hover)} +.elem-style-dark .layui-form-checkbox.layui-checkbox-disabled>div{background-color: var(--lay-color-fill-3) !important;} +/* 复选框-默认风格 */ +.elem-style-dark .layui-form-checkbox[lay-skin=primary]{background-image:none;background-color:initial;border-color:initial!important} +.elem-style-dark .layui-form-checkbox[lay-skin=primary]>div{background-image:none;background-color:initial;color:var(--lay-color-text-2)} +.elem-style-dark .layui-form-checkbox[lay-skin=primary]>i{border-color:var(--lay-color-border-1);background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-form-checkbox[lay-skin=primary]:hover>i{border-color:var(--lay-color-secondary-hover);color:var(--lay-color-text-1)} +.elem-style-dark .layui-form-checked[lay-skin=primary]>i{background-color:var(--lay-color-secondary);color:var(--lay-color-text-1);border-color:var(--lay-color-secondary-active)!important} +.elem-style-dark .layui-checkbox-disabled[lay-skin=primary] >div{background:none!important;color:var(--lay-color-text-4)!important} +.elem-style-dark .layui-form-checked.layui-checkbox-disabled[lay-skin=primary]>i{background-color:var(--lay-color-fill-1)!important;border-color:var(--lay-color-border-2)!important} +.elem-style-dark .layui-checkbox-disabled[lay-skin=primary]:hover>i{border-color:var(--lay-color-border-1)} +.elem-style-dark .layui-form-checkbox[lay-skin="primary"]>.layui-icon-indeterminate:before{background-color: var(--lay-color-secondary-hover);opacity: 1;} +.elem-style-dark .layui-form-checkbox[lay-skin="primary"]:hover>.layui-icon-indeterminate:before{opacity: 1;} +.elem-style-dark .layui-form-checkbox[lay-skin="primary"]>.layui-icon-indeterminate{border-color: var(--lay-color-secondary-hover);} +/* 复选框-开关风格 */ +.elem-style-dark .layui-form-switch{border-color:var(--lay-color-border-2);background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-form-switch>i{background-color:var(--lay-color-gray-4)} +.elem-style-dark .layui-form-switch.layui-checkbox-disabled>i{background-color:var(--lay-color-gray-7);} +.elem-style-dark .layui-form-switch>div{color:var(--lay-color-gray-8)!important} +.elem-style-dark .layui-form-onswitch{border-color:var(--lay-color-secondary-active);background-color:var(--lay-color-secondary)} +.elem-style-dark .layui-form-onswitch>i{background-color:var(--lay-color-gray-4)} +.elem-style-dark .layui-form-onswitch>div{color:var(--lay-color-text-1)!important} +.elem-style-dark .layui-checkbox-disabled{border-color:var(--lay-color-border-2)!important} +.elem-style-dark .layui-checkbox-disabled>div{background-color:var(--lay-color-fill-3)!important;color: var(--lay-color-text-4)!important;} +.elem-style-dark .layui-checkbox-disabled>i{border-color:var(--lay-color-border-2)!important} +.elem-style-dark .layui-checkbox-disabled:hover>i{color:var(--lay-color-text-1)!important} +.elem-style-dark .layui-form-switch.layui-checkbox-disabled>div{background-color:initial!important;color: var(--lay-color-text-3)!important;} +/*复选框背景优化*/ +.elem-style-dark .layui-form-checkbox>i:before{opacity:0;filter:alpha(opacity=0)} +.elem-style-dark .layui-form-checkbox:hover>i:before{opacity:1;filter:alpha(opacity=100)} +.elem-style-dark .layui-form-checked.layui-checkbox-disabled:hover>i:before,.layui-form-checked:hover>i:before,.layui-form-checked>i:before{opacity:1;filter:alpha(opacity=100)} +.elem-style-dark .layui-form-checkbox[lay-skin=primary]:hover>i:before{opacity:0;filter:alpha(opacity=0)} +.elem-style-dark .layui-form-checked[lay-skin=primary]:hover>i:before{opacity:1;filter:alpha(opacity=100)} +.elem-style-dark .layui-checkbox-disabled:hover>i:before{opacity:0;filter:alpha(opacity=0)} +/*单选框*/ +.elem-style-dark .layui-form-radio>i{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-form-radio:hover>*,.layui-form-radioed,.layui-form-radioed>i{color:var(--lay-color-secondary)} +.elem-style-dark .layui-radio-disabled>i{color:var(--lay-color-text-4)!important} +.elem-style-dark .layui-radio-disabled>*{color:var(--lay-color-text-4)!important} +/* 表单方框风格 */ +.elem-style-dark .layui-form-pane .layui-form-label{background-color:var(--lay-color-bg-2)} +/** 分页 **/ +.elem-style-dark .layui-laypage a{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laypage button{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laypage input{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laypage select{border:1px solid var(--lay-color-border-2)} +/*.elem-style-dark .layui-laypage span{border:1px solid var(--lay-color-border-2)}*/ +.elem-style-dark .layui-laypage a{background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-laypage span{background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-laypage a[data-page]{color:var(--lay-color-text-2)} +.elem-style-dark .layui-laypage a:hover{color: var(--lay-color-primary)} +.elem-style-dark .layui-laypage .layui-laypage-spr{color:var(--lay-color-text-3)} +.elem-style-dark .layui-laypage .layui-laypage-curr em{color: var(--lay-color-white)} +.elem-style-dark .layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: var(--lay-color-primary)} +.elem-style-dark .layui-laypage .layui-laypage-skip{color:var(--lay-color-text-3)} +.elem-style-dark .layui-laypage button{background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-laypage input{background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-laypage input:focus{border-color: var(--lay-color-primary)!important} +.elem-style-dark .layui-laypage select:focus{border-color: var(--lay-color-primary)!important} +/** 流加载 **/ +.elem-style-dark .layui-flow-more{color:var(--lay-color-text-1)} +.elem-style-dark .layui-flow-more a cite{background-color: var(--lay-color-bg-4);color: var(--lay-color-text-1)} +.elem-style-dark .layui-flow-more a i{color:var(--lay-color-text-2)} +/** 表格 **/ +.elem-style-dark .layui-table{background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-table-mend{background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-table-click{background-color:var(--lay-color-fill-3)} +.elem-style-dark .layui-table-hover{background-color:var(--lay-color-fill-3)} +.elem-style-dark .layui-table[lay-even] tbody tr:nth-child(even){background-color:var(--lay-color-fill-3)} +.elem-style-dark .layui-table-checked{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-1)} +.elem-style-dark .layui-table-checked.layui-table-hover{background-color: var(--lay-color-fill-3);} +.elem-style-dark .layui-table-checked.layui-table-click{background-color: var(--lay-color-fill-3);} +.elem-style-dark .layui-table td{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table th{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-col-set{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-fixed-r{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-grid-down{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-header{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-mend{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-page{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-tips-main{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-tool{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-total{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-view{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table[lay-skin=line]{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table[lay-skin=row]{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-table-view .layui-table td[data-edit]:hover:after{border:1px solid var(--lay-color-primary-active)} +.elem-style-dark .layui-table-init{background-color: var(--lay-color-bg-2);} +.elem-style-dark .layui-table-init .layui-icon{color:var(--lay-color-gray-8);} +.elem-style-dark .layui-table-page{background-color: var(--lay-color-bg-2);} +.elem-style-dark .layui-table-tool{background-color: var(--lay-color-bg-2);} +.elem-style-dark .layui-table-tool .layui-inline[lay-event]{color:var(--lay-color-text-3);border:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-table-tool .layui-inline[lay-event]:hover{border:1px solid var(--lay-color-border-3)} +.elem-style-dark .layui-table-tool-panel{color: var(--lay-color-text-1); border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-5);box-shadow:var(--lay-shadow-2)} +.elem-style-dark .layui-table-tool-panel li:hover{background-color:var(--lay-color-active)} +.elem-style-dark .layui-table-col-set{background-color: var(--lay-color-white)} +.elem-style-dark .layui-table-sort .layui-table-sort-asc{border-bottom-color:var(--lay-color-gray-8)} +.elem-style-dark .layui-table-sort .layui-table-sort-asc:hover{border-bottom-color:var(--lay-color-gray-11)} +.elem-style-dark .layui-table-sort .layui-table-sort-desc{border-top-color:var(--lay-color-gray-8)} +.elem-style-dark .layui-table-sort .layui-table-sort-desc:hover{border-top-color:var(--lay-color-gray-11)} +.elem-style-dark .layui-table-sort[lay-sort=asc] .layui-table-sort-asc{border-bottom-color:var(--lay-color-gray-13)} +.elem-style-dark .layui-table-sort[lay-sort=desc] .layui-table-sort-desc{border-top-color:var(--lay-color-gray-13)} +.elem-style-dark .layui-table-cell .layui-table-link{color: var(--lay-color-lightblue-5)} +.elem-style-dark .layui-table-body .layui-none{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-table-fixed-l{box-shadow:1px 0 8px rgba(0,0,0,1)} +.elem-style-dark .layui-table-fixed-r{box-shadow:-1px 0 8px rgba(0,0,0,1)} +.elem-style-dark .layui-table-edit{box-shadow:var(--lay-shadow-1);background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-table-edit:focus{border-color:var(--lay-color-secondary)!important} +.elem-style-dark select.layui-table-edit{border-color:var(--lay-color-border-2)} +.elem-style-dark .layui-table-grid-down{background-color: var(--lay-color-bg-5);color:var(--lay-color-gray-8)} +.elem-style-dark .layui-table-grid-down:hover{background-color:var(--lay-color-bg-5)} +/* 单元格多行展开风格 */ +.elem-style-dark .layui-table-cell-c{background-color: var(--lay-color-gray-13);color: var(--lay-color-text-1); border-color: var(--lay-color-border-3);} +.elem-style-dark .layui-table-cell-c:hover{border-color: var(--lay-color-secondary-hover);} +/* 单元格 TIPS 展开风格 */ +.elem-style-dark body .layui-table-tips .layui-layer-content{box-shadow:var(--lay-shadow-3)} +.elem-style-dark .layui-table-tips-main{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-3)} +.elem-style-dark .layui-table-tips-c{background-color:var(--lay-color-gray-13);color: var(--lay-color-text-1)} +.elem-style-dark .layui-table-tips-c:hover{background-color:var(--lay-color-gray-10)} +/** 文件上传 **/ +.elem-style-dark .layui-upload-choose{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-upload-drag{border:1px dashed var( --lay-color-border-2);background-color: var(--lay-color-bg-4);color: var(--lay-color-text-2)} +.elem-style-dark .layui-upload-drag .layui-icon{color: var(--lay-color-primary)} +.elem-style-dark .layui-upload-drag[lay-over]{border-color: var(--lay-color-primary)} +/* 基础菜单元素 */ +.elem-style-dark .layui-menu{background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-menu li{color: var(--lay-color-text-1)} +.elem-style-dark .layui-menu li:hover{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-menu li.layui-disabled{color:var(--lay-color-text-4)!important} +.elem-style-dark .layui-menu li.layui-disabled *{color:var(--lay-color-text-4)!important} +.elem-style-dark .layui-menu .layui-menu-item-group>.layui-menu-body-title{color: var(--lay-color-text-3)} +.elem-style-dark .layui-menu .layui-menu-item-none{color:var(--lay-color-black)} +.elem-style-dark .layui-menu .layui-menu-item-divider{border-bottom:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-menu .layui-menu-item-up>.layui-menu-body-title{color: var(--lay-color-text-1)} +.elem-style-dark .layui-menu .layui-menu-item-down:hover>.layui-menu-body-title>.layui-icon{color: var(--lay-color-text-1)} +.elem-style-dark .layui-menu .layui-menu-item-up>.layui-menu-body-title:hover>.layui-icon{color: var(--lay-color-text-1)} +.elem-style-dark .layui-menu .layui-menu-item-checked{background-color:var(--lay-color-active)!important;color:var(--lay-color-secondary)} +.elem-style-dark .layui-menu .layui-menu-item-checked2{background-color:var(--lay-color-active)!important;color:var(--lay-color-secondary)} +.elem-style-dark .layui-menu .layui-menu-item-checked a{color:var(--lay-color-secondary)} +.elem-style-dark .layui-menu .layui-menu-item-checked2 a{color:var(--lay-color-secondary)} +.elem-style-dark .layui-menu .layui-menu-item-checked:after{border-right:3px solid var(--lay-color-secondary)} +.elem-style-dark .layui-menu-body-title a{color: var(--lay-color-text-1)} +.elem-style-dark .layui-menu-lg .layui-menu-body-title a:hover{color:var(--lay-color-secondary)} +.elem-style-dark .layui-menu-lg li:hover{color:var(--lay-color-secondary)} +/* 下拉菜单 */ +.elem-style-dark .layui-dropdown{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-dropdown.layui-panel{background-color: var(--lay-color-bg-5);box-shadow: var(--lay-shadow-2)} +.elem-style-dark .layui-dropdown .layui-panel{background-color: var(--lay-color-bg-5);box-shadow: var(--lay-shadow-2)} +.elem-style-dark .layui-dropdown.layui-panel .layui-menu{background-color: var(--lay-color-bg-5)} +/** 导航菜单 **/ +.elem-style-dark .layui-nav{background-color:var(--lay-color-black-6);color: var(--lay-color-white)} +.elem-style-dark .layui-nav .layui-nav-item a{color: var(--lay-color-text-1);} +.elem-style-dark .layui-nav .layui-this:after{background-color:var(--lay-color-secondary)} +.elem-style-dark .layui-nav-bar{background-color:var(--lay-color-secondary)} +.elem-style-dark .layui-nav .layui-nav-item a:hover{color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav .layui-this a{color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav-child{box-shadow:var(--lay-shadow-2);background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-nav .layui-nav-child a{color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav .layui-nav-child a:hover{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav-child dd.layui-this{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav-tree .layui-nav-child dd.layui-this{background-color: var(--lay-color-primary);color: var(--lay-color-white)} +.elem-style-dark .layui-nav-tree .layui-nav-child dd.layui-this a{background-color: var(--lay-color-primary);color: var(--lay-color-white)} +.elem-style-dark .layui-nav-tree .layui-this{background-color: var(--lay-color-primary);color: var(--lay-color-white)} +.elem-style-dark .layui-nav-tree .layui-this>a{background-color: var(--lay-color-primary);color: var(--lay-color-white)} +.elem-style-dark .layui-nav-tree .layui-this>a:hover{background-color: var(--lay-color-primary);color: var(--lay-color-white)} +.elem-style-dark .layui-nav-itemed>a{color: var(--lay-color-white)!important} +.elem-style-dark .layui-nav-tree .layui-nav-title a{color: var(--lay-color-white)!important} +.elem-style-dark .layui-nav-tree .layui-nav-title a:hover{color: var(--lay-color-white)!important} +.elem-style-dark .layui-nav-tree .layui-nav-bar{background-color:var(--lay-color-primary)} +.elem-style-dark .layui-nav-tree .layui-nav-child{background: none;background-color:rgba(0, 0, 0, .3)} +.elem-style-dark .layui-nav-tree .layui-nav-child a{color: var(--lay-color-white);color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav-tree .layui-nav-child a:hover{background: none; color: var(--lay-color-white)} +.elem-style-dark .layui-nav.layui-bg-gray{background-color: var(--lay-color-bg-2) !important;color: var(--lay-color-text-1);} +.elem-style-dark .layui-nav-tree.layui-bg-gray{background-color: var(--lay-color-bg-2) !important;color: var(--lay-color-text-1);} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-nav-child{background-color: rgba(0, 0, 0, .3) !important;} +.elem-style-dark .layui-nav-tree.layui-bg-gray a{color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav.layui-bg-gray .layui-nav-item a{color: var(--lay-color-text-1)} +.elem-style-dark .layui-nav.layui-bg-gray .layui-nav-child{background-color: var(--lay-color-bg-5);} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-nav-itemed>a{color: var(--lay-color-text-1)!important} +.elem-style-dark .layui-nav.layui-bg-gray .layui-this a{color:var(--lay-color-secondary)} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this{color:var(--lay-color-secondary)!important} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this a{color:var(--lay-color-secondary)!important} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-this{color:var(--lay-color-secondary)!important} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-this>a{color:var(--lay-color-secondary)!important} +.elem-style-dark .layui-nav-tree.layui-bg-gray .layui-nav-bar{background-color:var(--lay-color-secondary)} +/** 面包屑 **/ +.elem-style-dark .layui-breadcrumb a{color:var(--lay-color-gray-7)!important} +.elem-style-dark .layui-breadcrumb a:hover{color:var(--lay-color-secondary)!important} +.elem-style-dark .layui-breadcrumb a cite{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-breadcrumb span[lay-separator]{color:var(--lay-color-gray-7)} +/** Tab 选项卡 **/ +.elem-style-dark .layui-tab-title .layui-this{color: var(--lay-color-text-2)} +.elem-style-dark .layui-tab-title .layui-this:after{border-bottom-color: var(--lay-color-border-2)} +.elem-style-dark .layui-tab-bar{background-color: var(--lay-color-bg-3)} +.elem-style-dark .layui-tab-more li.layui-this:after{border-bottom-color:var(--lay-color-gray-3)} +.elem-style-dark .layui-tab-title li .layui-tab-close{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-tab-title li .layui-tab-close:hover{background-color:var(--lay-color-danger);color: var(--lay-color-white)} +.elem-style-dark .layui-tab-brief>.layui-tab-title .layui-this{color:var( --lay-color-primary)} +.elem-style-dark .layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after{border-bottom:2px solid var(--lay-color-secondary)} +.elem-style-dark .layui-tab-card{box-shadow: var(--lay-shadow-1)} +.elem-style-dark .layui-tab-card>.layui-tab-title{background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-tab-card>.layui-tab-title .layui-this{background-color: var(--lay-color-bg-1)} +.elem-style-dark .layui-tab-card>.layui-tab-title .layui-this:after{border-bottom-color: var(--lay-color-bg-1)} +.elem-style-dark .layui-tab-card>.layui-tab-more .layui-this{color:var(--lay-color-secondary)} +/*时间线*/ +.elem-style-dark .layui-timeline-axis{background-color: var(--lay-color-bg-4);color:var(--lay-color-secondary)} +.elem-style-dark .layui-timeline-axis:hover{color:var(--lay-color-red-6)} +.elem-style-dark .layui-timeline-item:before{background-color: var(--lay-color-bg-3)} +/*徽章*/ +.elem-style-dark .layui-badge{background-color:var(--lay-color-red-6);color: var(--lay-color-white)} +.elem-style-dark .layui-badge-dot{background-color:var(--lay-color-red-6);color: var(--lay-color-white)} +.elem-style-dark .layui-badge-rim{background-color:var(--lay-color-red-6);color: var(--lay-color-white)} +.elem-style-dark .layui-badge-rim{background-color: var(--lay-color-white);color:var(--lay-color-black-6)} +/* carousel 轮播 */ +.elem-style-dark .layui-carousel{background-color:var(--lay-color-gray-2)} +.elem-style-dark .layui-carousel>[carousel-item]:before{color:var(--lay-color-gray-8);-moz-osx-font-smoothing:grayscale} +.elem-style-dark .layui-carousel>[carousel-item]>*{background-color:var(--lay-color-gray-2)} +.elem-style-dark .layui-carousel-arrow{background-color:rgba(0,0,0,.2);color: var(--lay-color-white)} +.elem-style-dark .layui-carousel-arrow:hover,.layui-carousel-ind ul:hover{background-color:var(--lay-color-black)} +.elem-style-dark .layui-carousel[lay-indicator=outside] .layui-carousel-ind ul{background-color:var(--lay-color-black)} +.elem-style-dark .layui-carousel-ind ul{background-color:rgba(0,0,0,.2)} +.elem-style-dark .layui-carousel-ind ul li{background-color:var(--lay-color-gray-3);background-color: var(--lay-color-text-3)} +.elem-style-dark .layui-carousel-ind ul li:hover{background-color: var(--lay-color-white)} +.elem-style-dark .layui-carousel-ind ul li.layui-this{background-color: var(--lay-color-white)} +/** fixbar **/ +.elem-style-dark .layui-fixbar li{background-color:var(--lay-color-black-5);color: var(--lay-color-text-1)} +/** 表情面板 **/ +.elem-style-dark body .layui-util-face .layui-layer-content{background-color: var(--lay-color-bg-5);color:var(--lay-color-text-2)} +.elem-style-dark .layui-util-face ul{border:1px solid var(--lay-color-border-3);background-color: var(--lay-color-bg-5);box-shadow:var(--lay-shadow-2)} +.elem-style-dark .layui-util-face ul li{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-util-face ul li:hover{border:1px solid var(--lay-color-red-7);background: var(--lay-color-text-1)} +/** 代码文本修饰 **/ +.elem-style-dark .layui-code{border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-white);color: var(--lay-color-text-2)} +/** 穿梭框 **/ +.elem-style-dark .layui-transfer-box{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-transfer-header{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-transfer-search{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-transfer-box{background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-transfer-search .layui-icon-search{color:var(--lay-color-gray-8)} +.elem-style-dark .layui-transfer-active .layui-btn{background-color:var( --lay-color-secondary);border-color:var( --lay-color-secondary);color: var(--lay-color-white)} +.elem-style-dark .layui-transfer-active .layui-btn-disabled{background-color:var(--lay-color-gray-2);border-color:var(--lay-color-gray-3);color:var(--lay-color-gray-8)} +.elem-style-dark .layui-transfer-data li:hover{background-color:var(--lay-color-active)} +/* chrome 105 */ +.elem-style-dark .layui-transfer-data li:hover:has([lay-filter="layTransferCheckbox"][disabled]){background-color:var(--lay-color-bg-2)} +.elem-style-dark .layui-transfer-data .layui-none{color:var(--lay-color-gray-7)} +/** 评分组件 **/ +.elem-style-dark .layui-rate li i.layui-icon{color:var(--lay-color-orange-6)} +/** 颜色选择器 **/ +.elem-style-dark .layui-colorpicker{border:1px solid var(--lay-color-border-1)} +.elem-style-dark .layui-colorpicker:hover{border-color: var(--lay-color-border-2)} +.elem-style-dark .layui-colorpicker-trigger-span{border:1px solid var(--lay-color-border-1)} +.elem-style-dark .layui-colorpicker-trigger-i{color: var(--lay-color-white)} +.elem-style-dark .layui-colorpicker-trigger-i.layui-icon-close{color:var(--lay-color-black-7)} +.elem-style-dark .layui-colorpicker-main{background: var(--lay-color-bg-2);border:1px solid var( --lay-color-border-2);box-shadow:var(--lay-shadow-2)} +.elem-style-dark .layui-colorpicker-basis-white{background:linear-gradient(90deg, #fff,hsla(0,0%,100%,0))} /* danger: 勿改*/ +.elem-style-dark .layui-colorpicker-basis-black{background:linear-gradient(0deg,#000,transparent)} /* danger: 勿改*/ +.elem-style-dark .layui-colorpicker-basis-cursor{border:1px solid var(--lay-color-white)} +.elem-style-dark .layui-colorpicker-side{background:linear-gradient(linear-gradient(#F00, #FF0, #0F0, #0FF, #00F, #F0F, #F00))} /* danger: 勿改*/ +.elem-style-dark .layui-colorpicker-side-slider{box-shadow:var(--lay-shadow-1);background: var(--lay-color-white);border:1px solid var(--lay-color-gray-2)} +.elem-style-dark .layui-colorpicker-alpha-slider{box-shadow:var(--lay-shadow-1);background: var(--lay-color-white);border:1px solid var(--lay-color-gray-2)} +.elem-style-dark .layui-colorpicker-pre.layui-this{box-shadow:var(--lay-shadow-1)} +.elem-style-dark .layui-colorpicker-pre.selected{box-shadow:var(--lay-shadow-1)} +.elem-style-dark .layui-colorpicker-main-input input.layui-input{color: var(--lay-color-text-2)} +/** 滑块 **/ +.elem-style-dark .layui-slider{background: var( --lay-color-bg-5)} +.elem-style-dark .layui-slider-step{background: var(--lay-color-fill-4)} +.elem-style-dark .layui-slider-wrap-btn{background: var(--lay-color-bg-4)} +.elem-style-dark .layui-slider-tips{color: var(--lay-color-text-1);background:var(--lay-color-black);box-shadow: var(--lay-shadow-3)} +.elem-style-dark .layui-slider-tips:after{border-color:var(--lay-color-black) transparent transparent transparent} +.elem-style-dark .layui-slider-input{border:1px solid var(--lay-color-border-1)} +.elem-style-dark .layui-slider-input-btn{border-left:1px solid var(--lay-color-border-1)} +.elem-style-dark .layui-slider-input-btn i{color:var(--lay-color-gray-9)} +.elem-style-dark .layui-slider-input-btn i:first-child{border-bottom:1px solid var(--lay-color-border-1)} +.elem-style-dark .layui-slider-input-btn i:hover{color:var(--lay-color-primary)} +/** 树组件 **/ +.elem-style-dark .layui-tree-line .layui-tree-set .layui-tree-set:after{border-top:1px dotted var(--lay-color-gray-7)} +.elem-style-dark .layui-tree-entry:hover{background-color: var(--lay-color-bg-4)} +.elem-style-dark .layui-tree-line .layui-tree-entry:hover{background-color:var(--lay-color-black)} +.elem-style-dark .layui-tree-line .layui-tree-entry:hover .layui-tree-txt{color:var(--lay-color-text-3)} +.elem-style-dark .layui-tree-entry:hover:has(span.layui-tree-txt.layui-disabled){background-color: transparent !important} +.elem-style-dark .layui-tree-line .layui-tree-set:before{border-left:1px dotted var(--lay-color-gray-7)} +.elem-style-dark .layui-tree-iconClick{color:var(--lay-color-gray-7)} +.elem-style-dark .layui-tree-icon{border:1px solid var(--lay-color-gray-8)} +.elem-style-dark .layui-tree-icon .layui-icon{color:var(--lay-color-text-1)} +.elem-style-dark .layui-tree-iconArrow:after{border-color:transparent transparent transparent var(--lay-color-gray-7)} +.elem-style-dark .layui-tree-txt{color:var(--lay-color-text-2)} +.elem-style-dark .layui-tree-search{color:var(--lay-color-black-7)} +.elem-style-dark .layui-tree-btnGroup .layui-icon:hover{color:var(--lay-color-text-2)} +.elem-style-dark .layui-tree-editInput{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-tree-emptyText{color:var(--lay-color-text-2)} +/*code 不处理*/ +.elem-style-dark .layui-code-view{border:1px solid var(--lay-color-border-1);} +.elem-style-dark .layui-code-view:not(.layui-code-hl){background-color: var(--lay-color-bg-2);color: var(--lay-color-text-2);} +.elem-style-dark .layui-code-header{border-bottom: 1px solid var(--lay-color-border-1); background-color: var(--lay-color-bg-2)} +.elem-style-dark .layui-code-header > .layui-code-header-about{color: var(--lay-color-text-2);} +.elem-style-dark .layui-code-view:not(.layui-code-hl) .layui-code-ln-side{border-color: var(--lay-color-border-1); background-color: var(--lay-color-bg-2);} +.elem-style-dark .layui-code-nowrap > .layui-code-ln-side{background: none !important;} +.elem-style-dark .layui-code-fixbar > span{color: var(--lay-color-text-3);} +.elem-style-dark .layui-code-fixbar > span:hover{color: var(--lay-color-secondary-hover);} + +.elem-style-dark .layui-code-theme-dark, +.elem-style-dark .layui-code-theme-dark > .layui-code-header{border-color: rgb(126 122 122 / 15%); background-color: #1f1f1f;} +.elem-style-dark .layui-code-theme-dark{border-width: 1px; color: #ccc;} +.elem-style-dark .layui-code-theme-dark > .layui-code-ln-side{border-right-color: #2a2a2a; background: none; color: #6e7681;} + +.elem-style-dark .layui-code-view.layui-code-hl > .layui-code-ln-side{background-color: transparent;} +.elem-style-dark .layui-code-theme-dark.layui-code-hl, +.elem-style-dark .layui-code-theme-dark.layui-code-hl > .layui-code-ln-side{border-color: rgb(126 122 122 / 15%);} + +.elem-style-dark .layui-code-full{background-color: var(--lay-color-bg-1)} +/*日期选择器*/ +.elem-style-dark .layui-laydate-header i{color:var(--lay-color-gray-8)} +.elem-style-dark .laydate-day-holidays:before{color:var(--lay-color-red-6)} +.elem-style-dark .layui-laydate .layui-this .laydate-day-holidays:before{color: var(--lay-color-white)} +.elem-style-dark .layui-laydate-footer span{border:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-laydate-footer span:hover{color:var(--lay-color-secondary)} +.elem-style-dark .layui-laydate-footer span.layui-laydate-preview{border-color:transparent!important;} +.elem-style-dark .layui-laydate-footer span.layui-laydate-preview:hover{color:var(--lay-color-black-7)} +.elem-style-dark .layui-laydate-shortcut+.layui-laydate-main{border-left:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laydate .layui-laydate-list{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-laydate-hint{color:var(--lay-color-danger)} +.elem-style-dark .layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laydate-range .laydate-main-list-1 .layui-laydate-header{border-left:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laydate{border:1px solid var(--lay-color-border-2);box-shadow:var(--lay-shadow-3);background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-laydate-hint{border:1px solid var(--lay-color-border-2);box-shadow:var(--lay-shadow-3);background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-laydate{box-shadow: var(--lay-shadow-2)} +.elem-style-dark .layui-laydate-hint{border-color:var(--lay-color-border-1)} +.elem-style-dark .layui-laydate-header{border-bottom:1px solid var( --lay-color-border-2)} +.elem-style-dark .layui-laydate-header i:hover,.layui-laydate-header span:hover{color:var(--lay-color-secondary)} +.elem-style-dark .layui-laydate-content th{color: var(--lay-color-text-1)} +.elem-style-dark .layui-laydate-content td{color: var(--lay-color-text-1)} +.elem-style-dark .layui-laydate-content td.laydate-day-now{color:var(--lay-color-secondary)} +.elem-style-dark .layui-laydate-content td.laydate-day-now:after{border:1px solid var(--lay-color-secondary)} +.elem-style-dark .layui-laydate-linkage .layui-laydate-content td.laydate-selected>div{background-color:var(--lay-color-secondary-light)} +.elem-style-dark .layui-laydate-linkage .laydate-selected:hover>div{background-color:var(--lay-color-green-4)!important} +.elem-style-dark .layui-laydate-content td>div:hover{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-laydate-list li:hover{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-laydate-shortcut>li:hover{background-color: var(--lay-color-fill-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-laydate-content td.laydate-disabled>div:hover{background-color: var(--lay-color-bg-5);color: var(--lay-color-text-4)} +.elem-style-dark .laydate-time-list li ol{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .laydate-time-list>li:hover{background: 0 0;} +.elem-style-dark .layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color: var(--lay-color-text-3)} +.elem-style-dark .layui-laydate-linkage .laydate-selected.laydate-day-next>div,.layui-laydate-linkage .laydate-selected.laydate-day-prev>div{background-color: var(--lay-color-bg-5)!important} +.elem-style-dark .layui-laydate-footer{border-top:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laydate-hint{color:var(--lay-color-danger)} +.elem-style-dark .laydate-day-mark::after{background-color:var(--lay-color-secondary)} +.elem-style-dark .layui-laydate-footer span[lay-type=date]{color:var(--lay-color-secondary)} +.elem-style-dark .layui-laydate .layui-this{background-color:var(--lay-color-primary)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-laydate .layui-this>div{background-color:var(--lay-color-primary)!important;color: var(--lay-color-white)!important} +.elem-style-dark .layui-laydate .laydate-disabled{color: var(--lay-color-text-4)!important} +.elem-style-dark .layui-laydate .laydate-disabled:hover{color: var(--lay-color-text-4)!important} +.elem-style-dark .laydate-theme-molv .layui-laydate-header{background-color:var(--lay-color-primary)} +.elem-style-dark .laydate-theme-molv .layui-laydate-header i{color:var(--lay-color-gray-2)} +.elem-style-dark .laydate-theme-molv .layui-laydate-header span{color:var(--lay-color-gray-2)} +.elem-style-dark .laydate-theme-molv .layui-laydate-header i:hover{color: var(--lay-color-white)} +.elem-style-dark .laydate-theme-molv .layui-laydate-header span:hover{color: var(--lay-color-white)} +.elem-style-dark .laydate-theme-molv .layui-laydate-content{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .laydate-theme-molv .layui-laydate-footer{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .laydate-theme-grid .laydate-month-list>li{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .laydate-theme-grid .laydate-year-list>li{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .laydate-theme-grid .layui-laydate-content td{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .laydate-theme-grid .layui-laydate-content thead{border:1px solid var(--lay-color-border-2)} +.elem-style-dark .layui-laydate-linkage.laydate-theme-grid .laydate-selected{background-color:var(--lay-color-gray-3)!important;color:var(--lay-color-primary)!important} +.elem-style-dark .layui-laydate-linkage.laydate-theme-grid .laydate-selected:hover{background-color:var(--lay-color-gray-3)!important;color:var(--lay-color-primary)!important} +.elem-style-dark .layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-next{color:var(--lay-color-gray-6)!important} +.elem-style-dark .layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-prev{color:var(--lay-color-gray-6)!important} +.elem-style-dark .layui-laydate.laydate-theme-circle .layui-laydate-content table td.layui-this{background-color:transparent!important} +/*layer*/ +.elem-style-dark .layui-layer{background-color: var(--lay-color-bg-3);box-shadow:var(--lay-shadow-3)} +.elem-style-dark .layui-layer-border{border:1px solid var(--lay-color-border-2);box-shadow:var(--lay-shadow-3)} +.elem-style-dark .layui-layer-move{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-title{border-bottom:1px solid var(--lay-color-border-2);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-setwin span{color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-setwin .layui-layer-min:before{border-bottom-color:var(--lay-color-text-1)} +.elem-style-dark .layui-layer-setwin .layui-layer-min:hover:before{border-bottom-color:var(--lay-color-info-hover)} +.elem-style-dark .layui-layer-setwin .layui-layer-max:after{border:1px solid var(--lay-color-text-3)} +.elem-style-dark .layui-layer-setwin .layui-layer-max:before{border:1px solid var(--lay-color-text-3)} +.elem-style-dark .layui-layer-setwin .layui-layer-max:hover:after{border-color:var(--lay-color-info-hover)} +.elem-style-dark .layui-layer-setwin .layui-layer-max:hover:before{border-color:var(--lay-color-info-hover)} +.elem-style-dark .layui-layer-setwin .layui-layer-maxmin:after{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-setwin .layui-layer-maxmin:before{background-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-setwin .layui-layer-close2{color:var(--lay-color-text-1);background-color:var(--lay-color-gray-10)} +.elem-style-dark .layui-layer-setwin .layui-layer-close2:hover{background-color:var(--lay-color-normal)} +.elem-style-dark .layui-layer-btn a{border:1px solid var(--lay-color-border-2);background-color: var( --lay-color-bg-3);color: var(--lay-color-text-2)} +.elem-style-dark .layui-layer-btn .layui-layer-btn0{border-color: transparent;background-color: var(--lay-color-normal);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-layer-face{color:var(--lay-color-gray-9)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-tips{color:var(--lay-color-warning)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-success{color: var(--lay-color-success)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-error{top: 19px; color: var(--lay-color-danger)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-question{color: var(--lay-color-warning);} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-lock{color: var(--lay-color-gray-10)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-face-cry{color:var(--lay-color-danger)} +.elem-style-dark .layui-layer-dialog .layui-layer-content .layui-icon-face-smile{color:var(--lay-color-success)} +.elem-style-dark .layui-layer-rim{border:6px solid var(--lay-color-gray-8);border:6px solid var(--lay-color-border-2)} +.elem-style-dark .layui-layer-msg{border:1px solid var( --lay-color-border-1)} +.elem-style-dark .layui-layer-hui{background-color: var(--lay-color-bg-3);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-hui .layui-layer-close{color: var(--lay-color-white)} +.elem-style-dark .layui-layer-loading-icon{color:var(--lay-color-gray-9)} +.elem-style-dark .layui-layer-loading-2:after{border:3px solid var(--lay-color-gray-6)} +.elem-style-dark .layui-layer-loading-2:before{border:3px solid var(--lay-color-gray-6)} +.elem-style-dark .layui-layer-loading-2:after{border-color:transparent;border-left-color: var(--lay-color-normal)} +.elem-style-dark .layui-layer-tips .layui-layer-content{box-shadow: var(--lay-shadow-3);background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsG{border-color:transparent} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsB{border-right-color:var(--lay-color-black)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsT{border-right-color:var(--lay-color-black)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsL{border-bottom-color:var(--lay-color-black)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsR{border-bottom-color:var(--lay-color-black)} +.elem-style-dark .layui-layer-lan .layui-layer-title{background:var(--lay-color-blue-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-lan .layui-layer-btn{border-top:1px solid var(--lay-color-border-3)} +.elem-style-dark .layui-layer-lan .layui-layer-btn a{background: var(--lay-color-white);border-color:var(--lay-color-border-3);color: var(--lay-color-black-7)} +.elem-style-dark .layui-layer-lan .layui-layer-btn .layui-layer-btn1{background: var(--lay-color-gray-7)} +.elem-style-dark .layui-layer-molv .layui-layer-title{background:var(--lay-color-layuigreen-6);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-molv .layui-layer-btn a{background:var(--lay-color-layuigreen-6);border-color:var(--lay-color-layuigreen-6)} +.elem-style-dark .layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:var(--lay-color-gray-7)} +.elem-style-dark .layui-layer-prompt .layui-layer-input{border:1px solid var(--lay-color-border-2);color: var(--lay-color-text-2)} +.elem-style-dark .layui-layer-tab{box-shadow:var(--lay-shadow-3)} +.elem-style-dark .layui-layer-tab .layui-layer-title span.layui-this{border-left:1px solid var(--lay-color-border-2);border-right:1px solid var(--lay-color-border-2);background-color: var(--lay-color-bg-3)} +.elem-style-dark .layui-layer-photos{background: none; box-shadow: none;} +.elem-style-dark .layui-layer-photos-prev{color:var(--lay-color-gray-9)} +.elem-style-dark .layui-layer-photos-next{color:var(--lay-color-gray-9)} +.elem-style-dark .layui-layer-photos-prev:hover{color:var(--lay-color-text-1)} +.elem-style-dark .layui-layer-photos-next:hover{color:var(--lay-color-text-1)} +.elem-style-dark .layui-layer-photos-toolbar{background-color:#333\9;background-color: var(--lay-color-bg-5);color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-photos-toolbar *{color: var(--lay-color-text-1)} +.elem-style-dark .layui-layer-photos-toolbar a:hover{color: var(--lay-color-text-2)} +.elem-style-dark .layui-layer-photos-header > span:hover{background-color: var(--lay-color-fill-2)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsB{border-right-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsT{border-right-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsL{border-bottom-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-tips i.layui-layer-TipsR{border-bottom-color: var(--lay-color-bg-5)} +.elem-style-dark .layui-layer-prompt .layui-layer-input{border:1px solid var(--lay-color-border-2);color:var(--lay-color-text-1);background-color:var(--lay-color-black)} +.elem-style-dark .layui-layer-prompt .layui-layer-input:focus{outline:0} + +/*fix style*/ +.elem-style-dark .layui-layer-loading{background:0 0;box-shadow:0 0} +.elem-style-dark .layui-btn-primary{border-color:transparent} +.elem-style-dark .layui-btn-group .layui-btn:first-child{border-left:none} +.elem-style-dark .layui-btn-group .layui-btn-primary:hover{border-top-color:transparent; border-bottom-color: transparent;} +.elem-style-dark .layui-menu li:hover{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-nav-child dd.layui-this{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-nav .layui-nav-child a:hover{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-nav .layui-nav-item a:hover{background-color: var(--lay-color-fill-2)} +.elem-style-dark .layui-nav .layui-this a{background-color: var(--lay-color-fill-2)} +.elem-style-dark .layui-nav-child dd.layui-this{background-color: var(--lay-color-fill-2)} +.elem-style-dark .layui-tab-card>.layui-tab-title .layui-this:after,.layui-tab-title .layui-this:after{border-bottom-color:var(--lay-color-bg-1)} +.elem-style-dark .layui-form-select dl dd:hover{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-form-select dl dd.layui-this{background-color:var(--lay-color-fill-2)} +.elem-style-dark .layui-laypage button{color:var(--lay-color-text-1)} +.elem-style-dark .layui-table[lay-even] tbody tr:nth-child(even){background-color:var(--lay-color-fill-4)} +.elem-style-dark .layui-menu .layui-menu-item-checked{background-color:var(--lay-color-fill-2)!important} +.elem-style-dark .layui-menu .layui-menu-item-checked2{background-color:var(--lay-color-fill-2)!important} +.elem-style-dark .layui-input-split{background-color: var(--lay-color-bg-2);} +.elem-style-dark .layui-input-wrap .layui-input-prefix.layui-input-split{border-width: 1px;} +.elem-style-dark .layui-input-wrap .layui-input-split:has(+.layui-input:hover) {border-color: var(--lay-color-border-2);} +.elem-style-dark .layui-input-wrap .layui-input-split:has(+.layui-input:focus) {border-color: var(--lay-color-secondary-hover);} +.elem-style-dark .layui-layer-tab .layui-layer-title span:first-child{border-left: none !important;} +.elem-style-dark .layui-slider-input .layui-input {background-color: var(--lay-color-bg-2);} +/*layuimini面板颜色*/ +.elem-style-dark .layuimini-container {color:var(--lay-color-text-2);background-color: var(--lay-color-bg-1); color-scheme: dark;} +.elem-style-dark .layui-form .layuimini-form{color:var(--lay-color-text-2);background-color: var(--lay-color-bg-1); color-scheme: dark;} +.elem-style-dark .hr-line{border-color:var(--lay-color-border-2)!important} +.elem-style-dark .layuimini-upload .layuimini-upload-btn{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layuimini-main{background-color: var(--lay-color-bg-1) !important;border-color: var(--lay-color-bg-2)!important;} +.elem-style-dark .layuimini-container .layui-table-tool{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-table-box{border-color: var(--lay-color-bg-2)!important;} +.elem-style-dark .layui-tab-item .layui-show{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-iconpicker.layui-form-selected .layui-anim {background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-iconpicker-icon{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-iconpicker-item{border-color: var(--lay-color-bg-3) !important;} +.elem-style-dark .layui-iconpicker-list-box{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-iconpicker-icon-limit{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark select{background-color: var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-tab-title{background-color: var(--lay-color-bg-1) !important;border: none!important;} +.elem-style-dark .layuimini-tab .layui-tab-control>li {color:var(--lay-color-text-1);background-color: var(--lay-color-bg-1) !important;border:none!important; } +.elem-style-dark .layuimini-tab .layui-tab-title li{border-right-color:var(--lay-color-bg-3)!important;} +.elem-style-dark {background-color:var(--lay-color-bg-1) !important;} +.elem-style-dark .panel-body{background-color:var(--lay-color-bg-1) !important;border:none !important;} +.elem-style-dark .layui-card{border: none!important;} +.elem-style-dark .panel{border: none!important;} +.elem-style-dark h3{color:var(--lay-color-text-1)!important;} +.elem-style-dark fieldset{border-color:var(--lay-color-border-2)!important;} +.elem-style-dark .layui-laypage-prev{border:none!important;} +.elem-style-dark .layui-laypage-next{border:none!important;} +.elem-style-dark a{border:none!important;} +.elem-style-dark .layuimini-table2card .layui-table-box .layui-table-body .layui-table tr {background-color:var(--lay-color-bg-1)!important;} +.elem-style-dark #dataTips{color:var(--lay-color-text-1)!important;} +.elem-style-dark .layui-menu-body-title span{color:var(--lay-color-white)!important;} +.elem-style-dark .layui-layer-dialog .layui-layer-content{color:var(--lay-color-white)!important;} +.elem-style-dark .layui-table tr:hover{background-color:var(--lay-color-fill-3)} +.elem-style-dark .tableSelect{background-color:var(--lay-color-bg-1) !important;} +.elem-style-dark .layui-bg-gray{background-color:var(--lay-color-bg-1) !important;} + + + diff --git a/public/static/admin/css/themes/index.scss b/public/static/admin/css/themes/index.scss new file mode 100644 index 0000000..58e8b04 --- /dev/null +++ b/public/static/admin/css/themes/index.scss @@ -0,0 +1,41 @@ +.elem-style-normal { + @import 'normal'; +} + +.elem-style-demo { + @import 'demo'; +} + +.elem-style-sicfi { + @import 'sicfi'; +} + +.elem-style-gtk { + @import 'gtk'; +} + +.elem-style-nes { + @import 'nes'; + +} + +.elem-style-win7 { + @import 'win7'; +} +.elem-style-neomorphic { + @import 'neomorphic'; +} +.elem-style-dark { + @import 'dark'; +} + +@font-face { + font-family: "ark-pixel"; + src : url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf') format('truetype'), + url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf') format('truetype'), + url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf') format('truetype'), + url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf') format('truetype'), + url('./nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf') format('truetype'), + url('./nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf') format('truetype'), + url('./nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf') format('truetype'); +} \ No newline at end of file diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/OFL.txt b/public/static/admin/css/themes/nes/ark-pixel-font-12px/OFL.txt new file mode 100644 index 0000000..0f2a824 --- /dev/null +++ b/public/static/admin/css/themes/nes/ark-pixel-font-12px/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2021, TakWolf (https://ark-pixel-font.takwolf.com), +with Reserved Font Name 'Ark Pixel'. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf new file mode 100644 index 0000000..a42ab1e Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf differ diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf new file mode 100644 index 0000000..db2010c Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf differ diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf new file mode 100644 index 0000000..e76d778 Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf differ diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf new file mode 100644 index 0000000..5209272 Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf differ diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf new file mode 100644 index 0000000..0207efd Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf differ diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf new file mode 100644 index 0000000..6224669 Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf differ diff --git a/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf new file mode 100644 index 0000000..308228c Binary files /dev/null and b/public/static/admin/css/themes/nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf differ diff --git a/public/static/admin/css/welcome.css b/public/static/admin/css/welcome.css new file mode 100644 index 0000000..d1e0654 --- /dev/null +++ b/public/static/admin/css/welcome.css @@ -0,0 +1,139 @@ +.layui-card { + border: 1px solid #f2f2f2; + border-radius: 5px; +} + +.dark .layui-card { + border: 1px solid #363636; + border-radius: 5px; +} + +.icon { + margin-right: 10px; + color: #1aa094; +} + +.icon-cray { + color: #ffb800 !important; +} + +.icon-blue { + color: #1e9fff !important; +} + +.icon-tip { + color: #ff5722 !important; +} + +.layuimini-qiuck-module { + text-align: center; + margin-top: 10px +} + +.layuimini-qiuck-module a i { + display: inline-block; + width: 80%; + height: 60px; + line-height: 60px; + text-align: center; + border-radius: 2px; + font-size: 30px; + background-color: #F8F8F8; + color: #333; + transition: all .3s; + -webkit-transition: all .3s; +} + +.layuimini-qiuck-module a cite { + position: relative; + top: 2px; + display: block; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + font-size: 14px; +} + +.welcome-module { + width: 100%; + overflow: hidden; +} + +.panel { + border: 1px solid transparent; + border-radius: 3px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05) +} + +.panel-body { + padding: 10px +} + +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 12px; + color: inherit +} + +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: 700; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; + margin-top: .3em; +} + +.layui-red { + color: red +} + +.main_btn > p { + height: 40px; +} + +/*.layui-bg-number {*/ +/* background-color: #F8F8F8;*/ +/*}*/ + +.layuimini-notice:hover { + background: #f6f6f6; +} + +.layuimini-notice { + padding: 7px 16px; + clear: both; + font-size: 12px !important; + cursor: pointer; + position: relative; + transition: background 0.2s ease-in-out; +} + +.layuimini-notice-title, .layuimini-notice-label { + padding-right: 70px !important; + text-overflow: ellipsis !important; + overflow: hidden !important; + white-space: nowrap !important; +} + +.layuimini-notice-title { + line-height: 28px; + font-size: 14px; +} + +.layuimini-notice-extra { + position: absolute; + top: 50%; + margin-top: -8px; + right: 16px; + display: inline-block; + height: 16px; + color: #999; +} \ No newline at end of file diff --git a/public/static/admin/fonts/iconfont/iconfont-1.eot b/public/static/admin/fonts/iconfont/iconfont-1.eot new file mode 100644 index 0000000..c4be36d Binary files /dev/null and b/public/static/admin/fonts/iconfont/iconfont-1.eot differ diff --git a/public/static/admin/fonts/iconfont/iconfont-1.svg b/public/static/admin/fonts/iconfont/iconfont-1.svg new file mode 100644 index 0000000..f857c4d --- /dev/null +++ b/public/static/admin/fonts/iconfont/iconfont-1.svg @@ -0,0 +1,83 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/static/admin/fonts/iconfont/iconfont-1.ttf b/public/static/admin/fonts/iconfont/iconfont-1.ttf new file mode 100644 index 0000000..ef4edab Binary files /dev/null and b/public/static/admin/fonts/iconfont/iconfont-1.ttf differ diff --git a/public/static/admin/fonts/iconfont/iconfont-1.woff b/public/static/admin/fonts/iconfont/iconfont-1.woff new file mode 100644 index 0000000..857ba5b Binary files /dev/null and b/public/static/admin/fonts/iconfont/iconfont-1.woff differ diff --git a/public/static/admin/fonts/iconfont/iconfont.eot b/public/static/admin/fonts/iconfont/iconfont.eot new file mode 100644 index 0000000..3119b76 Binary files /dev/null and b/public/static/admin/fonts/iconfont/iconfont.eot differ diff --git a/public/static/admin/fonts/iconfont/iconfont.svg b/public/static/admin/fonts/iconfont/iconfont.svg new file mode 100644 index 0000000..a7a56ab --- /dev/null +++ b/public/static/admin/fonts/iconfont/iconfont.svg @@ -0,0 +1,49 @@ + + + + +Created by FontForge 20120731 at Tue Feb 21 10:13:09 2017 + By admin + + + + + + + + + + + + + + + + diff --git a/public/static/admin/fonts/iconfont/iconfont.ttf b/public/static/admin/fonts/iconfont/iconfont.ttf new file mode 100644 index 0000000..b5e11df Binary files /dev/null and b/public/static/admin/fonts/iconfont/iconfont.ttf differ diff --git a/public/static/admin/fonts/iconfont/iconfont.woff b/public/static/admin/fonts/iconfont/iconfont.woff new file mode 100644 index 0000000..11e271a Binary files /dev/null and b/public/static/admin/fonts/iconfont/iconfont.woff differ diff --git a/public/static/admin/images/captcha.jpg b/public/static/admin/images/captcha.jpg new file mode 100644 index 0000000..92b2a33 Binary files /dev/null and b/public/static/admin/images/captcha.jpg differ diff --git a/public/static/admin/images/head.jpg b/public/static/admin/images/head.jpg new file mode 100644 index 0000000..189097f Binary files /dev/null and b/public/static/admin/images/head.jpg differ diff --git a/public/static/admin/images/icon-login.png b/public/static/admin/images/icon-login.png new file mode 100644 index 0000000..1db2f96 Binary files /dev/null and b/public/static/admin/images/icon-login.png differ diff --git a/public/static/admin/images/loginbg.png b/public/static/admin/images/loginbg.png new file mode 100644 index 0000000..675c74b Binary files /dev/null and b/public/static/admin/images/loginbg.png differ diff --git a/public/static/admin/images/upload-icons/doc.png b/public/static/admin/images/upload-icons/doc.png new file mode 100644 index 0000000..4d6a630 Binary files /dev/null and b/public/static/admin/images/upload-icons/doc.png differ diff --git a/public/static/admin/images/upload-icons/file.png b/public/static/admin/images/upload-icons/file.png new file mode 100644 index 0000000..b5021c9 Binary files /dev/null and b/public/static/admin/images/upload-icons/file.png differ diff --git a/public/static/admin/images/upload-icons/image.png b/public/static/admin/images/upload-icons/image.png new file mode 100644 index 0000000..731d249 Binary files /dev/null and b/public/static/admin/images/upload-icons/image.png differ diff --git a/public/static/admin/images/upload-icons/mp3.png b/public/static/admin/images/upload-icons/mp3.png new file mode 100644 index 0000000..c946e36 Binary files /dev/null and b/public/static/admin/images/upload-icons/mp3.png differ diff --git a/public/static/admin/images/upload-icons/mp4.png b/public/static/admin/images/upload-icons/mp4.png new file mode 100644 index 0000000..f4c5985 Binary files /dev/null and b/public/static/admin/images/upload-icons/mp4.png differ diff --git a/public/static/admin/images/upload-icons/pdf.png b/public/static/admin/images/upload-icons/pdf.png new file mode 100644 index 0000000..c61c3b4 Binary files /dev/null and b/public/static/admin/images/upload-icons/pdf.png differ diff --git a/public/static/admin/images/upload-icons/ppt.png b/public/static/admin/images/upload-icons/ppt.png new file mode 100644 index 0000000..880e110 Binary files /dev/null and b/public/static/admin/images/upload-icons/ppt.png differ diff --git a/public/static/admin/images/upload-icons/rar.png b/public/static/admin/images/upload-icons/rar.png new file mode 100644 index 0000000..8d5e449 Binary files /dev/null and b/public/static/admin/images/upload-icons/rar.png differ diff --git a/public/static/admin/images/upload-icons/txt.png b/public/static/admin/images/upload-icons/txt.png new file mode 100644 index 0000000..6ba8a57 Binary files /dev/null and b/public/static/admin/images/upload-icons/txt.png differ diff --git a/public/static/admin/images/upload-icons/visio.png b/public/static/admin/images/upload-icons/visio.png new file mode 100644 index 0000000..69de994 Binary files /dev/null and b/public/static/admin/images/upload-icons/visio.png differ diff --git a/public/static/admin/images/upload-icons/xls.png b/public/static/admin/images/upload-icons/xls.png new file mode 100644 index 0000000..47d8aed Binary files /dev/null and b/public/static/admin/images/upload-icons/xls.png differ diff --git a/public/static/admin/images/upload-icons/zip.png b/public/static/admin/images/upload-icons/zip.png new file mode 100644 index 0000000..8d5e449 Binary files /dev/null and b/public/static/admin/images/upload-icons/zip.png differ diff --git a/public/static/admin/js/article/article.js b/public/static/admin/js/article/article.js new file mode 100644 index 0000000..878bb1d --- /dev/null +++ b/public/static/admin/js/article/article.js @@ -0,0 +1,51 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + let init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'article.article/index', + add_url: 'article.article/add', + edit_url: 'article.article/edit', + delete_url: 'article.article/delete', + export_url: 'article.article/export', + modify_url: 'article.article/modify', + }; + + let Controller = { + + index: function () { + ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID'}, + {field: 'title', minWidth: 200, title: '文章标题'}, + {field: 'cate_name', width: 120, title: '分类'}, + {field: 'author', width: 100, title: '作者'}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + {field: 'create_time', minWidth: 150, title: '创建时间'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: ['edit', 'delete'] + } + ]], + }); + + ea.listen(); + }, + + add: function () { + ea.listen(); + }, + + edit: function () { + ea.listen(); + }, + + }; + + return Controller; +}); \ No newline at end of file diff --git a/public/static/admin/js/article/cate.js b/public/static/admin/js/article/cate.js new file mode 100644 index 0000000..b96c214 --- /dev/null +++ b/public/static/admin/js/article/cate.js @@ -0,0 +1,49 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + let init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'article.cate/index', + add_url: 'article.cate/add', + edit_url: 'article.cate/edit', + delete_url: 'article.cate/delete', + export_url: 'article.cate/export', + modify_url: 'article.cate/modify', + }; + + return { + index: function () { + ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID'}, + {field: 'title', minWidth: 150, title: '分类名称'}, + {field: 'sort', width: 100, title: '排序', edit: 'text'}, + { + field: 'status', + title: '状态', + width: 85, + selectList: {0: '禁用', 1: '启用'}, + templet: ea.table.switch + }, + {field: 'create_time', minWidth: 150, title: '创建时间'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: ['edit', 'delete'] + } + ]], + }); + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + }, + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/index.js b/public/static/admin/js/index.js new file mode 100644 index 0000000..fa34ff6 --- /dev/null +++ b/public/static/admin/js/index.js @@ -0,0 +1,222 @@ +define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTheme", "miniTab", "swiper"], function ($, ea, echarts, undefined, miniAdmin, miniTheme, miniTab) { + + return { + index: function () { + var options = { + iniUrl: ea.url('ajax/initAdmin'), // 初始化接口 + clearUrl: ea.url("ajax/clearCache"), // 缓存清理接口 + urlHashLocation: true, // 是否打开hash定位 + bgColorDefault: false, // 主题默认配置 + multiModule: true, // 是否开启多模块 + menuChildOpen: false, // 是否默认展开菜单 + loadingTime: 0, // 初始化加载时间 + pageAnim: true, // iframe窗口动画 + maxTabNum: 20, // 最大的tab打开数量 + }; + miniAdmin.render(options); + + $('.login-out').on("click", function () { + ea.request.get({ + url: 'login/out', + prefix: true, + }, function (res) { + ea.msg.success(res.msg, function () { + window.location = ea.url('login/index'); + }) + }); + }); + }, + welcome: function () { + miniTab.listen(); + + new Swiper('.mySwiper', { + pagination: { + el: '.swiper-pagination', + clickable: true, + }, + }) + + /** + * 查看公告信息 + **/ + $('body').on('click', '.layuimini-notice', function () { + var title = $(this).children('.layuimini-notice-title').text(), + noticeTime = $(this).children('.layuimini-notice-extra').text(), + content = $(this).children('.layuimini-notice-content').html(); + var html = '
      \n' + + '

      ' + title + '

      \n' + + '
      ' + content + '
      \n' + + '
      \n'; + layer.open({ + type: 1, + title: '系统公告' + '' + noticeTime + '', + area: '300px;', + shade: 0.8, + id: 'layuimini-notice', + btn: ['查看', '取消'], + btnAlign: 'c', + moveType: 1, + content: html, + success: function (layero) { + var btn = layero.find('.layui-layer-btn'); + btn.find('.layui-layer-btn0').attr({ + href: 'https://gitee.com/zhongshaofa/layuimini', + target: '_blank' + }); + } + }); + }); + + /** + * 报表功能 + */ + $(function () { + $('#layui-version').text('v' + layui.v); + let echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden'); + let optionRecords = { + title: { + text: '访问统计' + }, + tooltip: { + trigger: 'axis' + }, + legend: { + data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎'] + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + toolbox: { + feature: { + saveAsImage: {} + } + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] + }, + yAxis: { + type: 'value' + }, + series: [ + { + name: '邮件营销', + type: 'line', + stack: '总量', + data: [120, 132, 101, 134, 90, 230, 210] + }, + { + name: '联盟广告', + type: 'line', + stack: '总量', + data: [220, 182, 191, 234, 290, 330, 310] + }, + { + name: '视频广告', + type: 'line', + stack: '总量', + data: [150, 232, 201, 154, 190, 330, 410] + }, + { + name: '直接访问', + type: 'line', + stack: '总量', + data: [320, 332, 301, 334, 390, 330, 320] + }, + { + name: '搜索引擎', + type: 'line', + stack: '总量', + data: [820, 932, 901, 934, 1290, 1330, 1320] + } + ] + }; + echartsRecords.setOption(optionRecords); + window.addEventListener("resize", function () { + echartsRecords.resize(); + }); + }) + + let util = layui.util; + util.on({ + showComposerInfo: function () { + //
      12313
      + let html = `` + ea.request.get({ + url: ea.url('ajax/composerInfo'), + }, function (success) { + let data = success.data + data.forEach(function (item) { + html += `${item.name} ${item.version}\r\n` + }) + html = `
      ${html}
      ` + layer.open({ + type: 1, + title: 'composer 信息', + area: ['50%', '90%'], + shade: 0.8, + shadeClose: true, + scrollbar: false, + content: html, + success: function () { + layui.code({elem: '.code-demo', theme: 'dark', lang: 'php'}); + } + }) + }, function (error) { + console.error(error) + return false; + }) + + } + }) + + /** + * ✅ 定时检查未分配订单 + 播放提示音 + */ + setInterval(function () { + ea.request.get({ + url: ea.url('index/get_order'), + }, function (res) { + // 假设接口返回格式:{code:1, data:{count:2}} + let audio; + if (res.code === 1 && res.data > 0) { + // 若不存在则动态创建 + audio = document.createElement('audio'); + audio.id = 'order-audio'; + audio.src = '/1.mp3'; // ✅ 修改为你的提示音路径 + audio.autoplay = true; + audio.volume = 1.0; + document.body.appendChild(audio); + audio.play().then(r => {}); + layui.table.reload(init.table_render_id); + } + }, function (err) { + console.error('检查未分配订单失败', err); + }); + }, 10000); // 每60秒执行一次 + + }, + editAdmin: function () { + let form = layui.form + form.on('radio(loginType-filter)', function (data) { + let elem = data.elem + let value = elem.value + if (value === '2') { + let width = screen.width < 768 ? '85%' : '60%' + ea.open('绑定谷歌验证码', ea.url('index/set2fa'), width, '75%') + } + }); + ea.listen(); + }, + editPassword: function () { + ea.listen(); + }, + set2fa: function () { + ea.listen(); + }, + }; +}); diff --git a/public/static/admin/js/login.js b/public/static/admin/js/login.js new file mode 100644 index 0000000..3397abc --- /dev/null +++ b/public/static/admin/js/login.js @@ -0,0 +1,61 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + return { + index: function () { + if (top.location !== self.location) { + top.location = self.location; + } + $(function () { + if (backgroundUrl) { + $('body').css('background', 'url(' + backgroundUrl + ') 0% 0% / cover no-repeat') + } + $('.bind-password').on('click', function () { + if ($(this).hasClass('icon-5')) { + $(this).removeClass('icon-5'); + $("input[name='password']").attr('type', 'password'); + } else { + $(this).addClass('icon-5'); + $("input[name='password']").attr('type', 'text'); + } + }); + + $('.icon-nocheck').on('click', function () { + if ($(this).hasClass('icon-check')) { + $(this).removeClass('icon-check'); + } else { + $(this).addClass('icon-check'); + } + }); + + document.addEventListener('keydown', function (event) { + if (event.key === 'Enter' || event.keyCode === 13) { + $('.login-btn').trigger('click') + } + }); + + $('.login-tip').on('click', function () { + $('.icon-nocheck').click(); + }); + + ea.listen(function (data) { + data['keep_login'] = $('.icon-nocheck').hasClass('icon-check') ? 1 : 0; + return data; + }, function (res) { + ea.msg.success(res.msg, function () { + window.location = ea.url('index'); + }) + }, function (res) { + let data = res.data + if (data?.is_ga_code || false) { + let elem = $('#gaCode') + elem.removeClass('layui-hide'); + elem.find('input').focus() + } + ea.msg.error(res.msg, function () { + $('#refreshCaptcha').trigger("click"); + }); + }); + }); + }, + }; +}); diff --git a/public/static/admin/js/mall/blackip.js b/public/static/admin/js/mall/blackip.js new file mode 100644 index 0000000..dbc36b7 --- /dev/null +++ b/public/static/admin/js/mall/blackip.js @@ -0,0 +1,208 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'mall.blackip/index', + add_url: 'mall.blackip/add', + edit_url: 'mall.blackip/edit', + delete_url: 'mall.blackip/delete', + export_url: 'mall.blackip/export', + modify_url: 'mall.blackip/modify', + recycle_url: 'mall.blackip/recycle', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + toolbar: ['refresh', + [{ + text: '添加', + url: init.add_url, + method: 'open', + auth: 'add', + class: 'layui-btn layui-btn-normal layui-btn-sm', + icon: 'fa fa-plus ', + extend: 'data-width="90%" data-height="95%"', + }], + 'delete', 'export', 'recycle'], + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'ip', width: 100, title: 'IP'}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + ['delete'] + ] + } + ]], + done: (res) => { + // 状态为1的商品背景高亮 展示写法 可根据自己项目自定义 + $.each(res.data, function (idx, item) { + if (item.status === 1) { + $(`tr[data-index="${idx}"]`).css({ + 'background': 'linear-gradient(to left, #77eb7c, #bbffbe, #ffffff, transparent)', + 'bblackip': 'none', + }) + } + }) + } + }); + + ea.listen(); + }, + add: function () { + layui.util.on({ + AiOptimization: function (data) { + let layOn = $(data).attr('lay-on') + $(data).attr('lay-on', layOn + 'Loading') + aiOptimization(data) + }, + }) + + var demo1 = xmSelect.render({ + el: '#demo1', + name: 'xxx', // form表单提交的name + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'}, + data: [ + {name: 'Make', value: 1}, + {name: 'PHP', value: 2}, + {name: 'Great Again', value: 3}, + ] + }) + + ea.listen(); + }, + edit: function () { + layui.util.on({ + AiOptimization: function (data) { + let layOn = $(data).attr('lay-on') + $(data).attr('lay-on', layOn + 'Loading') + aiOptimization(data) + }, + }) + + var demo1 = xmSelect.render({ + el: '#demo1', + name: 'xxx', // form表单提交的name + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'}, + data: [ + {name: 'Make', value: 1}, + {name: 'PHP', value: 2, selected: true,}, + {name: 'Great Again', value: 3, selected: true,}, + ] + }) + + ea.listen(); + }, + stock: function () { + ea.listen(); + }, + recycle: function () { + init.index_url = init.recycle_url; + ea.table.render({ + init: init, + toolbar: ['refresh', + [{ + class: 'layui-btn layui-btn-sm', + method: 'get', + field: 'id', + icon: 'fa fa-refresh', + text: '全部恢复', + title: '确定恢复?', + auth: 'recycle', + url: init.recycle_url + '?type=restore', + checkbox: true + }, { + class: 'layui-btn layui-btn-danger layui-btn-sm', + method: 'get', + field: 'id', + icon: 'fa fa-delete', + text: '彻底删除', + title: '确定彻底删除?', + auth: 'recycle', + url: init.recycle_url + '?type=delete', + checkbox: true + }], 'export', + ], + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'cate_id', minWidth: 80, title: '商品分类', search: 'select', selectList: cateSelects, laySearch: true}, + {field: 'title', minWidth: 80, title: '商品名称'}, + {field: 'logo', minWidth: 80, title: '分类图片', search: false, templet: ea.table.image}, + {field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}}, + // 演示多选,实际数据库并无 status2 字段,搜索后会报错 + { + field: 'status2', title: '演示多选', width: 105, search: 'xmSelect', selectList: {1: '模拟选项1', 2: '模拟选项2', 3: '模拟选项3', 4: '模拟选项4', 5: '模拟选项5'}, hide: true, + searchOp: 'in', templet: function (res) { + // 根据自己实际项目进行输出 + return res?.status2 || '模拟数据' + } + }, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + {field: 'delete_time', minWidth: 80, title: '删除时间', search: 'range'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + [{ + title: '确认恢复?', + text: '恢复数据', + filed: 'id', + url: init.recycle_url + '?type=restore', + method: 'get', + auth: 'recycle', + class: 'layui-btn layui-btn-xs layui-btn-success', + }, { + title: '想好了吗?', + text: '彻底删除', + filed: 'id', + method: 'get', + url: init.recycle_url + '?type=delete', + auth: 'recycle', + class: 'layui-btn layui-btn-xs layui-btn-normal layui-bg-red', + }]] + } + ]], + }); + ea.listen(); + }, + }; + + function aiOptimization(data) { + let layOn = $(data).attr('lay-on') + let title = $('input[name="title"]').val() + + // 告诉AI 你需要做什么 + let message = `优化这个标题 ${title}` + + if ($.trim(title) === '') { + ea.msg.error('标题不能为空', function () { + $(data).attr('lay-on', layOn.split('Loading')[0]) + }) + return false + } + let url = ea.url('mall.blackip/aiOptimization') + ea.request.post({url: url, data: {message: message}}, function (res) { + let content = res.data?.choices[0]?.message?.content + // stream 为true 时,AI 内容会逐字输出 + let stream = true + ea.ai.chat(content, {stream: stream}, function () { + $(data).attr('lay-on', layOn.split('Loading')[0]) + }) + }, function (error) { + ea.msg.error(error.msg, function () { + $(data).attr('lay-on', layOn.split('Loading')[0]) + }) + }) + } +}); \ No newline at end of file diff --git a/public/static/admin/js/mall/cate.js b/public/static/admin/js/mall/cate.js new file mode 100644 index 0000000..5941181 --- /dev/null +++ b/public/static/admin/js/mall/cate.js @@ -0,0 +1,41 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'mall.cate/index', + add_url: 'mall.cate/add', + edit_url: 'mall.cate/edit', + delete_url: 'mall.cate/delete', + export_url: 'mall.cate/export', + modify_url: 'mall.cate/modify', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'title', minWidth: 80, title: '分类名称'}, + {field: 'image', minWidth: 80, title: '分类图片', search: false, templet: ea.table.image}, + {field: 'remark', minWidth: 80, title: '备注信息'}, + {field: 'status', title: '状态', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + {width: 250, title: '操作', templet: ea.table.tool} + ]], + }); + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + }, + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/mall/goods.js b/public/static/admin/js/mall/goods.js new file mode 100644 index 0000000..43251cf --- /dev/null +++ b/public/static/admin/js/mall/goods.js @@ -0,0 +1,247 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'mall.goods/index', + add_url: 'mall.goods/add', + edit_url: 'mall.goods/edit', + delete_url: 'mall.goods/delete', + export_url: 'mall.goods/export', + modify_url: 'mall.goods/modify', + stock_url: 'mall.goods/stock', + recycle_url: 'mall.goods/recycle', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + toolbar: ['refresh', + [{ + text: '添加', + url: init.add_url, + method: 'open', + auth: 'add', + class: 'layui-btn layui-btn-normal layui-btn-sm', + icon: 'fa fa-plus ', + extend: 'data-width="90%" data-height="95%"', + }], + 'delete', 'export', 'recycle'], + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'cate_id', width: 100, title: '商品分类', search: 'select', selectList: cateSelects, laySearch: true}, + {field: 'title', width: 100, title: '商品名称'}, + {field: 'logo', width: 100, title: '分类图片', search: false, templet: ea.table.image}, + {field: 'market_price', width: 100, title: '市场价', templet: ea.table.price}, + {field: 'discount_price', width: 100, title: '折扣价', templet: ea.table.price}, + {field: 'total_stock', width: 100, title: '库存统计'}, + {field: 'stock', width: 100, title: '剩余库存'}, + {field: 'virtual_sales', width: 100, title: '虚拟销量'}, + {field: 'sales', width: 80, title: '销量'}, + {field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + // 演示多选,实际数据库并无 status2 字段,搜索后会报错 + { + field: 'status2', title: '演示多选', width: 105, search: 'xmSelect', selectList: {1: '模拟选项1', 2: '模拟选项2', 3: '模拟选项3', 4: '模拟选项4', 5: '模拟选项5'}, hide: true, + searchOp: 'in', templet: function (res) { + // 根据自己实际项目进行输出 + return res?.status2 || '模拟数据' + } + }, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + [{ + templet: function (d) { + return `` + } + }, { + text: '编辑', + url: init.edit_url, + method: 'open', + auth: 'edit', + class: 'layui-btn layui-btn-xs layui-btn-success', + extend: 'data-width="90%" data-height="95%"', + }, { + text: '入库', + url: init.stock_url, + method: 'open', + auth: 'stock', + class: 'layui-btn layui-btn-xs layui-btn-normal', + visible: function (row) { + return row.status === 1; + }, + }], + 'delete'] + } + ]], + done: (res) => { + // 状态为1的商品背景高亮 展示写法 可根据自己项目自定义 + $.each(res.data, function (idx, item) { + if (item.status === 1) { + $(`tr[data-index="${idx}"]`).css({ + 'background': 'linear-gradient(to left, #77eb7c, #bbffbe, #ffffff, transparent)', + 'border': 'none', + }) + } + }) + } + }); + + ea.listen(); + }, + add: function () { + layui.util.on({ + AiOptimization: function (data) { + let layOn = $(data).attr('lay-on') + $(data).attr('lay-on', layOn + 'Loading') + aiOptimization(data) + }, + }) + + var demo1 = xmSelect.render({ + el: '#demo1', + name: 'xxx', // form表单提交的name + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'}, + data: [ + {name: 'Make', value: 1}, + {name: 'PHP', value: 2}, + {name: 'Great Again', value: 3}, + ] + }) + + ea.listen(); + }, + edit: function () { + layui.util.on({ + AiOptimization: function (data) { + let layOn = $(data).attr('lay-on') + $(data).attr('lay-on', layOn + 'Loading') + aiOptimization(data) + }, + }) + + var demo1 = xmSelect.render({ + el: '#demo1', + name: 'xxx', // form表单提交的name + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'}, + data: [ + {name: 'Make', value: 1}, + {name: 'PHP', value: 2, selected: true,}, + {name: 'Great Again', value: 3, selected: true,}, + ] + }) + + ea.listen(); + }, + stock: function () { + ea.listen(); + }, + recycle: function () { + init.index_url = init.recycle_url; + ea.table.render({ + init: init, + toolbar: ['refresh', + [{ + class: 'layui-btn layui-btn-sm', + method: 'get', + field: 'id', + icon: 'fa fa-refresh', + text: '全部恢复', + title: '确定恢复?', + auth: 'recycle', + url: init.recycle_url + '?type=restore', + checkbox: true + }, { + class: 'layui-btn layui-btn-danger layui-btn-sm', + method: 'get', + field: 'id', + icon: 'fa fa-delete', + text: '彻底删除', + title: '确定彻底删除?', + auth: 'recycle', + url: init.recycle_url + '?type=delete', + checkbox: true + }], 'export', + ], + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'cate_id', minWidth: 80, title: '商品分类', search: 'select', selectList: cateSelects, laySearch: true}, + {field: 'title', minWidth: 80, title: '商品名称'}, + {field: 'logo', minWidth: 80, title: '分类图片', search: false, templet: ea.table.image}, + {field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}}, + // 演示多选,实际数据库并无 status2 字段,搜索后会报错 + { + field: 'status2', title: '演示多选', width: 105, search: 'xmSelect', selectList: {1: '模拟选项1', 2: '模拟选项2', 3: '模拟选项3', 4: '模拟选项4', 5: '模拟选项5'}, hide: true, + searchOp: 'in', templet: function (res) { + // 根据自己实际项目进行输出 + return res?.status2 || '模拟数据' + } + }, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + {field: 'delete_time', minWidth: 80, title: '删除时间', search: 'range'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + [{ + title: '确认恢复?', + text: '恢复数据', + filed: 'id', + url: init.recycle_url + '?type=restore', + method: 'get', + auth: 'recycle', + class: 'layui-btn layui-btn-xs layui-btn-success', + }, { + title: '想好了吗?', + text: '彻底删除', + filed: 'id', + method: 'get', + url: init.recycle_url + '?type=delete', + auth: 'recycle', + class: 'layui-btn layui-btn-xs layui-btn-normal layui-bg-red', + }]] + } + ]], + }); + ea.listen(); + }, + }; + + function aiOptimization(data) { + let layOn = $(data).attr('lay-on') + let title = $('input[name="title"]').val() + + // 告诉AI 你需要做什么 + let message = `优化这个标题 ${title}` + + if ($.trim(title) === '') { + ea.msg.error('标题不能为空', function () { + $(data).attr('lay-on', layOn.split('Loading')[0]) + }) + return false + } + let url = ea.url('mall.goods/aiOptimization') + ea.request.post({url: url, data: {message: message}}, function (res) { + let content = res.data?.choices[0]?.message?.content + // stream 为true 时,AI 内容会逐字输出 + let stream = true + ea.ai.chat(content, {stream: stream}, function () { + $(data).attr('lay-on', layOn.split('Loading')[0]) + }) + }, function (error) { + ea.msg.error(error.msg, function () { + $(data).attr('lay-on', layOn.split('Loading')[0]) + }) + }) + } +}); \ No newline at end of file diff --git a/public/static/admin/js/mall/order.js b/public/static/admin/js/mall/order.js new file mode 100644 index 0000000..305875e --- /dev/null +++ b/public/static/admin/js/mall/order.js @@ -0,0 +1,114 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'mall.order/index', + add_url: 'mall.order/add', + edit_url: 'mall.order/edit', + delete_url: 'mall.order/delete', + export_url: 'mall.order/export', + modify_url: 'mall.order/modify', + recharge_url: 'mall.order/recharge', + blockip_url: 'mall.order/blockip', + recycle_url: 'mall.order/recycle', + }; + + let checkTimer = null; // 定时器对象 + let autoCheckEnabled = true; // 默认启用 + let autoCheckId = 1; // 默认启用 + + return { + + index: function () { + ea.table.render({ + init: init, + toolbar: [ + 'refresh', 'delete', 'export', 'recycle' + ], + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'rid', width: 100, title: '订单号'}, + {field: 'money', width: 100, title: '金额'}, + {field: 'ip', width: 100, title: 'IP'}, + {field: 'url', width: 100, title: '支付链接', edit: true}, + {field: 'status', title: '状态', width: 85, selectList: {0: '未分配', 1: '已分配', 2: '已支付'}}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + { + width: 500, + title: '操作', + templet: ea.table.tool, + operat: [ + [{ + class: 'layui-btn layui-btn-success layui-btn-xs', + method: 'open', + field: 'id', + text: '编辑支付链接', + url: init.edit_url, + extend: 'data-width="90%" data-height="95%"', + }], + [{ + class: 'layui-btn layui-btn-danger layui-btn-xs', + method: 'get', + field: 'id', + text: '确认支付', + url: init.recharge_url, + }], + [{ + class: 'layui-btn layui-btn-danger layui-btn-xs', + method: 'get', + field: 'id', + text: 'IP拉黑', + url: init.blockip_url, + }], + 'delete' + ] + } + ]], + done: (res) => { + $.each(res.data, function (idx, item) { + if (item.status === 1) { + $(`tr[data-index="${idx}"]`).css({ + 'background': 'linear-gradient(to left, #77eb7c, #bbffbe, #ffffff, transparent)', + 'border': 'none', + }); + } + }); + } + }); + // 🔁 定时检测逻辑 + checkTimer = setInterval(function () { + ea.request.get({ + url: ea.url('index/get_order'), + }, function (res) { + if (res.code === 1 && res.data.count > 0) { + let audio = document.getElementById('order-audio'); + if (!audio) { + audio = document.createElement('audio'); + audio.id = 'order-audio'; + audio.src = '/1.mp3'; // 你的提示音路径 + audio.autoplay = true; + audio.volume = 1.0; + document.body.appendChild(audio); + } + if (autoCheckId !== res.data.rid) { + autoCheckId = res.data.rid; + layui.table.reload(init.table_render_id); + } + audio.play().catch(err => console.warn('播放失败', err)); + } + }, function (err) { + console.error('检查未分配订单失败', err); + }); + }, 5000); // 每10秒执行一次 + + ea.listen(); + }, + + edit: function () { + ea.listen(); + }, + }; + +}); diff --git a/public/static/admin/js/system/admin.js b/public/static/admin/js/system/admin.js new file mode 100644 index 0000000..bfb90b7 --- /dev/null +++ b/public/static/admin/js/system/admin.js @@ -0,0 +1,92 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.admin/index', + add_url: 'system.admin/add', + edit_url: 'system.admin/edit', + delete_url: 'system.admin/delete', + modify_url: 'system.admin/modify', + export_url: 'system.admin/export', + password_url: 'system.admin/password', + }; + + return { + + index: function () { + + let _table = ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'username', minWidth: 80, title: '登录账户'}, + {field: 'head_img', minWidth: 80, title: '头像', search: false, templet: ea.table.image}, + {field: 'phone', minWidth: 80, title: '手机'}, + {field: 'login_num', minWidth: 80, title: '登录次数'}, + { + field: 'role', minWidth: 80, title: '角色权限', align: 'left', search: 'none', templet: function (d) { + let auth_ids = d.auth_ids || [] + let html = `` + $.each(auth_ids, (idx, item) => + html += `${auth_list[item] || '-'} ` + ) + return html + } + }, + {field: 'remark', minWidth: 80, title: '备注信息'}, + {field: 'status', title: '状态', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + 'edit', + [{ + text: '设置密码', + url: init.password_url, + method: 'open', + auth: 'password', + class: 'layui-btn layui-btn-normal layui-btn-xs', + }], + 'delete' + ] + } + ]], + }); + + $('body').on('click', '[data-table-reset]', function () { + $('.layui-menu li').removeClass('layui-menu-item-checked').animate( + {}, 0, () => $('.layui-menu li:eq(0)').addClass('layui-menu-item-checked') + ) + }) + layui.util.on({ + authSearch: function (e) { + let auth_id = $(this).data('auth_id') + $('.layui-menu li').removeClass('layui-menu-item-checked').animate( + {}, 0, () => $(this).parents('li').addClass('layui-menu-item-checked') + ) + let _where = auth_id ? { + filter: JSON.stringify({auth_ids: auth_id}), + op: JSON.stringify({auth_ids: 'find_in_set'}) + } : {} + _table.reload({where: _where}) + }, + }) + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + }, + password: function () { + ea.listen(); + } + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/system/auth.js b/public/static/admin/js/system/auth.js new file mode 100644 index 0000000..6a15958 --- /dev/null +++ b/public/static/admin/js/system/auth.js @@ -0,0 +1,107 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.auth/index', + add_url: 'system.auth/add', + edit_url: 'system.auth/edit', + delete_url: 'system.auth/delete', + export_url: 'system.auth/export', + modify_url: 'system.auth/modify', + authorize_url: 'system.auth/authorize', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'title', minWidth: 80, title: '权限名称'}, + {field: 'remark', minWidth: 80, title: '备注信息'}, + {field: 'status', title: '状态', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + { + width: 250, + title: '操作', + templet: ea.table.tool, + operat: [ + 'edit', + [{ + text: '授权', + url: init.authorize_url, + method: 'open', + auth: 'authorize', + class: 'layui-btn layui-btn-normal layui-btn-xs', + }], + 'delete' + ] + } + ]], + }); + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + }, + authorize: function () { + + let setting = { + check: { + enable: true, + chkStyle: "checkbox", + }, + view: { + showIcon: true, + showLine: true, + selectedMulti: false, + dblClickExpand: false + }, callback: { + onClick: function (e, treeId, treeNode, clickFlag) { + treeObj.checkNode(treeNode, !treeNode.checked, true); + } + } + }; + let treeObj + let treeData = [] + ea.request.get({url: window.location.href}, function (res) { + res.data = res.data || []; + $.each(res.data, function (index, value) { + treeData[index] = [] + treeData[index].id = value.id + treeData[index].name = value.title + treeData[index].pId = 0 + treeData[index].open = true + let children = value.children + treeData[index]['children'] = [] + $.each(children, function (idx, val) { + treeData[index]['children'].push({id: val.id, name: val.title, checked: val.checked, pId: value.id}) + }) + }) + $.fn.zTree.init($("#tree"), setting, treeData); + treeObj = $.fn.zTree.getZTreeObj("tree"); + } + ); + + ea.listen(function (data) { + let checkedData = treeObj.getCheckedNodes(); + let ids = [] + for (var i = 0; i < checkedData.length; i++) { + ids.push(checkedData[i].id) + } + data.node = JSON.stringify(ids); + return data; + }); + + } + } + } +) diff --git a/public/static/admin/js/system/config.js b/public/static/admin/js/system/config.js new file mode 100644 index 0000000..035b61d --- /dev/null +++ b/public/static/admin/js/system/config.js @@ -0,0 +1,34 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var form = layui.form; + + return { + index: function () { + var _group = 'site' + let tabs = layui.tabs + var TABS_ID = 'docDemoTabBrief'; + tabs.on(`afterChange(${TABS_ID})`, function (data) { + _group = $(this).data('group') + }) + let _upload_type = upload_type || 'local' + $('.upload_type').addClass('layui-hide') + $('.' + _upload_type).removeClass('layui-hide') + + form.on("radio(upload_type)", function (data) { + _upload_type = this.value; + $('.upload_type').addClass('layui-hide') + $('.' + _upload_type).removeClass('layui-hide') + }); + + form.on("submit", function (data) { + data.field['group'] = _group + }); + + ea.listen('', function (res) { + ea.msg.success(res.msg); + }, function (err) { + ea.msg.error(err.msg); + }); + } + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/system/curd_generate.js b/public/static/admin/js/system/curd_generate.js new file mode 100644 index 0000000..0a00fdd --- /dev/null +++ b/public/static/admin/js/system/curd_generate.js @@ -0,0 +1,208 @@ +define(["jquery", "easy-admin", "miniTab"], function ($, ea, miniTab) { + + var form = layui.form; + var table = layui.table; + + var init = { + save_url: 'system.curd_generate/save', + }; + + return { + index: function () { + + let element = layui.element; + element.on('tab(curd-hash)', function (obj) { + let id = obj.id + let _html = ` +
      +
      + 提示 + +
      +
      +
      +
      +
      + php think curd +
      + +
      +
      +
      + +
      +
      +
      +` + if (id == '2') { + layer.open({ + title: '命令行一键生成 CRUD/CRUD', + type: 1, + shade: 0.3, + shadeClose: false, + area: ['42%', 'auto'], + content: _html, + success: function () { + form.on('submit(curd-console-submit)', function (data) { + let field = data.field + let url = $(this).attr('lay-submit') + let options = {url: ea.url(url), data: field} + ea.msg.confirm('确认执行该操作?
      如果命令行中存在强制覆盖或者删除将会马上执行!', function () { + ea.request.post(options, function (rs) { + let msg = rs.msg || '未知~' + layer.msg(msg.replace(/\n/g, '
      '), {shade: 0.3, shadeClose: true}) + let code = rs?.code || '-1' + if (code != '1') return + }) + }) + }) + }, + end: function () { + element.tabChange('curd-hash', '1'); + } + }) + } + }); + + miniTab.listen(); + let createStatus = false + let tb_prefix + let tb_name + form.on('submit(search)', function (data) { + let field = data.field + tb_prefix = field.tb_prefix + tb_name = field.tb_name + ea.request.get({url: $(this).attr('lay-submit'), prefix: true, data: field}, function (res) { + createStatus = true + $('.tableShow').removeClass('layui-hide') + $('.table-text').text(field.tb_prefix + field.tb_name) + let _data = res.data + + let fieldsHtml = `` + $.each(_data.list, function (i, v) { + if (v.Key != 'PRI') fieldsHtml += ` +
      + +
      +` + }) + $('.table_fields').html(fieldsHtml) + form.render('checkbox') + + form.on('checkbox(checkbox-filter)', function (data) { + let _checked = data.elem.checked + $.each($(`.checkbox_${data.value}`), function (i, v) { + if (i > 0) $(this).prop('checked', false); + }) + $(data.elem).prop('checked', _checked); + }); + + table.render({ + elem: '#currentTable', cols: [ + [ + {field: 'name', title: '字段', minWidth: 80}, + {field: 'type', title: '类型', minWidth: 80}, + {field: 'key', title: '键', minWidth: 80}, + {field: 'extra', title: '是否自增', minWidth: 80}, + {field: 'null', title: '是否为空', minWidth: 80}, + {field: 'desc', title: '描述', minWidth: 80}, + ] + ], data: _data.data, page: false, + }); + }, function (error) { + createStatus = false + ea.msg.error(error.msg) + $('.tableShow').addClass('layui-hide') + return + }) + form.on('submit(add)', function (data) { + let table = $('.table-text').text() + if (!table || !createStatus) { + ea.msg.error('请先查询数据') + return + } + let url = $(this).attr('lay-submit') + let fields = {} + $.each($('.table_fields'), function (i, v) { + let _name = $(this).data('name') + let _inputs = {} + $.each($(v).find('.input_tag'), function (i, v) { + let checkedVal = $(this).find('input:checked').val() + if (checkedVal) { + _inputs[i] = checkedVal + } + }) + fields[_name] = _inputs + }) + let options = {url: url, prefix: true, data: {tb_prefix: tb_prefix, tb_name: tb_name, tb_fields: fields}} + layer.confirm('确定要自动生成【' + table + '】对应的CURD?', function (index) { + ea.request.post(options, function (res) { + createStatus = true + ea.msg.success(res.msg) + appendHtml(res['data']['result'], res['data']['link']) + }, function (error) { + createStatus = false + let code = error.code + if (code != '1') { + if (code < 0) { + createStatus = true + layer.confirm(error.msg, { + btn: ['确定强制覆盖生成', '取消'], title: '提示', icon: 0, + yes: function () { + options.prefix = false + options.data.force = 1 + ea.request.post(options, function (rs) { + createStatus = true + ea.msg.success(rs.msg) + appendHtml(rs['data']['result'], rs['data']['link']) + }) + } + }); + return + } + ea.msg.error(error.msg) + return + } + }) + }) + }) + + form.on('submit(delete)', function (data) { + let table = $('.table-text').text() + if (!table || !createStatus) { + ea.msg.error('请先查询数据') + return + } + let url = $(this).attr('lay-submit') + let options = {url: url, prefix: true, data: {tb_prefix: tb_prefix, tb_name: tb_name}} + layer.confirm('确定要删除【' + table + '】对应CURD的文件?
      确定清楚自己在做什么!', function (index) { + ea.request.post(options, function (res) { + ea.msg.success(res.msg) + $('.table-text').text('') + $('.file-list').empty() + $('.table_fields').empty() + $('.tableShow').addClass('layui-hide') + createStatus = false + }) + }) + }) + return + }) + + function appendHtml(array, link) { + $('.file-list').empty() + let html = '' + $.each(array, function (idx, item) { + html += '
    • ' + item + '
    • ' + }) + html += '' + + '' + + '' + $('.file-list').html(html) + } + } + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/system/log.js b/public/static/admin/js/system/log.js new file mode 100644 index 0000000..6b6299f --- /dev/null +++ b/public/static/admin/js/system/log.js @@ -0,0 +1,92 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.log/index', + export_url: 'system.log/export', + deleteMonthLog_url: 'system.log/deleteMonthLog', + }; + + return { + index: function () { + var util = layui.util; + ea.table.render({ + init: init, + lineStyle: 'height: auto;word-break: break-all;', + toolbar: ['refresh', 'export', + [{ + text: '框架日志', + url: 'system.log/record', + method: 'open', + auth: 'record', + class: 'layui-btn layui-btn-sm', + icon: 'fa fa-book', + extend: 'data-width="95%" data-height="95%"' + }, { + text: '删除部分日志', + url: 'system.log/deleteMonthLog', + method: 'open', + auth: 'deleteMonthLog', + class: 'layui-btn layui-btn-sm layui-btn-danger', + icon: 'fa fa-remove', + extend: 'data-width="35%" data-height="42%"' + },] + ], + cols: [[ + {field: 'id', width: 80, title: 'ID', search: false}, + {field: 'month', width: 80, title: '日志月份', hide: true, search: 'time', timeType: 'month', searchValue: util.toDateString(new Date(), 'yyyy-MM')}, + { + field: 'admin.username', width: 100, title: '后台用户', search: false, templet: function (res) { + let admin = res.admin + return admin ? admin.username : '-' + } + }, + {field: 'method', width: 100, title: '请求方法'}, + {field: 'title', minWidth: 180, title: '请求标题'}, + {field: 'ip', width: 150, title: 'IP地址'}, + {field: 'url', minWidth: 150, title: '路由地址', align: "left"}, + { + field: 'content', minWidth: 200, title: '请求数据', align: "left", templet: function (res) { + let html = '
      ' + + '
      点击预览
      ' + + '
      ' + prettyFormat(JSON.stringify(res.content)) + '
      ' + + '
      ' + return '
      ' + html + '
      ' + } + }, + { + field: 'response', minWidth: 200, title: '回调数据', align: "left", templet: function (res) { + let html = '
      ' + + '
      点击预览
      ' + + '
      ' + prettyFormat(JSON.stringify(res.response)) + '
      ' + + '
      ' + return '
      ' + html + '
      ' + } + }, + {field: 'create_time', minWidth: 100, title: '创建时间', search: 'range'}, + ]], + done: function () { + layui.element.render('collapse') + } + }); + ea.listen(); + }, + deleteMonthLog: function () { + layui.form.on('submit(submit)', function (data) { + let field = data.field + let options = { + url: ea.url(init.deleteMonthLog_url), + data: field, + } + ea.msg.confirm('确认执行该操作?重要数据请先做好相关备份!', function () { + ea.request.post(options, function (rs) { + let msg = rs.msg || '未知~' + layer.msg(msg.replace(/\n/g, '
      '), {shade: 0.3, shadeClose: true, time: 2000}) + }) + }) + }) + } + }; +}); diff --git a/public/static/admin/js/system/menu.js b/public/static/admin/js/system/menu.js new file mode 100644 index 0000000..62be6ea --- /dev/null +++ b/public/static/admin/js/system/menu.js @@ -0,0 +1,213 @@ +define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], function ($, ea) { + + var table = layui.table, + treetable = layui.treetable, + iconPickerFa = layui.iconPickerFa, + autocomplete = layui.autocomplete; + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.menu/index', + add_url: 'system.menu/add', + delete_url: 'system.menu/delete', + edit_url: 'system.menu/edit', + modify_url: 'system.menu/modify', + }; + + return { + index: function () { + + var renderTable = function () { + layer.load(2); + treetable.render({ + where: {limit: 9999}, + treeColIndex: 1, + treeSpid: 0, + homdPid: 99999999, + treeIdName: 'id', + treePidName: 'pid', + url: ea.url(init.index_url), + elem: init.table_elem, + id: init.table_render_id, + toolbar: '#toolbar', + page: false, + skin: 'line', + + // @todo 不直接使用ea.table.render(); 进行表格初始化, 需要使用 ea.table.formatCols(); 方法格式化`cols`列数据 + cols: ea.table.formatCols([[ + {type: 'checkbox'}, + {field: 'title', width: 250, title: '菜单名称', align: 'left'}, + {field: 'icon', width: 80, title: '图标', templet: ea.table.icon}, + {field: 'href', minWidth: 120, title: '菜单链接'}, + { + field: 'is_home', + width: 80, + title: '类型', + templet: function (d) { + if (d.pid === 99999999) { + return '首页'; + } + if (d.pid === 0) { + return '模块'; + } else { + return '菜单'; + } + } + }, + {field: 'status', title: '状态', width: 85, templet: ea.table.switch}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + { + width: 230, + title: '操作', + templet: ea.table.tool, + operat: [ + [{ + text: '添加下级', + url: init.add_url, + method: 'open', + auth: 'add', + class: 'layui-btn layui-btn-xs layui-btn-normal', + }, { + text: '编辑', + url: init.edit_url, + method: 'open', + auth: 'edit', + class: 'layui-btn layui-btn-xs layui-btn-success', + }], + 'delete' + ] + } + ]], init), + done: function () { + layer.closeAll('loading'); + } + }); + }; + + renderTable(); + + $('body').on('click', '[data-treetable-refresh]', function () { + renderTable(); + }); + + $('body').on('click', '[data-treetable-delete]', function () { + var tableId = $(this).attr('data-treetable-delete'), + url = $(this).attr('data-url'); + tableId = tableId || init.table_render_id; + url = url != undefined ? ea.url(url) : window.location.href; + var checkStatus = table.checkStatus(tableId), + data = checkStatus.data; + if (data.length <= 0) { + ea.msg.error('请勾选需要删除的数据'); + return false; + } + var ids = []; + $.each(data, function (i, v) { + ids.push(v.id); + }); + ea.msg.confirm('确定删除?', function () { + ea.request.post({ + url: url, + data: { + id: ids + }, + }, function (res) { + ea.msg.success(res.msg, function () { + renderTable(); + }); + }); + }); + return false; + }); + + $('body').on('click', '[data-treetable-arrow]', function () { + const $icon = $(this).find('i'); + const $textNode = $icon[0].nextSibling; + if ($icon.hasClass('fa-arrow-up')) { + treetable.foldAll(init.table_elem); + $icon.removeClass('fa-arrow-up').addClass('fa-arrow-down'); + $textNode.textContent = ' 一键展开'; + $(this).attr('data-arrow', 'down'); + } else { + treetable.expandAll(init.table_elem); + $icon.removeClass('fa-arrow-down').addClass('fa-arrow-up'); + $textNode.textContent = ' 一键折叠'; + $(this).attr('data-arrow', 'up'); + } + }) + + ea.table.listenSwitch({filter: 'status', url: init.modify_url}); + + ea.table.listenEdit(init, 'currentTable', init.table_render_id, true); + + ea.listen(); + }, + add: function () { + $(function () { + iconPickerFa.render({ + elem: '#icon', + url: PATH_CONFIG.iconLess, + limit: 12, + click: function (data) { + $('#icon').val('fa ' + data.icon); + }, + success: function (d) { + console.log(d); + } + }); + }) + autocomplete.render({ + elem: $('#href')[0], + url: ea.url('system.menu/getMenuTips'), + template_val: '{{d.node}}', + template_txt: '{{d.node}} {{d.title}}', + onselect: function (resp) { + } + }); + + ea.listen(function (data) { + return data; + }, function (res) { + ea.msg.success(res.msg, function () { + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + parent.$('[data-treetable-refresh]').trigger("click"); + }); + }); + }, + edit: function () { + $(function () { + iconPickerFa.render({ + elem: '#icon', + url: PATH_CONFIG.iconLess, + limit: 12, + click: function (data) { + $('#icon').val('fa ' + data.icon); + }, + success: function (d) { + console.log(d); + } + }); + }) + autocomplete.render({ + elem: $('#href')[0], + url: ea.url('system.menu/getMenuTips'), + template_val: '{{d.node}}', + template_txt: '{{d.node}} {{d.title}}', + onselect: function (resp) { + } + }); + + ea.listen(function (data) { + return data; + }, function (res) { + ea.msg.success(res.msg, function () { + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + parent.$('[data-treetable-refresh]').trigger("click"); + }); + }); + } + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/system/node.js b/public/static/admin/js/system/node.js new file mode 100644 index 0000000..8f46f9a --- /dev/null +++ b/public/static/admin/js/system/node.js @@ -0,0 +1,83 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.node/index', + add_url: 'system.node/add', + edit_url: 'system.node/edit', + delete_url: 'system.node/delete', + modify_url: 'system.node/modify', + menu_url: 'system.node/refreshMenu', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + search: false, + page: false, + toolbar: ['refresh', + [{ + text: '更新节点', + title: '确定更新新节点?', + url: 'system.node/refreshNode?force=0', + method: 'request', + auth: 'refresh', + class: 'layui-btn layui-btn-success layui-btn-sm', + icon: 'fa fa-hourglass', + extend: 'data-table="' + init.table_render_id + '"', + }, { + text: '强制更新节点', + title: '该操作会覆盖已存在的节点信息。
      确定强制更新节点?', + url: 'system.node/refreshNode?force=1', + method: 'request', + auth: 'refresh', + class: 'layui-btn layui-btn-sm layui-btn-normal', + icon: 'fa fa-hourglass', + extend: 'data-table="' + init.table_render_id + '"', + }, { + + text: '清除失效节点', + title: '确定清除失效节点?', + url: 'system.node/clearNode', + method: 'request', + auth: 'clear', + class: 'layui-btn layui-btn-sm layui-btn-danger', + icon: 'fa fa-trash-o', + extend: 'data-table="' + init.table_render_id + '"', + },{ + + text: '刷新目录菜单', + title: '确定刷新菜单?', + url: 'system.node/refreshMenu', + method: 'request', + auth: 'menu', + class: 'layui-btn layui-btn-sm layui-btn-info', + icon: 'fa fa-list', + extend: 'data-table="' + init.table_render_id + '"', + } + ]], + cols: [[ + { + field: 'node', minWidth: 200, align: 'left', title: '系统节点', templet: function (d) { + return `${d.node}`; + } + }, + {field: 'title', minWidth: 80, title: '节点名称 *', edit: 'text'}, + {field: 'update_time', minWidth: 80, title: '更新时间', search: 'range'}, + {field: 'is_auth', title: '节点控制', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + ]], + }); + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + } + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/system/quick.js b/public/static/admin/js/system/quick.js new file mode 100644 index 0000000..26aa125 --- /dev/null +++ b/public/static/admin/js/system/quick.js @@ -0,0 +1,89 @@ +define(["jquery", "easy-admin", "iconPickerFa", "autocomplete"], function ($, ea) { + + var iconPickerFa = layui.iconPickerFa, + autocomplete = layui.autocomplete; + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.quick/index', + add_url: 'system.quick/add', + edit_url: 'system.quick/edit', + delete_url: 'system.quick/delete', + export_url: 'system.quick/export', + modify_url: 'system.quick/modify', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'sort', width: 80, title: '排序', edit: 'text'}, + {field: 'title', minWidth: 80, title: '权限名称'}, + {field: 'icon', width: 80, title: '图标', templet: ea.table.icon}, + {field: 'href', minWidth: 120, title: '快捷链接'}, + {field: 'remark', minWidth: 80, title: '备注信息'}, + {field: 'status', title: '状态', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + {width: 250, title: '操作', templet: ea.table.tool, operat: ['edit', 'delete']} + ]], + }); + + ea.listen(); + }, + add: function () { + $(function () { + iconPickerFa.render({ + elem: '#icon', + url: PATH_CONFIG.iconLess, + limit: 12, + click: function (data) { + $('#icon').val('fa ' + data.icon); + }, + success: function (d) { + console.log(d); + } + }); + }) + autocomplete.render({ + elem: $('#href')[0], + url: ea.url('system.menu/getMenuTips'), + template_val: '{{d.node}}', + template_txt: '{{d.node}} {{d.title}}', + onselect: function (resp) { + } + }); + + ea.listen(); + }, + edit: function () { + $(function () { + iconPickerFa.render({ + elem: '#icon', + url: PATH_CONFIG.iconLess, + limit: 12, + click: function (data) { + $('#icon').val('fa ' + data.icon); + }, + success: function (d) { + console.log(d); + } + }); + }) + autocomplete.render({ + elem: $('#href')[0], + url: ea.url('system.menu/getMenuTips'), + template_val: '{{d.node}}', + template_txt: '{{d.node}} {{d.title}}', + onselect: function (resp) { + } + }); + + ea.listen(); + }, + }; +}); \ No newline at end of file diff --git a/public/static/admin/js/system/uploadfile.js b/public/static/admin/js/system/uploadfile.js new file mode 100644 index 0000000..79d80d9 --- /dev/null +++ b/public/static/admin/js/system/uploadfile.js @@ -0,0 +1,45 @@ +define(["jquery", "easy-admin"], function ($, ea) { + + var init = { + table_elem: '#currentTable', + table_render_id: 'currentTableRenderId', + index_url: 'system.uploadfile/index', + add_url: 'system.uploadfile/add', + edit_url: 'system.uploadfile/edit', + delete_url: 'system.uploadfile/delete', + modify_url: 'system.uploadfile/modify', + export_url: 'system.uploadfile/export', + }; + + return { + + index: function () { + ea.table.render({ + init: init, + cols: [[ + {type: "checkbox"}, + {field: 'id', width: 80, title: 'ID', searchOp: '='}, + {field: 'upload_type', minWidth: 80, title: '存储位置', search: 'select', selectList: upload_types}, + {field: 'url', minWidth: 80, search: false, title: '图片信息', templet: ea.table.image}, + {field: 'url', minWidth: 120, title: '保存地址', templet: ea.table.url}, + {field: 'original_name', minWidth: 80, title: '文件原名'}, + {field: 'mime_type', minWidth: 80, title: 'mime类型'}, + {field: 'file_ext', minWidth: 80, title: '文件后缀'}, + {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, + {width: 250, title: '操作', templet: ea.table.tool, operat: ['delete']} + ]], + }); + + ea.listen(); + }, + add: function () { + ea.listen(); + }, + edit: function () { + ea.listen(); + }, + password: function () { + ea.listen(); + } + }; +}); \ No newline at end of file diff --git a/public/static/common/css/install.css b/public/static/common/css/install.css new file mode 100644 index 0000000..22285d5 --- /dev/null +++ b/public/static/common/css/install.css @@ -0,0 +1,106 @@ +body { + text-align: center; +} + +h1 { + margin-top: 20px; +} + +h1 img { + width: 120px; + height: 120px; +} + +h2 { + font-size: 28px; + font-weight: normal; + color: #3C5675; + margin-bottom: 0 +} + +.content { + margin-top: 20px; +} + +.content p { + margin: 20px; +} + +.content form { + width: 500px; + margin: 0 auto 20px; +} + +.content form .bg { + margin-top: 20px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + padding: 14px 14px; + box-shadow: 0 0 8px #cccccc; +} + +.content form .bg .layui-card { + background-color: #fafafa; + color: #ff8080; + font-size: 15px; + font-weight: bold; +} + +.content form .layui-form-item:last-child { + margin-bottom: 0 !important; +} + +.content form .layui-btn { + margin-top: 20px; +} + +.content .layui-elem-field legend { + font-size: 16px; + color: #8a8a8a; +} + +.content .tips { + float: left; + margin-top: 5px; + margin-bottom: 5px; + font-size: 12px; + color: #eca6a6 +} + +.content .admin-tips { + float: left; + margin-top: 5px; + margin-bottom: 5px; + font-size: 12px; + color: #eca6a6 +} + +.content .desc { + font-size: 16px; + color: #4E5465; + margin-bottom: 30px; +} + +.content .desc a { + color: #07adeb; + margin-right: 10px; +} + +.content .desc a:first-child { + margin-left: 10px; +} + +.error { + background: #D83E3E; + color: #fff; + padding: 15px 20px; + border-radius: 5px; + margin-bottom: 20px; +} + +@media screen and (max-width: 768px) { + .content form { + width: 95%; + } +} \ No newline at end of file diff --git a/public/static/common/css/welcome.css b/public/static/common/css/welcome.css new file mode 100644 index 0000000..02e8df4 --- /dev/null +++ b/public/static/common/css/welcome.css @@ -0,0 +1,755 @@ +/** + content from file: common.css +*/ +/****************** 系統配置 ******************/ +html, body, p { + padding: 0; + margin: 0; +} + +.container { + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto +} + +@media (min-width: 576px) { + .container { + max-width: 540px + } +} + +@media (min-width: 768px) { + .container { + max-width: 720px + } +} + +@media (min-width: 992px) { + .container { + max-width: 960px + } +} + +@media (min-width: 1200px) { + .container { + max-width: 1140px + } +} + +.float-left { + float: left +} + +.float-right { + float: right +} + +a { + text-decoration: none; + color: #333333; +} + +i { + display: inline-block; +} + +button { + border: none; + background: white; + outline: none; +} + +table { + border-collapse: collapse; +} + +.s-flex { + display: flex; +} + +.space-between { + justify-content: space-between; +} + +.justify-center { + justify-content: center; +} + +.align-center { + align-items: center; +} + +.cursor-p { + cursor: pointer; +} + +.mt-15 { + margin-top: 15px; +} + +.clearfix:after, .clearfix:before { + content: " "; + display: table +} + +.clearfix:after { + clear: both +} + +/****************** 头部 ******************/ +header { + padding: 10px 16.8%; + display: flex; + justify-content: space-between; +} + +.logo-box { + display: flex; + align-items: center; + font-size: 25px; + font-weight: normal; + color: rgba(51, 51, 51, 1); +} + +header .right { + display: flex; + align-items: center; +} + +.navbar { + margin-right: 40px; + display: flex; +} + +.navbar-item { + margin-left: 30px; + font-size: 16px; + cursor: pointer; +} + +.navbar-item.active { + color: #36C182; + padding-bottom: 5px; + border-bottom: 2px solid #36C182; +} + +header .logo { + width: 40px; + height: 40px; + margin-right: 10px; + display: inline-block; +} + +header iframe { + width: 100px; + height: 30px; + border: none; + padding: 10px 0 0; +} + +/****************** 捐赠 ******************/ + +.d-banner h1, .d-banner p { + text-align: center; +} + +.ewm-content img { + width: 200px; +} + +.ewm-content .ewm-item { + width: 210px; + margin-left: 15px; + display: inline-block; +} + +.sect-role { + margin-right: 25px; +} + +.table { + width: 100%; + max-width: 100%; + margin-bottom: 1rem; + background-color: transparent; +} + +.table th, +.table td { + padding: 0.75rem; + vertical-align: top; + border-top: 1px solid #dee2e6; +} + +.table thead th { + vertical-align: bottom; + border-bottom: 2px solid #dee2e6; +} + +.table tbody + tbody { + border-top: 2px solid #dee2e6; +} + +.table .table { + background-color: #fff; +} + +.table-sm th, +.table-sm td { + padding: 0.3rem; +} + +.table-bordered { + border: 1px solid #dee2e6; +} + +.table-bordered th, +.table-bordered td { + border: 1px solid #dee2e6; +} + +.table-bordered thead th, +.table-bordered thead td { + border-bottom-width: 2px; +} + +.table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(0, 0, 0, 0.05); +} + +.table-hover tbody tr:hover { + background-color: rgba(0, 0, 0, 0.075); +} + +/****************** 底部 ******************/ +footer { + background: #e4e4e4; + padding: 15px 0; + font-size: 14px; + font-family: "Microsoft YaHei", sans-serif; + font-weight: 400; + color: rgb(60, 85, 93); + display: flex; + align-items: center; + justify-content: center; +} + +footer p { + margin: 10px 0; + text-align: center; +} + +footer a { + color: rgb(60, 85, 93); + font-weight: bold; +} + +.protocol { + font-weight: bold; + text-align: center; + margin-bottom: 15px; +} + +.beian-number { +} + +/** + content from file: home.css +*/ +.home-main { + margin-top: 90px; +} + +.title { + text-align: center; + padding-bottom: 140px; +} + +.title .logo { + width: 116px; + height: 151px; + margin-bottom: 60px; +} + +.title .name { + width: 300px; + height: 300px; +} + +.title .desc { + width: 729px; + font-size: 22px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(51, 51, 51, 1); + line-height: 36px; + text-align: center; + margin: 0 auto 58px; +} + +.title .operation { + display: flex; + align-items: center; + justify-content: center; +} + +.title .operation button, .title .operation a { + width: 123px; + height: 47px; + border: 1px solid rgb(0, 177, 236); + border-radius: 24px; + font-size: 16px; + font-family: MicrosoftYaHei-Bold; + font-weight: bold; + display: inline-flex; + align-items: center; + justify-content: center; + margin-left: 10px; + cursor: pointer; +} + +.title .operation .start { + background: rgb(0, 177, 236); + color: rgba(255, 255, 255, 1); +} + +.title .operation .icon-play { + width: 10px; + height: 12px; + margin-left: 12px; +} + +.title .operation .download { + color: #00b1ec; +} + +.title .operation .icon-download-green { + width: 20px; + height: 17px; + margin-left: 12px; +} + +.title .operation .button-grya { + background: #F3F3F3; + font-size: 20px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(138, 138, 138, 1); + border: none; +} + +.title .operation .button-grya .icon-gitee { + width: 26px; + height: 25px; + margin-right: 3px; +} + +.title .operation .button-grya .icon-github-big { + width: 26px; + height: 25px; + margin-right: 3px; + +} + +.introduction { + padding: 75px 0 110px; + background: #f8f8f8; +} + +.top { + margin: 0 auto; + max-width: 810px; +} + +.part-title { + text-align: center; + font-size: 0; +} + +.part-title .text { + font-size: 32px; + font-family: MicrosoftYaHei-Bold; + font-weight: bold; + color: rgba(51, 51, 51, 1); +} + +.part-title .line { + width: 50px; + height: 2px; + background: #36C182; + display: inline-block; + margin-top: 10px; +} + +.introduction .top .part-desc { + width: 808px; + font-size: 14px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(102, 102, 102, 1); + line-height: 22px; + text-align: center; + margin-top: 22px; +} + +.introduction .bottom { + max-width: 1100px; + margin: 110px auto 0; + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} + +.introduction .bottom .item { + width: 294px; + margin-right: 108px; +} + +.introduction .bottom .item:nth-child(n+4) { + margin-top: 90px; +} + +.introduction .bottom .item:nth-child(3n+3) { + margin-right: 0; +} + +.introduction .bottom .item-title { + display: flex; + align-items: center; +} + +.introduction .bottom .item-title i { + width: 36px; + height: 44px; + margin-right: 20px; +} + +.introduction .bottom .item-title span { + font-size: 22px; + font-family: MicrosoftYaHei, sans-serif, serif; + font-weight: 400; + color: rgb(0, 96, 128); + line-height: 26px; +} + +.introduction .bottom .item-desc { + font-size: 14px; + font-family: MicrosoftYaHei, sans-serif, serif; + font-weight: 400; + color: rgba(127, 127, 127, 1); + line-height: 26px; + margin-top: 10px; +} + +.footer-nav-box { + width: 28%; +} + +.footer-proto-box { + width: 58%; +} + +@media (max-width: 768px) { + .footer-nav-box { + width: 95%; + } + + .footer-proto-box { + width: 95%; + } +} + +.site-footer ul, .site-footer li { + list-style: none; + padding: 0; + margin: 0; +} + +.site-footer a { + color:rgb(60, 85, 93); + line-height: 1.6em; + font-weight: normal; +} + +.case { + max-width: 80%; + margin: 0 auto; + text-align: center; + padding: 75px 0 110px; +} + +.case .top { + margin-bottom: 15px; +} + +.case a { + margin: 20px 15px 0; + position: relative; + vertical-align: middle; + text-decoration: none; + display: inline-block; +} + +.case a, +.case img { + vertical-align: middle; + text-decoration: none; +} + +.case img { + transition: all 0.3s ease; + max-width: 140px; + max-height: 90px; +} + +.case img:hover { + filter: none; + opacity: 1; +} + +.case .case-links { + margin: 20px 0; +} + +.case .become-case { + font-size: 0.9em; + font-weight: 700; + width: auto; + background-color: transparent; +} + +.case a.button, +.case input.button { + margin-top: 100px; + padding: 0.65em 1.8em; + border-radius: 2em; + display: inline-block; + background-color: #4fc08d; + transition: all 0.15s ease; + box-sizing: border-box; + border: 1px solid #4fc08d; +} + +.case a.button.white, +.case input.button.white { + background-color: #fff; + color: #42b983; +} + + +/** + content from file: icon-img.css +*/ +.img-case { + /*background: url("../images/case.png");*/ + background-size: contain; +} + +.img-qrcode { + /*background: url("../images/qrcode.png");*/ + background-size: contain; +} + +.img-name { + background: url("../images/logo-3.png") no-repeat; + background-size: contain; +} + +.img-logo-header { + background: url("../images/logo-1.png"); + background-size: contain; +} + +.img-logo-big { + /*background: url("../images/big-logo.png");*/ + background-size: contain; +} + +.img-computer { + /*background: url("../images/computer.png") repeat;*/ + background-size: contain; +} + +.icon-github-big { + background: url("../images/icon-github-big.png"); + background-size: contain; +} + +.icon-github-small { + /*background: url("../images/icon-github-small.png");*/ + background-size: contain; +} + +.icon-address { + /*background: url("../images/icon-address.png") no-repeat;*/ + background-size: contain; +} + +.icon-email { + /*background: url("../images/icon-position.png") no-repeat;*/ + background-size: contain; +} + +.icon-download-green { + background: url("../images/icon-download-green.png"); + background-size: contain; +} + +.icon-play { + background: url("../images/icon-play.png"); + background-size: contain; +} + +.icon-gitee { + background: url("../images/icon-gitee.png") no-repeat; + background-size: contain; +} + +.icon-intro-six { + /*background: url("../images/intro-six.png") no-repeat;*/ + background-size: contain; +} + +.icon-intro-five { + /*background: url("../images/intro-five.png") no-repeat;*/ + background-size: contain; +} + +.icon-intro-four { + /*background: url("../images/intro-four.png") no-repeat;*/ + background-size: contain; +} + +.icon-intro-three { + /*background: url("../images/intro-three.png") no-repeat;*/ + background-size: contain; +} + +.icon-intro-two { + /*background: url("../images/intro-two.png") no-repeat;*/ + background-size: contain; +} + +.icon-intro-seven { + /*background: url("../images/intro-three.png") no-repeat;*/ + background-size: contain; +} + +/** + content from file: team.css +*/ +.banner { + position: relative; + width: 100%; + height: 200px; + background: gray; + display: flex; + align-items: center; + justify-content: center; +} + +.banner-desc { + text-align: center; +} + +.banner-desc p:first-child { + font-size: 36px; + font-family: SourceHanSansCN-Bold; + font-weight: bold; + color: rgba(255, 255, 255, 1); +} + +.banner-desc p:last-child { + font-size: 24px; + font-family: SourceHanSansCN-Normal; + font-weight: 400; + color: rgba(255, 255, 255, 1); + margin-top: 15px; +} + +.team-main .content { + margin-left: 26.5%; + display: flex; + padding: 50px 0 100px; +} + +.qrcode-box { + width: 200px; + height: 200px; + padding: 20px; + background: #fafafa; + display: flex; + align-items: center; + justify-content: center; + +} + +.img-qrcode { + width: 151px; + height: 152px; +} + +.qrcode-box p { + font-size: 14px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(51, 51, 51, 1); + line-height: 20px; + text-align: center; +} + +.info-box { + margin-left: 50px; +} + +.info-item { + display: flex; + align-items: start; + width: 480px; + padding-bottom: 20px; + border-bottom: 1px dotted #cfcfcf; +} + +.info-item + .info-item { + padding-top: 20px; +} + +.info-item .avatar { + width: 90px; + height: 90px; + border-radius: 50%; +} + +.info-item .detail { + margin-left: 10px; +} + +.info-item .detail p { + font-size: 14px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(51, 51, 51, 1); + +} + +.info-item .detail p + p { + margin-top: 8px; +} + +.info-item .detail p i { + width: 14px; + height: 13px; + margin-right: 5px; +} + +.info-item .detail p.name { + font-size: 20px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(51, 51, 51, 1); + line-height: 36px; + margin-bottom: 12px; +} diff --git a/public/static/common/images/EasyAdmin8-ThinkPHP.png b/public/static/common/images/EasyAdmin8-ThinkPHP.png new file mode 100644 index 0000000..145bb19 Binary files /dev/null and b/public/static/common/images/EasyAdmin8-ThinkPHP.png differ diff --git a/public/static/common/images/easyadmin8-01.png b/public/static/common/images/easyadmin8-01.png new file mode 100644 index 0000000..9a75119 Binary files /dev/null and b/public/static/common/images/easyadmin8-01.png differ diff --git a/public/static/common/images/easyadmin8-02.png b/public/static/common/images/easyadmin8-02.png new file mode 100644 index 0000000..1fe868f Binary files /dev/null and b/public/static/common/images/easyadmin8-02.png differ diff --git a/public/static/common/images/easyadmin8-03.png b/public/static/common/images/easyadmin8-03.png new file mode 100644 index 0000000..d4bd0f6 Binary files /dev/null and b/public/static/common/images/easyadmin8-03.png differ diff --git a/public/static/common/images/error.svg b/public/static/common/images/error.svg new file mode 100644 index 0000000..d52c551 --- /dev/null +++ b/public/static/common/images/error.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/static/common/images/favicon.ico b/public/static/common/images/favicon.ico new file mode 100644 index 0000000..74d849f Binary files /dev/null and b/public/static/common/images/favicon.ico differ diff --git a/public/static/common/images/github.png b/public/static/common/images/github.png new file mode 100644 index 0000000..f263708 Binary files /dev/null and b/public/static/common/images/github.png differ diff --git a/public/static/common/images/icon-download-green.png b/public/static/common/images/icon-download-green.png new file mode 100644 index 0000000..61ee420 Binary files /dev/null and b/public/static/common/images/icon-download-green.png differ diff --git a/public/static/common/images/icon-gitee.png b/public/static/common/images/icon-gitee.png new file mode 100644 index 0000000..f91368c Binary files /dev/null and b/public/static/common/images/icon-gitee.png differ diff --git a/public/static/common/images/icon-github-big.png b/public/static/common/images/icon-github-big.png new file mode 100644 index 0000000..470f3d0 Binary files /dev/null and b/public/static/common/images/icon-github-big.png differ diff --git a/public/static/common/images/icon-play.png b/public/static/common/images/icon-play.png new file mode 100644 index 0000000..e10be63 Binary files /dev/null and b/public/static/common/images/icon-play.png differ diff --git a/public/static/common/images/info.svg b/public/static/common/images/info.svg new file mode 100644 index 0000000..8c95e47 --- /dev/null +++ b/public/static/common/images/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/static/common/images/loading.gif b/public/static/common/images/loading.gif new file mode 100644 index 0000000..9add43e Binary files /dev/null and b/public/static/common/images/loading.gif differ diff --git a/public/static/common/images/logo-1.png b/public/static/common/images/logo-1.png new file mode 100644 index 0000000..1a47acd Binary files /dev/null and b/public/static/common/images/logo-1.png differ diff --git a/public/static/common/images/logo-2.png b/public/static/common/images/logo-2.png new file mode 100644 index 0000000..8ecc1ef Binary files /dev/null and b/public/static/common/images/logo-2.png differ diff --git a/public/static/common/images/logo-3.png b/public/static/common/images/logo-3.png new file mode 100644 index 0000000..c87c109 Binary files /dev/null and b/public/static/common/images/logo-3.png differ diff --git a/public/static/common/images/logo-8.png b/public/static/common/images/logo-8.png new file mode 100644 index 0000000..fea3115 Binary files /dev/null and b/public/static/common/images/logo-8.png differ diff --git a/public/static/common/images/success.svg b/public/static/common/images/success.svg new file mode 100644 index 0000000..290ec9d --- /dev/null +++ b/public/static/common/images/success.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/static/common/js/admin.js b/public/static/common/js/admin.js new file mode 100644 index 0000000..92348be --- /dev/null +++ b/public/static/common/js/admin.js @@ -0,0 +1,199 @@ +// +---------------------------------------------------------------------- +// | 后台公共JS +// +---------------------------------------------------------------------- + +/** + * @desc 快速时间范围选择 + * @returns {[{text: string, value: *[]}, {text: string, value: *[]}, {text: string, value: *[]}, {text: string, value: *[]}, {text: string, value: *[]}, null, null]} + */ +function getRangeShortcuts() { + return [ + { + text: "今天", + value: function () { + let value = []; + let date1 = new Date(); + date1.setDate(date1.getDate()); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + { + text: "昨天", + value: function () { + let value = []; + let date1 = new Date(); + date1.setDate(date1.getDate() - 1); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setDate(date2.getDate() - 1); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + { + text: "前天", + value: function () { + let value = []; + let date1 = new Date(); + date1.setDate(date1.getDate() - 2); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setDate(date2.getDate() - 1); + date2.setDate(date2.getDate() - 1); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + { + text: "7天内", + value: function () { + let value = []; + let date1 = new Date(); + // date1.setMonth(date1.getMonth() - 1); + date1.setDate(date1.getDate() - 7); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setDate(date2.getDate()); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + { + text: "这个月", + value: function () { + let value = []; + let date1 = new Date(); + // date1.setMonth(date1.getMonth() - 1); + date1.setDate(1); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setDate(date2.getDate()); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + { + text: "上个月", + value: function () { + let value = []; + let date1 = new Date(); + date1.setMonth(date1.getMonth() - 1); + date1.setDate(1); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setDate(1); + date2.setDate(date2.getDate() - 1); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + { + text: "今年", + value: function () { + let value = []; + let date1 = new Date(); + date1.setMonth(0); + date1.setDate(1); + date1.setHours(0, 0, 0, 0); + value.push(date1); + let date2 = new Date(); + date2.setDate(date2.getDate()); + date2.setHours(23, 59, 59, 59); + value.push(new Date(date2)); + return value; + }() + }, + ]; +} + +/** + * @desc 格式化json + * @param str + * @returns {string} + */ +function prettyFormat(str) { + let result = '' + try { + // 设置缩进为2个空格 + str = JSON.stringify(JSON.parse(str), null, 2); + str = str + .replace(/&/g, '&') + .replace(//g, '>'); + result += str.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { + let cls = 'number'; + if (/^"/.test(match)) { + if (/:$/.test(match)) { + cls = 'key'; + } else { + cls = 'string'; + } + } else if (/true|false/.test(match)) { + cls = 'boolean'; + } else if (/null/.test(match)) { + cls = 'null'; + } + return '' + match + ''; + }); + } catch (e) { + return '' + } + return "
      " + result + "
      " +} + +if (self === top) { + console.group('温馨提示'); + console.log(`%c + + ▄▄ ▄▄ +▀███▀▀▀███ ██ ▀███ ██ ▄█▄▀▄██▄ + ██ ▀█ ▄██▄ ██ ██ ██ + ██ █ ▄█▀██▄ ▄██▀█████▀ ▀██▀ ▄█▀██▄ ▄█▀▀███ ▀████████▄█████▄ ▀███ ▀████████▄ ▀██▄ ▄▄█ + ██████ ██ ██ ██ ▀▀ ██ ▄█ ▄█ ▀██ ▄██ ██ ██ ██ ██ ██ ██ ██ ▄█████▄ + ██ █ ▄▄█████ ▀█████▄ ██ ▄█ ████████ ███ ██ ██ ██ ██ ██ ██ ██ ██ ▀███ + ██ ▄██ ██ █▄ ██ ███ █▀ ██ ▀██ ██ ██ ██ ██ ██ ██ ██ ██ ▀██ +▄██████████████▀██▄██████▀ ▄█ ▄███▄ ▄████▄ ▀████▀███▄████ ████ ████▄████▄████ ████▄███████ + ▄█ + ██▀ +%c + +官方网站:https://easyadmin8.top + +官方文档:https://edocs.easyadmin8.top + +问答社区:https://meta.easyadmin8.top + +%c重要事情说3遍: +%c +常见问题:https://easyadmin8.top/guide/question.html + +常见问题:https://easyadmin8.top/guide/question.html + +常见问题:https://easyadmin8.top/guide/question.html + +%c遇到问题先把 DEBUG 模式打开,然后把错误信息找出来,当不能解决的时候再去社区提问或者QQ群交流 +`, + "color:#4290f7;font-weight:bold;font-size:10px;", + "color:#5672cd;", + "color:#ff5722;font-weight:bold;font-size:1rem;", + "color:#5672cd;", + "color:#ff5722;font-weight:bold;font-size:1rem;background:#f9de97;", + ); + console.groupEnd(); +} + diff --git a/public/static/config-admin.js b/public/static/config-admin.js new file mode 100644 index 0000000..114f8ff --- /dev/null +++ b/public/static/config-admin.js @@ -0,0 +1,51 @@ +var BASE_URL = document.scripts[document.scripts.length - 1].src.substring(0, document.scripts[document.scripts.length - 1].src.lastIndexOf("/") + 1); +window.BASE_URL = BASE_URL; +require.config({ + urlArgs: "v=" + CONFIG.VERSION, + baseUrl: BASE_URL, + paths: { + "jquery": ["plugs/jquery-3.4.1/jquery-3.4.1.min"], + "echarts": ["plugs/echarts/echarts.min"], + "echarts-theme": ["plugs/echarts/echarts-theme"], + "easy-admin": ["plugs/easy-admin/easy-admin"], + "layui": ["plugs/layui-v2.x/layui"], + "miniAdmin": ["plugs/lay-module/layuimini/miniAdmin"], + "miniMenu": ["plugs/lay-module/layuimini/miniMenu"], + "miniTab": ["plugs/lay-module/layuimini/miniTab"], + "miniTheme": ["plugs/lay-module/layuimini/miniTheme"], + "miniTongji": ["plugs/lay-module/layuimini/miniTongji"], + "treetable": ["plugs/lay-module/treetable-lay/treetable"], + "tableSelect": ["plugs/lay-module/tableSelect/tableSelect"], + "switchSelect": ["plugs/lay-module/switchSelect/switchSelect"], + "iconPickerFa": ["plugs/lay-module/iconPicker/iconPickerFa"], + "autocomplete": ["plugs/lay-module/autocomplete/autocomplete"], + "xmSelect": ["plugs/xmSelect/xm-select"], + "vue": ["plugs/vue-2.6.10/vue.min"], + "swiper": ["plugs/swiper/swiper-bundle.min"], + "colorMode": ["plugs/colorMode/colorMode"], + "lazyload": ["plugs/lazyload/lazyload.min"], + "clipboard": ["plugs/clipboard/clipboard.min"], + } +}); + +// 路径配置信息 +var PATH_CONFIG = { + iconLess: BASE_URL + "plugs/font-awesome-6.x/less/_variables.less", +}; +window.PATH_CONFIG = PATH_CONFIG; + +// 初始化控制器对应的JS自动加载 +window.addEventListener('load', function () { + if ("undefined" != typeof CONFIG.AUTOLOAD_JS && CONFIG.AUTOLOAD_JS) { + require([BASE_URL + CONFIG.CONTROLLER_JS_PATH], function (Controller) { + if (typeof Controller[CONFIG.ACTION] == "function") { + Controller[CONFIG.ACTION]() + } else { + console.error(`\r\n控制器对应的JS ${CONFIG.CONTROLLER_JS_PATH} 监测异常\r\n当前Js文件中不存在监听 ${CONFIG.ACTION} 方法`) + } + }, function (e) { + console.error(e); + }); + } +}) + diff --git a/public/static/plugs/ckeditor4/adapters/jquery.js b/public/static/plugs/ckeditor4/adapters/jquery.js new file mode 100644 index 0000000..3aa2ffa --- /dev/null +++ b/public/static/plugs/ckeditor4/adapters/jquery.js @@ -0,0 +1,10 @@ +/* + Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +(function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a}, +ckeditor:function(g,e){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=e;e=g;g=m}var k=[];e=e||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function d(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(d,100)},0)},null,null,9999); +else{if(e.autoUpdateElement||"undefined"==typeof e.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)e.autoUpdateElementJquery=!0;e.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,e):CKEDITOR.inline(h,e);b.data("ckeditorInstance",c);c.on("instanceReady",function(e){var d=e.editor;setTimeout(function n(){if(d.element){e.removeListener();d.on("dataReady",function(){b.trigger("dataReady.ckeditor",[d])});d.on("setData",function(a){b.trigger("setData.ckeditor", +[d,a.data])});d.on("getData",function(a){b.trigger("getData.ckeditor",[d,a.data])},999);d.on("destroy",function(){b.trigger("destroy.ckeditor",[d])});d.on("save",function(){a(h.form).submit();return!1},null,null,20);if(d.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){d.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize", +c)})}d.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[d]);g&&g.apply(d,[h]);l.resolve()}else setTimeout(n,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(e){if(arguments.length){var m= +this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(e,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,e)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery); \ No newline at end of file diff --git a/public/static/plugs/ckeditor4/build-config.js b/public/static/plugs/ckeditor4/build-config.js new file mode 100644 index 0000000..6aae4d3 --- /dev/null +++ b/public/static/plugs/ckeditor4/build-config.js @@ -0,0 +1,168 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/license + */ + +/** + * This file was added automatically by CKEditor builder. + * You may re-use it at any time to build CKEditor again. + * + * If you would like to build CKEditor online again + * (for example to upgrade), visit one the following links: + * + * (1) https://ckeditor.com/cke4/builder + * Visit online builder to build CKEditor from scratch. + * + * (2) https://ckeditor.com/cke4/builder/3b54fd1f22dcd13ebe2a3f52d6f8cc05 + * Visit online builder to build CKEditor, starting with the same setup as before. + * + * (3) https://ckeditor.com/cke4/builder/download/3b54fd1f22dcd13ebe2a3f52d6f8cc05 + * Straight download link to the latest version of CKEditor (Optimized) with the same setup as before. + * + * NOTE: + * This file is not used by CKEditor, you may remove it. + * Changing this file will not change your CKEditor configuration. + */ + +var CKBUILDER_CONFIG = { + skin: 'moono-lisa', + preset: 'standard', + ignore: [ + '.DS_Store', + '.bender', + '.editorconfig', + '.gitattributes', + '.gitignore', + '.idea', + '.jscsrc', + '.jshintignore', + '.jshintrc', + '.mailmap', + '.npm', + '.travis.yml', + 'bender-err.log', + 'bender-out.log', + 'bender.ci.js', + 'bender.js', + 'dev', + 'gruntfile.js', + 'less', + 'node_modules', + 'package.json', + 'tests' + ], + plugins : { + 'a11yhelp' : 1, + 'about' : 1, + 'basicstyles' : 1, + 'blockquote' : 1, + 'clipboard' : 1, + 'contextmenu' : 1, + 'elementspath' : 1, + 'enterkey' : 1, + 'entities' : 1, + 'filebrowser' : 1, + 'floatingspace' : 1, + 'format' : 1, + 'horizontalrule' : 1, + 'htmlwriter' : 1, + 'image' : 1, + 'indentlist' : 1, + 'link' : 1, + 'list' : 1, + 'magicline' : 1, + 'maximize' : 1, + 'pastefromgdocs' : 1, + 'pastefromword' : 1, + 'pastetext' : 1, + 'pastetools' : 1, + 'removeformat' : 1, + 'resize' : 1, + 'scayt' : 1, + 'showborders' : 1, + 'sourcearea' : 1, + 'specialchar' : 1, + 'stylescombo' : 1, + 'tab' : 1, + 'table' : 1, + 'tableselection' : 1, + 'tabletools' : 1, + 'toolbar' : 1, + 'undo' : 1, + 'uploadimage' : 1, + 'wsc' : 1, + 'wysiwygarea' : 1 + }, + languages : { + 'af' : 1, + 'ar' : 1, + 'az' : 1, + 'bg' : 1, + 'bn' : 1, + 'bs' : 1, + 'ca' : 1, + 'cs' : 1, + 'cy' : 1, + 'da' : 1, + 'de' : 1, + 'de-ch' : 1, + 'el' : 1, + 'en' : 1, + 'en-au' : 1, + 'en-ca' : 1, + 'en-gb' : 1, + 'eo' : 1, + 'es' : 1, + 'es-mx' : 1, + 'et' : 1, + 'eu' : 1, + 'fa' : 1, + 'fi' : 1, + 'fo' : 1, + 'fr' : 1, + 'fr-ca' : 1, + 'gl' : 1, + 'gu' : 1, + 'he' : 1, + 'hi' : 1, + 'hr' : 1, + 'hu' : 1, + 'id' : 1, + 'is' : 1, + 'it' : 1, + 'ja' : 1, + 'ka' : 1, + 'km' : 1, + 'ko' : 1, + 'ku' : 1, + 'lt' : 1, + 'lv' : 1, + 'mk' : 1, + 'mn' : 1, + 'ms' : 1, + 'nb' : 1, + 'nl' : 1, + 'no' : 1, + 'oc' : 1, + 'pl' : 1, + 'pt' : 1, + 'pt-br' : 1, + 'ro' : 1, + 'ru' : 1, + 'si' : 1, + 'sk' : 1, + 'sl' : 1, + 'sq' : 1, + 'sr' : 1, + 'sr-latn' : 1, + 'sv' : 1, + 'th' : 1, + 'tr' : 1, + 'tt' : 1, + 'ug' : 1, + 'uk' : 1, + 'vi' : 1, + 'zh' : 1, + 'zh-cn' : 1 + } +}; \ No newline at end of file diff --git a/public/static/plugs/ckeditor4/ckeditor.js b/public/static/plugs/ckeditor4/ckeditor.js new file mode 100644 index 0000000..fe269f2 --- /dev/null +++ b/public/static/plugs/ckeditor4/ckeditor.js @@ -0,0 +1,1267 @@ +/* +Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"K24B",version:"4.14.0",revision:"8a12b04171",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;de.getListenerIndex(d)){e=e.listeners;h||(h=this);isNaN(g)&&(g=10);var x=this;l.fn=d;l.priority=g;for(var t=e.length-1;0<=t;t--)if(e[t].priority<=g)return e.splice(t+1,0,l),{removeListener:v};e.unshift(l)}return{removeListener:v}}, +once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},h=0,k=function(){h=1};return function(g,l,v){var e=d(this)[g];g=a;var x=h;a=h=0;if(e){var t=e.listeners;if(t.length)for(var t=t.slice(0),z,G=0;Gdocument.documentMode),mobile:-1c||b.quirks);b.gecko&&(d=a.match(/rv:([\d\.]+)/))&&(d=d[1].split("."),c=1E4*d[0]+100*(d[1]||0)+1*(d[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); +b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&7>c)&&!(b.gecko&&4E4>c)&&!(b.webkit&&534>c);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10c;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air"); +b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}()); +"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= +CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*d))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:d})}; +CKEDITOR.error=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})}; +CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var d=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[d]("[CKEDITOR] Error code: "+b+".",a);else console[d]("[CKEDITOR] Error code: "+b+".");console[d]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+b)}},null,null,999);CKEDITOR.dom={}; +(function(){function a(a,b,e){this._minInterval=a;this._context=e;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(b,e||{});var c=this;this.input=function(){function a(){c._lastOutput=(new Date).getTime();c._scheduledTimer=0;c._call()}if(!c._scheduledTimer||!1!==c._reschedule()){var x=(new Date).getTime()-c._lastOutput;x/g,k=/|\s) /g,function(a,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",b=0;8>b;b++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a, +b){var e=b(a);e.prototype=a.prototype;return e},setTimeout:function(a,b,e,c,g){g||(g=window);e||(e=g);return g.setTimeout(function(){c?a.apply(e,[].concat(c)):a.apply(e)},b||0)},throttle:function(a,b,e){return new this.buffers.throttle(a,b,e)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a, +"")}}(),indexOf:function(a,b){if("function"==typeof b)for(var e=0,c=a.length;eparseFloat(b);e&&(b=b.replace("-",""));a.setStyle("width",b);b=a.$.clientWidth;return e?-b:b}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,e=arguments.length;bb;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,b,e,c){a=b.toLowerCase();3==a.length&& +(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+c})},parseCssText:function(a,b,e){var c={};e&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return c;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,x){b&&(e=e.toLowerCase(),"font-family"==e&&(x=x.replace(/\s*,\s*/g,",")),x=CKEDITOR.tools.trim(x));c[e]=x});return c}, +writeCssText:function(a,b){var e,c=[];for(e in a)c.push(e+":"+a[e]);b&&c.sort();return c.join("; ")},objectCompare:function(a,b,e){var c;if(!a&&!b)return!0;if(!a||!b)return!1;for(c in a)if(a[c]!=b[c])return!1;if(!e)for(c in b)if(a[c]!=b[c])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,b){var e={};1==arguments.length&&(b=!0);for(var c=0,g=a.length;ce;e++)a.push(Math.floor(256*Math.random()));for(e=0;en)for(l=n;3>l;l++)g[l]=0;d[0]=(g[0]&252)>>2;d[1]=(g[0]&3)<<4|g[1]>>4;d[2]=(g[1]&15)<<2|(g[2]&192)>>6;d[3]=g[2]&63;for(l=0;4>l;l++)b=l<=n? +b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d[l]):b+"\x3d"}return b},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C", +cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF", +firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2", +lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A", +mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399", +red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00", +yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var b={},e=this._findColor(a);e.length&&(b.color=e[0],CKEDITOR.tools.array.forEach(e,function(b){a=a.replace(b,"")})); +if(a=CKEDITOR.tools.trim(a))b.unprocessed=a;return b},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(a,b){function e(a){c.top=g[a[0]];c.right=g[a[1]];c.bottom=g[a[2]];c.left=g[a[3]]}var c={},g=b?b(a):a.split(/\s+/);switch(g.length){case 1:e([0,0,0,0]);break;case 2:e([0,1,0,1]);break;case 3:e([0,1,2,1]);break;case 4:e([0,1,2,3])}return c},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(a)}, +_findColor:function(a){var b=[],e=CKEDITOR.tools.array,b=b.concat(a.match(this._rgbaRegExp)||[]),b=b.concat(a.match(this._hslaRegExp)||[]);return b=b.concat(e.filter(a.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,b,e){var c=[];this.forEach(a,function(g,n){b.call(e,g,n,a)&&c.push(g)});return c},find:function(a,b,e){for(var c=a.length,g=0;gCKEDITOR.env.version&&(!a||"object"!==typeof a)){b=[];if("string"===typeof a)for(e=0;eCKEDITOR.env.version)for(g=0;gCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(f);return f},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$, +a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this;c&&c!=b;){var f=c.getParent();f&&d.unshift(this.getIndex.call(c,a));c=f}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,b){var c=b?a.getNext():a.getPrevious();return c&&c.type==CKEDITOR.NODE_TEXT?c.isEmpty()?d(c,b):c: +null}var b=this,c=-1,f;if(!this.getParent()||a&&b.type==CKEDITOR.NODE_TEXT&&b.isEmpty()&&!d(b)&&!d(b,!0))return-1;do if(!a||b.equals(this)||b.type!=CKEDITOR.NODE_TEXT||!f&&!b.isEmpty())c++,f=b.type==CKEDITOR.NODE_TEXT;while(b=b.getPrevious());return c},getNextSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getFirst&&this.getFirst();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(f=(f||this).getParent());){if(b&& +!1===b(f,!0))return null;a=f.getNext()}return!a||b&&!1===b(a)?null:d&&d!=a.type?a.getNextSourceNode(!1,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(f=(f||this).getParent());){if(b&&!1===b(f,!0))return null;a=f.getPrevious()}return!a||b&&!1===b(a)?null:d&&a.type!=d?a.getPreviousSourceNode(!1,d,b): +a},getPrevious:function(a){var d=this.$,b;do b=(d=d.previousSibling)&&10!=d.nodeType&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent()); +return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+ +CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return 0>d.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0]; +return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+ +CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}});CKEDITOR.dom.nodeList=function(a){this.$=a}; +CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}};CKEDITOR.dom.element=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)}; +CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()}; +CKEDITOR.dom.element.setMarker=function(a,d,b,c){var f=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),h=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[f]=d;h[b]=1;return d.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)}; +CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),f=d.getCustomData("list_marker_id"),h;for(h in c)d.removeCustomData(h);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[f])}; +(function(){function a(a,b){return-1<(" "+a+" ").replace(h," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,e=k[a].length;cCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a); +var e=c.extractContents(!1,b||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=e.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else e.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$): +b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(a){var b=CKEDITOR.tools.extend({}, +this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),b):b},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(e){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0)); +return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a, +2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,e;a=CKEDITOR.tools.isArray(a)? +a:[];for(e=0;e=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, +is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,c;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; +for(var a=this.getChildren(),b=0,c=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var e;if(b)for(;e=c.lastChild;)a.insertBefore(c.removeChild(e),a.firstChild);else for(;e=c.firstChild;)a.appendChild(c.removeChild(e))}},mergeSiblings:function(){function a(b,c,e){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d= +[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=e?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var g=e?b.getLast():b.getFirst();d.length;)d.shift().move(b,!e);c.moveChildren(b,!e);c.remove();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", +visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this, +arguments)}catch(e){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b= +0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", +"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,e=b.count();cf||0f?f:d);c&&(0>t||0t?t:e,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+ +"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}}, +getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var e=0;eCKEDITOR.env.version){var d=e.ownerDocument.createEventObject(),f;for(f in b)d[f]=b[f];e.fireEvent(c, +d)}else e[e[a]?a:c](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.contains(this)?!CKEDITOR.env.ie||8=B.getChildCount()?(B=B.getChild(A-1),r=!0):B=B.getChild(A):F=r=!0;m.type==CKEDITOR.NODE_TEXT?l?w=!0:m.split(K):0da)for(;J;)J=h(J,E,!0);E=D}l|| +g()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(f){return c(f)||b(f)?!0:d(f)&&!a?a=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(h)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}} +function f(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&v(a)&&(b=a);return l(a)&&!(k(a)&&a.equals(b))})}}var h={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=CKEDITOR.dom.walker.bogus(),g=/^[\t\r\n ]*(?: |\xa0)$/,l=CKEDITOR.dom.walker.editable(),v=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a= +new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed|| +d(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,c,a,"undefined"==typeof b?!0:b);return c},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var b; +if(b=a.data&&a.data("cke-temp"))b=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return b},!0)}var c=this.startContainer,d=this.endContainer,f=this.collapsed,h,n,g,k;h=this.document.createElement("span");h.data("cke-bookmark",1);h.setStyle("display","none");h.setHtml("\x26nbsp;");a&&(g="cke_bm_"+CKEDITOR.tools.getNextNumber(),h.setAttribute("id",g+(f?"C":"S")));f||(n=h.clone(),n.setHtml("\x26nbsp;"),a&&n.setAttribute("id",g+"E"),k=this.clone(),b(d)&&(d=b(d), +k.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),k.collapse(),k.insertNode(n));k=this.clone();b(c)&&(d=b(c),k.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));k.collapse(!0);k.insertNode(h);n?(this.setStartAfter(h),this.setEndBefore(n)):this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END);return{startNode:a?g+(f?"C":"S"):h,endNode:a?g+"E":n,serializable:a,collapsed:f}},createBookmark2:function(){function a(b){var e=b.container,d=b.offset,n;n=e;var f=d;n=n.type!=CKEDITOR.NODE_ELEMENT||0===f||f==n.getChildCount()? +0:n.getChild(f-1).type==CKEDITOR.NODE_TEXT&&n.getChild(f).type==CKEDITOR.NODE_TEXT;n&&(e=e.getChild(d-1),d=e.getLength());if(e.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,f={container:this.startContainer,offset:this.startOffset},n={container:this.endContainer,offset:this.endOffset};c&&(a(f),b(f,this.root), +d||(a(n),b(n,this.root)));return{start:f.container.getAddress(c),end:d?null:n.container.getAddress(c),startOffset:f.offset,endOffset:n.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode): +a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT)if(f=a.getChildCount(),f>c)a=a.getChild(c);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>d)b=b.getChild(d).getPreviousSourceNode(!0); +else if(1>f)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset; +a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a, +b){var c=this.startContainer,d=this.startOffset,f=this.collapsed;if((!a||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var h=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(f){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||f||!c||c.type!= +CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var f=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var c=new CKEDITOR.dom.range(g);c.setStart(a,b);c.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),e;for(c.guard= +function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return!1;M=e!=a?e.getText():e.substring(b);if(d.test(M))return!1}return!0};if(this.collapsed)break;var n=this.getCommonAncestor(),g=this.root,k,v,l,m,B,K=!1,A,M;A=this.startContainer;var r=this.startOffset;A.type==CKEDITOR.NODE_TEXT?(r&&(A=!CKEDITOR.tools.trim(A.substring(0,r)).length&&A,K=!!A),A&&((m=A.getPrevious())||(l=A.getParent()))):(r&&(m=A.getChild(r-1)||A.getLast()),m||(l=A)); +for(l=c(l);l||m;){if(l&&!m){!B&&l.equals(n)&&(B=!0);if(f?l.isBlockBoundary():!g.contains(l))break;K&&"inline"==l.getComputedStyle("display")||(K=!1,B?k=l:this.setStartBefore(l));m=l.getPrevious()}for(;m;)if(A=!1,m.type==CKEDITOR.NODE_COMMENT)m=m.getPrevious();else{if(m.type==CKEDITOR.NODE_TEXT)M=m.getText(),d.test(M)&&(m=null),A=/[\s\ufeff]$/.test(M);else if((m.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&m.is("br"))&&!m.data("cke-bookmark"))if(K&&CKEDITOR.dtd.$removeEmpty[m.getName()]){M=m.getText(); +if(d.test(M))m=null;else for(var r=m.$.getElementsByTagName("*"),C=0,F;F=r[C++];)if(!CKEDITOR.dtd.$removeEmpty[F.nodeName.toLowerCase()]){m=null;break}m&&(A=!!M.length)}else m=null;A&&(K?B?k=l:l&&this.setStartBefore(l):K=!0);if(m){A=m.getPrevious();if(!l&&!A){l=m;m=null;break}m=A}else l=null}l&&(l=c(l.getParent()))}A=this.endContainer;r=this.endOffset;l=m=null;B=K=!1;A.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(A.substring(r)).length?K=!0:(K=!A.getLength(),r==A.getLength()?(m=A.getNext())||(l=A.getParent()): +h(A,r)&&(l=A.getParent())):(m=A.getChild(r))||(l=A);for(;l||m;){if(l&&!m){!B&&l.equals(n)&&(B=!0);if(f?l.isBlockBoundary():!g.contains(l))break;K&&"inline"==l.getComputedStyle("display")||(K=!1,B?v=l:l&&this.setEndAfter(l));m=l.getNext()}for(;m;){A=!1;if(m.type==CKEDITOR.NODE_TEXT)M=m.getText(),h(m,0)||(m=null),A=/^[\s\ufeff]/.test(M);else if(m.type==CKEDITOR.NODE_ELEMENT){if((0=n.getLength()?h.setStartAfter(n):(h.setStartBefore(n),c=0):h.setStartBefore(n));g&&g.type==CKEDITOR.NODE_TEXT&&(l?l>=g.getLength()?h.setEndAfter(g):(h.setEndAfter(g),v=0):h.setEndBefore(g));var h=new CKEDITOR.dom.walker(h),m=CKEDITOR.dom.walker.bookmark(),B=CKEDITOR.dom.walker.bogus();h.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var K;h.guard=function(b,c){if(f&&B(b)||m(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&& +b.type==CKEDITOR.NODE_TEXT||c&&b.equals(K)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(K=b);return!0};c&&(n=h[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(n,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);v&&(h.reset(),(h=h[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(h,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)); +return!(!c&&!v)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a, +a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b), +this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b, +b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a, +b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var f=d.getBogus();f&&f.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=c.block,h=d.block,n=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!= +a&&(f||(f=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),h||(h=this.fixBlock(!1,a)));c=f&&this.checkStartOfBlock();d=h&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(h)&&(d?(n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):c?(n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f=null):(h=this.splitElement(f,b|| +!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:h,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:n}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(e){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()|| +e.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),f=d.block||d.blockLimit,h;f&&!f.equals(d.root)&&!f.getFirst(a(f));)h=f.getParent(),this[b?"setEndAt":"setStartAt"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=h;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer, +this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,f=this.clone();f.collapse(d);f[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=c(d);return f[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,c)),g.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer, +this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),g.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END); +a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type== +CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START), +!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&g.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); +else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var d=a,f=c,h=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(h=d[b?"getLast":"getFirst"](v));f||h||(h=d[b?"getPrevious":"getNext"](v));a=h}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,f,h,n=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,n[b?0:1])):c=this.clone();if(a&& +!a.is(CKEDITOR.dtd.$block))d=1;else if(f=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(h=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?(c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(f,0),c.collapse()):c.moveToPosition(f,n[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)}, +moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer; +return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:f(),getPreviousEditableNode:f(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),c=this.getTouchedEndNode(),d=b.getAscendant("table",!0),c=c.getAscendant("table",!0);return d&&!this.root.contains(d)? +null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&c&&(d.equals(c)||d.contains(c)||c.contains(d))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,f=this.clone();f.optimize();(d=f.startContainer.type==CKEDITOR.NODE_TEXT)?(c=f.startContainer.getText(),b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView();d&&(f.startContainer.setText(c), +b.remove());a.remove()},getClientRects:function(){function a(b,c){var d=CKEDITOR.tools.array.map(b,function(a){return a}),e=new CKEDITOR.dom.range(c.root),f,h,g;c.startContainer instanceof CKEDITOR.dom.element&&(h=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(g=(g=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));h&&e.setStart(c.startContainer.getParent(), +c.startContainer.getIndex());g&&e.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(h||g)c=e;e=c.cloneContents().find("[data-cke-widget-id]").toArray();if(e=CKEDITOR.tools.array.map(e,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return e=CKEDITOR.tools.array.map(e,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;f=this.root.getDocument().$.createRange();f.setStart(b.getParent().$,b.getIndex()); +f.setEnd(b.getParent().$,b.getIndex()+1);b=f.getClientRects();b.widgetRect=a.getClientRect();return b},c),CKEDITOR.tools.array.forEach(e,function(a){function b(e){CKEDITOR.tools.array.forEach(d,function(b,f){var h=CKEDITOR.tools.objectCompare(a[e],b);h||(h=CKEDITOR.tools.objectCompare(a.widgetRect,b));h&&(Array.prototype.splice.call(d,f,a.length-e,a.widgetRect),c=!0)});c||(earguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,f,h){a:{null==h&&(h=d(f));for(var g;g=h.shift();)if(g.getDtd().p){h={element:g,remaining:h};break a}h=null}if(!h)return 0;if((g=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!g.check(c))return b(a, +c,f,h.remaining);c=new CKEDITOR.dom.range(h.element);c.selectNodeContents(h.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=g;a._.nestedEditable={element:h.element,container:f,remaining:h.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var f=/^[\r\n\t ]+$/,h=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0), +g=function(a){return h(a)&&k(a)},l={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,k,t,z,G;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable= +null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var u=this.range.clone();k=u.startPath();var n=u.endPath(),L=!u.collapsed&&c(u,k.block),y=!u.collapsed&&c(u,n.block,1);u.shrink(CKEDITOR.SHRINK_ELEMENT,!0);L&&u.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END);y&&u.setEndAt(n.block,CKEDITOR.POSITION_AFTER_START);k=u.endContainer.hasAscendant("pre",!0)||u.startContainer.hasAscendant("pre",!0);u.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS); +u.collapsed||(k=new CKEDITOR.dom.walker(u.clone()),n=CKEDITOR.dom.walker.bookmark(!0,!0),k.evaluator=n,this._.nextNode=k.next(),k=new CKEDITOR.dom.walker(u.clone()),k.evaluator=n,k=k.previous(),this._.lastNode=k.getNextSourceNode(!0,null,u.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(n=this.range.clone(),n.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),n.checkEndOfBlock()&& +(n=new CKEDITOR.dom.elementPath(n.endContainer,n.root),this._.lastNode=(n.block||n.blockLimit).getNextSourceNode(!0))),this._.lastNode&&u.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=u.document.createText(""),this._.lastNode.insertAfter(k)),u=null);this._.started=1;k=u}n=this._.nextNode;u=this._.lastNode;for(this._.nextNode=null;n;){var L=0,y=n.hasAscendant("pre"),H=n.type!=CKEDITOR.NODE_ELEMENT,I=0;if(H)n.type==CKEDITOR.NODE_TEXT&&f.test(n.getText())&&(H=0);else{var m=n.getName(); +if(CKEDITOR.dtd.$block[m]&&"false"==n.getAttribute("contenteditable")){d=n;b(this,a,d);break}else if(n.isBlockBoundary(this.forceBrBreak&&!y&&{br:1})){if("br"==m)H=1;else if(!k&&!n.getChildCount()&&"hr"!=m){d=n;t=n.equals(u);break}k&&(k.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),"br"!=m&&(this._.nextNode=n));L=1}else{if(n.getFirst()){k||(k=this.range.clone(),k.setStartAt(n,CKEDITOR.POSITION_BEFORE_START));n=n.getFirst();continue}H=1}}H&&!k&&(k=this.range.clone(),k.setStartAt(n,CKEDITOR.POSITION_BEFORE_START)); +t=(!L||H)&&n.equals(u);if(k&&!L)for(;!n.getNext(g)&&!t;){m=n.getParent();if(m.isBlockBoundary(this.forceBrBreak&&!y&&{br:1})){L=1;H=0;t||m.equals(u);k.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);break}n=m;H=1;t=n.equals(u);I=1}H&&k.setEndAt(n,CKEDITOR.POSITION_AFTER_END);n=this._getNextSourceNode(n,I,u);if((t=!n)||L&&k)break}if(!d){if(!k)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(k.startContainer,k.root);n=d.blockLimit;L={div:1,th:1,td:1}; +d=d.block;!d&&n&&!this.enforceRealBlocks&&L[n.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock()&&!n.equals(k.root)?d=n:!d||this.enforceRealBlocks&&d.is(l)?(d=this.range.document.createElement(a),k.extractContents().appendTo(d),d.trim(),k.insertNode(d),z=G=!0):"li"!=d.getName()?k.checkStartOfBlock()&&k.checkEndOfBlock()||(d=d.clone(!1),k.extractContents().appendTo(d),d.trim(),G=k.splitBlock(),z=!G.wasStartOfBlock,G=!G.wasEndOfBlock,k.insertNode(d)):t||(this._.nextNode=d.equals(u)?null:this._getNextSourceNode(k.getBoundaryNodes().endNode, +1,u))}z&&(z=d.getPrevious())&&z.type==CKEDITOR.NODE_ELEMENT&&("br"==z.getName()?z.remove():z.getLast()&&"br"==z.getLast().$.nodeName.toLowerCase()&&z.getLast().remove());G&&(z=d.getLast())&&z.type==CKEDITOR.NODE_ELEMENT&&"br"==z.getName()&&(!CKEDITOR.env.needsBrFiller||z.getPrevious(h)||z.getNext(h))&&z.remove();this._.nextNode||(this._.nextNode=t||d.equals(u)||!u?null:this._getNextSourceNode(d,1,u));return d},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(f))}var f= +this.range.root;for(a=a.getNextSourceNode(b,null,d);!h(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); +CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==d.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh", +{editor:a,path:b})?!0:d.refresh&&!1!==d.refresh.apply(this,arguments)};var b;this.checkAllowed=function(c){return c||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; +CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF? +this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; +CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; +(function(){function a(a,b,c,d,e){var f,m;a=[];for(f in b){m=b[f];m="boolean"==typeof m?{}:"function"==typeof m?{match:m}:C(m);"$"!=f.charAt(0)&&(m.elements=f);c&&(m.featureName=c.toLowerCase());var q=m;q.elements=k(q.elements,/\s+/)||null;q.propertiesOnly=q.propertiesOnly||!0===q.elements;var F=/\s*,\s*/,r=void 0;for(r in T){q[r]=k(q[r],F)||null;var h=q,p=S[r],n=k(q[S[r]],F),g=q[r],w=[],E=!0,N=void 0;n?E=!1:n={};for(N in g)"!"==N.charAt(0)&&(N=N.slice(1),w.push(N),n[N]=!0,E=!1);for(;N=w.pop();)g[N]= +g["!"+N],delete g["!"+N];h[p]=(E?!1:n)||null}q.match=q.match||null;d.push(m);a.push(m)}b=e.elements;e=e.generic;var B;c=0;for(d=a.length;c=--g&&(h&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),e(b))},t=function(b,c){a[b]=1;var f=d[b];delete d[b];for(var e=0;e=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==e.$.readyState)e.$.onreadystatechange=null,t(b,!0)}:(e.$.onload=function(){setTimeout(function(){e.$.onload=null;e.$.onerror=null;t(b,!0)},0)},e.$.onerror=function(){e.$.onload=null;e.$.onerror=null;t(b,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};h&&CKEDITOR.document.getDocumentElement().setStyle("cursor", +"wait");for(var G=0;G]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}; +(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,f,h=0,k;c=this._.htmlPartsRegex.exec(b);){f=c.index;if(f>h)if(h=b.substring(h,f),k)k.push(h);else this.onText(h); +h=this._.htmlPartsRegex.lastIndex;if(f=c[1])if(f=f.toLowerCase(),k&&CKEDITOR.dtd.$cdata[f]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(f);continue}if(k)k.push(c[0]);else if(f=c[3]){if(f=f.toLowerCase(),!/="/.test(f)){var g={},l,v=c[4];c=!!c[5];if(v)for(;l=a.exec(v);){var e=l[1].toLowerCase();l=l[2]||l[3]||l[4]||"";g[e]=!l&&d[e]?e:CKEDITOR.tools.htmlDecodeAttr(l)}this.onTagOpen(f,g,c);!k&&CKEDITOR.dtd.$cdata[f]&&(k=[])}}else if(f=c[2])this.onComment(f)}if(b.length>h)this.onText(b.substring(h, +b.length))}}})(); +CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,d){d?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,d){"string"==typeof d&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a, +"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}});"use strict"; +(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,d=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(d,1);this.parent=null},replaceWith:function(a){var d=this.parent.children,b=CKEDITOR.tools.indexOf(d,this),c=a.previous=this.previous,f=a.next=this.next;c&&(c.next=a);f&&(f.previous=a);d[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var d=a.parent.children, +b=CKEDITOR.tools.indexOf(d,a),c=a.next;d.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a);d.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var d="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& +b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}}; +CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,d){var b=this.value;if(!(b=a.onComment(d,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,d){d&&this.filter(d);a.comment(this.value)}});"use strict"; +(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this)))return this.remove(),!1},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})})();"use strict"; +(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}}; +(function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),f={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml= +function(h,k,g){function l(a){var b;if(0k;k++)if(h=d[k]){h=h.exec(a,c,this);if(!1===h)return null;if(h&&h!=c)return this.onNode(a,h);if(c.parent&&!c.name)break}return c}, +onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value,c)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value,c)):null},onAttribute:function(a,c,d,h){return(d=this.attributesRules[d])?d.exec(a,h,c,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a, +c,d){for(var h=[this.findIndex(c),0],k=0,g=a.length;k/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function x(a){return a.replace(S,function(a,b){return decodeURIComponent(b)})}function t(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, +function(a){return"\x3c!--"+y+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function z(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function G(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function u(a,b){var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore= +{id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/|$)/gi,//gi,//gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-1)+"--\x3e"});for(var p=0;p]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"\x3c"+c+d+"\x3e"+G(z(e),b)+"\x3c/"+c+"\x3e"})}var n;CKEDITOR.htmlDataProcessor=function(b){var c, +f,m=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(B);c.addRules(K,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});f.addRules(A);f.addRules(M,{applyToAll:!0});f.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,f,c=n(c),c=u(c,b),c=e(c,T),c=v(c),c=e(c,w),c=c.replace(p,"$1cke:$2"),c=c.replace(O,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), +c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");f=a.context||b.editable().getName();var m;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",m=1);f=b.document.createElement(f);f.setHtml("a"+c);c=f.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");m&&(c=c.replace(/^
      |<\/pre>$/gi,""));c=c.replace(N,"$1$2");c=x(c);c=z(c);f=!1===a.fixForBody?!1:
      +d(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,f);f&&(m=c,!m.children.length&&CKEDITOR.dtd[m.name][f]&&(f=new CKEDITOR.htmlParser.element(f),m.add(f)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(m.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
      +c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=t(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
      /i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(m.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, +!1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=m.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=z(c);c=G(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,f,p,m,h;b&&"object"==typeof b?(f=b.context,c=b.fixForBody,d=b.dontFilter,p=b.filter,m=b.enterMode,h=b.protectedWhitespaces):f=b;f||null===f||(f=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:c,dontFilter:d, +filter:p||e.filter,enterMode:m||e.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,b){var c,d,e;b&&(c=b.context,d=b.filter,e=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var L=/(?: |\xa0)$/,y="{cke_protected}",H=CKEDITOR.dtd,I="caption colgroup col thead tfoot tbody".split(" "),m=CKEDITOR.tools.extend({},H.$blockLimit, +H.$block),B={elements:{input:g,textarea:g}},K={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},A={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height; +c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},M={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,e=0;ed?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck; +delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:l,textarea:l},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(M.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g, +function(a){return a.toLowerCase()})});var r=/<(a|area|img|input|source)\b([^>]*)>/gi,C=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,F=/^(href|src|name)$/i,w=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,T=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,S=/([^<]*)<\/cke:encoded>/gi,p=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,N=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,O=/]*?)\/?>(?!\s*<\/cke:\1)/gi; +n=function(){function a(c){return CKEDITOR.tools.array.reduce(c.split(""),function(a,c){var d=c.toLowerCase(),e=c.toUpperCase(),f=b(d);d!==e&&(f+="|"+b(e));return a+("("+f+")")},"")}function b(a){var c;c=a.charCodeAt(0);var d=c.toString(16);c={htmlCode:"\x26#"+c+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var e in c)c[e]&&(a+="|"+c[e]);return a}var c=new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+ +"?"+a("cke:encoded\x3e")+")","gi"),d=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+a("}")+")","gi");return function(a){return a.replace(c,"").replace(d,"")}}()})();"use strict"; +CKEDITOR.htmlParser.element=function(a,d){this.name=a;this.attributes=d||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; +CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,f){"font-family"==c&&(f=f.replace(/["']/g,""));d[c.toLowerCase()]=f});return{rules:d,populate:function(a){var c=this.toString();c&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c)},toString:function(){var a=[],c; +for(c in d)d[c]&&a.push(c,":",d[c],";");return a.join("")}}}; +(function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return ab?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,k,g;b=d.getFilterContext(b);if(!d.parent)a.onRoot(b, +d);for(;;){k=d.name;if(!(g=a.onElementName(b,k)))return this.remove(),!1;d.name=g;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==k)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}k=d.attributes;var l,v;for(l in k){for(g=k[l];;)if(v=a.onAttributeName(b,l))if(v!=l)delete k[l],l=v;else break;else{delete k[l];break}v&&(!1===(g=a.onAttribute(b,d,v,g))?delete k[v]:k[v]=g)}d.isEmpty|| +this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var h=this.name,k=[],g=this.attributes,l,v;a.openTag(h,g);for(l in g)k.push([l,g[l]]);a.sortAttributes&&k.sort(d);l=0;for(v=k.length;lCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document); +a={doc:this.getDocument(),range:a.clone()};H.eol.detect(a,this);H.bogus.exclude(a);H.cell.shrink(a);a.fragment=a.range.cloneContents();H.tree.rebuild(a,this);H.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=I,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var f=this.editor.createRange(); +f.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=f.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this); +if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),f=0,g;if(d)for(;g=d.getItem(f++);)if(!t(g)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),z(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b= +this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(u,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()}, +this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO|| +this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?r.$.styleSheet.cssText=k:r.setText(k)):(k=f.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),g.setCustomData("stylesheet",k),k.data("cke-temp",1))}g=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref", +g+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var C={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;b=a.getSelection();if(0!==b.getRanges().length){if(c in C){var e,f=b.getRanges()[0],r=f.startPath(),g,q,k,c=8==c;CKEDITOR.env.ie&& +11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=h(b))?(a.fire("saveSnapshot"),f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),f.select(),a.fire("saveSnapshot"),d=1):f.collapsed&&((g=r.block)&&(k=g[c?"getPrevious":"getNext"](x))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("table")&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),f[c?"checkEndOfBlock":"checkStartOfBlock"]()&&g.remove(),f["moveToElementEdit"+(c?"End":"Start")](k),f.select(),a.fire("saveSnapshot"), +d=1):r.blockLimit&&r.blockLimit.is("td")&&(q=r.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(q,c?CKEDITOR.START:CKEDITOR.END)&&(k=q[c?"getPrevious":"getNext"](x))?(a.fire("saveSnapshot"),f["moveToElementEdit"+(c?"End":"Start")](k),f.checkStartOfBlock()&&f.checkEndOfBlock()?k.remove():f.select(),a.fire("saveSnapshot"),d=1):(q=r.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(q,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&& +this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in C&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr", +"input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&!b.isReadOnly()&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getAscendant("table")&&!b.getOuterHtml().replace(u,""))){var c=a.createRange();c.moveToElementEditStart(b); +c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey();if(c in C&&(b=a.getSelection(),0!==b.getRanges().length)){var c=8==c,d=b.getRanges()[0];b=d.startPath();if(d.collapsed)a:{var f= +b.block;if(f&&d[c?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(f,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var p=d.startContainer.getChild(d.startOffset-(c?1:0));if(p&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("hr")){a.fire("saveSnapshot");p.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(f))b=void 0;else{a.fire("saveSnapshot");var r;(r=(c?d:f).getBogus())&&r.remove();r=a.getSelection();p=r.createBookmarks();(c?f:d).moveChildren(c? +d:f,!1);b.lastElement.mergeSiblings();e(f,d,!c);r.selectBookmarks(p);b=!0}}else b=!1}else c=d,r=b.block,d=c.endPath().block,r&&d&&!r.equals(d)?(a.fire("saveSnapshot"),(f=r.getBogus())&&f.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(r,!1),b.lastElement.mergeSiblings(),e(r,d,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView(); +a.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref"); +--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")|| +a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role", +"textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"); +x=CKEDITOR.dom.walker.whitespaces(!0);t=CKEDITOR.dom.walker.bookmark(!1,!0);z=CKEDITOR.dom.walker.empty();G=CKEDITOR.dom.walker.bogus();u=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;n=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,r,g,h=[],k=d.range.startContainer;e=d.range.startPath();for(var k=F[k.getName()],C=0,w=c.getChildren(),l=w.count(),n=-1,A=-1,v=0,T=e.contains(F.$list);C< +l;++C)e=w.getItem(C),a(e)?(r=e.getName(),T&&r in CKEDITOR.dtd.$list?h=h.concat(b(e,d)):(g=!!k[r],"br"!=r||!e.data("cke-eol")||C&&C!=l-1||(v=(f=C?h[C-1].node:w.getItem(C+1))&&(!a(f)||!f.is("br")),f=f&&a(f)&&F.$block[f.getName()]),-1!=n||g||(n=C),g||(A=C),h.push({isElement:1,isLineBreak:v,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:r,allowed:g}),f=v=0)):h.push({isElement:0,node:e,allowed:1});-1CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e=d.startContainer,f=e.getAscendant("table", +1),g=!1;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();f||(f=d.clone(),f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),g=!0);f||(f=e);f.is("table")?(d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),f.remove()):(f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",g)),f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",g)),(e=f.getBogus())&&e.remove(),d.moveToPosition(f,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}(); +y=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,d=!1,e;e=b.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),d=!0);e||(e=c);e.is(CKEDITOR.dtd.$list)? +(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),e.remove()):((c=e.getBogus())&&c.remove(),b.moveToPosition(e,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();H={eol:{detect:function(a,b){var c=a.range,d=c.clone(),e=c.clone(),f=new CKEDITOR.dom.elementPath(c.startContainer,b),g=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);e.collapse();f.block&&d.checkBoundaryOfElement(f.block,CKEDITOR.END)&&(c.setStartAfter(f.block),a.prependEolBr=1);g.block&& +e.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(c.setEndBefore(g.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!G(b)||c&&c.equals(b)||a.range.setEndBefore(b)}}, +tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),g;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1,table:1})){var h=e.contains("table").getParent();g=function(a){return!a.equals(h)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(f=f.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!f.equals(c))){var k=e.contains(CKEDITOR.dtd.$list).getParent(); +g=function(a){return!a.equals(k)}}g||(g=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,g)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e),a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};I=function(){function a(b,c){var d= +b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var f;f=e.getNext();)f.insertAfter(d),d=f;z(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),f=d.endPath(),g=e.contains(CKEDITOR.dtd.$list),h=f.contains(CKEDITOR.dtd.$list);a.mergeList=g&&h&&g.getParent().equals(h.getParent())&&!g.equals(h); +a.mergeListItems=e.block&&f.block&&e.block.is(CKEDITOR.dtd.$listItem)&&f.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var h=f.contains(CKEDITOR.dtd.$list),k= +g.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(f=f.contains(CKEDITOR.dtd.$listItem),g=g.contains(CKEDITOR.dtd.$listItem),f.equals(g)||b(g,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d= +a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(e,c),f=f.block,g=g.block;f&&g&&!f.equals(g)&&b(g,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=[],f,g=new CKEDITOR.dom.walker(c),h=c.startPath().contains(d),p=c.endPath().contains(d),k={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(g?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(k,a,l,1)}if(g&& +h&&a.equals(h))f=c.clone(),f.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(f);else if(!g&&p&&a.equals(p))f=c.clone(),f.setStartAt(p,CKEDITOR.POSITION_AFTER_START),e.push(f);else{if(l=!g)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||b(a,h))&&(!p||b(a,p));if(!l&&(l=g))if(a.is(d))var l=h&&h.getAscendant("table",!0),n=p&&p.getAscendant("table",!0),m=a.getAscendant("table",!0),l=l&&l.contains(m)||n&&n.contains(m);else l=void 0;l&&(f=c.clone(),f.selectNodeContents(a),e.push(f))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(k); +return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(1f&&e&&e.intersectsNode(c.$)){var g=[{node:d.anchorNode,offset:d.anchorOffset}, +{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==c.$&&d.anchorOffset>f&&(g[0].offset-=f);d.focusNode==c.$&&d.focusOffset>f&&(g[1].offset-=f)}}c.setText(t(c.getText(),1));g&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(g[1].node,g[1].offset))}}function t(a,b){return b?a.replace(H,function(a,b){return b?" ":""}):a.replace(y,"")}function z(a,b){var c=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;", +c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+'"\x3e'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),e=a.createRange(),f=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(c,CKEDITOR.POSITION_AFTER_START);e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END); +d.selectRanges([e]);f.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function G(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];1==e.length&&f.collapsed&&(d=f[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),c.data.preventDefault(),c.cancel())}}}function u(a){for(var b=0;b=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e): +h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(d),e.collapsed||a.splice(b+1,0,e));return!0}return!1};d.next()}}return a}var n="function"!=typeof window.getSelection,L=1,y=CKEDITOR.tools.repeat("​",7),H=new RegExp(y+"( )?","g"),I,m,B,K=CKEDITOR.dom.walker.invisible(1),A=function(){function a(b){return function(a){var c= +a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!c.readOnly)return(e=d.moveToClosestEditablePosition(b.selected,a))||(e=d.moveToClosestEditablePosition(b.selected,!a)),e&&c.getSelection().selectRanges([d]),c.fire("saveSnapshot"),b.selected.remove(),e||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d])),c.fire("saveSnapshot"), +!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){v=new CKEDITOR.dom.selection(c.getSelection());v.lock()}function b(){g.removeListener("mouseup",b);l.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==f.$&&c.select()}function d(a){var b, +c;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(c=e(b))&&!c.equals(q)&&(b.selectElement(c),a.data.preventDefault()))}function e(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var f=c.document,g=CKEDITOR.document,q=c.editable(),r=f.getBody(),l=f.getDocumentElement(),C=q.isInline(), +m,v;CKEDITOR.env.gecko&&q.attachListener(q,"focus",function(a){a.removeListener();0!==m&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==q.$&&(a=c.createRange(),a.moveToElementEditStart(q),a.select())},null,null,-2);q.attachListener(q,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){m=c._.previousActive&&c._.previousActive.equals(f.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=q.$.scrollTop; +CKEDITOR.env.webkit&&m&&a&&(q.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(m);m=0},null,null,-1);q.attachListener(q,"mousedown",function(){m=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||C)n?q.attachListener(q,"beforedeactivate",a,null,null,-1):q.attachListener(c,"selectionCheck",a,null,null,-1),q.attachListener(q,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=v&&(v.isFake||2>v.getRanges().length);CKEDITOR.env.gecko&&!C&&a||(c.lockSelection(v),m=1)},null,null,-1), +q.attachListener(q,"mousedown",function(){m=0});if(CKEDITOR.env.ie&&!C){var t;q.attachListener(q,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(t=c.window.getScrollPosition()))});q.attachListener(q,"mouseup",function(a){2==a.data.$.button&&t&&(c.document.$.documentElement.scrollLeft=t.x,c.document.$.documentElement.scrollTop=t.y);t=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var u,z; +l.on("mousedown",function(a){function b(a){a=a.data.$;if(u){var c=r.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}u.setEndPoint(0>z.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);u.select()}}function c(){l.removeListener("mousemove",b);g.removeListener("mouseup",c);l.removeListener("mouseup",c);u.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)l.on("mousedown",function(a){a.data.getTarget().is("html")&&(g.on("mouseup",b),l.on("mouseup",b))})}}q.attachListener(q,"selectionchange",h,c);q.attachListener(q,"keyup",k,c);q.attachListener(q,"touchstart",k,c);q.attachListener(q,"touchend",k,c);CKEDITOR.env.ie&&q.attachListener(q,"keydown",d,c);q.attachListener(q,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){c.forceNextSelectionCheck(); +c.selectionChange(1)});if(C&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var y;q.attachListener(q,"mousedown",function(){y=1});q.attachListener(f.getDocumentElement(),"mouseup",function(){y&&k.call(c);y=0})}else q.attachListener(CKEDITOR.env.ie?q:f.getDocumentElement(),"mouseup",k,c);CKEDITOR.env.webkit&&q.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:q.hasFocus&&x(q)}},null,null,-1);q.attachListener(q, +"keydown",G(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(), +CKEDITOR.env.gecko&&(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var d=A[a.data.keyCode];if(d)return d({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar");c&&(c.getCustomData("ready")? +(x(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){x(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=t(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=t(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?h:k).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&& +"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection, +!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection= +function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:L++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer); +else{try{e=a.createRange()}catch(f){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var M={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1, +select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:t,_createFillingCharSequenceNode:e,FILLING_CHAR_SEQUENCE:y});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=n?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:n?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE; +try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&M[d.childNodes[c.startOffset].nodeName.toLowerCase()]&& +(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=n?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,g,h=b.duplicate(),k=0,l=e.length-1,r=-1,n,m;k<=l;)if(r=Math.floor((k+l)/2),f=e[r],h.moveToElementText(f),n=h.compareEndPoints("StartToStart",b),0n)k=r+1;else return{container:d,offset:a(f)}; +if(-1==r||r==e.length-1&&0>n){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h)return f=e[e.length-1],f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length};for(d=e.length;0c.length?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty(); +a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=L++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,c=b&&b._.hiddenSelectionContainer;this.reset();if(c)for(var c=this.root,g,h=0;h]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g, +" ");g=g.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(f);f.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";f.copyAttributes(h.getFirst());f=h.getFirst().remove()}else f.setHtml(g);b=f}else g?b=t(c?[a.getHtml()]:e(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(w))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=x(k.getHtml(),/\n$/,"")+"\n\n"+x(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e": +c.setHtml(d),k.remove())}else c&&n(b)}function e(a){var b=[];x(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function x(a,b,c){var d="",e="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function t(a,b){var c; +1=c?(h=f.createText(""),h.insertAfter(this)):(a=f.createText(""),a.insertAfter(h),a.remove()));return h},substring:function(a,d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}}); +(function(){function a(a,c,d){var h=a.serializable,k=c[d?"endContainer":"startContainer"],g=d?"endOffset":"startOffset",l=h?c.document.getById(a.startNode):a.startNode;a=h?c.document.getById(a.endNode):a.endNode;k.equals(l.getPrevious())?(c.startOffset=c.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(c.startOffset-=k.getLength(),k=a.getNext());k.equals(l.getParent())&&c[g]++;k.equals(a.getParent())&&c[g]++;c[d?"endContainer":"startContainer"]=k;return c} +CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(k){h=void 0===h?0:h+1;var g=a[h];if(g&&1b?-1:1}),f=0,g;fCKEDITOR.env.version? +a[h].$.styleSheet.cssText+=g:a[h].$.innerHTML+=g}}var h={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,f){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]), +g||(g=this.icons[a]));a=c||g&&g.path||"";d=d||g&&g.offset;f=f||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,d="",h="";"function"==typeof c&&(d=c(this,"editor"),h= +c(this,"panel"));a=[[l,a]];f([b],d,a);f(g,h,a)}).call(this,a)}});var k="cke_ui_color",g=[],l=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){var d=c(a);g.push(d);b.on("destroy",function(){g=CKEDITOR.tools.array.filter(g,function(a){return d!==a})});(a=b.getUiColor())&&f([d],CKEDITOR.skin.chameleon(b,"panel"), +[[l,a]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); +(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var d=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!d||d!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); +CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;de;e++){var f=e,c;c=parseInt(a[e],16);c=("0"+(0>d?0|c*(1+d):0|c+(255-c)*d).toString(16)).slice(-2);a[f]=c}return"#"+a.join("")}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; +return function(g,d){var a=b(g.uiColor,.4),a={id:"."+g.id,defaultBorder:b(a,-.2),toolbarElementsBorder:b(a,-.25),defaultBackground:a,lightBackground:b(a,.8),darkBackground:b(a,-.15),ckeButtonOn:b(a,.4),ckeResizer:b(a,-.4),ckeColorauto:b(a,.8),dialogBody:b(a,.7),dialogTab:b(a,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-.6),menubuttonHover:b(a,.1),menubuttonIcon:b(a,.5),menubuttonIconHover:b(a,.3)};return f[d].output(a).replace(/\[/g,"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var h=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;darguments.length)){var c=h.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+ +"_label";this._.children=[];var e={role:a.role||"presentation"};a.includeLabel&&(e["aria-labelledby"]=c.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null,e,function(){var e=[],g=a.required?" cke_required":"";"horizontal"!=a.labelLayout?e.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" ',' id\x3d"'+c.labelId+'"',c.inputId?' for\x3d"'+c.inputId+'"':"",(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",a.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', +a.controlStyle?' style\x3d"'+a.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,b,a),"\x3c/div\x3e"):(g={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" id\x3d"'+c.labelId+'" for\x3d"'+c.inputId+'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(a.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(a.controlStyle?' style\x3d"'+a.controlStyle+ +'"':"")+"\x3e"+f.call(this,b,a)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,g,e));return e.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+a.type,id:f,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var e=this,m=!1;b.on("load",function(){e.getInputElement().on("keydown", +function(a){13==a.data.getKeystroke()&&(m=!0)});e.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&m&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),m=!1);e.bidi&&w.call(e,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var b=['\x3cdiv class\x3d"cke_dialog_ui_input_',a.type,'" role\x3d"presentation"'];a.width&&b.push('style\x3d"width:'+a.width+'" ');b.push("\x3e\x3cinput ");c["aria-labelledby"]=this._.labelId;this._.required&& +(c["aria-required"]=this._.required);for(var e in c)b.push(e+'\x3d"'+c[e]+'" ');b.push(" /\x3e\x3c/div\x3e");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",e={};a.validate&&(this.validate=a.validate);e.rows=a.rows||5;e.cols=a.cols||20;e["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(e.style=a.inputStyle);a.dir&&(e.dir=a.dir);if(f.bidi)b.on("load", +function(){f.getInputElement().on("keyup",w)},f);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e["aria-labelledby"]=this._.labelId;this._.required&&(e["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',c,'" '],b;for(b in e)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(e[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, +a,d){if(!(3>arguments.length)){var f=h.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],d=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":d};t(c);a["default"]&&(g.checked="checked");"undefined"!=typeof c.inputStyle&&(c.style=c.inputStyle); +f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,e,"input",null,g);e.push(' \x3clabel id\x3d"',d,'" for\x3d"',g.id,'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(a.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.validate);var f=[],c=this;a.role="radiogroup";a.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, +b,a,d,function(){for(var e=[],d=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",k=0;karguments.length)){var f=h.call(this,a);a.validate&&(this.validate=a.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],d=[],g={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_', +a.type,'" role\x3d"presentation"');a.width&&e.push('style\x3d"width:'+a.width+'" ');e.push("\x3e");void 0!==a.size&&(g.size=a.size);void 0!==a.multiple&&(g.multiple=a.multiple);t(c);for(var k=0,l;karguments.length)){void 0===a["default"]&&(a["default"]="");var f=CKEDITOR.tools.extend(h.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', +f.frameId,'" title\x3d"',a.label,'" src\x3d"javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"\x3e\x3c/iframe\x3e');return b.join("")})}},fileButton:function(b,a,d){var f=this;if(!(3>arguments.length)){h.call(this,a);a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= +a["for"];c=e?e.call(this,c):!1;!1!==c&&("xhr"!==c&&b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var m=[],g=c.html;"\x3c"!=g.charAt(0)&&(g="\x3cspan\x3e"+g+"\x3c/span\x3e");var k=c.focus;if(k){var l=this.focus; +this.focus=function(){("function"==typeof k?k:l).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,c,m,"span",null,null,"");m=m.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",m[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a= +[];e&&a.push("\x3clegend"+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+e+"\x3c/legend\x3e");for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue= +b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:v},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")}, +isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, +focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var a=b&&b.charAt(0);(a="‪"==a?"ltr":"‫"==a?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(a)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, +getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var a=this.getDirectionMarker();a&&(b=("ltr"==a?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var a=this.getInputElement();b?a.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&a.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},q,!0);CKEDITOR.ui.dialog.textarea.prototype= +new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);return this},remove:function(b){this.getInputElement().$.remove(b); +return this},clear:function(){for(var b=this.getInputElement().$;0b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function V(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;ck.width-c.width-g?k.width-c.width+("rtl"==f.lang.dir?0:h[1]):d.x;c=d.y+h[0]k.height-c.height-g?k.height-c.height+h[2]:d.y;q=Math.floor(q);c=Math.floor(c);a.move(q,c,1);b.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var e=null,d=null,f=a.getParentEditor(), +g=f.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(g){if(!a._.moved){var f=a._.element;f.getFirst().setStyle("position","absolute");f.removeStyle("display");a._.moved=!0;a.layout()}e={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);d=a.getPosition();CKEDITOR.env.ie6Compat&&(f=u.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));g.data.preventDefault()}, +a)}function ca(a){function b(b){var c="rtl"==f.lang.dir,q=k.width,l=k.height,w=q+(b.data.$.screenX-m.x)*(c?-1:1)*(a._.moved?1:2),C=l+(b.data.$.screenY-m.y)*(a._.moved?1:2),E=a._.element.getFirst(),E=c&&parseInt(E.getComputedStyle("right"),10),v=a.getPosition();v.x=v.x||0;v.y=v.y||0;v.y+C>p.height&&(C=p.height-v.y);(c?E:v.x)+w>p.width&&(w=p.width-(c?E:v.x));C=Math.floor(C);w=Math.floor(w);if(d==CKEDITOR.DIALOG_RESIZE_WIDTH||d==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(e.minWidth||0,w-g);if(d==CKEDITOR.DIALOG_RESIZE_HEIGHT|| +d==CKEDITOR.DIALOG_RESIZE_BOTH)l=Math.max(e.minHeight||0,C-h);a.resize(q,l);a._.moved&&O(a,a._.position.x,a._.position.y);a._.moved||a.layout();b.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);q&&(q.remove(),q=null);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var e=a.definition,d=e.resizable;if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var f= +a.getParentEditor(),g,h,p,m,k,q,l=CKEDITOR.tools.addFunction(function(d){function e(a){return a.isVisible()}k=a.getSize();var f=a.parts.contents,l=f.$.getElementsByTagName("iframe").length,w=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);l&&(q=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),f.append(q));h=k.height-a.parts.contents.getFirst(e).getSize("height",w); +g=k.width-a.parts.contents.getFirst(e).getSize("width",1);m={x:d.screenX,y:d.screenY};p=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(f=u.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+ +b+" cke_resizer_"+f.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(f.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+l+', event )"\x3e'+("ltr"==f.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});f.on("destroy",function(){CKEDITOR.tools.removeFunction(l)})}}function O(a,b,c){var e=a.parts.dialog.getParent().getClientSize(),d=a.getSize(),f=a._.viewportRatio,g=Math.max(e.width-d.width,0),e=Math.max(e.height-d.height,0);f.width=g?b/g:f.width;f.height=e?c/e:f.height; +a._.viewportRatio=f}function J(a){a.data.preventDefault(1)}function P(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,e=b.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=b.dialog_backgroundCoverOpacity,d=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(e,c,d),f=D[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");f?f.show():(d=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",d,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;", +CKEDITOR.env.ie6Compat?"":"background-color: "+e,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(e="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+e+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",d.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),d.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+e+"' );document.close();")+"})())"),d.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')), +d.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(d.join("")),f.setOpacity(void 0!==c?c:.5),f.on("keydown",J),f.on("keypress",J),f.on("keyup",J),f.appendTo(CKEDITOR.document.getBody()),D[b]=f);a.focusManager.add(f);u=f;CKEDITOR.env.mac&&CKEDITOR.env.webkit||f.focus()}function Q(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");u&&(a.focusManager.remove(u),u.hide())}function R(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode); +(b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function S(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function T(a,b,c,e,d){(x[c]||(x[c]=[])).push({uiElement:a, +dialog:b,key:c,keyup:d||a.accessKeyUp,keydown:e||a.accessKeyDown})}function da(a){for(var b in x){for(var c=x[b],e=c.length-1;0<=e;e--)c[e].dialog!=a&&c[e].uiElement!=a||c.splice(e,1);0===c.length&&delete x[b]}}function ea(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function fa(){}var y=CKEDITOR.tools.cssLength,U,u,F=!CKEDITOR.env.ie||CKEDITOR.env.edge,Z='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(F? +"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(F?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; +CKEDITOR.dialog=function(a,b){function c(){var a=n._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;cb.length)){var c=n._.currentFocusIndex;n._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,g=1arguments.length)){var h=(e.call?e(b):e)||"div",p=["\x3c",h," "],m=(d&&d.call?d(b):d)||{},k=(f&&f.call?f(b):f)||{},q=(g&&g.call?g.call(this,a,b):g)||"",l=this.domId=k.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);k.id=l;var r={};b.type&&(r["cke_dialog_ui_"+b.type]=1);b.className&&(r[b.className]= +1);b.disabled&&(r.cke_disabled=1);for(var n=k["class"]&&k["class"].split?k["class"].split(" "):[],l=0;lCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;t.fire("focus");c&&this.addClass(c)});b.on("blur",function(){t.fire("blur"); +c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=t.focusIndex}))}},hbox:function(a,b,c,e,d){if(!(4>arguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.widths||null,h=d&&d.height||null,p,m={role:"presentation"};d&&d.align&&(m.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"hbox"},e,"table",{},m,function(){var a= +['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(p=0;parguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.width||null,h=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');d&&d.expand&&b.push("height:100%;"); +b.push("width:"+y(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;earguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,c,e){for(var d=c.children,f,g=[],h=[],p=0;pe.length&&(a=g.document.createElement(g.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=h.shift(),c.insertNode(a),a.append(new CKEDITOR.dom.text("",g.document)),c.moveToBookmark(b),c.selectNodeContents(a),c.collapse(!0),b=c.createBookmark(),e.push(a),h.unshift(b));d=e[0].getParent();c=[];for(b=0;ba||(this.notifications.splice(a,1),b.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,a=b.config,c=new CKEDITOR.dom.element("div");c.addClass("cke_notifications_area");c.setAttribute("id","cke_notifications_area_"+b.name);c.setStyle("z-index",a.baseFloatZIndex-2);return c},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input); +a.on("change",this._changeBuffer.input);a.on("floatingSpaceLayout",this._layout,this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left", +k(n+d.width-g-h))}var a=this.element,c=this.editor,d=c.ui.contentsElement.getClientRect(),e=c.ui.contentsElement.getDocumentPosition(),f,l,u=a.getClientRect(),m,g=this._notificationWidth,h=this._notificationMargin;m=CKEDITOR.document.getWindow();var p=m.getScrollPosition(),t=m.getViewPaneSize(),q=CKEDITOR.document.getBody(),r=q.getDocumentPosition(),k=CKEDITOR.tools.cssLength;g&&h||(m=this.element.getChild(0),g=this._notificationWidth=m.getClientRect().width,h=this._notificationMargin=parseInt(m.getComputedStyle("margin-left"), +10)+parseInt(m.getComputedStyle("margin-right"),10));c.toolbar&&(f=c.ui.space("top"),l=f.getClientRect());f&&f.isVisible()&&l.bottom>d.top&&l.bottomp.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:k(e.y+d.height-u.height)});var n="fixed"==a.getStyle("position")?d.left:"static"!=q.getComputedStyle("position")?e.x-r.x:e.x;d.width< +g+h?e.x+g+h>p.x+t.width?b():a.setStyle("left",k(n)):e.x+g+h>p.x+t.width?a.setStyle("left",k(n)):e.x+d.width/2+g/2+h>p.x+t.width?a.setStyle("left",k(n-e.x+p.x+t.width-g-h)):0>d.left+d.width-g-h?b():0>d.left+d.width/2-g/2?a.setStyle("left",k(n-e.x+p.x)):a.setStyle("left",k(n+d.width/2-g/2-h/2))}};CKEDITOR.plugins.notification=q})();(function(){var c='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+= +' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var k="";CKEDITOR.env.ie&&(k='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+k+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ +'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',v=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),w=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON, +CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,b){function c(){var f=a.mode;f&&(f=this.modes[f]?void 0!==p[f]?p[f]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,f=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED: +f,this.setState(f),this.refresh&&this.refresh())}var p=null,q=CKEDITOR.env,r=this._.id=CKEDITOR.tools.getNextId(),g="",d=this.command,k,l,m;this._.editor=a;var e={id:r,button:this,editor:a,focus:function(){CKEDITOR.document.getById(r).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},x=CKEDITOR.tools.addFunction(function(a){if(e.onkey)return a=new CKEDITOR.dom.event(a),!1!==e.onkey(e,a.getKeystroke())}),y=CKEDITOR.tools.addFunction(function(a){var b;e.onfocus&& +(b=!1!==e.onfocus(e,new CKEDITOR.dom.event(a)));return b}),u=0;e.clickFn=k=CKEDITOR.tools.addFunction(function(){u&&(a.unlockSelection(1),u=0);e.execute();q.iOS&&a.focus()});this.modes?(p={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(p[a.mode]=this._.state)},this),a.on("activeFilterChange",c,this),a.on("mode",c,this),!this.readOnly&&a.on("readOnly",c,this)):d&&(d=a.getCommand(d))&&(d.on("state",function(){this.setState(d.state)},this),g+=d.state==CKEDITOR.TRISTATE_ON? +"on":d.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var n;if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(n,"rtl"==b,this.icon,this.iconOffset))},this);d?(l=a.getCommandKeystroke(d))&&(m=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,l)):g+="off";l=this.name||this.command;var h= +null,t=this.icon;n=l;this.icon&&!/\./.test(this.icon)?(n=this.icon,t=null):(this.icon&&(h=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(h=this.iconHiDpi));h?(CKEDITOR.skin.addIcon(h,h),t=null):h=n;g={id:r,name:l,iconName:n,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:g,ariaDisabled:"disabled"==g?"true":"false",title:this.title+(m?" ("+m.display+")":""),ariaShortcut:m?a.lang.common.keyboardShortcut+" "+m.aria:"",titleJs:q.gecko&&!q.hc?"":(this.title|| +"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:x,focusFn:y,clickFn:k,style:CKEDITOR.skin.getIconStyle(h,"rtl"==a.lang.dir,t,this.iconOffset),arrowHtml:this.hasArrow?v.output():""};w.output(g,b);if(this.onRender)this.onRender();return e},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED), +this.hasArrow?b.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}})();(function(){function D(a){function d(){for(var b=f(),e=CKEDITOR.tools.clone(a.config.toolbarGroups)||v(a),n=0;na.order?-1:0>b.order?1:b.order]+data-cke-bookmark[^<]*?<\/span>/ig, +"");e&&r(a,c)})}function u(){if("wysiwyg"==a.mode){var b=q("paste");a.getCommand("cut").setState(q("cut"));a.getCommand("copy").setState(q("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function q(b){var c=a.getSelection(),c=c&&c.getRanges()[0];if((a.readOnly||c&&c.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed? +CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var p=CKEDITOR.plugins.clipboard,n=0,v=0;(function(){a.on("key",m);a.on("contentDom",b);a.on("selectionChange",u);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:q("cut"),copy:q("copy"),paste:q("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady", +function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,e,d,g,m){var k=a.lang.clipboard[e];a.addCommand(e,d);a.ui.addButton&&a.ui.addButton(c,{label:k,command:e,toolbar:"clipboard,"+g});a.addMenuItems&&a.addMenuItem(e,{label:k,command:e,group:"clipboard",order:m})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste", +"paste",d(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,c){function e(a){a.removeListener();a.cancel();c(a.data)}function d(a){a.removeListener();a.cancel();c({type:m,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var g=!1,m="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();g=!0;m=a.data.type},null,null,1E3);a.on("paste",e,null,null,0);!1===t()&&(a.removeListener("paste",e),a._.forcePasteDialog&& +g&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",d),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",d);a.data._.committed||c(null)})):c(null))}}function y(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
      <\/div>|
      [^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

      ([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html"; +return"htmlifiedtext"}function z(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
      |)<\/div>)(?!$|(

      (
      |)<\/div>))/g,"\x3cbr\x3e").replace(/^(
      (
      |)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"), +b.match(/
      (
      |)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(
      (
      |)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
      /g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

      $/,"\x3cbr\x3e")),-1){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return A(a,b)}function B(a){function b(){var a= +{},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function w(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b, +!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function A(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

      )+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function C(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function D(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,c,e){c.select();r(a,{dataTransfer:e, +method:"drop"},1);e.sourceEditor.fire("saveSnapshot");e.sourceEditor.editable().extractHtmlFromRange(b);e.sourceEditor.getSelection().selectRanges([b]);e.sourceEditor.fire("saveSnapshot")}function d(c,e){c.select();r(a,{dataTransfer:e,method:"drop"},1);b.resetDragDataTransfer()}function f(b,c,e){var d={$:b.data.$,target:b.data.getTarget()};c&&(d.dragRange=c);e&&(d.dropRange=e);!1===a.fire(b.name,d)&&b.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} +var e=a.editable(),g=CKEDITOR.plugins.clipboard.getDropTarget(a),l=a.ui.space("top"),t=a.ui.space("bottom");b.preventDefaultDropOnElement(l);b.preventDefaultDropOnElement(t);e.attachListener(g,"dragstart",f);e.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);e.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);e.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount= +c?h(c.startContainer):null,b.dragEndContainerChildCount=c?h(c.endContainer):null)},null,null,100);e.attachListener(g,"dragend",f);e.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);e.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);e.attachListener(g,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&& +a.data.preventDefault()}});e.attachListener(g,"drop",function(c){if(!c.data.$.defaultPrevented&&(c.data.preventDefault(),!a.readOnly)){var e=c.data.getTarget();if(!e.isReadOnly()||e.type==CKEDITOR.NODE_ELEMENT&&e.is("html")){var e=b.getRangeAtDropPosition(c,a),d=b.dragRange;e&&f(c,d,e)}}},null,null,9999);e.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);e.attachListener(a,"drop",function(e){if(e=e.data){var g=e.dropRange,f=e.dragRange,l=e.dataTransfer;l.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL? +setTimeout(function(){b.internalDrop(f,g,l,a)},0):l.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,g,l):d(g,l)}},null,null,9999)})}var n;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){function b(a){if(!a||h===a.id)return!1;var b=a.getTypes(),b=1===b.length&&"Files"===b[0];a=1===a.getFilesCount();return b&&a}var c,d=B(a);a.config.forcePasteAsPlainText?c="plain-text":a.config.pasteFilter?c=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in +a.config||(c="semantic-content");a.pasteFilter=d.get(c);x(a);D(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var f=["image/png","image/jpeg","image/gif"],h;a.on("paste",function(c){var d=c.data,l=d.dataTransfer;if(!d.dataValue&&"paste"==d.method&&b(l)&&(l=l.getFile(0),-1!=CKEDITOR.tools.indexOf(f,l.type))){var t=new FileReader;t.addEventListener("load",function(){c.data.dataValue='\x3cimg src\x3d"'+t.result+'" /\x3e';a.fire("paste",c.data)},!1); +t.addEventListener("abort",function(){a.fire("paste",c.data)},!1);t.addEventListener("error",function(){a.fire("paste",c.data)},!1);t.readAsDataURL(l);h=d.dataTransfer.id;c.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d), +b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/, +"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,h=new CKEDITOR.dom.element("div");for(h.setHtml(b);1==h.getChildCount()&&(d=h.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)h=f=d;f&&(b=f.getHtml().replace(/
      $/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


      <\/div>$/, +function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
      $/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(b){b=b.data;var c=a._.nextPasteType||b.type,f=b.dataValue,h,m=a.config.clipboard_defaultContentType||"html",k=b.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;h="html"==c||"html"==b.preSniffing?"html":y(f);delete a._.nextPasteType;"htmlifiedtext"==h&&(f=z(a.config,f)); +if("text"==c&&"html"==h)f=w(a,f,d.get("plain-text"));else if(k&&a.pasteFilter&&!b.dontFilter||n)f=w(a,f,a.pasteFilter);b.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+f);b.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==c&&(c="html"==h||"html"==m?"html":"text");b.type=c;b.dataValue=f;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")}, +0))},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function f(a,c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var h=b.startContainer;"number"==typeof d&&"number"== +typeof c&&h.type==CKEDITOR.NODE_ELEMENT&&(f(a.startContainer,h,c)||f(a.endContainer,h,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(g=this.isDropRangeAffectedByDragRange(a,b))||(e=a.createBookmark(!1));f=b.clone().createBookmark(!1);g&&(e=a.createBookmark(!1));a=e.startNode;b=e.endNode;g=f.startNode;b&&a.getPosition(g)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(g)&CKEDITOR.POSITION_FOLLOWING&&g.insertBefore(a);a=d.createRange();a.moveToBookmark(e);h.extractHtmlFromRange(a,1);b=d.createRange(); +f.startNode.getCommonAncestor(h)||(f=d.getSelection().createBookmarks()[0]);b.moveToBookmark(f);r(d,{dataTransfer:c,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,f=c.clientY,h=b.getSelection(!0).getRanges()[0],e=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,f))c=b.document.$.caretRangeFromPoint(d,f),e.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset), +e.collapse(!0);else if(c.rangeParent)e.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),e.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!g;l++){if(!g)try{c.moveToPoint(d,f-l),g=!0}catch(n){}if(!g)try{c.moveToPoint(d,f+l),g=!0}catch(m){}}if(g){var k="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+k+'"\x3e​\x3c/span\x3e'); +var u=b.document.getById(k);e.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START);u.remove()}else{var q=b.document.$.elementFromPoint(d,f),p=new CKEDITOR.dom.element(q),r;if(p.equals(b.editable())||"html"==p.getName())return h&&h.startContainer&&!h.startContainer.equals(b.editable())?h:null;r=p.getClientRect();d/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g, +data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(n);this.id||(this.id="Text"==n?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==n||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL= +1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"== +c.substring(0,7)&&(c="");if("string"===typeof c)var f=c.indexOf("\x3c/html\x3e"),c=-1!==f?c.substring(0,f+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==n&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!== +n&&this.setData(n,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(a){a=b._.normalizeType(a);var c=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a,!0),c=b._stripHtml(c));c&&(b._.data[a]=c)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;cc?d+c:b.width>c?d-a.left:d-a.right+b.width):mc?d-c:b.width>c?d-a.right+b.width:d-a.left);c=a.top;b.height-a.tope?p-e:b.height>e?p-a.bottom+b.height:p-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=k.$.offsetParent&&new CKEDITOR.dom.element(k.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&(d=CKEDITOR.env.ie8Compat?d-2*k.getDocument().getDocumentElement().$.scrollLeft:d-(a.$.scrollWidth-a.$.clientWidth))); +var a=k.getFirst(),f;(f=a.getCustomData("activePanel"))&&f.onHide&&f.onHide.call(this,1);a.setCustomData("activePanel",this);k.setStyles({top:p+"px",left:d+"px"});k.setOpacity(1);g&&g()},this);n.isLoaded?a():n.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();l.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){l.markFirstDisplayed? +l.markFirstDisplayed():l._.markFirstDisplayed()},0):l.markFirstDisplayed?l.markFirstDisplayed():l._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused|| +this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(), +a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!==a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,f,h,g){if(this._.activeChild!=a||a._.panel._.offsetParentId!=c.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,f,h,g),this.blur(), +(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in f){var c=f[b];a?c.destroy():c.element.hide()}a&&(f={})})})();CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(m){for(var k=m.config.menu_groups.split(","),n=m._.menuGroups={},r=m._.menuItems={},p=0;pf.group?1:a.orderf.order?1:0})}var k='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"', +n="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(k+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(k+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(n='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var k=k+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+n+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+ +'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',r=CKEDITOR.addTemplate("menuItem",k),p=CKEDITOR.addTemplate("menuArrow", +'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),c=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var f=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level- +1,block:{}}),c=f.block.attributes=f.attributes||{};!c.role&&(c.role="menu");this._.panelDefinition=f},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),f=this.editor.elementPath(),c=this._.listeners;this.removeAll();for(var h=0;hc.width&&(a.resize_minWidth=c.width);a.resize_minHeight>c.height&&(a.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",k);b.document&&(b.document.on("mousemove",f),b.document.on("mouseup",k));d.preventDefault&&d.preventDefault()});b.on("destroy", +function(){CKEDITOR.tools.removeFunction(q)});b.on("uiSpace",function(a){if("bottom"==a.data.space){var e="";h&&!p&&(e=" cke_resizer_horizontal");!h&&p&&(e=" cke_resizer_vertical");var c='\x3cspan id\x3d"'+r+'" class\x3d"cke_resizer'+e+" cke_resizer_"+g+'" title\x3d"'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event)"\x3e'+("ltr"==g?"◢":"◣")+"\x3c/span\x3e";"ltr"==g&&"ltr"==e?a.data.html+=c:a.data.html=c+a.data.html}},b,null,100);b.on("maximize", +function(a){b.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){function q(a,c){function k(b){b=h.list[b];var e;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(e=a.createRange(),e.selectNodeContents(b),e=e.select()):(e=a.getSelection(),e.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:e,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function l(){m&&m.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete h.list}var n=a.ui.spaceId("path"),m,h=a._.elementsPath,q=h.idBase;c.html+='\x3cspan id\x3d"'+ +n+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+n+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+n+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});h.onClick=k;var v=CKEDITOR.tools.addFunction(k),w=CKEDITOR.tools.addFunction(function(b,e){var g=h.idBase,d;e=new CKEDITOR.dom.event(e);d="rtl"==a.lang.dir;switch(e.getKeystroke()){case d? +39:37:case 9:return(d=CKEDITOR.document.getById(g+(b+1)))||(d=CKEDITOR.document.getById(g+"0")),d.focus(),!1;case d?37:39:case CKEDITOR.SHIFT+9:return(d=CKEDITOR.document.getById(g+(b-1)))||(d=CKEDITOR.document.getById(g+(h.list.length-1))),d.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return k(b),!1}return!0});a.on("selectionChange",function(b){for(var e=[],g=h.list=[],d=[],c=h.filters,p=!0,k=b.data.path.elements,u=k.length;u--;){var f=k[u],r=0;b=f.data("cke-display-name")?f.data("cke-display-name"): +f.data("cke-real-element-type")?f.data("cke-real-element-type"):f.getName();(p=f.hasAttribute("contenteditable")?"true"==f.getAttribute("contenteditable"):p)||f.hasAttribute("contenteditable")||(r=1);for(var t=0;tCKEDITOR.env.version?n.createText("\r"):n.createElement("br"),b.deleteContents(),b.insertNode(a),CKEDITOR.env.needsBrFiller?(n.createText("").insertAfter(a),g&&(k||f.blockLimit).appendBogus(),a.getNext().$.nodeValue="",b.setStartAt(a.getNext(), +CKEDITOR.POSITION_AFTER_START)):b.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),b.collapse(!0),b.select(),b.scrollIntoView()):r(a,e,b,l)}}};v=CKEDITOR.plugins.enterkey;u=v.enterBr;r=v.enterBlock;w=/^h[1-6]$/})();(function(){function k(a,f){var g={},c=[],e={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var d=f?"\x26"+b+";":e[b];g[d]=f?e[b]:"\x26"+b+";";c.push(d);return""});a=a.replace(/,$/,"");if(!f&&a){a=a.split(",");var b=document.createElement("div"),d;b.innerHTML="\x26"+a.join(";\x26")+";";d=b.innerHTML;b=null;for(b=0;ba&&(a=640);420>b&&(b=420);var f=parseInt((window.screen.height-b)/2,10),g=parseInt((window.screen.width-a)/2,10);d=(d||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+ +a+",height\x3d"+b+",top\x3d"+f+",left\x3d"+g;var c=window.open("",null,d,!0);if(!c)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(c.moveTo(g,f),c.resizeTo(a,b)),c.focus(),c.location.href=e}catch(h){window.open(e,null,d,!0)}return!0}});(function(){function k(a){this.editor=a;this.loaders=[]}function l(a,c,b){var d=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof c?(this.data=c,this.file=n(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=c,this.total=this.file.size,this.loaded=0);b?this.fileName=b:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),d&&(a[0]=d),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status= +"created";this.abort=function(){this.changeStatus("abort")}}function n(a){var c=a.match(m)[1];a=a.replace(m,"");a=atob(a);var b=[],d,f,g,e;for(d=0;dd.status||299h.height-c.bottom?e("pin"):e("bottom"),d=h.width/2,d=l.floatSpacePreferRight?"right":0n.width?"rtl"==l.contentsLangDirection? +"right":"left":d-c.left>c.right-d?"left":"right",n.width>h.width?(d="left",f=0):(f="left"==d?0h.width&&(d="left"==d?"right":"left",f=0)),b.setStyle(d,w(("pin"==m?u:p)+f+("pin"==m?0:"left"==d?v:-v)))):(m="pin",e("pin"),t(d))}}}();if(p){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko? +" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:p,id:a.id,langDir:a.lang.dir, +langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(l.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),u=CKEDITOR.tools.eventsBuffer(500,t),e=CKEDITOR.tools.eventsBuffer(100,t);b.unselectable();b.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){t(b);a.on("change",u.input);g.on("scroll",e.input);g.on("resize",e.input)});a.on("blur",function(){b.hide();a.removeListener("change",u.input);g.removeListener("scroll", +e.input);g.removeListener("resize",e.input)});a.on("destroy",function(){g.removeListener("scroll",e.input);g.removeListener("resize",e.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b,1)}}var g=CKEDITOR.document.getWindow(),w=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){k(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var f=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),g=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), +h=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),k=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&& +(c["aria-multiselectable"]=!0);!c.role&&(c.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",c.role);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=f.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a); +delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,c){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=d;var e;e=CKEDITOR.tools.htmlEncodeAttr(a).replace(k,"\\'");a={id:d,val:e,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': +"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(c||a),text:b||a};this._.pendingList.push(g.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(h.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a= +this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),d;for(d in a)c.getById(a[d]).setStyle("display","");for(var e in b)a=c.getById(b[e]),d=a.getNext(),a.setStyle("display",""),d&&"ul"==d.getName()&&d.setStyle("display", +"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected"); +this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var d=a[c];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,d=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a= +b.getItem(++d);){if(a.equals(c)){this._.focusIndex=d;break}}else this.element.focus();c&&setTimeout(function(){c.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(d){d.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}); +(function(){var d='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',g="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(d+=' onkeypress\x3d"return false;"'); +CKEDITOR.env.gecko&&(d+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var d=d+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+g+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+ +(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),m=CKEDITOR.addTemplate("combo",d);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel"; +a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{},listeners:[]}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function k(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}} +var d=CKEDITOR.env,f,e,c="cke_"+this.id,l=CKEDITOR.tools.addFunction(function(b){e&&(a.unlockSelection(1),e=0);f.execute(b)},this),h=this;f={id:c,combo:this,focus:function(){CKEDITOR.document.getById(c).getChild(1).focus()},execute:function(b){var c=h._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(h.createPanel(a),c.on)c.panel.hide();else{h.commit();var d=h.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(h.id,new CKEDITOR.dom.element(b),4)}},clickFn:l};this._.listeners.push(a.on("activeFilterChange", +k,this));this._.listeners.push(a.on("mode",k,this));this._.listeners.push(a.on("selectionChange",k,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",k,this));var g=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(l,b);break;default:f.onkey(f,c)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){f.onfocus&&f.onfocus()});e=0;f.keyDownFn=g;d={id:c,name:this.name||this.command, +label:this.label,title:this.title,cls:this.className||"",titleJs:d.gecko&&!d.hc?"":(this.title||"").replace("'",""),keydownFn:g,focusFn:n,clickFn:l};m.output(d,b);if(this.onRender)this.onRender();return f},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,d=this._.panelDefinition.block,g=b.parent||CKEDITOR.document.getBody(),f="cke_combopanel__"+this.name,e=new CKEDITOR.ui.floatPanel(a,g,b),b=e.addListBlock(this.id,d),c=this;e.onShow=function(){this.element.addClass(f);c.setState(CKEDITOR.TRISTATE_ON); +c._.on=1;c.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(c.onOpen)c.onOpen()};e.onHide=function(b){this.element.removeClass(f);c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c._.on=0;if(!b&&c.onClose)c.onClose()};e.onEscape=function(){e.hide(1)};b.onClick=function(a,b){c.onClick&&c.onClick.call(c,a,b);e.hide()};this._.panel=e;this._.list=b;e.getBlock(this.id).onHide=function(){c._.on=0;c.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a, +b){this._.value=a;var d=this.document.getById("cke_"+this.id+"_text");d&&(a||b?d.removeClass("cke_combo_inlinelabel"):(b=this.label,d.addClass("cke_combo_inlinelabel")),d.setText("undefined"!=typeof b?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,d){this._.items[a]= +d||a;this._.list.add(a,b,d)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state== +CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var b in this._.items)if(a({value:b,text:this._.items[b]})){this.setValue(b);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}}); +CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(a){if(!a.blockless){for(var f=a.config,c=a.lang.format,l=f.format_tags.split(";"),d={},m=0,n=[],g=0;gCKEDITOR.env.version&&b.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10this.$.offsetHeight){var d=b.createRange();d[33==c?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(c,"blur",function(){try{c.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(c,"touchend",function(){a.focus()});d=b.document.getElementsByTag("title").getItem(0); +d.data("cke-title",d.getText());CKEDITOR.env.ie&&(b.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");b.fire("contentDom");this._.isPendingFocus&&(b.focus(),this._.isPendingFocus=!1);setTimeout(function(){b.fire("dataReady")},0)},0,this)}}function n(a){function e(){var c;a.editable().attachListener(a,"selectionChange",function(){var d=a.getSelection().getSelectedElement();d&&(c&&(c.detachEvent("onresizestart",b),c=null),d.$.attachEvent("onresizestart", +b),c=d.$)})}function b(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var c=a.document.$;c.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);c.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(d){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&e(a)}function p(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var e=[],b;for(b in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+ +b+"[contenteditable\x3dfalse]");a.push(e.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var l;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", +requiredContent:"body"});a.addMode("wysiwyg",function(e){function b(b){b&&b.removeListener();a.isDestroyed()||a.isDetached()||(a.editable(new l(a,d.$.contentWindow.document.body)),a.setData(a.getData(1),e))}var c="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",c=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(c)+"}())":"",d=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+ +c+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');d.setStyles({width:"100%",height:"100%"});d.addClass("cke_wysiwyg_frame").addClass("cke_reset");c=a.ui.space("contents");c.append(d);var f=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(f)d.on("load",b);var g=a.title,h=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&h&&(g+=", "+h),d.setAttribute("title",g));if(h){var g=CKEDITOR.tools.getNextId(),k=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+ +h+"\x3c/span\x3e");c.append(k,1);d.setAttribute("aria-describedby",g)}a.on("beforeModeUnload",function(a){a.removeListener();k&&k.remove()});d.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!f&&b();a.fire("ariaWidget",d)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var e=this.config,b=e.contentsCss;CKEDITOR.tools.isArray(b)||(e.contentsCss=b?[b]:[]);e.contentsCss.push(a)};l=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler= +CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(m,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var b=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),b.fire("dataReady");else{this._.isLoadingData=!0;b._.dataStore={id:1};var c=b.config,d=c.fullPage,f=c.docType,g=CKEDITOR.tools.buildStyleHtml(p()).replace(/'); + } + }, + + /** + * 获取数据 + */ + getData: function (url) { + var iconlist = []; + $.ajax({ + url: url, + type: 'get', + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + async: false, + success: function (ret) { + var exp = /fa-var-(.*):/ig; + var result; + while ((result = exp.exec(ret)) != null) { + iconlist.push('fa-' + result[1]); + } + }, + error: function (xhr, textstatus, thrown) { + layer.msg('fa图标接口有误'); + } + }); + return iconlist; + } + }; + + a.init(); + return new IconPicker(); + }; + + /** + * 选中图标 + * @param filter lay-filter + * @param iconName 图标名称,自动识别fontClass/unicode + */ + IconPicker.prototype.checkIcon = function (filter, iconName) { + var el = $('*[lay-filter=' + filter + ']'), + p = el.next().find('.layui-iconpicker-item .fa'), + c = iconName; + + if (c.indexOf('#xe') > 0) { + p.html(c); + } else { + p.html('').attr('class', 'fa ' + c); + } + el.attr('value', c).val(c); + }; + + var iconPicker = new IconPicker(); + exports(_MOD, iconPicker); +}); \ No newline at end of file diff --git a/public/static/plugs/lay-module/layuimini/layuimini.css b/public/static/plugs/lay-module/layuimini/layuimini.css new file mode 100644 index 0000000..dbd88ff --- /dev/null +++ b/public/static/plugs/lay-module/layuimini/layuimini.css @@ -0,0 +1,930 @@ +/** +配色方案(如有需要,请自行配置) + */ +/**头部-配色*/ +.layui-layout-admin .layui-header { + background-color: #1aa094 !important; +} + +.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #197971 !important; +} + +.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #197971 !important; +} + +/**logo-配色*/ +.layui-layout-admin .layuimini-logo { + background-color: #243346 !important; +} + +/**左侧-配色*/ +.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul { + background-color: #2f4056 !important; +} + +.layuimini-menu-left .layui-nav .layui-nav-child a:hover:not(.layui-this) { + background-color: #3b3f4b; +} + +/**左侧菜单选中-配色*/ +.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this > a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #1aa094 !important; +} + + +/**头部样式 */ +.layui-layout-admin .header { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.layuimini-header-menu, .layui-header { + height: 60px !important; +} + +.layuimini-header-menu > .layui-nav-item { + color: #1b1d21; + height: 60px !important; + line-height: 60px !important; +} + +.layui-header > .layui-layout-right > .layui-nav-item { + height: 60px !important; + line-height: 60px !important; +} + +.layui-layout-left { + left: 295px !important; +} + +.layui-nav.layui-layout-left.layuimini-header-menu.layuimini-pc-show { + font-weight: bold; + transition: all .2s; +} + + +/**logo演示(通用) */ +.layui-layout-admin .layuimini-logo { + font-weight: bold; + color: #ffffff !important; + height: 60px !important; + line-height: 60px !important; + overflow: hidden; + line-height: 64px; + transition: all .2s !important; +} + +.layui-layout-admin .layuimini-logo img { + display: inline-block; + height: 40px; + vertical-align: middle; + border-radius: 50%; +} + +.layui-layout-admin .layuimini-logo h1 { + display: inline-block; + margin: 0 0 0 12px; + color: #ffffff; + font-weight: 600; + font-size: 20px; + font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; + vertical-align: middle; +} + +/**缩放工具(通用) */ +.layuimini-tool { + position: absolute !important; + top: 0; + left: 235px; + width: 60px; + height: 100%; + line-height: 60px; + text-align: center; + color: #ffffff !important; + transition: all .2s; +} + +/**缩放工具(缩放) */ +.layuimini-tool i { + display: block; + color: #bbe3df; + width: 32px; + height: 32px; + line-height: 32px; + border-radius: 3px; + text-align: center; + margin-top: 15px; + cursor: pointer; +} + +/**tab选项卡 */ +.layuimini-tab { + margin: 0; + overflow: hidden; + height: 100% !important; +} + +.layuimini-tab .layui-tabs-scroll { + position: marker; +} + +.layuimini-tab .layui-tabs-body { + height: calc(100% - 37px) !important; +} + +.layuimini-tab .layui-tabs-body .layui-tabs-item { + height: 100%; +} + +.layuimini-tab .layui-tabs-body { + padding: 0; +} + +.layuimini-tab .layui-tabs-header { + border: none; + border: 1px solid whitesmoke; + background-color: white; +} + +.layuimini-tab .layui-tabs-header li { + border-right: 1px solid whitesmoke; + color: dimgray; +} + +.layuimini-tab .layui-tabs-header .layui-tab-bar { + display: none; +} + +.layuimini-tab .layui-tabs-header .layui-this:after { + display: none; +} + +.layuimini-tab .layui-tabs-header .layuimini-tab-active { + display: inline-block; + background-color: lightgray; + width: 9px; + height: 9px; + border-radius: 30px; + margin-right: 5px; +} + +.layuimini-tab .layui-tabs-header .layui-this .layuimini-tab-active { + background-color: var(--ea8-theme-main-color); +} + +.layuimini-tab > .layui-tabs-header, .layuimini-tab > .close-box { + height: 35px !important; +} + +.layuimini-tab > .layui-tabs-header li, .layuimini-tab > .close-box li { + line-height: 35px !important; +} + +.layuimini-tab .layui-tabs-header span { + color: #acafb1; +} + +.layuimini-tab .layui-tabs-header .layui-this span { + color: dimgray; +} + +.layuimini-tab .layui-tabs-header .layui-tab-close { + font-size: 12px !important; + width: 14px !important; + height: 14px !important; + line-height: 16px !important; + margin-left: 5px; + padding: 2px; +} + +.layuimini-tab .layui-tabs-header .layui-tab-close:hover { + border-radius: 4em; + background: #ff5722; + color: #fff; +} + +.layuimini-tab .layui-tabs-header .disable-close + .layui-tab-close { + display: none; +} + +.layuimini-tab .layui-tabs-header .able-close + .layui-tab-close { + display: inline-block; +} + +.layuimini-tab .layui-tab-control > li { + position: absolute; + top: 0; + height: 35px; + line-height: 35px; + width: 35px; + text-align: center; + background-color: white; + border-top: whitesmoke 1px solid; + border-bottom: whitesmoke 1px solid; +} + +.layuimini-tab .layuimini-tab-roll-left { + left: 0; + border-right: whitesmoke 1px solid; + border-left: whitesmoke 1px solid; +} + +.layuimini-tab .layuimini-tab-roll-right { + right: 35px; + border-left: 1px solid whitesmoke; +} + +.layuimini-tab .layui-tab-tool { + right: 0; + border-left: 1px solid whitesmoke; +} + +.layuimini-tab .layui-tab-control .layui-tab-tool, +.layuimini-tab .layui-tab-control .layuimini-tab-roll-left, +.layuimini-tab .layui-tab-control .layuimini-tab-roll-right { + display: none; +} + +.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-left, +.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { + display: block; +} + +.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { + right: 0; + border-right: 1px solid whitesmoke; +} + +.layuimini-tab.layui-tab-roll .layui-tabs-header { + padding-left: 35px; + padding-right: 35px; +} + + +.layuimini-tab.layui-tab-tool .layui-tab-control .layui-tab-tool { + display: block; +} + +.layuimini-tab.layui-tab-tool .layui-tabs-header { + padding-left: 0; + padding-right: 35px; +} + + +.layuimini-tab.layui-tab-rollTool .layui-tabs-header { + padding-left: 35px; + padding-right: 80px; +} + +.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-left, +.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-right, +.layuimini-tab.layui-tab-rollTool .layui-tab-control .layui-tab-tool { + display: block; +} + +.layuimini-tab .layui-tab-tool .layui-nav { + position: absolute; + height: 43px !important; + top: 0; + width: 100%; + height: 100%; + padding: 0; + background: 0 0; +} + +.layuimini-tab .layui-tab-tool .layui-nav-item { + height: 35px; +} + +.layuimini-tab .layui-tab-tool .layui-nav-bar { + display: none; +} + +.layuimini-tab .layui-tab-tool .layui-nav-child { + left: auto; + top: 45px; + right: 3px; + width: 120px; + border: 1px solid whitesmoke; +} + +.layuimini-tab .layui-tab-tool .layui-this a { + background-color: #009688; +} + +.layuimini-tab-loading { + position: absolute; + display: none; + width: 100%; + height: calc(100% - 37px); + top: 37px; + z-index: 19; + background-color: #fff +} + +.layuimini-tab-loading.close { + animation: close 1s; + -webkit-animation: close 1s; + animation-fill-mode: forwards; +} + +/**左侧菜单栏 (通用) */ +.layui-side.layui-bg-black { + transition: all .2s; +} + +.layui-side.layui-bg-black > .layuimini-menu-left > ul { + transition: all .2s; +} + +.layui-side.layui-bg-black > .layuimini-menu-left > ul > .layui-nav-item:first-child { + border-top: 1px solid #4b5461; +} + +.layuimini-menu-left .layui-nav .layui-nav-item a { + height: 40px; + line-height: 40px; + padding-right: 30px; +} + +.layuimini-menu-left .layui-nav .layui-nav-item > a { + padding-top: 5px; + padding-bottom: 5px; +} + +.layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child { + background: 0 0 !important +} + +.layuimini-menu-left .layui-nav .layui-nav-more { + right: 15px; +} + +.layuimini-menu-left .layui-nav .layui-nav-item a:hover { + background-color: transparent !important; +} + +.layuimini-menu-left .layui-nav { + background-color: transparent !important; +} + + +/**左侧菜单栏 (正常) */ +.layui-layout-body .layui-nav-itemed .layui-nav-child a, .layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child a { + padding-left: 35px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child a { + padding-left: 45px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child a { + padding-left: 55px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child .layui-nav-child a { + padding-left: 65px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-itemed > .layui-nav-child { + padding: 5px 0; +} + +/**内容主体(通用) */ +.layui-layout-admin .layui-body { + overflow: hidden; + bottom: 0px !important; + top: 60px !important; + transition: all .2s; +} + +/**选择配色方案 */ +.layuimini-color .color-title { + padding: 10px 0 10px 20px; + border-bottom: 1px solid #d9dada; + margin-bottom: 8px; +} + +.layuimini-color .color-content { + padding: 10px 5px 0 5px; +} + +.layuimini-color .color-content ul { + list-style: none; + text-align: center; +} + +.layuimini-color .color-content ul li { + position: relative; + display: inline-block; + vertical-align: top; + width: 80px; + height: 50px; + margin: 0 15px 15px 0; + padding: 2px 2px 4px 2px; + background-color: #f2f2f2; + cursor: pointer; + font-size: 12px; + color: #666; +} + +.layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after { + width: 100%; + height: 100%; + padding: 4px; + top: -5px; + left: -5px; + border-color: #d8d8d8; + opacity: 1; +} + +.layuimini-color .color-content li:after { + content: ''; + position: absolute; + z-index: 20; + top: 50%; + left: 50%; + width: 1px; + height: 0; + border: 1px solid #f2f2f2; + transition: all .3s; + -webkit-transition: all .3s; + opacity: 0; +} + + +/**其它 */ +.layui-tabs-item { + width: 100% !important; + height: 100% !important; +} + +.layui-nav-item.layui-this { + background-color: #1b1d21; +} + +.layui-width-height { + width: 100%; + height: 95%; +} + +.layui-tab { + margin: 0; + z-index: 99999; +} + +.text-center { + height: 30px !important; + line-height: 30px !important; + text-align: center !important; +} + +.layui-nav { + padding: 0 !important; +} + +.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after { + width: 0 !important; + height: 0 !important; +} + +.layui-layout-admin .layui-side { + top: 60px !important; +} + +.layui-tab-card { + box-shadow: 0px 0px 0px #888888; + border-bottom: 0; +} + + +/**自定义滚动条样式 */ +::-webkit-scrollbar { + display: none +} + + +/*移动端遮罩层*/ +.layuimini-make { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 1000; + background: rgba(0, 0, 0, .5); + display: none; +} + +.layuimini-mini .layui-header { + z-index: 1001; +} + +/**初始化加载层*/ +.layuimini-loader { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #ffffff; + z-index: 999999; +} + +.layuimini-loader .layuimini-loader-inner { + display: block; + position: relative; + left: 50%; + top: 50%; + width: 150px; + height: 150px; + margin: -75px 0 0 -75px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #1E9FFF; + animation: spin 2s linear infinite; +} + +.layuimini-loader .layuimini-loader-inner:before { + content: ""; + position: absolute; + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #1E9FFF; + animation: spin 3s linear infinite; +} + +.layuimini-loader .layuimini-loader-inner:after { + content: ""; + position: absolute; + top: 15px; + left: 15px; + right: 15px; + bottom: 15px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #1E9FFF; + animation: spin 1.5s linear infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + to { + transform: rotate(1turn); + } +} + +/*系统设置*/ + +.layuimini-color .layui-word-aux { + position: absolute; + left: 60px; + top: 12px; + font-size: 12px; +} + +.layuimini-color .layui-input-block { + margin-left: 15px; + min-height: 36px; +} + +.layuimini-color .more-menu-list { + width: 100%; + margin-top: 30px; +} + + +.layuimini-color .more-menu-item:first-child { + border-top: 1px solid #e8e8e8; +} + +.layuimini-color .more-menu-item .layui-icon { + font-size: 18px; + padding-right: 10px; +} + +.layuimini-color .more-menu-item { + height: 50px; + line-height: 50px; + font-size: 16px; + padding: 0 25px; + border-bottom: 1px solid #e8e8e8; + font-style: normal; + display: block; +} + +.layuimini-color .more-menu-item:after { + color: #8c8c8c; + right: 16px; + content: "\e602"; + position: absolute; + font-family: layui-icon !important; +} + +/** +鼠标右键 + */ +.layuimini-tab-mousedown { + display: none; + width: 80px; + position: fixed; + top: 55px !important; + left: 0 !important; + z-index: 99999; +} + +.layuimini-tab-mousedown dd a { + padding: 0 15px; + color: #484545; +} + +.layuimini-tab-make { + position: absolute; + top: 36px; + bottom: 0; + width: 100%; + background: rgb(255, 255, 255, 0); + padding: 0; + overflow: hidden; +} + +/** +菜单缩放 + */ +.popup-tips .layui-layer-TipsG { + display: none; +} + +.popup-tips.layui-layer-tips .layui-layer-content { + padding: 0; +} + +.popup-tips .layui-nav-tree { + width: 150px; + border-radius: 10px; +} + +/**左侧菜单字体间距*/ +.layuimini-menu-left .layui-nav-item a span { + letter-spacing: 1px; +} + +/**头部菜单字体间距*/ +.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-pc-show, .layui-layout-admin .layui-header .layuimini-header-menu.layuimini-mobile-show { + letter-spacing: 1px; +} + + +/**左侧菜单更多下拉样式*/ +.layuimini-menu-left .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-more { + font-family: layui-icon !important; + font-size: 12px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow: hidden; + width: auto; + height: auto; + line-height: normal; + border: none; + display: inline-block; + margin-top: -6px !important; +} + +.layuimini-menu-left .layui-nav-child .layui-nav-more { + margin-top: -6px !important; +} + +.layuimini-menu-left .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-more:before { + content: "\e61a"; +} + +.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more { + transform: rotate(180deg); + -ms-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -webkit-transform: rotate(180deg); + -o-transform: rotate(180deg); + width: 12px; + text-align: center; + border-style: none; +} + +.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more:before { + content: '\e61a'; + background-color: transparent; + display: inline-block; + vertical-align: middle; +} + +/**修复左侧菜单字体不对齐的问题*/ +.layuimini-menu-left .layui-nav-item a .fa, .layuimini-menu-left .layui-nav-item a .layui-icon { + width: 20px; +} + + +/** + PC版样式 + */ +@media screen and (min-width: 1025px) { + /**头部样式(缩放) */ + .layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show { + left: 155px !important; + } + + /**logo演示(缩放) */ + .layuimini-mini .layui-layout-admin .layuimini-logo { + width: 60px !important; + } + + .layuimini-mini .layui-layout-admin .layuimini-logo h1 { + display: none; + } + + /**左侧菜单栏(缩放) */ + .layuimini-mini .layuimini-menu-left { + width: 80px !important; + } + + .layuimini-mini .layui-side.layui-bg-black, .layuimini-mini .layuimini-menu-left > ul, .layuimini-mini .layuimini-menu-left > ul li i { + width: 60px !important; + } + + .layuimini-mini .layuimini-menu-left > ul li span:first-child { + display: none; + } + + .layuimini-mini .layuimini-menu-left > ul li span:last-child { + float: right; + right: 7px; + } + + .layuimini-mini .layuimini-menu-left .layui-nav .layui-nav-item a { + height: 40px; + line-height: 40px; + padding-right: 0px !important; + } + + /**内容主体(缩放) */ + .layuimini-mini .layui-layout-admin .layui-body { + left: 60px !important; + } + + .layuimini-mini .layuimini-tool { + left: 95px !important; + } + + .layuimini-pc-show { + display: block; + } + + .layuimini-mobile-show { + display: none; + } + + /**菜单缩放*/ + .layuimini-mini .layuimini-menu-left .layui-nav-more, .layuimini-mini .layuimini-menu-left .layui-nav-child { + display: none; + !important; + } +} + +/** + 手机自适应样式 +*/ +@media screen and (max-width: 1024px) { + + /** + todo 修复低版本IOS不能滑动问题, 但还是有问题, 低版本IOS部分情况下子页面无法自适应 + */ + .layuimini-tab .layui-tabs-body .layui-tabs-item { + -webkit-overflow-scrolling: touch; + overflow: scroll; + width: 100%; + height: 100%; + } + + .layuimini-tab .layui-tabs-body .layui-tabs-item iframe { + height: 100%; + width: 100%; + } + + .layuimini-pc-show { + display: none; + } + + .layuimini-mobile-show { + display: block; + } + + .layuimini-header-content { + left: 0; + } + + .layui-layout-admin .layui-body .layui-tabs-item.layui-show { + border-top: 1px solid #e2e2e2; + } + + .layuimini-all .layui-layout-left.layuimini-header-menu { + left: 15px !important + } + + .layuimini-mini .layui-layout-left.layuimini-header-menu { + left: 205px !important + } + + .layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) { + width: 40px !important; + } + + .layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) a { + padding: 0 15px; + } + + .layuimini-all .layui-layout-admin .layui-body { + left: 0px !important; + } + + .layuimini-mini .layui-layout-admin .layuimini-menu-left, .layuimini-mini .layui-header .layuimini-logo { + left: 0; + transition: left .2s; + z-index: 1001 !important; + } + + .layuimini-all .layui-layout-admin .layuimini-menu-left, .layuimini-all .layui-header .layuimini-logo { + left: -200px; + transition: left .2s; + top: 0; + z-index: 1002; + } + + .layuimini-mini .layui-layout-admin .layui-body { + left: 0 !important; + transition: left .2s; + top: 0; + z-index: 998; + } + + .layuimini-mini .layuimini-make { + display: block; + } + + .layuimini-multi-module .layuimini-header-content .layuimini-tool { + display: none; + } + + .layuimini-single-module .layuimini-header-content .layuimini-tool { + left: 15px; + } + + .layuimini-mini .layuimini-site-mobile { + display: none !important; + } + + .layuimini-site-mobile { + display: block !important; + position: fixed; + z-index: 100000; + bottom: 15px; + left: 15px; + width: 40px; + height: 40px; + line-height: 40px; + border-radius: 2px; + text-align: center; + background-color: rgba(0, 0, 0, .7); + color: #fff; + } + + .layuimini-header-content { + z-index: 997; + } + + /*修复UC之类的浏览器点击无效*/ + .layuimini-make { + cursor: pointer; + } + + .layuimini-site-mobile { + cursor: pointer; + } +} + +@media screen and (max-width: 550px) { + + /**头部右侧数据*/ + .layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right { + display: none; + } +} diff --git a/public/static/plugs/lay-module/layuimini/miniAdmin.js b/public/static/plugs/lay-module/layuimini/miniAdmin.js new file mode 100644 index 0000000..961d1f6 --- /dev/null +++ b/public/static/plugs/lay-module/layuimini/miniAdmin.js @@ -0,0 +1,435 @@ +/** + * date:2020/02/27 + * author:Mr.Chung + * version:2.0 + * description:layuimini 主体框架扩展 + */ + + +define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($, miniMenu, miniTheme, miniTab, colorMode) { + + var $ = layui.$, + layer = layui.layer, + element = layui.element; + + if (!/http(s*):\/\//.test(location.href)) { + var tips = "请先将项目部署至web容器(Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示"; + return layer.alert(tips); + } + + + var miniAdmin = { + + /** + * 后台框架初始化 + * @param options.iniUrl 后台初始化接口地址 + * @param options.clearUrl 后台清理缓存接口 + * @param options.urlHashLocation URL地址hash定位 + * @param options.bgColorDefault 默认皮肤 + * @param options.multiModule 是否开启多模块 + * @param options.menuChildOpen 是否展开子菜单 + * @param options.loadingTime 初始化加载时间 + * @param options.pageAnim iframe窗口动画 + * @param options.maxTabNum 最大的tab打开数量 + */ + render: function (options) { + options.iniUrl = options.iniUrl || null; + options.clearUrl = options.clearUrl || null; + options.urlHashLocation = options.urlHashLocation || false; + options.bgColorDefault = options.bgColorDefault || 0; + options.multiModule = options.multiModule || false; + options.menuChildOpen = options.menuChildOpen || false; + options.loadingTime = options.loadingTime || 1; + options.pageAnim = options.pageAnim || false; + options.maxTabNum = options.maxTabNum || 20; + $.getJSON(options.iniUrl, function (data) { + if (data == null) { + miniAdmin.error('暂无菜单信息') + } else { + miniAdmin.renderLogo(data.logoInfo); + miniAdmin.renderClear(options.clearUrl); + miniAdmin.renderHome(data.homeInfo); + miniAdmin.renderAnim(options.pageAnim); + miniAdmin.listen(); + miniMenu.render({ + menuList: data.menuInfo, + multiModule: options.multiModule, + menuChildOpen: options.menuChildOpen + }); + miniTab.render({ + filter: 'layuiminiTab', + urlHashLocation: options.urlHashLocation, + multiModule: options.multiModule, + menuChildOpen: options.menuChildOpen, + maxTabNum: options.maxTabNum, + menuList: data.menuInfo, + homeInfo: data.homeInfo, + listenSwichCallback: function () { + miniAdmin.renderDevice(); + } + }); + miniTheme.render({ + bgColorDefault: options.bgColorDefault, + listen: true, + }); + miniAdmin.deleteLoader(options.loadingTime); + } + }).fail(function () { + miniAdmin.error('菜单接口有误'); + }); + }, + + /** + * 初始化logo + * @param data + */ + renderLogo: function (data) { + var html = 'logo

      ' + data.title + '

      '; + $('.layuimini-logo').html(html); + }, + + /** + * 初始化首页 + * @param data + */ + renderHome: function (data) { + sessionStorage.setItem('layuiminiHomeHref', data.href); + $('#layuiminiHomeTabId').html('' + data.title + ''); + $('#layuiminiHomeTabId').attr('lay-id', data.href); + $('#layuiminiHomeTabIframe').html(''); + }, + + /** + * 初始化缓存地址 + * @param clearUrl + */ + renderClear: function (clearUrl) { + $('.layuimini-clear').attr('data-href', clearUrl); + }, + + /** + * 初始化iframe窗口动画 + * @param anim + */ + renderAnim: function (anim) { + if (anim) { + $('#layuimini-bg-color').after(''); + } + }, + + fullScreen: function () { + var el = document.documentElement; + var rfs = el.requestFullScreen || el.webkitRequestFullScreen; + if (typeof rfs != "undefined" && rfs) { + rfs.call(el); + } else if (typeof window.ActiveXObject != "undefined") { + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript != null) { + wscript.SendKeys("{F11}"); + } + } else if (el.msRequestFullscreen) { + el.msRequestFullscreen(); + } else if (el.oRequestFullscreen) { + el.oRequestFullscreen(); + } else if (el.webkitRequestFullscreen) { + el.webkitRequestFullscreen(); + } else if (el.mozRequestFullScreen) { + el.mozRequestFullScreen(); + } else { + miniAdmin.error('浏览器不支持全屏调用!'); + } + }, + + /** + * 退出全屏 + */ + exitFullScreen: function () { + var el = document; + var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.exitFullScreen; + if (typeof cfs != "undefined" && cfs) { + cfs.call(el); + } else if (typeof window.ActiveXObject != "undefined") { + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript != null) { + wscript.SendKeys("{F11}"); + } + } else if (el.msExitFullscreen) { + el.msExitFullscreen(); + } else if (el.oRequestFullscreen) { + el.oCancelFullScreen(); + } else if (el.mozCancelFullScreen) { + el.mozCancelFullScreen(); + } else if (el.webkitCancelFullScreen) { + el.webkitCancelFullScreen(); + } else { + miniAdmin.error('浏览器不支持全屏调用!'); + } + }, + + /** + * 初始化设备端 + */ + renderDevice: function () { + if (miniAdmin.checkMobile()) { + $('.layuimini-tool i').attr('data-side-fold', 1); + $('.layuimini-tool i').attr('class', 'fa fa-outdent'); + $('.layui-layout-body').removeClass('layuimini-mini'); + $('.layui-layout-body').addClass('layuimini-all'); + } + }, + + + /** + * 初始化加载时间 + * @param loadingTime + */ + deleteLoader: function (loadingTime) { + $('.layuimini-loader').fadeOut(); + }, + + /** + * 成功 + * @param title + * @returns {*} + */ + success: function (title) { + return layer.msg(title, {icon: 1, shade: this.shade, scrollbar: false, time: 2000, shadeClose: true}); + }, + + /** + * 失败 + * @param title + * @returns {*} + */ + error: function (title) { + return layer.msg(title, {icon: 2, shade: this.shade, scrollbar: false, time: 3000, shadeClose: true}); + }, + + /** + * 判断是否为手机 + * @returns {boolean} + */ + checkMobile: function () { + var ua = navigator.userAgent.toLocaleLowerCase(); + var pf = navigator.platform.toLocaleLowerCase(); + var isAndroid = (/android/i).test(ua) || ((/iPhone|iPod|iPad/i).test(ua) && (/linux/i).test(pf)) + || (/ucweb.*linux/i.test(ua)); + var isIOS = (/iPhone|iPod|iPad/i).test(ua) && !isAndroid; + var isWinPhone = (/Windows Phone|ZuneWP7/i).test(ua); + var clientWidth = document.documentElement.clientWidth; + if (!isAndroid && !isIOS && !isWinPhone && clientWidth > 1024) { + return false; + } else { + return true; + } + }, + + /** + * 监听 + */ + listen: function () { + + layui.form.on('switch(header-theme-mode)', function (data) { + let checked = data.elem.checked; + let mode = checked ? 'dark' : 'light'; + changeTheme(mode); + }); + + /** + * 浅色和暗色主题切换 + */ + const theme = colorMode.init({ + onChanged(mode, defaultHandler) { + const isAppearanceTransition = + document.startViewTransition && !window.matchMedia(`(prefers-reduced-motion: reduce)`).matches; + const isDark = mode === 'dark'; + //跟随windows系统主题色的变化而变化,但没法保存选择的元素风格 + // var darkThemeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); + // var preferredDark = darkThemeMediaQuery.matches; + // var currMode = preferredDark ? 'dark' : 'light'; + // changeTheme(currMode); + $('#change-theme').attr('class', `layui-icon layui-icon-${isDark ? 'moon' : 'light'}`); + + if (!isAppearanceTransition) { + defaultHandler(); + } else { + rippleViewTransition(isDark, function () { + // 动画需要 + document.documentElement.classList[isDark ? 'add' : 'remove']('dark'); + defaultHandler(); + }); + } + }, + }); + + //切换特效 + function rippleViewTransition(isDark, callback) { + // 移植自 https://github.com/vuejs/vitepress/pull/2347 + // 支持 Chrome 111+ + const x = event.clientX; + const y = event.clientY; + const endRadius = Math.hypot(Math.max(x, innerWidth - x), Math.max(y, innerHeight - y)); + const transition = document.startViewTransition(function () { + callback && callback(); + }); + transition.ready.then(function () { + var clipPath = [`circle(0px at ${x}px ${y}px)`, `circle(${endRadius}px at ${x}px ${y}px)`]; + document.documentElement.animate( + { + clipPath: isDark ? clipPath : [...clipPath].reverse(), + }, + { + duration: 300, + easing: 'ease-in', + pseudoElement: isDark ? '::view-transition-new(root)' : '::view-transition-old(root)', + } + ); + }); + } + + //改变主题 + function changeTheme(mode) { + switch (mode) { + case 'dark': + localStorage.setItem('layuiminiBgColorId', '1'); + localStorage.setItem('layuiminiElemStyleName', 'dark'); + changeBgColor(1); + break; + case 'light': + localStorage.setItem('layuiminiBgColorId', '0'); + localStorage.setItem('layuiminiElemStyleName', 'normal'); + changeBgColor(0); + break + } + window.onInitElemStyle() + } + + //改变配色 + function changeBgColor(id) { + $('.layuimini-color .color-content ul .layui-this').attr('class', ''); + $(this).attr('class', 'layui-this'); + localStorage.setItem('layuiminiBgColorId', id); + miniTheme.render({ + bgColorDefault: id, + listen: false, + }); + } + + /** + * 清理 + */ + $('body').on('click', '[data-clear]', function () { + var loading = layer.load(0, {shade: false, time: 2 * 1000}); + sessionStorage.clear(); + + // 判断是否清理服务端 + var clearUrl = $(this).attr('data-href'); + if (clearUrl != undefined && clearUrl != '' && clearUrl != null) { + $.getJSON(clearUrl, function (data, status) { + layer.close(loading); + if (data.code != 1) { + return miniAdmin.error(data.msg); + } else { + return miniAdmin.success(data.msg); + } + }).fail(function () { + layer.close(loading); + return miniAdmin.error('清理缓存接口有误'); + }); + } else { + layer.close(loading); + return miniAdmin.success('清除缓存成功'); + } + }); + + /** + * 刷新 + */ + $('body').on('click', '[data-refresh]', function () { + $(".layui-tabs-item.layui-show").find("iframe")[0].contentWindow.location.reload(); + miniAdmin.success('刷新成功'); + }); + + /** + * 监听提示信息 + */ + $("body").on("mouseenter", ".layui-nav-tree .menu-li", function () { + if (miniAdmin.checkMobile()) { + return false; + } + var classInfo = $(this).attr('class'), + tips = $(this).prop("innerHTML"), + isShow = $('.layuimini-tool i').attr('data-side-fold'); + if (isShow == 0 && tips) { + tips = "
      • " + tips + "
      "; + window.openTips = layer.tips(tips, $(this), { + tips: [2, '#2f4056'], + time: 300000, + skin: "popup-tips", + success: function (el) { + var left = $(el).position().left - 10; + $(el).css({left: left}); + element.render(); + } + }); + } + }); + + $("body").on("mouseleave", ".popup-tips", function () { + if (miniAdmin.checkMobile()) { + return false; + } + var isShow = $('.layuimini-tool i').attr('data-side-fold'); + if (isShow == 0) { + try { + layer.close(window.openTips); + } catch (e) { + console.log(e.message); + } + } + }); + + + /** + * 全屏 + */ + $('body').on('click', '[data-check-screen]', function () { + var check = $(this).attr('data-check-screen'); + if (check == 'full') { + miniAdmin.fullScreen(); + $(this).attr('data-check-screen', 'exit'); + $(this).html(''); + } else { + miniAdmin.exitFullScreen(); + $(this).attr('data-check-screen', 'full'); + $(this).html(''); + } + }); + + /** + * 点击遮罩层 + */ + $('body').on('click', '.layuimini-make', function () { + miniAdmin.renderDevice(); + }); + + } + }; + + + return miniAdmin; +}); \ No newline at end of file diff --git a/public/static/plugs/lay-module/layuimini/miniMenu.js b/public/static/plugs/lay-module/layuimini/miniMenu.js new file mode 100644 index 0000000..fea9bab --- /dev/null +++ b/public/static/plugs/lay-module/layuimini/miniMenu.js @@ -0,0 +1,257 @@ +/** + * date:2020/02/27 + * author:Mr.Chung + * version:2.0 + * description:layuimini 菜单框架扩展 + */ +define(["jquery"], function ($) { + var element = layui.element, + $ = layui.$, + laytpl = layui.laytpl, + layer = layui.layer; + + var miniMenu = { + + /** + * 菜单初始化 + * @param options.menuList 菜单数据信息 + * @param options.multiModule 是否开启多模块 + * @param options.menuChildOpen 是否展开子菜单 + */ + render: function (options) { + options.menuList = options.menuList || []; + options.multiModule = options.multiModule || false; + options.menuChildOpen = options.menuChildOpen || false; + if (options.multiModule) { + miniMenu.renderMultiModule(options.menuList, options.menuChildOpen); + } else { + miniMenu.renderSingleModule(options.menuList, options.menuChildOpen); + } + miniMenu.listen(); + }, + + /** + * 单模块 + * @param menuList 菜单数据 + * @param menuChildOpen 是否默认展开 + */ + renderSingleModule: function (menuList, menuChildOpen) { + menuList = menuList || []; + var leftMenuHtml = '', + childOpenClass = '', + leftMenuCheckDefault = 'layui-this'; + var me = this ; + if (menuChildOpen) childOpenClass = ' layui-nav-itemed'; + leftMenuHtml = this.renderLeftMenu(menuList,{ childOpenClass:childOpenClass }) ; + $('.layui-layout-body').addClass('layuimini-single-module'); //单模块标识 + $('.layuimini-header-menu').remove(); + $('.layuimini-menu-left').html(leftMenuHtml); + + element.init(); + }, + + /** + * 渲染一级菜单 + */ + compileMenu: function(menu,isSub){ + var menuHtml = '' ; + if(isSub){ + menuHtml = '' + } + return laytpl(menuHtml).render(menu); + }, + compileMenuContainer :function(menu,isSub){ + var wrapperHtml = '
        {{- d.children}}
      ' ; + if(isSub){ + wrapperHtml = '
      {{- d.children}}
      ' ; + } + if(!menu.children){ + return ""; + } + return laytpl(wrapperHtml).render(menu); + }, + + each:function(list,callback){ + var _list = []; + for(var i = 0 ,length = list.length ; i= options.maxTabNum) { + layer.msg('Tab窗口已达到限定数量,请先关闭部分Tab'); + return false; + } + if (options.isIframe) tabs = parent.layui.tabs; + tabs.add('layuiminiTab', { + title: `${options.title}` + , content: `` + , id: options.tabId + }); + $('.layuimini-menu-left').attr('layuimini-tab-tag', 'add'); + sessionStorage.setItem('layuiminimenu_' + options.tabId, options.title); + }, + + + /** + * 切换选项卡 + * @param tabId + */ + change: function (tabId) { + tabs.change('layuiminiTab', tabId); + }, + + /** + * 删除tab窗口 + * @param tabId + * @param isParent + */ + delete: function (tabId, isParent) { + if (isParent === true) { + parent.layui.tabs.close('layuiminiTab', tabId); + } else { + tabs.close('layuiminiTab', tabId); + } + }, + + /** + * 在iframe层打开新tab方法 + */ + openNewTabByIframe: function (options) { + options.href = options.href || null; + options.title = options.title || null; + var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); + if (options.href === null || options.href === undefined) options.href = new Date().getTime(); + var checkTab = miniTab.check(options.href, true); + if (!checkTab) { + miniTab.create({ + tabId: options.href, + href: options.href, + title: options.title, + isIframe: true, + }); + } + parent.layui.tabs.change('layuiminiTab', options.href); + parent.layer.close(loading); + }, + + /** + * 在iframe层关闭当前tab方法 + */ + deleteCurrentByIframe: function () { + var ele = $(".layuimini-tab .layui-tabs-header li.layui-this", parent.document); + if (ele.length > 0) { + var layId = $(ele[0]).attr('lay-id'); + miniTab.delete(layId, true); + } + }, + + /** + * 判断tab窗口 + */ + check: function (tabId, isIframe) { + // 判断选项卡上是否有 + var checkTab = false; + if (isIframe === undefined || isIframe === false) { + $(".layui-tabs-header li").each(function () { + var checkTabId = $(this).attr('lay-id'); + if (checkTabId != null && checkTabId === tabId) { + checkTab = true; + } + }); + } else { + parent.layui.$(".layui-tabs-header li").each(function () { + var checkTabId = $(this).attr('lay-id'); + if (checkTabId != null && checkTabId === tabId) { + checkTab = true; + } + }); + } + return checkTab; + }, + + /** + * 开启tab右键菜单 + * @param tabId + * @param left + */ + openTabRignMenu: function (tabId, left) { + miniTab.closeTabRignMenu(); + var menuHtml = '
      \n' + + '
      \n' + + '
      关 闭 当 前
      \n' + + '
      关 闭 其 他
      \n' + + '
      关 闭 全 部
      \n' + + '
      \n' + + '
      '; + var makeHtml = '
      '; + $('.layuimini-tab .layui-tabs-header').after(menuHtml); + $('.layuimini-tab .layui-tab-content').after(makeHtml); + }, + + /** + * 关闭tab右键菜单 + */ + closeTabRignMenu: function () { + $('.layuimini-tab-mousedown').remove(); + $('.layuimini-tab-make').remove(); + }, + + /** + * 查询菜单信息 + * @param href + * @param menuList + */ + searchMenu: function (href, menuList) { + var menu; + for (key in menuList) { + var item = menuList[key]; + if (item.href === href) { + menu = item; + break; + } + if (item.child) { + newMenu = miniTab.searchMenu(href, item.child); + if (newMenu) { + menu = newMenu; + break; + } + } + } + return menu; + }, + + /** + * 监听 + * @param options + */ + listen: function (options) { + options = options || {}; + options.maxTabNum = options.maxTabNum || 20; + + /** + * 打开新窗口 + */ + $('body').on('click', '[layuimini-href]', function () { + var loading = layer.load(0, {shade: false, time: 2 * 1000}); + var tabId = $(this).attr('layuimini-href'), + href = $(this).attr('layuimini-href'), + title = $(this).text(), + target = $(this).attr('target'); + + var el = $("[layuimini-href='" + href + "']", ".layuimini-menu-left"); + layer.close(window.openTips); + if (el.length) { + $(el).closest(".layui-nav-tree").find(".layui-this").removeClass("layui-this"); + $(el).parent().addClass("layui-this"); + } + + if (target === '_blank') { + layer.close(loading); + window.open(href, "_blank"); + return false; + } + + if (tabId === null || tabId === undefined) tabId = new Date().getTime(); + var checkTab = miniTab.check(tabId); + if (!checkTab) { + miniTab.create({ + tabId: tabId, + href: href, + title: title, + isIframe: false, + maxTabNum: options.maxTabNum, + }); + } + tabs.change('layuiminiTab', tabId); + layer.close(loading); + }); + + /** + * 在iframe子菜单上打开新窗口 + */ + $('body').on('click', '[layuimini-content-href]', function () { + var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); + var tabId = $(this).attr('layuimini-content-href'), + href = $(this).attr('layuimini-content-href'), + title = $(this).attr('data-title'), + target = $(this).attr('target'); + if (target === '_blank') { + parent.layer.close(loading); + window.open(href, "_blank"); + return false; + } + if (tabId === null || tabId === undefined) tabId = new Date().getTime(); + var checkTab = miniTab.check(tabId, true); + if (!checkTab) { + miniTab.create({ + tabId: tabId, + href: href, + title: title, + isIframe: true, + maxTabNum: options.maxTabNum, + }); + } + parent.layui.tabs.change('layuiminiTab', tabId); + parent.layer.close(loading); + }); + + /** + * 关闭选项卡 + **/ + $('body').on('click', '.layuimini-tab .layui-tabs-header .layui-tab-close', function () { + var loading = layer.load(0, {shade: false, time: 2 * 1000}); + var $parent = $(this).parent(); + var tabId = $parent.attr('lay-id'); + if (tabId !== undefined || tabId !== null) { + miniTab.delete(tabId); + } + layer.close(loading); + }); + + /** + * 选项卡操作 + */ + $('body').on('click', '[layuimini-tab-close]', function () { + var loading = layer.load(0, {shade: false, time: 2 * 1000}); + var closeType = $(this).attr('layuimini-tab-close'); + $(".layuimini-tab .layui-tabs-header li").each(function () { + var tabId = $(this).attr('lay-id'); + var id = $(this).attr('id'); + var isCurrent = $(this).hasClass('layui-this'); + if (id !== 'layuiminiHomeTabId') { + if (closeType === 'all') { + miniTab.delete(tabId); + } else { + if (closeType === 'current' && isCurrent) { + miniTab.delete(tabId); + } else if (closeType === 'other' && !isCurrent) { + miniTab.delete(tabId); + } + } + } + }); + layer.close(loading); + }); + + /** + * 禁用网页右键 + */ + $(".layuimini-tab .layui-tabs-header").unbind("mousedown").bind("contextmenu", function (e) { + e.preventDefault(); + return false; + }); + + /** + * 注册鼠标右键 + */ + $('body').on('mousedown', '.layuimini-tab .layui-tabs-header li', function (e) { + var left = e.pageX , + tabId = $(this).attr('lay-id'); + if (e.which === 3) { + e.preventDefault(); + miniTab.openTabRignMenu(tabId, left); + } + }); + + /** + * 关闭tab右键菜单 + */ + $('body').on('click', '.layui-body,.layui-header,.layuimini-menu-left,.layuimini-tab-make', function () { + miniTab.closeTabRignMenu(); + }); + + /** + * tab右键选项卡操作 + */ + $('body').on('click', '[layuimini-tab-menu-close]', function () { + var loading = layer.load(0, {shade: false, time: 2 * 1000}); + var closeType = $(this).attr('layuimini-tab-menu-close'), + currentTabId = $('.layuimini-tab-mousedown').attr('data-tab-id'); + $(".layuimini-tab .layui-tabs-header li").each(function () { + var tabId = $(this).attr('lay-id'); + var id = $(this).attr('id'); + if (id !== 'layuiminiHomeTabId') { + if (closeType === 'all') { + miniTab.delete(tabId); + } else { + if (closeType === 'current' && currentTabId === tabId) { + miniTab.delete(tabId); + } else if (closeType === 'other' && currentTabId !== tabId) { + miniTab.delete(tabId); + } + } + } + }); + miniTab.closeTabRignMenu(); + layer.close(loading); + }); + }, + + /** + * 监听tab切换 + * @param options + */ + listenSwitch: function (options) { + options.filter = options.filter || null; + options.multiModule = options.multiModule || false; + options.urlHashLocation = options.urlHashLocation || false; + options.listenSwichCallback = options.listenSwichCallback || function () { + + }; + tabs.on('afterChange(layuiminiTab)', function (data) { + var tabId = $(this).attr('lay-id'); + if (options.urlHashLocation) { + location.hash = tabId; + } + if (typeof options.listenSwichCallback === 'function') { + options.listenSwichCallback(); + } + // 判断是否为新增窗口 + if ($('.layuimini-menu-left').attr('layuimini-tab-tag') === 'add') { + $('.layuimini-menu-left').attr('layuimini-tab-tag', 'no') + } else { + $("[layuimini-href]").parent().removeClass('layui-this'); + if (options.multiModule) { + miniTab.listenSwitchMultiModule(tabId); + } else { + miniTab.listenSwitchSingleModule(tabId); + } + } + miniTab.rollPosition(); + }); + }, + + /** + * 监听hash变化 + * @param options + * @returns {boolean} + */ + listenHash: function (options) { + options.urlHashLocation = options.urlHashLocation || false; + options.maxTabNum = options.maxTabNum || 20; + options.homeInfo = options.homeInfo || {}; + options.menuList = options.menuList || []; + if (!options.urlHashLocation) return false; + var tabId = location.hash.replace(/^#/, ''); + if (tabId === null || tabId === undefined || tabId === '') return false; + + // 判断是否为首页 + if (tabId === options.homeInfo.href) return false; + + // 判断是否为右侧菜单 + var menu = miniTab.searchMenu(tabId, options.menuList); + if (menu !== undefined) { + miniTab.create({ + tabId: tabId, + href: tabId, + title: menu.title, + isIframe: false, + maxTabNum: options.maxTabNum, + }); + $('.layuimini-menu-left').attr('layuimini-tab-tag', 'no'); + tabs.change('layuiminiTab', tabId); + return false; + } + + // 判断是否为快捷菜单 + var isSearchMenu = false; + $("[layuimini-content-href]").each(function () { + if ($(this).attr("layuimini-content-href") === tabId) { + var title = $(this).attr("data-title"); + miniTab.create({ + tabId: tabId, + href: tabId, + title: title, + isIframe: false, + maxTabNum: options.maxTabNum, + }); + $('.layuimini-menu-left').attr('layuimini-tab-tag', 'no'); + tabs.change('layuiminiTab', tabId); + isSearchMenu = true; + return false; + } + }); + if (isSearchMenu) return false; + + // 既不是右侧菜单、快捷菜单,就直接打开 + var title = sessionStorage.getItem('layuiminimenu_' + tabId) === null ? tabId : sessionStorage.getItem('layuiminimenu_' + tabId); + miniTab.create({ + tabId: tabId, + href: tabId, + title: title, + isIframe: false, + maxTabNum: options.maxTabNum, + }); + tabs.change('layuiminiTab', tabId); + return false; + }, + + /** + * 监听滚动 + */ + listenRoll: function () { + $(".layuimini-tab-roll-left").click(function () { + miniTab.rollClick("left"); + }); + $(".layuimini-tab-roll-right").click(function () { + miniTab.rollClick("right"); + }); + }, + + /** + * 单模块切换 + * @param tabId + */ + listenSwitchSingleModule: function (tabId) { + $("[layuimini-href]").each(function () { + if ($(this).attr("layuimini-href") === tabId) { + // 自动展开菜单栏 + var addMenuClass = function ($element, type) { + if (type === 1) { + $element.addClass('layui-this'); + if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) { + $(".layuimini-header-menu li").attr('class', 'layui-nav-item'); + } else { + addMenuClass($element.parent().parent(), 2); + } + } else { + $element.addClass('layui-nav-itemed'); + if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) { + $(".layuimini-header-menu li").attr('class', 'layui-nav-item'); + } else { + addMenuClass($element.parent().parent(), 2); + } + } + }; + addMenuClass($(this).parent(), 1); + return false; + } + }); + }, + + /** + * 多模块切换 + * @param tabId + */ + listenSwitchMultiModule: function (tabId) { + $("[layuimini-href]").each(function () { + if ($(this).attr("layuimini-href") === tabId) { + + // 自动展开菜单栏 + var addMenuClass = function ($element, type) { + if (type === 1) { + $element.addClass('layui-this'); + if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) { + var moduleId = $element.parent().attr('id'); + $(".layuimini-header-menu li").attr('class', 'layui-nav-item'); + $("#" + moduleId + "HeaderId").addClass("layui-this"); + $(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide'); + $("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this'); + } else { + addMenuClass($element.parent().parent(), 2); + } + } else { + $element.addClass('layui-nav-itemed'); + if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) { + var moduleId = $element.parent().attr('id'); + $(".layuimini-header-menu li").attr('class', 'layui-nav-item'); + $("#" + moduleId + "HeaderId").addClass("layui-this"); + $(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide'); + $("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this'); + } else { + addMenuClass($element.parent().parent(), 2); + } + } + }; + addMenuClass($(this).parent(), 1); + return false; + } + }); + }, + + /** + * 自动定位 + */ + rollPosition: function () { + var $tabTitle = $('.layuimini-tab .layui-tabs-header'); + var autoLeft = 0; + $tabTitle.children("li").each(function () { + if ($(this).hasClass('layui-this')) { + return false; + } else { + autoLeft += $(this).outerWidth(); + } + }); + $tabTitle.animate({ + scrollLeft: autoLeft - $tabTitle.width() / 3 + }, 200); + }, + + /** + * 点击滚动 + * @param direction + */ + rollClick: function (direction) { + var $tabTitle = $('.layuimini-tab .layui-tabs-header'); + var left = $tabTitle.scrollLeft(); + if ('left' === direction) { + $tabTitle.animate({ + scrollLeft: left - 450 + }, 200); + } else { + $tabTitle.animate({ + scrollLeft: left + 450 + }, 200); + } + } + + }; + + return miniTab; +}); \ No newline at end of file diff --git a/public/static/plugs/lay-module/layuimini/miniTheme.js b/public/static/plugs/lay-module/layuimini/miniTheme.js new file mode 100644 index 0000000..2d9e288 --- /dev/null +++ b/public/static/plugs/lay-module/layuimini/miniTheme.js @@ -0,0 +1,600 @@ +/** + * date:2020/02/28 + * author:Mr.Chung + * version:2.0 + * description:layuimini tab框架扩展 + */ +define(["jquery"], function ($) { + var $ = layui.$, + layer = layui.layer; + + var miniTheme = { + + /** + * 主题配置项 + * @param bgcolorId + * @returns {{headerLogo, menuLeftHover, headerRight, menuLeft, headerRightThis, menuLeftThis}|*|*[]} + */ + config: function (bgcolorId) { + var bgColorConfig = [ + { + headerRightBg: '#ffffff', //头部右侧背景色 + headerRightBgThis: '#e4e4e4', //头部右侧选中背景色, + headerRightColor: 'rgba(107, 107, 107, 0.7)', //头部右侧字体颜色, + headerRightChildColor: 'rgba(107, 107, 107, 0.7)', //头部右侧下拉字体颜色, + headerRightColorThis: '#565656', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(160, 160, 160, 0.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#1E9FFF', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#565656', //头部缩放按钮样式, + headerLogoBg: '#192027', //logo背景颜色, + headerLogoColor: 'rgb(191, 187, 187)', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#28333E', //左侧菜单背景, + leftMenuBgThis: '#1E9FFF', //左侧菜单选中背景, + leftMenuChildBg: '#0c0f13', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#1e9fff', //tab选项卡选中颜色, + }, + { + headerRightBg: '#23262e', //头部右侧背景色 + headerRightBgThis: '#0c0c0c', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: 'rgba(255,255,255,.7)', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: 'rgba(255,255,255,.7)', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#0c0c0c', //logo背景颜色, + headerLogoColor: 'rgba(255,255,255,.7)', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#23262e', //左侧菜单背景, + leftMenuBgThis: '#484849', //左侧菜单选中背景, + leftMenuChildBg: '#23262e', //左侧菜单子菜单背景, + leftMenuColor: 'rgba(255,255,255,.9)', //左侧菜单字体颜色, + leftMenuColorThis: 'rgba(255,255,255,.7)', //左侧菜单选中字体颜色, + tabActiveColor: '#23262e', //tab选项卡选中颜色, + }, + { + headerRightBg: '#ffa4d1', //头部右侧背景色 + headerRightBgThis: '#bf7b9d', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#ffa4d1', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#e694bd', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#1f1f1f', //左侧菜单背景, + leftMenuBgThis: '#737373', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#ffa4d1', //tab选项卡选中颜色, + }, + { + headerRightBg: '#1aa094', //头部右侧背景色 + headerRightBgThis: '#197971', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#0c0c0c', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#23262e', //左侧菜单背景, + leftMenuBgThis: '#1aa094', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#1aa094', //tab选项卡选中颜色, + }, + { + headerRightBg: '#1e9fff', //头部右侧背景色 + headerRightBgThis: '#0069b7', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#1e9fff', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#0c0c0c', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#1f1f1f', //左侧菜单背景, + leftMenuBgThis: '#1e9fff', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#1e9fff', //tab选项卡选中颜色, + }, + { + headerRightBg: '#ffb800', //头部右侧背景色 + headerRightBgThis: '#d09600', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#243346', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#2f4056', //左侧菜单背景, + leftMenuBgThis: '#8593a7', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#ffb800', //tab选项卡选中颜色, + }, + { + headerRightBg: '#e82121', //头部右侧背景色 + headerRightBgThis: '#ae1919', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#0c0c0c', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#1f1f1f', //左侧菜单背景, + leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#e82121', //tab选项卡选中颜色, + }, + { + headerRightBg: '#963885', //头部右侧背景色 + headerRightBgThis: '#772c6a', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#243346', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#2f4056', //左侧菜单背景, + leftMenuBgThis: '#586473', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#963885', //tab选项卡选中颜色, + }, + { + headerRightBg: '#2D8CF0', //头部右侧背景色 + headerRightBgThis: '#0069b7', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#0069b7', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#0069b7', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#1f1f1f', //左侧菜单背景, + leftMenuBgThis: '#2D8CF0', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#2d8cf0', //tab选项卡选中颜色, + }, + { + headerRightBg: '#ffb800', //头部右侧背景色 + headerRightBgThis: '#d09600', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#d09600', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#2f4056', //左侧菜单背景, + leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#ffb800', //tab选项卡选中颜色, + }, + { + headerRightBg: '#e82121', //头部右侧背景色 + headerRightBgThis: '#ae1919', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#d91f1f', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#1f1f1f', //左侧菜单背景, + leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#e82121', //tab选项卡选中颜色, + }, + { + headerRightBg: '#963885', //头部右侧背景色 + headerRightBgThis: '#772c6a', //头部右侧选中背景色, + headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色, + headerRightChildColor: '#676767', //头部右侧下拉字体颜色, + headerRightColorThis: '#ffffff', //头部右侧鼠标选中, + headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色, + headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色, + headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色, + headerRightToolColor: '#bbe3df', //头部缩放按钮样式, + headerLogoBg: '#772c6a', //logo背景颜色, + headerLogoColor: '#ffffff', //logo字体颜色, + leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式, + leftMenuBg: '#2f4056', //左侧菜单背景, + leftMenuBgThis: '#626f7f', //左侧菜单选中背景, + leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景, + leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色, + leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色, + tabActiveColor: '#963885', //tab选项卡选中颜色, + } + ]; + if (bgcolorId === undefined) { + return bgColorConfig; + } else { + return bgColorConfig[bgcolorId]; + } + }, + + /** + * 初始化 + * @param options + */ + render: function (options) { + options.bgColorDefault = options.bgColorDefault || false; + options.listen = options.listen || false; + var bgcolorId = localStorage.getItem('layuiminiBgColorId'); + if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') { + bgcolorId = options.bgColorDefault; + } + miniTheme.buildThemeCss(bgcolorId); + if (options.listen) miniTheme.listen(options); + }, + + renderElemStyle(elemStyleDefault) { + elemStyleDefault = elemStyleDefault || 'light'; + let elemStyleName = localStorage.getItem('layuiminiElemStyleName'); + if (!elemStyleName) elemStyleName = elemStyleDefault; + let themeModeEle = $('input[name=theme-mode]') + if (themeModeEle.length > 0) { + if (elemStyleName == 'dark') { + themeModeEle.prop('checked', true); + } else { + themeModeEle.prop('checked', false); + } + layui.form.render('checkbox', 'header-theme-mode'); + } + miniTheme.buildBodyElemStyle(elemStyleName); + }, + + changeThemeMainColor() { + let bgcolorId = localStorage.getItem('layuiminiBgColorId'); + if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') return false; + let bgcolorData = miniTheme.config(bgcolorId); + let mainColor = bgcolorData.headerRightBg + if (bgcolorId == 0) mainColor = '#16b777'; + const bgColor = window.getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color'); + document.documentElement.style.setProperty('--ea8-theme-main-color', mainColor); + const iframes = document.getElementsByTagName('iframe'); + if (iframes.length === 0) return false; + $.each(iframes, (i, iframe) => { + if (iframe === '' || iframe === undefined) return false; + const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; + iframeDocument.documentElement.style.setProperty('--ea8-theme-main-color', mainColor); + }) + }, + + /** + * 构建主题样式 + * @param bgcolorId + * @returns {boolean} + */ + buildThemeCss: function (bgcolorId) { + if (!bgcolorId) { + return false; + } + var bgcolorData = miniTheme.config(bgcolorId); + var styleHtml = '/*头部右侧背景色 headerRightBg */\n' + + '.layui-layout-admin .layui-header {\n' + + ' background-color: ' + bgcolorData.headerRightBg + ' !important;\n' + + '}\n' + + '\n' + + '/*头部右侧选中背景色 headerRightBgThis */\n' + + '.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {\n' + + ' background-color: ' + bgcolorData.headerRightBgThis + ' !important;\n' + + '}\n' + + '\n' + + '/*头部右侧字体颜色 headerRightColor */\n' + + '.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {\n' + + ' color: ' + bgcolorData.headerRightColor + ';\n' + + '}\n' + + '/**头部右侧下拉字体颜色 headerRightChildColor */\n' + + '.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {\n' + + ' color: ' + bgcolorData.headerRightChildColor + '!important;\n' + + '}\n' + + '\n' + + '/*头部右侧鼠标选中 headerRightColorThis */\n' + + '.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {\n' + + ' color: ' + bgcolorData.headerRightColorThis + ' !important;\n' + + '}\n' + + '\n' + + '/*头部右侧更多下拉颜色 headerRightNavMore */\n' + + '.layui-header .layui-nav .layui-nav-more {\n' + + ' border-top-color: ' + bgcolorData.headerRightNavMore + ' !important;\n' + + '}\n' + + '\n' + + '/*头部右侧更多下拉颜色 headerRightNavMore */\n' + + '.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {\n' + + ' border-color: transparent transparent ' + bgcolorData.headerRightNavMore + ' !important;\n' + + '}\n' + + '\n' + + '/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */\n' + + '.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {\n' + + ' background-color: ' + bgcolorData.headerRightNavMoreBg + ' !important;\n' + + ' color:' + bgcolorData.headerRightNavMoreColor + ' !important;\n' + + '}\n' + + '\n' + + '/*头部缩放按钮样式 headerRightToolColor */\n' + + '.layui-layout-admin .layui-header .layuimini-tool i {\n' + + ' color: ' + bgcolorData.headerRightToolColor + ';\n' + + '}\n' + + '\n' + + '/*logo背景颜色 headerLogoBg */\n' + + '.layui-layout-admin .layuimini-logo {\n' + + ' background-color: ' + bgcolorData.headerLogoBg + ' !important;\n' + + '}\n' + + '\n' + + '/*logo字体颜色 headerLogoColor */\n' + + '.layui-layout-admin .layuimini-logo h1 {\n' + + ' color: ' + bgcolorData.headerLogoColor + ';\n' + + '}\n' + + '\n' + + '/*左侧菜单更多下拉样式 leftMenuNavMore */\n' + + '.layuimini-menu-left .layui-nav .layui-nav-more,.layuimini-menu-left-zoom.layui-nav .layui-nav-more {\n' + + ' border-top-color: ' + bgcolorData.leftMenuNavMore + ';\n' + + '}\n' + + '\n' + + '/*左侧菜单更多下拉样式 leftMenuNavMore */\n' + + '.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {\n' + + ' border-color: transparent transparent ' + bgcolorData.leftMenuNavMore + ' !important;\n' + + '}\n' + + '\n' + + '/*左侧菜单背景 leftMenuBg */\n' + + '.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {\n' + + ' background-color: ' + bgcolorData.leftMenuBg + ' !important;\n' + + '}\n' + + '\n' + + '/*左侧菜单选中背景 leftMenuBgThis */\n' + + '.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {\n' + + ' background-color: ' + bgcolorData.leftMenuBgThis + ' !important\n' + + '}\n' + + '\n' + + '/*左侧菜单子菜单背景 leftMenuChildBg */\n' + + '.layuimini-menu-left .layui-nav-itemed > .layui-nav-child{\n' + + ' background-color: ' + bgcolorData.leftMenuChildBg + ' !important;\n' + + '}\n' + + '\n' + + '/*左侧菜单字体颜色 leftMenuColor */\n' + + '.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {\n' + + ' color: ' + bgcolorData.leftMenuColor + ' !important;\n' + + '}\n' + + '\n' + + '/*左侧菜单选中字体颜色 leftMenuColorThis */\n' + + '.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {\n' + + ' color:' + bgcolorData.leftMenuColorThis + ' !important;\n' + + '}\n' + + '\n' + + '/**tab选项卡选中颜色 tabActiveColor */\n' + + '.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {\n' + + ' background-color: ' + bgcolorData.tabActiveColor + ';\n' + + '}\n'; + $('#layuimini-bg-color').html(styleHtml); + }, + configElemStyle() { + var listElemStyle = [ + { + title: '标准', + className: 'normal' + }, + { + title: '原型', + className: 'demo', + defaultColorConfig: '12' + }, + { + title: '科幻', + className: 'sicfi' + }, + { + title: 'GTK', + className: 'gtk' + }, + { + title: '像素', + className: 'nes', + defaultColorConfig: '12' + }, + { + title: 'WIN7', + className: 'win7', + defaultColorConfig: '12' + }, + { + title: '拟物', + className: 'neomorphic', + + }, + { + title: '暗黑', + className: 'dark', + defaultColorConfig: '1' + + }, + ] + return listElemStyle; + }, + buildBodyElemStyle(className) { + + var listElemStyle = miniTheme.configElemStyle() + + $.each(listElemStyle, function (index, item) { + var classNameReal = 'elem-style-' + item.className; + if ($('body').hasClass(classNameReal)) { + $('body').removeClass(classNameReal); + } + }) + + $('body').addClass('elem-style-' + className) + }, + buildElemStyleHtml(options) { + var elemStyleName = localStorage.getItem('layuiminiElemStyleName'); + if (!elemStyleName) elemStyleName = options.elemStyleDefault; + var listElemStyle = miniTheme.configElemStyle() + var html = ''; + $.each(listElemStyle, function (key, val) { + + if (typeof val.defaultColorConfig == 'undefined') { + val.defaultColorConfig = '0' + } + + if (val.className === elemStyleName) { + html += '
    • \n'; + } else { + html += '
    • \n'; + } + html += + val.title + + + '
    • '; + }); + return html; + }, + /** + * 构建主题选择html + * @param options + * @returns {string} + */ + buildBgColorHtml: function (options) { + options.bgColorDefault = options.bgColorDefault || 0; + var bgcolorId = parseInt(localStorage.getItem('layuiminiBgColorId')); + if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault; + var bgColorConfig = miniTheme.config(); + var html = ''; + $.each(bgColorConfig, function (key, val) { + if (key === bgcolorId) { + html += '
    • \n'; + } else { + html += '
    • \n'; + } + html += '\n' + + '
      \n' + + '
      \n' + + '
      \n' + + '
    • '; + }); + return html; + }, + + /** + * 监听 + * @param options + */ + listen: function (options) { + $('body').on('click', '[data-bgcolor]', function () { + var loading = layer.load(0, {shade: false, time: 2 * 1000}); + var clientHeight = (document.documentElement.clientHeight) - 60; + var bgColorHtml = miniTheme.buildBgColorHtml(options); + var html = '
      \n' + + '
      \n' + + '配色方案\n' + + '
      \n' + + '
      \n' + + '
        \n' + bgColorHtml + '
      \n' + + '
      \n' + + '
      \n' + + ' 开源地址\n' + + '
      ' + + '
      '; + layer.open({ + type: 1, + title: false, + closeBtn: 0, + shade: 0.2, + anim: 2, + shadeClose: true, + id: 'layuiminiBgColor', + area: ['340px', clientHeight + 'px'], + offset: 'rb', + content: html, + success: function (index, layero) { + }, + end: function () { + $('.layuimini-select-bgcolor').removeClass('layui-this'); + } + }); + layer.close(loading); + }); + + $('body').on('click', '[data-select-bgcolor]', function () { + var bgcolorId = $(this).attr('data-select-bgcolor'); + $('.layuimini-color .color-content ul .layui-this').attr('class', ''); + $(this).attr('class', 'layui-this'); + localStorage.setItem('layuiminiBgColorId', bgcolorId); + miniTheme.render({ + bgColorDefault: bgcolorId, + listen: false, + }); + miniTheme.changeThemeMainColor() + }); + $('body').on('click', '[data-select-style]', function () { + var elemStyleName = $(this).attr('data-select-style'); + + $(this).attr('class', 'layui-this').siblings().removeClass('layui-this'); + + var defaultColorConfig = $(this).attr('data-default-color-config'); + + if (defaultColorConfig && defaultColorConfig.length > 0) { + localStorage.setItem('layuiminiBgColorId', defaultColorConfig); + + } + + localStorage.setItem('layuiminiElemStyleName', elemStyleName); + miniTheme.render({ + listen: false, + }); + }); + } + }; + + return miniTheme; +}) +; \ No newline at end of file diff --git a/public/static/plugs/lay-module/layuimini/miniTongji.js b/public/static/plugs/lay-module/layuimini/miniTongji.js new file mode 100644 index 0000000..540e623 --- /dev/null +++ b/public/static/plugs/lay-module/layuimini/miniTongji.js @@ -0,0 +1,40 @@ +/** + * date:2020/03/01 + * author:Mr.Chung + * version:2.0 + * description:layuimini 统计框架扩展 + */ +define(["jquery"], function ($) { + var $ = layui.$; + + var miniTongji = { + + /** + * 初始化 + * @param options + */ + render: function (options) { + options.specific = options.specific || false; + options.domains = options.domains || []; + var domain = window.location.hostname; + if (options.specific === false || (options.specific === true && options.domains.indexOf(domain) >=0)) { + miniTongji.listen(); + } + }, + + /** + * 监听统计代码 + */ + listen: function () { + var _hmt = _hmt || []; + (function () { + var hm = document.createElement("script"); + hm.src = "https://hm.baidu.com/hm.js?d97abf6d61c21d773f97835defbdef4e"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); + })(); + } + }; + + return miniTongji; +}); \ No newline at end of file diff --git a/public/static/plugs/lay-module/layuimini/themes/default.css b/public/static/plugs/lay-module/layuimini/themes/default.css new file mode 100644 index 0000000..fad9ae9 --- /dev/null +++ b/public/static/plugs/lay-module/layuimini/themes/default.css @@ -0,0 +1,98 @@ +/*头部右侧背景色 headerRightBg */ +.layui-layout-admin .layui-header { + background-color: #ffffff !important; +} + +/*头部右侧选中背景色 headerRightBgThis */ +.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #e4e4e4 !important; +} + +/*头部右侧字体颜色 headerRightColor */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { + color: rgba(107, 107, 107, 0.7); +} + +/**头部右侧下拉字体颜色 headerRightChildColor */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { + color: rgba(107, 107, 107, 0.7) !important; +} + +/*头部右侧鼠标选中 headerRightColorThis */ +.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { + color: #565656 !important; +} + +/*头部右侧更多下拉颜色 headerRightNavMore */ +.layui-header .layui-nav .layui-nav-more { + border-top-color: rgba(160, 160, 160, 0.7) !important; +} + +/*头部右侧更多下拉颜色 headerRightNavMore */ +.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more { + border-color: transparent transparent rgba(160, 160, 160, 0.7) !important; +} + +/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */ +.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: #1E9FFF !important; + color: #ffffff !important; +} + +/*头部缩放按钮样式 headerRightToolColor */ +.layui-layout-admin .layui-header .layuimini-tool i { + color: #565656; +} + +/*logo背景颜色 headerLogoBg */ +.layui-layout-admin .layuimini-logo { + background-color: #192027 !important; +} + +/*logo字体颜色 headerLogoColor */ +.layui-layout-admin .layuimini-logo h1 { + color: rgb(191, 187, 187); +} + +/*左侧菜单更多下拉样式 leftMenuNavMore */ +.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more { + border-top-color: rgb(191, 187, 187); + display: inline-block; + margin: 0 auto !important; + line-height: inherit; +} + +/*左侧菜单更多下拉样式 leftMenuNavMore */ +.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { + border-color: transparent transparent rgb(191, 187, 187) !important; +} + +/*左侧菜单背景 leftMenuBg */ +.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul { + background-color: #28333E !important; +} + +/*左侧菜单选中背景 leftMenuBgThis */ +.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #1E9FFF !important +} + +/*左侧菜单子菜单背景 leftMenuChildBg */ +.layuimini-menu-left .layui-nav-itemed > .layui-nav-child { + background-color: #0c0f13 !important; +} + +/*左侧菜单字体颜色 leftMenuColor */ +.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: rgb(191, 187, 187) !important; +} + +/*左侧菜单选中字体颜色 leftMenuColorThis */ +.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a { + color: #ffffff !important; +} + +/**tab选项卡选中颜色 tabActiveColor */ +.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + background-color: #1e9fff; +} diff --git a/public/static/plugs/lay-module/step-lay/step.css b/public/static/plugs/lay-module/step-lay/step.css new file mode 100644 index 0000000..cc5e2ce --- /dev/null +++ b/public/static/plugs/lay-module/step-lay/step.css @@ -0,0 +1,79 @@ +.lay-step { + font-size: 0; + width: 400px; + margin: 0 auto; + max-width: 100%; + padding-left: 200px; +} + +.step-item { + display: inline-block; + line-height: 26px; + position: relative; + font-size: 14px; +} + +.step-item-tail { + width: 100%; + padding: 0 10px; + position: absolute; + left: 0; + top: 13px; +} + +.step-item-tail i { + display: inline-block; + width: 100%; + height: 1px; + vertical-align: top; + background: #c2c2c2; + position: relative; +} + +.step-item-tail .step-item-tail-done { + background: #009688; +} + +.step-item-head { + position: relative; + display: inline-block; + height: 26px; + width: 26px; + text-align: center; + vertical-align: top; + color: #009688; + border: 1px solid #009688; + border-radius: 50%; + background: #ffffff; +} + +.step-item-head.step-item-head-active { + background: #009688; + color: #ffffff; +} + +.step-item-main { + display: block; + position: relative; + margin-left: -50%; + margin-right: 50%; + padding-left: 26px; + text-align: center; +} + +.step-item-main-title { + font-weight: bolder; + color: #555555; +} + +.step-item-main-desc { + color: #aaaaaa; +} + +.lay-step + [carousel-item]:before { + display: none; +} + +.lay-step + [carousel-item] > * { + background-color: transparent; +} \ No newline at end of file diff --git a/public/static/plugs/lay-module/step-lay/step.js b/public/static/plugs/lay-module/step-lay/step.js new file mode 100644 index 0000000..baa015b --- /dev/null +++ b/public/static/plugs/lay-module/step-lay/step.js @@ -0,0 +1,101 @@ +layui.define(['layer', 'carousel'], function (exports) { + var $ = layui.jquery; + var layer = layui.layer; + var carousel = layui.carousel; + + // 添加步骤条dom节点 + var renderDom = function (elem, stepItems, postion) { + var stepDiv = '
      '; + for (var i = 0; i < stepItems.length; i++) { + stepDiv += '
      '; + // 线 + if (i < (stepItems.length - 1)) { + if (i < postion) { + stepDiv += '
      '; + } else { + stepDiv += '
      '; + } + } + + // 数字 + var number = stepItems[i].number; + if (!number) { + number = i + 1; + } + if (i == postion) { + stepDiv += '
      ' + number + '
      '; + } else if (i < postion) { + stepDiv += '
      '; + } else { + stepDiv += '
      ' + number + '
      '; + } + + // 标题和描述 + var title = stepItems[i].title; + var desc = stepItems[i].desc; + if (title || desc) { + stepDiv += '
      '; + if (title) { + stepDiv += '
      ' + title + '
      '; + } + if (desc) { + stepDiv += '
      ' + desc + '
      '; + } + stepDiv += '
      '; + } + stepDiv += '
      '; + } + stepDiv += '
      '; + + $(elem).prepend(stepDiv); + + // 计算每一个条目的宽度 + var bfb = 100 / stepItems.length; + $('.step-item').css('width', bfb + '%'); + }; + + var step = { + // 渲染步骤条 + render: function (param) { + param.indicator = 'none'; // 不显示指示器 + param.arrow = 'always'; // 始终显示箭头 + param.autoplay = false; // 关闭自动播放 + if (!param.stepWidth) { + param.stepWidth = '400px'; + } + + // 渲染轮播图 + carousel.render(param); + + // 渲染步骤条 + var stepItems = param.stepItems; + renderDom(param.elem, stepItems, 0); + $('.lay-step').css('width', param.stepWidth); + + //监听轮播切换事件 + carousel.on('change(' + param.filter + ')', function (obj) { + $(param.elem).find('.lay-step').remove(); + renderDom(param.elem, stepItems, obj.index); + $('.lay-step').css('width', param.stepWidth); + }); + + // 隐藏左右箭头按钮 + $(param.elem).find('.layui-carousel-arrow').css('display', 'none'); + + // 去掉轮播图的背景颜色 + $(param.elem).css('background-color', 'transparent'); + }, + // 下一步 + next: function (elem) { + $(elem).find('.layui-carousel-arrow[lay-type=add]').trigger('click'); + }, + // 上一步 + pre: function (elem) { + $(elem).find('.layui-carousel-arrow[lay-type=sub]').trigger('click'); + } + }; + + layui.link(layui.cache.base + 'step-lay/step.css'); + + exports('step', step); +}); diff --git a/public/static/plugs/lay-module/switchSelect/switchSelect.css b/public/static/plugs/lay-module/switchSelect/switchSelect.css new file mode 100644 index 0000000..2c72187 --- /dev/null +++ b/public/static/plugs/lay-module/switchSelect/switchSelect.css @@ -0,0 +1,44 @@ +.layui-switch-select { + position: relative; +} + +.layui-switch-select .radio-container { + border: 1px solid #eee; + padding: 0 5px; +} + +.layui-switch-select .toggle-dots { + position: absolute; + top: 5px; + right: 5px; + display: flex; + gap: 8px; + z-index: 999; + background: #e9e9e9; + padding: 5px; + border-radius: 25px; +} + +.layui-switch-select .dot { + width: 12px; + height: 12px; + border-radius: 50%; + background-color: #ccc; + cursor: pointer; +} + +.layui-switch-select .dot.active { + background-color: #1E9FFF; +} + +.layui-switch-select .radio-group { + display: flex; +} + +.layui-switch-select .toggle-hidden { + display: none !important; +} + +.layui-form-pane .layui-switch-select .radio-container { + padding: 0; +} \ No newline at end of file diff --git a/public/static/plugs/lay-module/switchSelect/switchSelect.js b/public/static/plugs/lay-module/switchSelect/switchSelect.js new file mode 100644 index 0000000..55d5dcb --- /dev/null +++ b/public/static/plugs/lay-module/switchSelect/switchSelect.js @@ -0,0 +1,175 @@ +/** + * @autho wolfcode + * @description switchSelect.js + * @time 2025年7月23日 16:07:06 + */ + +layui.define(['form'], function (exports) { + let form = layui.form, $ = layui.$; + + // 构造函数 + let SwitchSelect = function (options) { + this.config = $.extend({ + elem: null, // 容器选择器 + data: [], // 选项数据 {1:'正常',2:'禁用',3:'删除'} Key => Value 形式 + default: '', // 默认值 + target: '', // 默认显示形式 + name: '', // 表单 name + onSwitch: null // 切换回调 + }, options); + this.render(); + }; + + // 原型方法 + SwitchSelect.prototype = { + // 渲染组件 + render: function () { + let that = this; + let elem = $(this.config.elem); + if (!elem.length) return; + let active, toggleHidden + switch (this.config.target) { + case 'radio': + active = 'radio'; + toggleHidden = 'select'; + break; + case 'select': + active = 'select'; + toggleHidden = 'radio'; + break; + default: + active = 'select'; + toggleHidden = 'radio'; + } + + // 创建HTML结构 + let html = ` +
      +
      + + +
      +
      +
      ${this.generateRadioHtml()}
      +
      + +
      +
      +
      + `; + elem.html(html); + form.render(); + this.bindEvents(); + }, + + // 生成单选框HTML + generateRadioHtml: function () { + let html = ''; + $.map(this.config.data, (item, index) => { + let checked = index == this.config.default ? 'checked' : ''; + html += `\n\n`; + }); + return html; + }, + + // 生成下拉框HTML + generateSelectHtml: function () { + let html = ''; + $.map(this.config.data, (item, index) => { + let selected = index == this.config.default ? 'selected' : ''; + html += `\n\n`; + }); + return html; + }, + + // 绑定事件 + bindEvents: function () { + let that = this; + let elem = $(this.config.elem); + let radioContainer = elem.find('.radio-container'); + let selectContainer = elem.find('.select-container'); + let toggleDots = elem.find('.dot'); + + // 圆点切换事件 + toggleDots.on('click', function () { + let target = $(this).data('target'); + if (target === 'radio') { + radioContainer.removeClass('toggle-hidden'); + selectContainer.addClass('toggle-hidden'); + } else { + radioContainer.addClass('toggle-hidden'); + selectContainer.removeClass('toggle-hidden'); + } + + // 更新激活状态 + toggleDots.removeClass('active'); + $(this).addClass('active'); + + // 同步数据 + that.syncData(target); + + // 触发回调 + if (typeof that.config.onSwitch === 'function') { + that.config.onSwitch(target); + } + }); + + // 监听单选按钮变化 + form.on('radio', function (data) { + let that = $(this); + let name = $(data.elem).attr('name') + if (that.attr('lay-filter') !== `switchSelectFilter_${name}`) return; + let value = $(data.elem).val() + elem.find(`select[name="${name}"]`).val(value); + form.render('select'); + }); + + // 监听下拉框变化 + form.on('select', function (data) { + let name = $(data.elem).attr('name') + if ($(data.elem).attr('lay-filter') !== `switchSelectFilter_${name}`) return; + let value = $(data.elem).val() + elem.find(`input[name="${name}"][value="${value}"]`).prop('checked', true); + form.render('radio'); + }); + }, + + // 同步数据 + syncData: function (target) { + let elem = $(this.config.elem); + if (target === 'radio') { + let selectValue = elem.find(`select[name="${this.config.name}"]`).val(); + elem.find(`input[name="${this.config.name}"][value="` + selectValue + '"]').prop('checked', true); + form.render('radio'); + } else { + let radioValue = elem.find(`input[name="${this.config.name}"]:checked`).val(); + elem.find(`select[name="${this.config.name}"]`).val(radioValue); + form.render('select'); + } + }, + + // 获取当前值 + getValue: function () { + return $(this.config.elem).find(`input[name="${this.config.name}"]:checked`).val(); + }, + + // 设置值 + setValue: function (value) { + let elem = $(this.config.elem); + elem.find(`input[name="${this.config.name}"][value="${value}"]`).prop('checked', true); + elem.find(`select[name="${this.config.name}"]`).val(value); + form.render(); + }, + }; + + // 暴露接口 + exports('switchSelect', function (options) { + return new SwitchSelect(options); + }); +}); + +let currentScriptPath = document.currentScript.src; +const urlObj = new URL(currentScriptPath); +layui.link(urlObj.pathname.replace('switchSelect.js', 'switchSelect.css')); diff --git a/public/static/plugs/lay-module/tableSelect/tableSelect.js b/public/static/plugs/lay-module/tableSelect/tableSelect.js new file mode 100644 index 0000000..a436953 --- /dev/null +++ b/public/static/plugs/lay-module/tableSelect/tableSelect.js @@ -0,0 +1,273 @@ +layui.define(['table', 'jquery', 'form'], function (exports) { + "use strict"; + + var MOD_NAME = 'tableSelect', + $ = layui.jquery, + table = layui.table, + form = layui.form; + var tableSelect = function () { + this.v = '1.1.0'; + }; + + /** + * 初始化表格选择器 + */ + tableSelect.prototype.render = function (opt) { + var elem = $(opt.elem); + var tableDone = opt.table.done || function () { + }; + + //默认设置 + opt.searchKey = opt.searchKey || 'keyword'; + opt.searchPlaceholder = opt.searchPlaceholder || '关键词搜索'; + opt.checkedKey = opt.checkedKey || ''; + opt.table.page = opt.table.page || true; + opt.table.height = opt.height || 315; + + //最小宽度 + opt.width = opt.width || '530'; + + //多搜索条件 + opt.searchType = opt.searchType || 'one'; + opt.searchList = opt.searchList || [{key: opt.searchKey, placeholder: opt.searchPlaceholder}]; + + elem.off('click').on('click', function (e) { + e.stopPropagation(); + + if ($('div.tableSelect').length >= 1) { + return false; + } + + var t = elem.offset().top + elem.outerHeight() + "px"; + var l = elem.offset().left + "px"; + var tableName = "tableSelect_table_" + new Date().getTime(); + var tableBox = '
      '; + tableBox += '
      '; + tableBox += '
      '; + + //判断是否多搜索条件 + if (opt.searchType == 'more') { + $.each(opt.searchList, function (index, item) { + tableBox += ''; + }); + } else { + tableBox += ''; + } + + tableBox += ''; + tableBox += '
      '; + tableBox += ''; + tableBox += '
      '; + tableBox += '
      '; + tableBox += '
      '; + tableBox = $(tableBox); + $('body').append(tableBox); + + //数据缓存 + var checkedData = []; + + //渲染TABLE + opt.table.elem = "#" + tableName; + opt.table.id = tableName; + opt.table.done = function (res, curr, count) { + defaultChecked(res, curr, count); + setChecked(res, curr, count); + tableDone(res, curr, count); + }; + var tableSelect_table = table.render(opt.table); + + //分页选中保存数组 + table.on('radio(' + tableName + ')', function (obj) { + if (opt.checkedKey) { + checkedData = table.checkStatus(tableName).data + } + updataButton(table.checkStatus(tableName).data.length) + }) + table.on('checkbox(' + tableName + ')', function (obj) { + if (opt.checkedKey) { + if (obj.checked) { + for (var i = 0; i < table.checkStatus(tableName).data.length; i++) { + checkedData.push(table.checkStatus(tableName).data[i]) + } + } else { + if (obj.type == 'all') { + for (var j = 0; j < table.cache[tableName].length; j++) { + for (var i = 0; i < checkedData.length; i++) { + if (checkedData[i][opt.checkedKey] == table.cache[tableName][j][opt.checkedKey]) { + checkedData.splice(i, 1) + } + } + } + } else { + //因为LAYUI问题,操作到变化全选状态时获取到的obj为空,这里用函数获取未选中的项。 + var nu = function () { + var noCheckedKey = ''; + for (var i = 0; i < table.cache[tableName].length; i++) { + if (!table.cache[tableName][i].LAY_CHECKED) { + noCheckedKey = table.cache[tableName][i][opt.checkedKey]; + } + } + return noCheckedKey + }; + var noCheckedKey = obj.data[opt.checkedKey] || nu(); + for (var i = 0; i < checkedData.length; i++) { + if (checkedData[i][opt.checkedKey] == noCheckedKey) { + checkedData.splice(i, 1); + } + } + } + } + checkedData = uniqueObjArray(checkedData, opt.checkedKey); + updataButton(checkedData.length) + } else { + updataButton(table.checkStatus(tableName).data.length) + } + }); + + //渲染表格后选中 + function setChecked(res, curr, count) { + for (var i = 0; i < res.data.length; i++) { + for (var j = 0; j < checkedData.length; j++) { + if (res.data[i][opt.checkedKey] == checkedData[j][opt.checkedKey]) { + res.data[i].LAY_CHECKED = true; + var index = res.data[i]['LAY_INDEX']; + var checkbox = $('#' + tableName + '').next().find('tr[data-index=' + index + '] input[type="checkbox"]'); + checkbox.prop('checked', true).next().addClass('layui-form-checked'); + var radio = $('#' + tableName + '').next().find('tr[data-index=' + index + '] input[type="radio"]'); + radio.prop('checked', true).next().addClass('layui-form-radioed').find("i").addClass('layui-icon-radio'); + } + } + } + var checkStatus = table.checkStatus(tableName); + if (checkStatus.isAll) { + $('#' + tableName + '').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').prop('checked', true); + $('#' + tableName + '').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked'); + } + updataButton(checkedData.length) + } + + //写入默认选中值(puash checkedData) + function defaultChecked(res, curr, count) { + if (opt.checkedKey && elem.attr('ts-selected')) { + var selected = elem.attr('ts-selected').split(","); + for (var i = 0; i < res.data.length; i++) { + for (var j = 0; j < selected.length; j++) { + if (res.data[i][opt.checkedKey] == selected[j]) { + checkedData.push(res.data[i]) + } + } + } + checkedData = uniqueObjArray(checkedData, opt.checkedKey); + } + } + + //更新选中数量 + function updataButton(n) { + tableBox.find('.tableSelect_btn_select span').html(n == 0 ? '' : '(' + n + ')') + } + + //数组去重 + function uniqueObjArray(arr, type) { + var newArr = []; + var tArr = []; + if (arr.length == 0) { + return arr; + } else { + if (type) { + for (var i = 0; i < arr.length; i++) { + if (!tArr[arr[i][type]]) { + newArr.push(arr[i]); + tArr[arr[i][type]] = true; + } + } + return newArr; + } else { + for (var i = 0; i < arr.length; i++) { + if (!tArr[arr[i]]) { + newArr.push(arr[i]); + tArr[arr[i]] = true; + } + } + return newArr; + } + } + } + + //FIX位置 + var overHeight = (elem.offset().top + elem.outerHeight() + tableBox.outerHeight() - $(window).scrollTop()) > $(window).height(); + var overWidth = (elem.offset().left + tableBox.outerWidth()) > $(window).width(); + overHeight && tableBox.css({'top': 'auto', 'bottom': '0px'}); + overWidth && tableBox.css({'left': 'auto', 'right': '5px'}) + + //关键词搜索 + form.on('submit(tableSelect_btn_search)', function (data) { + tableSelect_table.reload({ + where: data.field, + page: { + curr: 1 + } + }); + return false; + }); + + //双击行选中 + table.on('rowDouble(' + tableName + ')', function (obj) { + var checkStatus = {data: [obj.data]}; + selectDone(checkStatus); + }) + + //按钮选中 + tableBox.find('.tableSelect_btn_select').on('click', function () { + var checkStatus = table.checkStatus(tableName); + if (checkedData.length > 1) { + checkStatus.data = checkedData; + } + selectDone(checkStatus); + }) + + //写值回调和关闭 + function selectDone(checkStatus) { + if (opt.checkedKey) { + var selected = []; + for (var i = 0; i < checkStatus.data.length; i++) { + selected.push(checkStatus.data[i][opt.checkedKey]) + } + elem.attr("ts-selected", selected.join(",")); + } + opt.done(elem, checkStatus); + tableBox.remove(); + delete table.cache[tableName]; + checkedData = []; + } + + //点击其他区域关闭 + $(document).mouseup(function (e) { + var userSet_con = $('' + opt.elem + ',.tableSelect'); + if (!userSet_con.is(e.target) && userSet_con.has(e.target).length === 0) { + tableBox.remove(); + delete table.cache[tableName]; + checkedData = []; + } + }); + }) + } + + /** + * 隐藏选择器 + */ + tableSelect.prototype.hide = function (opt) { + $('.tableSelect').remove(); + } + + //自动完成渲染 + var tableSelect = new tableSelect(); + + //FIX 滚动时错位 + if (window.top == window.self) { + $(window).scroll(function () { + tableSelect.hide(); + }); + } + + exports(MOD_NAME, tableSelect); +}) \ No newline at end of file diff --git a/public/static/plugs/lay-module/treetable-lay/treetable.css b/public/static/plugs/lay-module/treetable-lay/treetable.css new file mode 100644 index 0000000..584b2f8 --- /dev/null +++ b/public/static/plugs/lay-module/treetable-lay/treetable.css @@ -0,0 +1,18 @@ +.treeTable-empty { + width: 20px; + display: inline-block; +} + +.treeTable-icon { + cursor: pointer; +} + +.treeTable-icon .layui-icon-triangle-d:before { + content: "\e623"; +} + +.treeTable-icon.open .layui-icon-triangle-d:before { + content: "\e625"; + background-color: transparent; +} + diff --git a/public/static/plugs/lay-module/treetable-lay/treetable.js b/public/static/plugs/lay-module/treetable-lay/treetable.js new file mode 100644 index 0000000..628c459 --- /dev/null +++ b/public/static/plugs/lay-module/treetable-lay/treetable.js @@ -0,0 +1,210 @@ +layui.define(['layer', 'table'], function (exports) { + var $ = layui.jquery; + var layer = layui.layer; + var table = layui.table; + + var treetable = { + // 渲染树形表格 + render: function (param) { + param.homdPid = param.homdPid || -1; + // 检查参数 + if (!treetable.checkParam(param)) { + return; + } + // 获取数据 + if (param.data) { + treetable.init(param, param.data); + } else { + $.getJSON(param.url, param.where, function (res) { + treetable.init(param, res.data); + }); + } + }, + // 渲染表格 + init: function (param, data) { + var mData = []; + var doneCallback = param.done; + var tNodes = data; + // 补上id和pid字段 + for (var i = 0; i < tNodes.length; i++) { + var tt = tNodes[i]; + if (!tt.id) { + if (!param.treeIdName) { + layer.msg('参数treeIdName不能为空', {icon: 5}); + return; + } + tt.id = tt[param.treeIdName]; + } + if (!tt.pid) { + if (!param.treePidName) { + layer.msg('参数treePidName不能为空', {icon: 5}); + return; + } + tt.pid = tt[param.treePidName]; + } + if(tt.pid == param.homdPid){ + mData.push(tt); + } + } + + // 对数据进行排序 + var sort = function (s_pid, data) { + for (var i = 0; i < data.length; i++) { + if (data[i].pid == s_pid) { + var len = mData.length; + if (len > 0 && mData[len - 1].id == s_pid) { + mData[len - 1].isParent = true; + } + mData.push(data[i]); + sort(data[i].id, data); + } + } + }; + sort(param.treeSpid, tNodes); + + // 重写参数 + param.url = undefined; + param.data = mData; + param.page = { + count: param.data.length, + limit: param.data.length + }; + param.cols[0][param.treeColIndex].templet = function (d) { + var mId = d.id; + var mPid = d.pid; + var isDir = d.isParent; + var emptyNum = treetable.getEmptyNum(mPid, mData, param.indent); + var iconHtml = ''; + for (var i = 0; i < emptyNum; i++) { + iconHtml += ''; + } + if (isDir) { + iconHtml += ' '; + } else { + iconHtml += ''; + } + iconHtml += '  '; + var ttype = isDir ? 'dir' : 'file'; + var vg = ''; + return vg + iconHtml + d[param.cols[0][param.treeColIndex].field] + '' + }; + + param.done = function (res, curr, count) { + $(param.elem).next().addClass('treeTable'); + $('.treeTable .layui-table-page').css('display', 'none'); + $(param.elem).next().attr('treeLinkage', param.treeLinkage); + // 绑定事件换成对body绑定 + /*$('.treeTable .treeTable-icon').click(function () { + treetable.toggleRows($(this), param.treeLinkage); + });*/ + if (param.treeDefaultClose) { + treetable.foldAll(param.elem); + } + if (doneCallback) { + doneCallback(res, curr, count); + } + }; + + // 渲染表格 + table.render(param); + }, + // 计算缩进的数量 + getEmptyNum: function (pid, data, indent) { + var num = 0; + if (!pid) { + return num; + } + var tPid; + for (var i = 0; i < data.length; i++) { + if (pid == data[i].id) { + num += indent || 1; + tPid = data[i].pid; + break; + } + } + return num + treetable.getEmptyNum(tPid, data, indent); + }, + // 展开/折叠行 + toggleRows: function ($dom, linkage) { + var type = $dom.attr('lay-ttype'); + if ('file' == type) { + return; + } + var mId = $dom.attr('lay-tid'); + var isOpen = $dom.hasClass('open'); + if (isOpen) { + $dom.removeClass('open'); + } else { + $dom.addClass('open'); + } + $dom.closest('tbody').find('tr').each(function () { + var $ti = $(this).find('.treeTable-icon'); + var pid = $ti.attr('lay-tpid'); + var ttype = $ti.attr('lay-ttype'); + var tOpen = $ti.hasClass('open'); + if (mId == pid) { + if (isOpen) { + $(this).hide(); + if ('dir' == ttype && tOpen == isOpen) { + $ti.trigger('click'); + } + } else { + $(this).show(); + if (linkage && 'dir' == ttype && tOpen == isOpen) { + $ti.trigger('click'); + } + } + } + }); + }, + // 检查参数 + checkParam: function (param) { + if (!param.treeSpid && param.treeSpid != 0) { + layer.msg('参数treeSpid不能为空', {icon: 5}); + return false; + } + + if (!param.treeColIndex && param.treeColIndex != 0) { + layer.msg('参数treeColIndex不能为空', {icon: 5}); + return false; + } + return true; + }, + // 展开所有 + expandAll: function (dom) { + $(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () { + var $ti = $(this).find('.treeTable-icon'); + var ttype = $ti.attr('lay-ttype'); + var tOpen = $ti.hasClass('open'); + if ('dir' == ttype && !tOpen) { + $ti.trigger('click'); + } + }); + }, + // 折叠所有 + foldAll: function (dom) { + $(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () { + var $ti = $(this).find('.treeTable-icon'); + var ttype = $ti.attr('lay-ttype'); + var tOpen = $ti.hasClass('open'); + if ('dir' == ttype && tOpen) { + $ti.trigger('click'); + } + }); + } + }; + + // layui.link(layui.cache.base + '/treetable-lay/treetable.css'); + + // 给图标列绑定事件 + $('body').on('click', '.treeTable .treeTable-icon', function () { + var treeLinkage = $(this).parents('.treeTable').attr('treeLinkage'); + if ('true' == treeLinkage) { + treetable.toggleRows($(this), true); + } else { + treetable.toggleRows($(this), false); + } + }); + + exports('treetable', treetable); +}); diff --git a/public/static/plugs/layui-v2.x/css/layui.css b/public/static/plugs/layui-v2.x/css/layui.css new file mode 100644 index 0000000..48b3911 --- /dev/null +++ b/public/static/plugs/layui-v2.x/css/layui.css @@ -0,0 +1 @@ +blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}a:active,a:hover{outline:0}img{display:inline-block;border:none;vertical-align:middle}li{list-style:none}table{border-collapse:collapse;border-spacing:0}h1,h2,h3,h4,h5,h6{font-weight:700}h5,h6{font-size:100%}button,input,select,textarea{font-size:100%}button,input,optgroup,option,select,textarea{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;outline:0}pre{white-space:pre-wrap;word-wrap:break-word}body{line-height:1.6;color:rgba(0,0,0,.85);font-size:14px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif}hr{height:0;line-height:0;margin:10px 0;padding:0;border:none;border-bottom:1px solid #eee;clear:both;overflow:hidden;background:0 0}a{color:#333;text-decoration:none}a cite{font-style:normal}.layui-border-box,.layui-border-box *{box-sizing:border-box}.layui-box,.layui-box *{box-sizing:content-box}.layui-clear{clear:both}.layui-clear:after{content:'\20';clear:both;display:block;height:0}.layui-clear-space{word-spacing:-5px}.layui-inline{position:relative;display:inline-block;vertical-align:middle}.layui-edge{position:relative;display:inline-block;vertical-align:middle;width:0;height:0;border-width:6px;border-style:dashed;border-color:transparent;overflow:hidden}.layui-edge-top{top:-4px;border-bottom-color:#999;border-bottom-style:solid}.layui-edge-right{border-left-color:#999;border-left-style:solid}.layui-edge-bottom{top:2px;border-top-color:#999;border-top-style:solid}.layui-edge-left{border-right-color:#999;border-right-style:solid}.layui-elip,.layui-ellip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-disabled,.layui-icon,.layui-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.layui-disabled,.layui-disabled:hover{color:#d2d2d2!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-show-v{visibility:visible!important}.layui-hide-v{visibility:hidden!important}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=293);src:url(../font/iconfont.eot?v=293#iefix) format('embedded-opentype'),url(../font/iconfont.woff2?v=293) format('woff2'),url(../font/iconfont.woff?v=293) format('woff'),url(../font/iconfont.ttf?v=293) format('truetype'),url(../font/iconfont.svg?v=293#layui-icon) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-icon-sound:before{content:"\e69d"}.layui-icon-bot:before{content:"\e7d6"}.layui-icon-leaf:before{content:"\e701"}.layui-icon-folder:before{content:"\eabe"}.layui-icon-folder-open:before{content:"\eac1"}.layui-icon-gitee:before{content:"\e69b"}.layui-icon-github:before{content:"\e6a7"}.layui-icon-disabled:before{content:"\e6cc"}.layui-icon-moon:before{content:"\e6c2"}.layui-icon-error:before{content:"\e693"}.layui-icon-success:before{content:"\e697"}.layui-icon-question:before{content:"\e699"}.layui-icon-lock:before{content:"\e69a"}.layui-icon-eye:before{content:"\e695"}.layui-icon-eye-invisible:before{content:"\e696"}.layui-icon-backspace:before{content:"\e694"}.layui-icon-tips-fill:before{content:"\eb2e"}.layui-icon-test:before{content:"\e692"}.layui-icon-clear:before{content:"\e788"}.layui-icon-heart-fill:before{content:"\e68f"}.layui-icon-light:before{content:"\e748"}.layui-icon-music:before{content:"\e690"}.layui-icon-time:before{content:"\e68d"}.layui-icon-ie:before{content:"\e7bb"}.layui-icon-firefox:before{content:"\e686"}.layui-icon-at:before{content:"\e687"}.layui-icon-bluetooth:before{content:"\e689"}.layui-icon-chrome:before{content:"\e68a"}.layui-icon-edge:before{content:"\e68b"}.layui-icon-heart:before{content:"\e68c"}.layui-icon-key:before{content:"\e683"}.layui-icon-android:before{content:"\e684"}.layui-icon-mike:before{content:"\e6dc"}.layui-icon-mute:before{content:"\e685"}.layui-icon-gift:before{content:"\e627"}.layui-icon-windows:before{content:"\e67f"}.layui-icon-ios:before{content:"\e680"}.layui-icon-logout:before{content:"\e682"}.layui-icon-wifi:before{content:"\e7e0"}.layui-icon-rss:before{content:"\e808"}.layui-icon-email:before{content:"\e618"}.layui-icon-reduce-circle:before{content:"\e616"}.layui-icon-transfer:before{content:"\e691"}.layui-icon-service:before{content:"\e626"}.layui-icon-addition:before{content:"\e624"}.layui-icon-subtraction:before{content:"\e67e"}.layui-icon-slider:before{content:"\e714"}.layui-icon-print:before{content:"\e66d"}.layui-icon-export:before{content:"\e67d"}.layui-icon-cols:before{content:"\e610"}.layui-icon-screen-full:before{content:"\e622"}.layui-icon-screen-restore:before{content:"\e758"}.layui-icon-rate-half:before{content:"\e6c9"}.layui-icon-rate-solid:before{content:"\e67a"}.layui-icon-rate:before{content:"\e67b"}.layui-icon-cellphone:before{content:"\e678"}.layui-icon-vercode:before{content:"\e679"}.layui-icon-login-weibo:before{content:"\e675"}.layui-icon-login-qq:before{content:"\e676"}.layui-icon-login-wechat:before{content:"\e677"}.layui-icon-username:before{content:"\e66f"}.layui-icon-password:before{content:"\e673"}.layui-icon-refresh-3:before{content:"\e9aa"}.layui-icon-auz:before{content:"\e672"}.layui-icon-shrink-right:before{content:"\e668"}.layui-icon-spread-left:before{content:"\e66b"}.layui-icon-snowflake:before{content:"\e6b1"}.layui-icon-tips:before{content:"\e702"}.layui-icon-note:before{content:"\e66e"}.layui-icon-senior:before{content:"\e674"}.layui-icon-refresh-1:before{content:"\e666"}.layui-icon-refresh:before{content:"\e669"}.layui-icon-flag:before{content:"\e66c"}.layui-icon-theme:before{content:"\e66a"}.layui-icon-notice:before{content:"\e667"}.layui-icon-console:before{content:"\e665"}.layui-icon-website:before{content:"\e7ae"}.layui-icon-face-surprised:before{content:"\e664"}.layui-icon-set:before{content:"\e716"}.layui-icon-template:before{content:"\e663"}.layui-icon-app:before{content:"\e653"}.layui-icon-template-1:before{content:"\e656"}.layui-icon-home:before{content:"\e68e"}.layui-icon-female:before{content:"\e661"}.layui-icon-male:before{content:"\e662"}.layui-icon-tread:before{content:"\e6c5"}.layui-icon-praise:before{content:"\e6c6"}.layui-icon-rmb:before{content:"\e65e"}.layui-icon-more:before{content:"\e65f"}.layui-icon-camera:before{content:"\e660"}.layui-icon-cart-simple:before{content:"\e698"}.layui-icon-face-cry:before{content:"\e69c"}.layui-icon-face-smile:before{content:"\e6af"}.layui-icon-survey:before{content:"\e6b2"}.layui-icon-read:before{content:"\e705"}.layui-icon-location:before{content:"\e715"}.layui-icon-dollar:before{content:"\e659"}.layui-icon-diamond:before{content:"\e735"}.layui-icon-return:before{content:"\e65c"}.layui-icon-camera-fill:before{content:"\e65d"}.layui-icon-fire:before{content:"\e756"}.layui-icon-more-vertical:before{content:"\e671"}.layui-icon-cart:before{content:"\e657"}.layui-icon-star-fill:before{content:"\e658"}.layui-icon-prev:before{content:"\e65a"}.layui-icon-next:before{content:"\e65b"}.layui-icon-upload:before{content:"\e67c"}.layui-icon-upload-drag:before{content:"\e681"}.layui-icon-user:before{content:"\e770"}.layui-icon-file-b:before{content:"\e655"}.layui-icon-component:before{content:"\e857"}.layui-icon-find-fill:before{content:"\e670"}.layui-icon-loading:before{content:"\e63d"}.layui-icon-loading-1:before{content:"\e63e"}.layui-icon-add-1:before{content:"\e654"}.layui-icon-pause:before{content:"\e651"}.layui-icon-play:before{content:"\e652"}.layui-icon-video:before{content:"\e6ed"}.layui-icon-headset:before{content:"\e6fc"}.layui-icon-voice:before{content:"\e688"}.layui-icon-speaker:before{content:"\e645"}.layui-icon-fonts-del:before{content:"\e64f"}.layui-icon-fonts-html:before{content:"\e64b"}.layui-icon-fonts-code:before{content:"\e64e"}.layui-icon-fonts-strong:before{content:"\e62b"}.layui-icon-unlink:before{content:"\e64d"}.layui-icon-picture:before{content:"\e64a"}.layui-icon-link:before{content:"\e64c"}.layui-icon-face-smile-b:before{content:"\e650"}.layui-icon-align-center:before{content:"\e647"}.layui-icon-align-right:before{content:"\e648"}.layui-icon-align-left:before{content:"\e649"}.layui-icon-fonts-u:before{content:"\e646"}.layui-icon-fonts-i:before{content:"\e644"}.layui-icon-tabs:before{content:"\e62a"}.layui-icon-circle:before{content:"\e63f"}.layui-icon-radio:before{content:"\e643"}.layui-icon-share:before{content:"\e641"}.layui-icon-edit:before{content:"\e642"}.layui-icon-delete:before{content:"\e640"}.layui-icon-engine:before{content:"\e628"}.layui-icon-chart-screen:before{content:"\e629"}.layui-icon-chart:before{content:"\e62c"}.layui-icon-table:before{content:"\e62d"}.layui-icon-tree:before{content:"\e62e"}.layui-icon-upload-circle:before{content:"\e62f"}.layui-icon-templeate-1:before{content:"\e630"}.layui-icon-util:before{content:"\e631"}.layui-icon-layouts:before{content:"\e632"}.layui-icon-prev-circle:before{content:"\e633"}.layui-icon-carousel:before{content:"\e634"}.layui-icon-code-circle:before{content:"\e635"}.layui-icon-water:before{content:"\e636"}.layui-icon-date:before{content:"\e637"}.layui-icon-layer:before{content:"\e638"}.layui-icon-fonts-clear:before{content:"\e639"}.layui-icon-dialogue:before{content:"\e63a"}.layui-icon-cellphone-fine:before{content:"\e63b"}.layui-icon-form:before{content:"\e63c"}.layui-icon-file:before{content:"\e621"}.layui-icon-triangle-r:before{content:"\e623"}.layui-icon-triangle-d:before{content:"\e625"}.layui-icon-set-sm:before{content:"\e620"}.layui-icon-add-circle:before{content:"\e61f"}.layui-icon-layim-download:before{content:"\e61e"}.layui-icon-layim-uploadfile:before{content:"\e61d"}.layui-icon-404:before{content:"\e61c"}.layui-icon-about:before{content:"\e60b"}.layui-icon-layim-theme:before{content:"\e61b"}.layui-icon-down:before{content:"\e61a"}.layui-icon-up:before{content:"\e619"}.layui-icon-circle-dot:before{content:"\e617"}.layui-icon-set-fill:before{content:"\e614"}.layui-icon-search:before{content:"\e615"}.layui-icon-friends:before{content:"\e612"}.layui-icon-group:before{content:"\e613"}.layui-icon-reply-fill:before{content:"\e611"}.layui-icon-menu-fill:before{content:"\e60f"}.layui-icon-face-smile-fine:before{content:"\e60c"}.layui-icon-picture-fine:before{content:"\e60d"}.layui-icon-log:before{content:"\e60e"}.layui-icon-list:before{content:"\e60a"}.layui-icon-release:before{content:"\e609"}.layui-icon-add-circle-fine:before{content:"\e608"}.layui-icon-ok:before{content:"\e605"}.layui-icon-help:before{content:"\e607"}.layui-icon-chat:before{content:"\e606"}.layui-icon-top:before{content:"\e604"}.layui-icon-right:before{content:"\e602"}.layui-icon-left:before{content:"\e603"}.layui-icon-star:before{content:"\e600"}.layui-icon-download-circle:before{content:"\e601"}.layui-icon-close:before{content:"\1006"}.layui-icon-close-fill:before{content:"\1007"}.layui-icon-ok-circle:before{content:"\1005"}.layui-main{position:relative;width:1160px;margin:0 auto}.layui-header{position:relative;z-index:1000;height:60px}.layui-header a:hover{-webkit-transition:all .5s;transition:all .5s}.layui-side{position:fixed;left:0;top:0;bottom:0;z-index:999;width:200px;overflow-x:hidden}.layui-side-scroll{position:relative;width:220px;height:100%;overflow-x:hidden}.layui-body{position:relative;left:200px;right:0;top:0;bottom:0;width:auto;box-sizing:border-box}.layui-layout-body{overflow-x:hidden}.layui-layout-admin .layui-header{position:fixed;top:0;left:0;right:0;background-color:#23292e}.layui-layout-admin .layui-side{top:60px;width:200px;overflow-x:hidden}.layui-layout-admin .layui-body{position:absolute;top:60px;padding-bottom:44px}.layui-layout-admin .layui-main{width:auto;margin:0 15px}.layui-layout-admin .layui-footer{position:fixed;left:200px;right:0;bottom:0;z-index:990;height:44px;line-height:44px;padding:0 15px;box-shadow:-1px 0 4px rgb(0 0 0 / 12%);background-color:#fafafa}.layui-layout-admin .layui-logo{position:absolute;left:0;top:0;width:200px;height:100%;line-height:60px;text-align:center;color:#16baaa;font-size:16px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 15%)}.layui-layout-admin .layui-header .layui-nav{background:0 0}.layui-layout-left{position:absolute!important;left:200px;top:0}.layui-layout-right{position:absolute!important;right:0;top:0}.layui-container{position:relative;margin:0 auto;box-sizing:border-box}.layui-fluid{position:relative;margin:0 auto;padding:0 15px}.layui-row:after,.layui-row:before{content:"";display:block;clear:both}.layui-col-lg1,.layui-col-lg10,.layui-col-lg11,.layui-col-lg12,.layui-col-lg2,.layui-col-lg3,.layui-col-lg4,.layui-col-lg5,.layui-col-lg6,.layui-col-lg7,.layui-col-lg8,.layui-col-lg9,.layui-col-md1,.layui-col-md10,.layui-col-md11,.layui-col-md12,.layui-col-md2,.layui-col-md3,.layui-col-md4,.layui-col-md5,.layui-col-md6,.layui-col-md7,.layui-col-md8,.layui-col-md9,.layui-col-sm1,.layui-col-sm10,.layui-col-sm11,.layui-col-sm12,.layui-col-sm2,.layui-col-sm3,.layui-col-sm4,.layui-col-sm5,.layui-col-sm6,.layui-col-sm7,.layui-col-sm8,.layui-col-sm9,.layui-col-xl1,.layui-col-xl10,.layui-col-xl11,.layui-col-xl12,.layui-col-xl2,.layui-col-xl3,.layui-col-xl4,.layui-col-xl5,.layui-col-xl6,.layui-col-xl7,.layui-col-xl8,.layui-col-xl9,.layui-col-xs1,.layui-col-xs10,.layui-col-xs11,.layui-col-xs12,.layui-col-xs2,.layui-col-xs3,.layui-col-xs4,.layui-col-xs5,.layui-col-xs6,.layui-col-xs7,.layui-col-xs8,.layui-col-xs9{position:relative;display:block;box-sizing:border-box}.layui-col-xs1,.layui-col-xs10,.layui-col-xs11,.layui-col-xs12,.layui-col-xs2,.layui-col-xs3,.layui-col-xs4,.layui-col-xs5,.layui-col-xs6,.layui-col-xs7,.layui-col-xs8,.layui-col-xs9{float:left}.layui-col-xs1{width:8.33333333%}.layui-col-xs2{width:16.66666667%}.layui-col-xs3{width:25%}.layui-col-xs4{width:33.33333333%}.layui-col-xs5{width:41.66666667%}.layui-col-xs6{width:50%}.layui-col-xs7{width:58.33333333%}.layui-col-xs8{width:66.66666667%}.layui-col-xs9{width:75%}.layui-col-xs10{width:83.33333333%}.layui-col-xs11{width:91.66666667%}.layui-col-xs12{width:100%}.layui-col-xs-offset1{margin-left:8.33333333%}.layui-col-xs-offset2{margin-left:16.66666667%}.layui-col-xs-offset3{margin-left:25%}.layui-col-xs-offset4{margin-left:33.33333333%}.layui-col-xs-offset5{margin-left:41.66666667%}.layui-col-xs-offset6{margin-left:50%}.layui-col-xs-offset7{margin-left:58.33333333%}.layui-col-xs-offset8{margin-left:66.66666667%}.layui-col-xs-offset9{margin-left:75%}.layui-col-xs-offset10{margin-left:83.33333333%}.layui-col-xs-offset11{margin-left:91.66666667%}.layui-col-xs-offset12{margin-left:100%}@media screen and (max-width:767.98px){.layui-container{padding:0 15px}.layui-hide-xs{display:none!important}.layui-show-xs-block{display:block!important}.layui-show-xs-inline{display:inline!important}.layui-show-xs-inline-block{display:inline-block!important}}@media screen and (min-width:768px){.layui-container{width:720px}.layui-hide-sm{display:none!important}.layui-show-sm-block{display:block!important}.layui-show-sm-inline{display:inline!important}.layui-show-sm-inline-block{display:inline-block!important}.layui-col-sm1,.layui-col-sm10,.layui-col-sm11,.layui-col-sm12,.layui-col-sm2,.layui-col-sm3,.layui-col-sm4,.layui-col-sm5,.layui-col-sm6,.layui-col-sm7,.layui-col-sm8,.layui-col-sm9{float:left}.layui-col-sm1{width:8.33333333%}.layui-col-sm2{width:16.66666667%}.layui-col-sm3{width:25%}.layui-col-sm4{width:33.33333333%}.layui-col-sm5{width:41.66666667%}.layui-col-sm6{width:50%}.layui-col-sm7{width:58.33333333%}.layui-col-sm8{width:66.66666667%}.layui-col-sm9{width:75%}.layui-col-sm10{width:83.33333333%}.layui-col-sm11{width:91.66666667%}.layui-col-sm12{width:100%}.layui-col-sm-offset1{margin-left:8.33333333%}.layui-col-sm-offset2{margin-left:16.66666667%}.layui-col-sm-offset3{margin-left:25%}.layui-col-sm-offset4{margin-left:33.33333333%}.layui-col-sm-offset5{margin-left:41.66666667%}.layui-col-sm-offset6{margin-left:50%}.layui-col-sm-offset7{margin-left:58.33333333%}.layui-col-sm-offset8{margin-left:66.66666667%}.layui-col-sm-offset9{margin-left:75%}.layui-col-sm-offset10{margin-left:83.33333333%}.layui-col-sm-offset11{margin-left:91.66666667%}.layui-col-sm-offset12{margin-left:100%}}@media screen and (min-width:992px){.layui-container{width:960px}.layui-hide-md{display:none!important}.layui-show-md-block{display:block!important}.layui-show-md-inline{display:inline!important}.layui-show-md-inline-block{display:inline-block!important}.layui-col-md1,.layui-col-md10,.layui-col-md11,.layui-col-md12,.layui-col-md2,.layui-col-md3,.layui-col-md4,.layui-col-md5,.layui-col-md6,.layui-col-md7,.layui-col-md8,.layui-col-md9{float:left}.layui-col-md1{width:8.33333333%}.layui-col-md2{width:16.66666667%}.layui-col-md3{width:25%}.layui-col-md4{width:33.33333333%}.layui-col-md5{width:41.66666667%}.layui-col-md6{width:50%}.layui-col-md7{width:58.33333333%}.layui-col-md8{width:66.66666667%}.layui-col-md9{width:75%}.layui-col-md10{width:83.33333333%}.layui-col-md11{width:91.66666667%}.layui-col-md12{width:100%}.layui-col-md-offset1{margin-left:8.33333333%}.layui-col-md-offset2{margin-left:16.66666667%}.layui-col-md-offset3{margin-left:25%}.layui-col-md-offset4{margin-left:33.33333333%}.layui-col-md-offset5{margin-left:41.66666667%}.layui-col-md-offset6{margin-left:50%}.layui-col-md-offset7{margin-left:58.33333333%}.layui-col-md-offset8{margin-left:66.66666667%}.layui-col-md-offset9{margin-left:75%}.layui-col-md-offset10{margin-left:83.33333333%}.layui-col-md-offset11{margin-left:91.66666667%}.layui-col-md-offset12{margin-left:100%}}@media screen and (min-width:1200px){.layui-container{width:1150px}.layui-hide-lg{display:none!important}.layui-show-lg-block{display:block!important}.layui-show-lg-inline{display:inline!important}.layui-show-lg-inline-block{display:inline-block!important}.layui-col-lg1,.layui-col-lg10,.layui-col-lg11,.layui-col-lg12,.layui-col-lg2,.layui-col-lg3,.layui-col-lg4,.layui-col-lg5,.layui-col-lg6,.layui-col-lg7,.layui-col-lg8,.layui-col-lg9{float:left}.layui-col-lg1{width:8.33333333%}.layui-col-lg2{width:16.66666667%}.layui-col-lg3{width:25%}.layui-col-lg4{width:33.33333333%}.layui-col-lg5{width:41.66666667%}.layui-col-lg6{width:50%}.layui-col-lg7{width:58.33333333%}.layui-col-lg8{width:66.66666667%}.layui-col-lg9{width:75%}.layui-col-lg10{width:83.33333333%}.layui-col-lg11{width:91.66666667%}.layui-col-lg12{width:100%}.layui-col-lg-offset1{margin-left:8.33333333%}.layui-col-lg-offset2{margin-left:16.66666667%}.layui-col-lg-offset3{margin-left:25%}.layui-col-lg-offset4{margin-left:33.33333333%}.layui-col-lg-offset5{margin-left:41.66666667%}.layui-col-lg-offset6{margin-left:50%}.layui-col-lg-offset7{margin-left:58.33333333%}.layui-col-lg-offset8{margin-left:66.66666667%}.layui-col-lg-offset9{margin-left:75%}.layui-col-lg-offset10{margin-left:83.33333333%}.layui-col-lg-offset11{margin-left:91.66666667%}.layui-col-lg-offset12{margin-left:100%}}@media screen and (min-width:1400px){.layui-container{width:1330px}.layui-hide-xl{display:none!important}.layui-show-xl-block{display:block!important}.layui-show-xl-inline{display:inline!important}.layui-show-xl-inline-block{display:inline-block!important}.layui-col-xl1,.layui-col-xl10,.layui-col-xl11,.layui-col-xl12,.layui-col-xl2,.layui-col-xl3,.layui-col-xl4,.layui-col-xl5,.layui-col-xl6,.layui-col-xl7,.layui-col-xl8,.layui-col-xl9{float:left}.layui-col-xl1{width:8.33333333%}.layui-col-xl2{width:16.66666667%}.layui-col-xl3{width:25%}.layui-col-xl4{width:33.33333333%}.layui-col-xl5{width:41.66666667%}.layui-col-xl6{width:50%}.layui-col-xl7{width:58.33333333%}.layui-col-xl8{width:66.66666667%}.layui-col-xl9{width:75%}.layui-col-xl10{width:83.33333333%}.layui-col-xl11{width:91.66666667%}.layui-col-xl12{width:100%}.layui-col-xl-offset1{margin-left:8.33333333%}.layui-col-xl-offset2{margin-left:16.66666667%}.layui-col-xl-offset3{margin-left:25%}.layui-col-xl-offset4{margin-left:33.33333333%}.layui-col-xl-offset5{margin-left:41.66666667%}.layui-col-xl-offset6{margin-left:50%}.layui-col-xl-offset7{margin-left:58.33333333%}.layui-col-xl-offset8{margin-left:66.66666667%}.layui-col-xl-offset9{margin-left:75%}.layui-col-xl-offset10{margin-left:83.33333333%}.layui-col-xl-offset11{margin-left:91.66666667%}.layui-col-xl-offset12{margin-left:100%}}.layui-col-space1{margin:-.5px}.layui-col-space1>*{padding:.5px}.layui-col-space2{margin:-1px}.layui-col-space2>*{padding:1px}.layui-col-space4{margin:-2px}.layui-col-space4>*{padding:2px}.layui-col-space5{margin:-2.5px}.layui-col-space5>*{padding:2.5px}.layui-col-space6{margin:-3px}.layui-col-space6>*{padding:3px}.layui-col-space8{margin:-4px}.layui-col-space8>*{padding:4px}.layui-col-space10{margin:-5px}.layui-col-space10>*{padding:5px}.layui-col-space12{margin:-6px}.layui-col-space12>*{padding:6px}.layui-col-space14{margin:-7px}.layui-col-space14>*{padding:7px}.layui-col-space15{margin:-7.5px}.layui-col-space15>*{padding:7.5px}.layui-col-space16{margin:-8px}.layui-col-space16>*{padding:8px}.layui-col-space18{margin:-9px}.layui-col-space18>*{padding:9px}.layui-col-space20{margin:-10px}.layui-col-space20>*{padding:10px}.layui-col-space22{margin:-11px}.layui-col-space22>*{padding:11px}.layui-col-space24{margin:-12px}.layui-col-space24>*{padding:12px}.layui-col-space25{margin:-12.5px}.layui-col-space25>*{padding:12.5px}.layui-col-space26{margin:-13px}.layui-col-space26>*{padding:13px}.layui-col-space28{margin:-14px}.layui-col-space28>*{padding:14px}.layui-col-space30{margin:-15px}.layui-col-space30>*{padding:15px}.layui-col-space32{margin:-16px}.layui-col-space32>*{padding:16px}.layui-padding-1{padding:4px!important}.layui-padding-2{padding:8px!important}.layui-padding-3{padding:16px!important}.layui-padding-4{padding:32px!important}.layui-padding-5{padding:48px!important}.layui-margin-1{margin:4px!important}.layui-margin-2{margin:8px!important}.layui-margin-3{margin:16px!important}.layui-margin-4{margin:32px!important}.layui-margin-5{margin:48px!important}.layui-btn,.layui-input,.layui-select,.layui-textarea,.layui-upload-button{outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-transition:all .3s;transition:all .3s;box-sizing:border-box}.layui-elem-quote{margin-bottom:10px;padding:15px;line-height:1.8;border-left:5px solid #16b777;border-radius:0 2px 2px 0;background-color:#fafafa}.layui-quote-nm{border-style:solid;border-width:1px;border-left-width:5px;background:0 0}.layui-elem-field{margin-bottom:10px;padding:0;border-width:1px;border-style:solid}.layui-elem-field legend{margin-left:20px;padding:0 10px;font-size:20px}.layui-field-title{margin:16px 0;border-width:0;border-top-width:1px}.layui-field-box{padding:15px}.layui-field-title .layui-field-box{padding:10px 0}.layui-progress{position:relative;height:6px;border-radius:20px;background-color:#eee}.layui-progress-bar{position:absolute;left:0;top:0;width:0;max-width:100%;height:6px;border-radius:20px;text-align:right;background-color:#16b777;-webkit-transition:all .3s;transition:all .3s}.layui-progress-big,.layui-progress-big .layui-progress-bar{height:18px;line-height:18px}.layui-progress-text{position:relative;top:-20px;line-height:18px;font-size:12px;color:#5f5f5f}.layui-progress-big .layui-progress-text{position:static;padding:0 10px;color:#fff}.layui-collapse{border-width:1px;border-style:solid;border-radius:2px}.layui-colla-content,.layui-colla-item{border-top-width:1px;border-top-style:solid}.layui-colla-item:first-child{border-top:none}.layui-colla-title{position:relative;height:42px;line-height:42px;padding:0 15px 0 35px;color:#333;background-color:#fafafa;cursor:pointer;font-size:14px;overflow:hidden}.layui-colla-content{display:none;padding:10px 15px;line-height:1.6;color:#5f5f5f}.layui-colla-icon{position:absolute;left:15px;top:50%;margin-top:-7px;font-size:14px;line-height:normal;transition:all .2s}.layui-colla-item.layui-show>.layui-colla-title .layui-colla-icon{transform:rotate(90deg)}.layui-colla-item.layui-show>.layui-colla-content{display:block}.layui-card{margin-bottom:15px;border-radius:2px;background-color:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.layui-card:last-child{margin-bottom:0}.layui-card-body,.layui-card-header{position:relative;padding:10px 15px}.layui-card-header{border-bottom:1px solid #f8f8f8;color:#333;border-radius:2px 2px 0 0;font-size:14px}.layui-card-body .layui-table{margin:5px 0}.layui-card .layui-tab{margin:0}.layui-panel{position:relative;border-width:1px;border-style:solid;border-radius:2px;box-shadow:1px 1px 4px rgb(0 0 0 / 8%);background-color:#fff;color:#5f5f5f}.layui-panel-window{position:relative;padding:15px;border-radius:0;border-top:5px solid #eee;background-color:#fff}.layui-auxiliar-moving{position:fixed;left:0;right:0;top:0;bottom:0;width:100%;height:100%;background:0 0;z-index:9999999999;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.layui-scrollbar-hide{overflow:hidden!important}.layui-bg-red{background-color:#ff5722!important;color:#fff!important}.layui-bg-orange{background-color:#ffb800!important;color:#fff!important}.layui-bg-green{background-color:#16baaa!important;color:#fff!important}.layui-bg-cyan{background-color:#2f4056!important;color:#fff!important}.layui-bg-blue{background-color:#1e9fff!important;color:#fff!important}.layui-bg-purple{background-color:#a233c6!important;color:#fff!important}.layui-bg-black{background-color:#2f363c!important;color:#fff!important}.layui-bg-gray{background-color:#fafafa!important;color:#5f5f5f!important}.layui-badge-rim,.layui-border,.layui-colla-content,.layui-colla-item,.layui-collapse,.layui-elem-field,.layui-form-pane .layui-form-item[pane],.layui-form-pane .layui-form-label,.layui-input,.layui-input-split,.layui-panel,.layui-quote-nm,.layui-select,.layui-tab-bar,.layui-tab-card,.layui-tab-title,.layui-tab-title .layui-this:after,.layui-textarea{border-color:#eee}.layui-border{border-width:1px;border-style:solid;color:#5f5f5f!important}.layui-border-red{border-width:1px;border-style:solid;border-color:#ff5722!important;color:#ff5722!important}.layui-border-orange{border-width:1px;border-style:solid;border-color:#ffb800!important;color:#ffb800!important}.layui-border-green{border-width:1px;border-style:solid;border-color:#16baaa!important;color:#16baaa!important}.layui-border-cyan{border-width:1px;border-style:solid;border-color:#2f4056!important;color:#2f4056!important}.layui-border-blue{border-width:1px;border-style:solid;border-color:#1e9fff!important;color:#1e9fff!important}.layui-border-purple{border-width:1px;border-style:solid;border-color:#a233c6!important;color:#a233c6!important}.layui-border-black{border-width:1px;border-style:solid;border-color:#2f363c!important;color:#2f363c!important}hr.layui-border-black,hr.layui-border-blue,hr.layui-border-cyan,hr.layui-border-green,hr.layui-border-orange,hr.layui-border-purple,hr.layui-border-red{border-width:0 0 1px}.layui-timeline-item:before{background-color:#eee}.layui-text{line-height:1.8;font-size:14px}.layui-text h1{margin:32px 0;font-size:32px}.layui-text h2{margin:24px 0;font-size:24px}.layui-text h3{margin:16px 0;font-size:18px}.layui-text h4{margin:11px 0;font-size:16px}.layui-text h5{margin:11px 0;font-size:14px}.layui-text h6{margin:11px 0;font-size:13px}.layui-text p{margin:15px 0}.layui-text p:first-child{margin-top:0}.layui-text p:last-child{margin-bottom:0}.layui-text hr{margin:15px 0}.layui-text ol,.layui-text ul{padding-left:15px}.layui-text ul li{margin-top:5px;list-style-type:disc}.layui-text ol li{margin-top:5px;list-style-type:decimal}.layui-text ol ul>li,.layui-text ul ul>li{list-style-type:disc}.layui-text ol li>p:first-child,.layui-text ul li>p:first-child{margin-top:0;margin-bottom:0}.layui-text :where(a:not(.layui-btn)){color:#01aaed}.layui-text :where(a:not(.layui-btn):hover){text-decoration:underline}.layui-text blockquote:not(.layui-elem-quote){margin:15px 0;padding:5px 15px;border-left:5px solid #eee}.layui-text pre>code:not(.layui-code){display:block;padding:15px;font-family:"Courier New",Consolas,"Lucida Console",monospace}.layui-text-em,.layui-word-aux{color:#999!important;padding-left:5px!important;padding-right:5px!important}.layui-font-12{font-size:12px!important}.layui-font-13{font-size:13px!important}.layui-font-14{font-size:14px!important}.layui-font-16{font-size:16px!important}.layui-font-18{font-size:18px!important}.layui-font-20{font-size:20px!important}.layui-font-22{font-size:22px!important}.layui-font-24{font-size:24px!important}.layui-font-26{font-size:26px!important}.layui-font-28{font-size:28px!important}.layui-font-30{font-size:30px!important}.layui-font-32{font-size:32px!important}.layui-font-red{color:#ff5722!important}.layui-font-orange{color:#ffb800!important}.layui-font-green{color:#16baaa!important}.layui-font-cyan{color:#2f4056!important}.layui-font-blue{color:#01aaed!important}.layui-font-purple{color:#a233c6!important}.layui-font-black{color:#000!important}.layui-font-gray{color:#c2c2c2!important}.layui-btn{display:inline-block;vertical-align:middle;height:38px;line-height:38px;border:1px solid transparent;padding:0 18px;background-color:#16baaa;color:#fff;white-space:nowrap;text-align:center;font-size:14px;border-radius:2px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.layui-btn:hover{opacity:.8;filter:alpha(opacity=80);color:#fff}.layui-btn:active{opacity:1;filter:alpha(opacity=100)}.layui-btn+.layui-btn{margin-left:10px}.layui-btn-container{word-spacing:-5px}.layui-btn-container .layui-btn{margin-right:10px;margin-bottom:10px;word-spacing:normal}.layui-btn-container .layui-btn+.layui-btn{margin-left:0}.layui-table .layui-btn-container .layui-btn{margin-bottom:9px}.layui-btn-radius{border-radius:100px}.layui-btn .layui-icon{padding:0 2px;vertical-align:middle\0;vertical-align:bottom}.layui-btn-primary{border-color:#d2d2d2;background:0 0;color:#5f5f5f}.layui-btn-primary:hover{border-color:#16baaa;color:#333}.layui-btn-normal{background-color:#1e9fff}.layui-btn-warm{background-color:#ffb800}.layui-btn-danger{background-color:#ff5722}.layui-btn-checked{background-color:#16b777}.layui-btn-disabled,.layui-btn-disabled:active,.layui-btn-disabled:hover{border-color:#eee!important;background-color:#fbfbfb!important;color:#d2d2d2!important;cursor:not-allowed!important;opacity:1}.layui-btn-lg{height:44px;line-height:44px;padding:0 25px;font-size:16px}.layui-btn-sm{height:30px;line-height:30px;padding:0 10px;font-size:12px}.layui-btn-xs{height:22px;line-height:22px;padding:0 5px;font-size:12px}.layui-btn-xs i{font-size:12px!important}.layui-btn-group{display:inline-block;vertical-align:middle;font-size:0}.layui-btn-group .layui-btn{margin-left:0!important;margin-right:0!important;border-left:1px solid rgba(255,255,255,.5);border-radius:0}.layui-btn-group .layui-btn-primary{border-left:none}.layui-btn-group .layui-btn-primary:hover{border-color:#d2d2d2;color:#16baaa}.layui-btn-group .layui-btn:first-child{border-left:none;border-radius:2px 0 0 2px}.layui-btn-group .layui-btn-primary:first-child{border-left:1px solid #d2d2d2}.layui-btn-group .layui-btn:last-child{border-radius:0 2px 2px 0}.layui-btn-group .layui-btn+.layui-btn{margin-left:0}.layui-btn-group+.layui-btn-group{margin-left:10px}.layui-btn-fluid{width:100%}.layui-input,.layui-select,.layui-textarea{height:38px;line-height:1.3;line-height:38px\9;border-width:1px;border-style:solid;background-color:#fff;color:rgba(0,0,0,.85);border-radius:2px}.layui-input::-webkit-input-placeholder,.layui-select::-webkit-input-placeholder,.layui-textarea::-webkit-input-placeholder{line-height:1.3}.layui-input,.layui-textarea{display:block;width:100%;padding-left:10px}.layui-input:hover,.layui-textarea:hover{border-color:#d2d2d2!important}.layui-input:focus,.layui-textarea:focus{border-color:#16b777!important;box-shadow:0 0 0 3px rgba(22,183,119,.08)}.layui-textarea{position:relative;min-height:100px;height:auto;line-height:20px;padding:6px 10px;resize:vertical}.layui-input[disabled],.layui-textarea[disabled]{background-color:#fafafa}.layui-select{padding:0 10px}.layui-form input[type=checkbox],.layui-form input[type=radio],.layui-form select{display:none}.layui-form [lay-ignore]{display:initial}.layui-form-item{position:relative;margin-bottom:15px;clear:both}.layui-form-item:after{content:'\20';clear:both;display:block;height:0}.layui-form-label{position:relative;float:left;display:block;padding:9px 15px;width:80px;font-weight:400;line-height:20px;text-align:right}.layui-form-label-col{display:block;float:none;padding:9px 0;line-height:20px;text-align:left}.layui-form-item .layui-inline{margin-bottom:5px;margin-right:10px}.layui-input-block,.layui-input-inline{position:relative}.layui-input-block{margin-left:110px;min-height:36px}.layui-input-inline{display:inline-block;vertical-align:middle}.layui-form-item .layui-input-inline{float:left;width:190px;margin-right:10px}.layui-form-text .layui-input-inline{width:auto}.layui-form-mid{position:relative;float:left;display:block;padding:9px 0!important;line-height:20px;margin-right:10px}.layui-form-danger+.layui-form-select .layui-input,.layui-form-danger:focus{border-color:#ff5722!important;box-shadow:0 0 0 3px rgba(255,87,34,.08)}.layui-input-prefix,.layui-input-split,.layui-input-suffix,.layui-input-suffix .layui-input-affix{position:absolute;right:0;top:0;padding:0 10px;width:35px;height:100%;text-align:center;transition:all .3s;box-sizing:border-box}.layui-input-prefix{left:0;border-radius:2px 0 0 2px}.layui-input-suffix{right:0;border-radius:0 2px 2px 0}.layui-input-split{border-width:1px;border-style:solid}.layui-input-prefix .layui-icon,.layui-input-split .layui-icon,.layui-input-suffix .layui-icon{position:relative;font-size:16px;color:#5f5f5f;transition:all .3s}.layui-input-group{position:relative;display:table;box-sizing:border-box}.layui-input-group>*{display:table-cell;vertical-align:middle;position:relative}.layui-input-group .layui-input{padding-right:15px}.layui-input-group>.layui-input-prefix{width:auto;border-right:0}.layui-input-group>.layui-input-suffix{width:auto;border-left:0}.layui-input-group .layui-input-split{white-space:nowrap}.layui-input-wrap{position:relative;line-height:38px}.layui-input-wrap .layui-input{padding-right:35px}.layui-input-wrap .layui-input::-ms-clear,.layui-input-wrap .layui-input::-ms-reveal{display:none}.layui-input-wrap .layui-input-prefix+.layui-input,.layui-input-wrap .layui-input-prefix~* .layui-input{padding-left:35px}.layui-input-wrap .layui-input-split+.layui-input,.layui-input-wrap .layui-input-split~* .layui-input{padding-left:45px}.layui-input-wrap .layui-input-prefix~.layui-form-select{position:static}.layui-input-wrap .layui-input-prefix,.layui-input-wrap .layui-input-split,.layui-input-wrap .layui-input-suffix{pointer-events:none}.layui-input-wrap .layui-input:hover+.layui-input-split{border-color:#d2d2d2}.layui-input-wrap .layui-input:focus+.layui-input-split{border-color:#16b777}.layui-input-wrap .layui-input.layui-form-danger:focus+.layui-input-split{border-color:#ff5722}.layui-input-wrap .layui-input-prefix.layui-input-split{border-width:0;border-right-width:1px}.layui-input-wrap .layui-input-suffix.layui-input-split{border-width:0;border-left-width:1px}.layui-input-affix{line-height:38px}.layui-input-suffix .layui-input-affix{right:auto;left:-35px}.layui-input-affix .layui-icon{color:rgba(0,0,0,.8);pointer-events:auto!important;cursor:pointer}.layui-input-affix .layui-icon-clear{color:rgba(0,0,0,.3)}.layui-input-affix .layui-icon:hover{color:rgba(0,0,0,.6)}.layui-input-wrap .layui-input-number{width:24px;padding:0}.layui-input-wrap .layui-input-number .layui-icon{position:absolute;right:0;width:100%;height:50%;line-height:normal;font-size:12px}.layui-input-wrap .layui-input-number .layui-icon:before{position:absolute;left:50%;top:50%;margin-top:-6px;margin-left:-6px}.layui-input-wrap .layui-input-number .layui-icon-up{top:0;border-bottom:1px solid #eee}.layui-input-wrap .layui-input-number .layui-icon-down{bottom:0}.layui-input-wrap .layui-input-number .layui-icon:hover{font-weight:700}.layui-input-wrap .layui-input[type=number]::-webkit-inner-spin-button,.layui-input-wrap .layui-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none!important}.layui-input-wrap .layui-input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.layui-input-wrap .layui-input.layui-input-number-invalid,.layui-input-wrap .layui-input.layui-input-number-out-of-range{color:#ff5722}.layui-form-select{position:relative;color:#5f5f5f}.layui-form-select .layui-input{padding-right:30px;cursor:pointer}.layui-form-select .layui-edge{position:absolute;right:10px;top:50%;margin-top:-3px;cursor:pointer;border-width:6px;border-top-color:#c2c2c2;border-top-style:solid;-webkit-transition:all .3s;transition:all .3s}.layui-form-select dl{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #eee;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:1px 1px 4px rgb(0 0 0 / 8%);box-sizing:border-box}.layui-form-select dl dd,.layui-form-select dl dt{padding:0 10px;line-height:36px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layui-form-select dl dt{font-size:12px;color:#999}.layui-form-select dl dd{cursor:pointer}.layui-form-select dl dd:hover{background-color:#f8f8f8;-webkit-transition:.5s all;transition:.5s all}.layui-form-select .layui-select-group dd{padding-left:20px}.layui-form-select dl dd.layui-select-tips{padding-left:10px!important;color:#999}.layui-form-select dl dd.layui-this{background-color:#f8f8f8;color:#16b777;font-weight:700}.layui-form-select dl dd.layui-disabled{background-color:#fff}.layui-form-selected dl{display:block}.layui-form-selected .layui-edge{margin-top:-9px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.layui-form-selected .layui-edge{margin-top:-3px\0}:root .layui-form-selected .layui-edge{margin-top:-9px\0/IE9}.layui-form-selectup dl{top:auto;bottom:42px}.layui-select-none{margin:5px 0;text-align:center;color:#999}.layui-select-panel-wrap{position:absolute;z-index:99999999}.layui-select-panel-wrap dl{position:relative;display:block;top:0}.layui-select-disabled .layui-disabled{border-color:#eee!important}.layui-select-disabled .layui-edge{border-top-color:#d2d2d2}.layui-form-checkbox{position:relative;display:inline-block;vertical-align:middle;height:30px;line-height:30px;margin-right:10px;padding-right:30px;background-color:#fff;cursor:pointer;font-size:0;-webkit-transition:.1s linear;transition:.1s linear;box-sizing:border-box}.layui-form-checkbox>*{display:inline-block;vertical-align:middle}.layui-form-checkbox>div{padding:0 11px;font-size:14px;border-radius:2px 0 0 2px;background-color:#d2d2d2;color:#fff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.layui-form-checkbox>div>.layui-icon{line-height:normal}.layui-form-checkbox:hover>div{background-color:#c2c2c2}.layui-form-checkbox>i{position:absolute;right:0;top:0;width:30px;height:100%;border:1px solid #d2d2d2;border-left:none;border-radius:0 2px 2px 0;color:#fff;color:rgba(255,255,255,0);font-size:20px;text-align:center;box-sizing:border-box}.layui-form-checkbox:hover>i{border-color:#c2c2c2;color:#c2c2c2}.layui-form-checked,.layui-form-checked:hover{border-color:#16b777}.layui-form-checked:hover>div,.layui-form-checked>div{background-color:#16b777}.layui-form-checked:hover>i,.layui-form-checked>i{color:#16b777}.layui-form-item .layui-form-checkbox{margin-top:4px}.layui-form-checkbox.layui-checkbox-disabled>div{background-color:#eee!important}.layui-form [lay-checkbox]{display:none}.layui-form-checkbox[lay-skin=primary]{height:auto!important;line-height:normal!important;min-width:18px;min-height:18px;border:none!important;margin-right:0;padding-left:24px;padding-right:0;background:0 0}.layui-form-checkbox[lay-skin=primary]>div{margin-top:-1px;padding-left:0;padding-right:15px;line-height:18px;background:0 0;color:#5f5f5f}.layui-form-checkbox[lay-skin=primary]>i{right:auto;left:0;width:16px;height:16px;line-height:14px;border:1px solid #d2d2d2;font-size:12px;border-radius:2px;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-checkbox[lay-skin=primary]:hover>i{border-color:#16b777;color:#fff}.layui-form-checked[lay-skin=primary]>i{border-color:#16b777!important;background-color:#16b777;color:#fff}.layui-checkbox-disabled[lay-skin=primary]>div{background:0 0!important}.layui-form-checked.layui-checkbox-disabled[lay-skin=primary]>i{background:#eee!important;border-color:#eee!important}.layui-checkbox-disabled[lay-skin=primary]:hover>i{border-color:#d2d2d2}.layui-form-item .layui-form-checkbox[lay-skin=primary]{margin-top:10px}.layui-form-checkbox[lay-skin=primary]>.layui-icon-indeterminate{border-color:#16b777}.layui-form-checkbox[lay-skin=primary]>.layui-icon-indeterminate:before{content:'';display:inline-block;vertical-align:middle;position:relative;width:50%;height:1px;margin:-1px auto 0;background-color:#16b777}.layui-form-switch{position:relative;display:inline-block;vertical-align:middle;height:24px;line-height:22px;min-width:44px;padding:0 5px;margin-top:8px;border:1px solid #d2d2d2;border-radius:20px;cursor:pointer;box-sizing:border-box;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch>i{position:absolute;left:5px;top:3px;width:16px;height:16px;border-radius:20px;background-color:#d2d2d2;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch>div{position:relative;top:0;margin-left:21px;padding:0!important;text-align:center!important;color:#999!important;font-style:normal!important;font-size:12px}.layui-form-onswitch{border-color:#16b777;background-color:#16b777}.layui-form-onswitch>i{left:100%;margin-left:-21px;background-color:#fff}.layui-form-onswitch>div{margin-left:0;margin-right:21px;color:#fff!important}.layui-form-checkbox[lay-skin=none] *,.layui-form-radio[lay-skin=none] *{box-sizing:border-box}.layui-form-checkbox[lay-skin=none],.layui-form-radio[lay-skin=none]{position:relative;min-height:20px;margin:0;padding:0;height:auto;line-height:normal}.layui-form-checkbox[lay-skin=none]>div,.layui-form-radio[lay-skin=none]>div{position:relative;top:0;left:0;cursor:pointer;z-index:10;color:inherit;background-color:inherit}.layui-form-checkbox[lay-skin=none]>i,.layui-form-radio[lay-skin=none]>i{display:none}.layui-form-checkbox[lay-skin=none].layui-checkbox-disabled>div,.layui-form-radio[lay-skin=none].layui-radio-disabled>div{cursor:not-allowed}.layui-checkbox-disabled{border-color:#eee!important}.layui-checkbox-disabled>div{color:#c2c2c2!important}.layui-checkbox-disabled>i{border-color:#eee!important}.layui-checkbox-disabled:hover>i{color:#fff!important}.layui-form-checkbox[lay-skin=tag].layui-form-checked.layui-checkbox-disabled>i{color:#c2c2c2}.layui-form-checkbox[lay-skin=tag].layui-form-checked.layui-checkbox-disabled:hover>i{color:#c2c2c2!important}.layui-form-radio{display:inline-block;vertical-align:middle;line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio>*{display:inline-block;vertical-align:middle;font-size:14px}.layui-form-radio>i{margin-right:8px;font-size:22px;color:#c2c2c2}.layui-form-radio:hover>*,.layui-form-radioed,.layui-form-radioed>i{color:#16b777}.layui-radio-disabled>i{color:#eee!important}.layui-radio-disabled>*{color:#c2c2c2!important}.layui-form [lay-radio]{display:none}.layui-form-pane .layui-form-label{width:110px;padding:8px 15px;height:38px;line-height:20px;border-width:1px;border-style:solid;border-radius:2px 0 0 2px;text-align:center;background-color:#fafafa;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box}.layui-form-pane .layui-input-inline{margin-left:-1px}.layui-form-pane .layui-input-block{margin-left:110px;left:-1px}.layui-form-pane .layui-input{border-radius:0 2px 2px 0}.layui-form-pane .layui-form-text .layui-form-label{float:none;width:100%;border-radius:2px;box-sizing:border-box;text-align:left}.layui-form-pane .layui-form-text .layui-input-inline{display:block;margin:0;top:-1px;clear:both}.layui-form-pane .layui-form-text .layui-input-block{margin:0;left:0;top:-1px}.layui-form-pane .layui-form-text .layui-textarea{min-height:100px;border-radius:0 0 2px 2px}.layui-form-pane .layui-form-checkbox{margin:4px 0 4px 10px}.layui-form-pane .layui-form-radio,.layui-form-pane .layui-form-switch{margin-top:6px;margin-left:10px}.layui-form-pane .layui-form-item[pane]{position:relative;border-width:1px;border-style:solid}.layui-form-pane .layui-form-item[pane] .layui-form-label{position:absolute;left:0;top:0;height:100%;border-width:0;border-right-width:1px}.layui-form-pane .layui-form-item[pane] .layui-input-inline{margin-left:110px}@media screen and (max-width:450px){.layui-form-item .layui-form-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-form-item .layui-inline{display:block;margin-right:0;margin-bottom:20px;clear:both}.layui-form-item .layui-inline:after{content:'\20';clear:both;display:block;height:0}.layui-form-item .layui-input-inline{display:block;float:none;left:-3px;width:auto!important;margin:0 0 10px 112px}.layui-form-item .layui-input-inline+.layui-form-mid{margin-left:110px;top:-5px;padding:0}.layui-form-item .layui-form-checkbox{margin-right:5px;margin-bottom:5px}}.layui-laypage{display:inline-block;vertical-align:middle;margin:10px 0;font-size:0}.layui-laypage>a:first-child,.layui-laypage>a:first-child em{border-radius:2px 0 0 2px}.layui-laypage>a:last-child,.layui-laypage>a:last-child em{border-radius:0 2px 2px 0}.layui-laypage>:first-child{margin-left:0!important}.layui-laypage>:last-child{margin-right:0!important}.layui-laypage a,.layui-laypage button,.layui-laypage input,.layui-laypage select,.layui-laypage span{border:1px solid #eee}.layui-laypage a,.layui-laypage span{display:inline-block;vertical-align:middle;padding:0 15px;height:28px;line-height:28px;margin:0 -1px 5px 0;background-color:#fff;color:#333;font-size:12px}.layui-laypage a[data-page]{color:#333}.layui-laypage a{text-decoration:none!important;cursor:pointer}.layui-laypage a:hover{color:#16baaa}.layui-laypage em{font-style:normal}.layui-laypage .layui-laypage-spr{color:#999;font-weight:700}.layui-laypage .layui-laypage-curr{position:relative}.layui-laypage .layui-laypage-curr em{position:relative;color:#fff}.layui-laypage .layui-laypage-curr .layui-laypage-em{position:absolute;left:-1px;top:-1px;padding:1px;width:100%;height:100%;background-color:#16baaa}.layui-laypage-em{border-radius:2px}.layui-laypage-next em,.layui-laypage-prev em{font-family:Sim sun;font-size:16px}.layui-laypage .layui-laypage-count,.layui-laypage .layui-laypage-limits,.layui-laypage .layui-laypage-refresh,.layui-laypage .layui-laypage-skip{margin-left:10px;margin-right:10px;padding:0;border:none}.layui-laypage .layui-laypage-limits,.layui-laypage .layui-laypage-refresh{vertical-align:top}.layui-laypage .layui-laypage-refresh i{font-size:18px;cursor:pointer}.layui-laypage select{height:22px;padding:3px;border-radius:2px;cursor:pointer}.layui-laypage .layui-laypage-skip{height:30px;line-height:30px;color:#999}.layui-laypage button,.layui-laypage input{height:30px;line-height:30px;border-radius:2px;vertical-align:top;background-color:#fff;box-sizing:border-box}.layui-laypage input{display:inline-block;width:40px;margin:0 10px;padding:0 3px;text-align:center;transition:none}.layui-laypage input:focus,.layui-laypage select:focus{border-color:#16baaa!important}.layui-laypage button{margin-left:10px;padding:0 10px;cursor:pointer}.layui-flow-more{margin:10px 0;text-align:center;color:#999;font-size:14px;clear:both}.layui-flow-more a{height:32px;line-height:32px}.layui-flow-more a *{display:inline-block;vertical-align:top}.layui-flow-more a cite{padding:0 20px;border-radius:3px;background-color:#eee;color:#333;font-style:normal}.layui-flow-more a cite:hover{opacity:.8}.layui-flow-more a i{font-size:30px;color:#737383}.layui-table{width:100%;margin:10px 0;background-color:#fff;color:#5f5f5f}.layui-table tr{-webkit-transition:all .3s;transition:all .3s}.layui-table th{text-align:left;font-weight:600}.layui-table-mend{background-color:#fff}.layui-table-click,.layui-table-hover,.layui-table[lay-even] tbody tr:nth-child(even){background-color:#f8f8f8}.layui-table-checked{background-color:#dbfbf0}.layui-table-checked.layui-table-click,.layui-table-checked.layui-table-hover,.layui-table[lay-even] tbody tr:nth-child(even).layui-table-checked{background-color:#abf8dd}.layui-table-disabled-transition *,.layui-table-disabled-transition :after,.layui-table-disabled-transition :before{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}.layui-table td,.layui-table th,.layui-table-col-set,.layui-table-fixed-r,.layui-table-grid-down,.layui-table-header,.layui-table-mend,.layui-table-page,.layui-table-tips-main,.layui-table-tool,.layui-table-total,.layui-table-view,.layui-table[lay-skin=line],.layui-table[lay-skin=row]{border-width:1px;border-style:solid;border-color:#eee}.layui-table td,.layui-table th{position:relative;padding:9px 15px;min-height:20px;line-height:20px;font-size:14px}.layui-table[lay-skin=line] td,.layui-table[lay-skin=line] th{border-width:0;border-bottom-width:1px}.layui-table[lay-skin=row] td,.layui-table[lay-skin=row] th{border-width:0;border-right-width:1px}.layui-table[lay-skin=nob] td,.layui-table[lay-skin=nob] th{border:none}.layui-table img{max-width:100px}.layui-table[lay-size=lg] td,.layui-table[lay-size=lg] th{padding-top:15px;padding-right:30px;padding-bottom:15px;padding-left:30px}.layui-table-view .layui-table[lay-size=lg] .layui-table-cell{height:50px;line-height:40px}.layui-table[lay-size=sm] td,.layui-table[lay-size=sm] th{padding-top:5px;padding-right:10px;padding-bottom:5px;padding-left:10px;font-size:12px}.layui-table-view .layui-table[lay-size=sm] .layui-table-cell{height:30px;line-height:20px;padding-top:5px;padding-left:11px;padding-right:11px}.layui-table[lay-data],.layui-table[lay-options]{display:none}.layui-table-box{position:relative;overflow:hidden}.layui-table-view{clear:both;position:relative;border-right:none}.layui-table-view:after{content:"";position:absolute;top:0;right:0;width:1px;height:100%;background-color:#eee;z-index:101}.layui-table-view .layui-table{position:relative;width:auto;margin:0;border:0;border-collapse:separate}.layui-table-view .layui-table[lay-skin=line]{border-width:0;border-right-width:1px}.layui-table-view .layui-table[lay-skin=row]{border-width:0;border-bottom-width:1px}.layui-table-view .layui-table td,.layui-table-view .layui-table th{padding:0;border-top:none;border-left:none}.layui-table-view .layui-table th [lay-event],.layui-table-view .layui-table th.layui-unselect .layui-table-cell span{cursor:pointer}.layui-table-view .layui-table td,.layui-table-view .layui-table th span{cursor:default}.layui-table-view .layui-table td[data-edit]{cursor:text}.layui-table-view .layui-table td[data-edit]:hover:after{position:absolute;left:0;top:0;width:100%;height:100%;box-sizing:border-box;border:1px solid #16b777;pointer-events:none;content:""}.layui-table-view .layui-form-checkbox[lay-skin=primary] i{width:18px;height:18px;line-height:16px}.layui-table-view .layui-form-radio{line-height:0;padding:0}.layui-table-view .layui-form-radio>i{margin:0;font-size:20px}.layui-table-init{position:absolute;left:0;top:0;right:0;bottom:0;margin:0;z-index:199;transition:opacity .1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.layui-table-loading-icon{position:absolute;width:100%\0;left:50%;left:auto\0;top:50%;margin-top:-15px\0;transform:translate(-50%,-50%);transform:none\0;text-align:center}.layui-table-loading-icon .layui-icon{font-size:30px;color:#c2c2c2}.layui-table-header{border-width:0;border-bottom-width:1px;overflow:hidden}.layui-table-header .layui-table{margin-bottom:-1px}.layui-table-column{position:relative;width:100%;min-height:41px;padding:8px 16px;border-width:0;border-bottom-width:1px}.layui-table-column .layui-btn-container{margin-bottom:-8px}.layui-table-column .layui-btn-container .layui-btn{margin-right:8px;margin-bottom:8px}.layui-table-tool .layui-inline[lay-event]{position:relative;width:26px;height:26px;padding:5px;line-height:16px;margin-right:10px;text-align:center;color:#333;border:1px solid #ccc;cursor:pointer;-webkit-transition:.5s all;transition:.5s all}.layui-table-tool .layui-inline[lay-event]:hover{border:1px solid #999}.layui-table-tool-temp{padding-right:120px}.layui-table-tool-self{position:absolute;right:17px;top:10px}.layui-table-tool .layui-table-tool-self .layui-inline[lay-event]{margin:0 0 0 10px}.layui-table-tool-panel{position:absolute;top:29px;left:-1px;z-index:399;padding:5px 0!important;min-width:150px;min-height:40px;border:1px solid #d2d2d2;text-align:left;overflow-y:auto;background-color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.12)}.layui-table-tool-panel li{padding:0 10px;margin:0!important;line-height:30px;list-style-type:none!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-transition:.5s all;transition:.5s all}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary]{width:100%}.layui-table-tool-panel li:hover{background-color:#f8f8f8}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary]{padding-left:28px}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] i{position:absolute;left:0;top:0}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] span{padding:0}.layui-table-tool .layui-table-tool-self .layui-table-tool-panel{left:auto;right:-1px}.layui-table-col-set{position:absolute;right:0;top:0;width:20px;height:100%;border-width:0;border-left-width:1px;background-color:#fff}.layui-table-sort{width:10px;height:20px;margin-left:5px;cursor:pointer!important}.layui-table-sort .layui-edge{position:absolute;left:5px;border-width:5px}.layui-table-sort .layui-table-sort-asc{top:3px;border-top:none;border-bottom-style:solid;border-bottom-color:#b2b2b2}.layui-table-sort .layui-table-sort-asc:hover{border-bottom-color:#5f5f5f}.layui-table-sort .layui-table-sort-desc{bottom:5px;border-bottom:none;border-top-style:solid;border-top-color:#b2b2b2}.layui-table-sort .layui-table-sort-desc:hover{border-top-color:#5f5f5f}.layui-table-sort[lay-sort=asc] .layui-table-sort-asc{border-bottom-color:#000}.layui-table-sort[lay-sort=desc] .layui-table-sort-desc{border-top-color:#000}.layui-table-cell{height:38px;line-height:28px;padding:6px 15px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.layui-table-cell .layui-form-checkbox[lay-skin=primary]{top:-1px;padding:0}.layui-table-cell .layui-form-checkbox[lay-skin=primary]>div{padding-left:24px}.layui-table-cell .layui-table-link{color:#01aaed}.layui-table-cell .layui-btn{vertical-align:inherit}.layui-table-cell[align=center]{-webkit-box-pack:center}.layui-table-cell[align=right]{-webkit-box-pack:end}.laytable-cell-checkbox,.laytable-cell-numbers,.laytable-cell-radio,.laytable-cell-space{text-align:center;-webkit-box-pack:center}.layui-table-body{position:relative;overflow:auto;margin-bottom:-1px}.layui-table-body .layui-none{line-height:26px;padding:30px 15px;text-align:center;color:#999}.layui-table-fixed{position:absolute;left:0;top:0;z-index:101}.layui-table-fixed .layui-table-body{overflow:hidden}.layui-table-fixed-l{box-shadow:1px 0 8px rgba(0,0,0,.08)}.layui-table-fixed-r{left:auto;right:0;border-width:0;border-left-width:1px;box-shadow:-1px 0 8px rgba(0,0,0,.08)}.layui-table-fixed-r .layui-table-header{position:relative;overflow:visible}.layui-table-mend{position:absolute;right:-49px;top:0;height:100%;width:50px;border-width:0;border-left-width:1px}.layui-table-tool{position:relative;width:100%;min-height:50px;line-height:30px;padding:10px 15px;border-width:0;border-bottom-width:1px}.layui-table-tool .layui-btn-container{margin-bottom:-10px}.layui-table-total{margin-bottom:-1px;border-width:0;border-top-width:1px;overflow:hidden}.layui-table-page{border-width:0;border-top-width:1px;margin-bottom:-1px;white-space:nowrap;overflow:hidden}.layui-table-page>div{height:26px}.layui-table-page .layui-laypage{margin:0}.layui-table-page .layui-laypage a,.layui-table-page .layui-laypage span{height:26px;line-height:26px;margin-bottom:10px;border:none;background:0 0}.layui-table-page .layui-laypage a,.layui-table-page .layui-laypage span.layui-laypage-curr{padding:0 12px}.layui-table-page .layui-laypage span{margin-left:0;padding:0}.layui-table-page .layui-laypage .layui-laypage-prev{margin-left:-11px!important}.layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em{left:0;top:0;padding:0}.layui-table-page .layui-laypage button,.layui-table-page .layui-laypage input{height:26px;line-height:26px}.layui-table-page .layui-laypage input{width:40px}.layui-table-page .layui-laypage button{padding:0 10px}.layui-table-page select{height:18px}.layui-table-pagebar{float:right;line-height:23px}.layui-table-pagebar .layui-btn-sm{margin-top:-1px}.layui-table-pagebar .layui-btn-xs{margin-top:2px}.layui-table-view select[lay-ignore]{display:inline-block}.layui-table-patch .layui-table-cell{padding:0;width:30px}.layui-table-edit{position:absolute;left:0;top:0;z-index:189;min-width:100%;min-height:100%;padding:5px 14px;border-radius:0;box-shadow:1px 1px 20px rgba(0,0,0,.15);background-color:#fff}.layui-table-edit:focus{border-color:#16b777!important}input.layui-input.layui-table-edit{height:100%}select.layui-table-edit{padding:0 0 0 10px;border-color:#d2d2d2}.layui-table-view .layui-form-checkbox,.layui-table-view .layui-form-radio,.layui-table-view .layui-form-switch{top:0;margin:0}.layui-table-view .layui-form-checkbox{top:-1px;height:26px;line-height:26px}.layui-table-view .layui-form-checkbox i{height:26px}.layui-table-grid .layui-table-cell{overflow:visible}.layui-table-grid-down{position:absolute;top:0;right:0;width:24px;height:100%;padding:5px 0;border-width:0;border-left-width:1px;text-align:center;background-color:#fff;color:#999;cursor:pointer}.layui-table-grid-down .layui-icon{position:absolute;top:50%;left:50%;margin:-8px 0 0 -8px;font-size:14px}.layui-table-grid-down:hover{background-color:#fbfbfb}.layui-table-expanded{height:95px}.layui-table-expanded .layui-table-cell,.layui-table-view .layui-table[lay-size=lg] .layui-table-expanded .layui-table-cell,.layui-table-view .layui-table[lay-size=sm] .layui-table-expanded .layui-table-cell{height:auto;max-height:94px;white-space:normal;text-overflow:clip}.layui-table-cell-c{position:absolute;bottom:-10px;right:50%;margin-right:-9px;width:20px;height:20px;line-height:18px;cursor:pointer;text-align:center;background-color:#fff;border:1px solid #eee;border-radius:50%;z-index:1000;transition:.3s all;font-size:14px}.layui-table-cell-c:hover{border-color:#16b777}.layui-table-expanded td:hover .layui-table-cell{overflow:auto}.layui-table-main>.layui-table>tbody>tr:last-child>td>.layui-table-cell-c{bottom:0}body .layui-table-tips .layui-layer-content{background:0 0;padding:0;box-shadow:0 1px 6px rgba(0,0,0,.12)}.layui-table-tips-main{margin:-49px 0 0 -1px;max-height:150px;padding:8px 15px;font-size:14px;overflow-y:scroll;background-color:#fff;color:#5f5f5f}.layui-table-tips-c{position:absolute;right:-3px;top:-13px;width:20px;height:20px;padding:3px;cursor:pointer;background-color:#5f5f5f;border-radius:50%;color:#fff}.layui-table-tips-c:hover{background-color:#777}.layui-table-tips-c:before{position:relative;right:-2px}.layui-table-tree-nodeIcon{max-width:20px}.layui-table-tree-nodeIcon>*{width:100%}.layui-table-tree-flexIcon,.layui-table-tree-nodeIcon{margin-right:2px}.layui-table-tree-flexIcon{cursor:pointer}.layui-upload-file{display:none!important;opacity:.01;filter:Alpha(opacity=1)}.layui-upload-list{margin:11px 0}.layui-upload-choose{max-width:200px;padding:0 10px;color:#999;font-size:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-upload-drag{position:relative;display:inline-block;padding:30px;border:1px dashed #e2e2e2;background-color:#fff;text-align:center;cursor:pointer;color:#999}.layui-upload-drag .layui-icon{font-size:50px;color:#16baaa}.layui-upload-drag[lay-over]{border-color:#16baaa}.layui-upload-form{display:inline-block}.layui-upload-iframe{position:absolute;width:0;height:0;border:0;visibility:hidden}.layui-upload-wrap{position:relative;display:inline-block;vertical-align:middle}.layui-upload-wrap .layui-upload-file{display:block!important;position:absolute;left:0;top:0;z-index:10;font-size:100px;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-btn-container .layui-upload-choose{padding-left:0}.layui-menu{position:relative;margin:5px 0;background-color:#fff;box-sizing:border-box}.layui-menu *{box-sizing:border-box}.layui-menu li,.layui-menu-body-title,.layui-menu-body-title a{padding:5px 15px;color:initial}.layui-menu li{position:relative;margin:0 0 1px;line-height:26px;color:rgba(0,0,0,.8);font-size:14px;white-space:nowrap;cursor:pointer;transition:all .3s}.layui-menu li:hover{background-color:#f8f8f8}.layui-menu li.layui-disabled,.layui-menu li.layui-disabled *{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important}.layui-menu-item-parent:hover>.layui-menu-body-panel{display:block;animation-name:layui-fadein;animation-duration:.3s;animation-fill-mode:both;animation-delay:.2s}.layui-menu-item-group>.layui-menu-body-title,.layui-menu-item-parent>.layui-menu-body-title{padding-right:38px}.layui-menu .layui-menu-item-divider:hover,.layui-menu .layui-menu-item-group:hover,.layui-menu .layui-menu-item-none:hover{background:0 0;cursor:default}.layui-menu .layui-menu-item-group>ul{margin:5px 0 -5px}.layui-menu .layui-menu-item-group>.layui-menu-body-title{color:rgba(0,0,0,.35);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.layui-menu .layui-menu-item-none{color:rgba(0,0,0,.35);cursor:default}.layui-menu .layui-menu-item-none{text-align:center}.layui-menu .layui-menu-item-divider{margin:5px 0;padding:0;height:0;line-height:0;border-bottom:1px solid #eee;overflow:hidden}.layui-menu .layui-menu-item-down:hover,.layui-menu .layui-menu-item-up:hover{cursor:pointer}.layui-menu .layui-menu-item-up>.layui-menu-body-title{color:rgba(0,0,0,.8)}.layui-menu .layui-menu-item-up>ul{visibility:hidden;height:0;overflow:hidden}.layui-menu .layui-menu-item-down>.layui-menu-body-title>.layui-icon-down{transform:rotate(180deg)}.layui-menu .layui-menu-item-up>.layui-menu-body-title>.layui-icon-up{transform:rotate(-180deg)}.layui-menu .layui-menu-item-down:hover>.layui-menu-body-title>.layui-icon,.layui-menu .layui-menu-item-up>.layui-menu-body-title:hover>.layui-icon{color:#000}.layui-menu .layui-menu-item-down>ul{visibility:visible;height:auto}.layui-menu .layui-menu-item-checked,.layui-menu .layui-menu-item-checked2{background-color:#f8f8f8!important;color:#16b777}.layui-menu .layui-menu-item-checked a,.layui-menu .layui-menu-item-checked2 a{color:#16b777}.layui-menu .layui-menu-item-checked:after{position:absolute;right:-1px;top:0;bottom:0;border-right:3px solid #16b777;content:""}.layui-menu-body-title{position:relative;margin:-5px -15px;overflow:hidden;text-overflow:ellipsis}.layui-menu-body-title a{display:block;margin:-5px -15px;color:rgba(0,0,0,.8)}.layui-menu-body-title a:hover{transition:all .3s}.layui-menu-body-title>.layui-icon{position:absolute;right:15px;top:50%;margin-top:-6px;line-height:normal;font-size:14px;-webkit-transition:all .2s;transition:all .2s}.layui-menu-body-title>.layui-icon:hover{transition:all .3s}.layui-menu-body-title>.layui-icon-right{right:14px}.layui-menu-body-panel{display:none;position:absolute;top:-7px;left:100%;z-index:1000;margin-left:13px;padding:5px 0}.layui-menu-body-panel:before{content:"";position:absolute;width:20px;left:-16px;top:0;bottom:0}.layui-menu-body-panel-left{left:auto;right:100%;margin:0 13px 0}.layui-menu-body-panel-left:before{left:auto;right:-16px}.layui-menu-lg li{line-height:32px}.layui-menu-lg .layui-menu-body-title a:hover,.layui-menu-lg li:hover{background:0 0;color:#16b777}.layui-menu-lg li .layui-menu-body-panel{margin-left:14px}.layui-menu-lg li .layui-menu-body-panel-left{margin:0 15px 0}.layui-dropdown{position:absolute;left:-999999px;top:-999999px;z-index:77777777;margin:5px 0;min-width:100px}.layui-dropdown:before{content:"";position:absolute;width:100%;height:6px;left:0;top:-6px}.layui-dropdown-shade{top:0;left:0;width:100%;height:100%;position:fixed;pointer-events:auto}.layui-tabs{position:relative}.layui-tabs.layui-hide-v{overflow:hidden}.layui-tabs-header{position:relative;left:0;height:40px;padding:0!important;white-space:nowrap;font-size:0;-webkit-transition:all .16s;transition:all .16s}.layui-tabs-header:after,.layui-tabs-scroll:after{content:"";position:absolute;left:0;bottom:0;z-index:0;width:100%;border-bottom:1px solid #eee}.layui-tabs-header li{position:relative;display:inline-block;vertical-align:middle;line-height:40px;margin:0!important;padding:0 16px;text-align:center;cursor:pointer;font-size:14px;-webkit-transition:all .16s;transition:all .16s}.layui-tabs-header li:first-child{margin-left:0}.layui-tabs-header li a{display:block;padding:0 16px;margin:0 -16px;color:inherit}.layui-tabs-header li a:hover{text-decoration:none}.layui-tabs-header .layui-this,.layui-tabs-header li:hover{color:#16baaa}.layui-tabs-header .layui-this:after{content:"";position:absolute;left:0;top:0;z-index:1;width:100%;height:100%;border-bottom:3px solid #16baaa;box-sizing:border-box;pointer-events:none}.layui-tabs-header .layui-badge,.layui-tabs-header .layui-badge-dot{left:5px;top:-1px}.layui-tabs-scroll{position:relative;overflow:hidden;padding:0 40px}.layui-tabs-scroll .layui-tabs-header:after{display:none;content:none;border:0}.layui-tabs-bar .layui-icon{position:absolute;left:0;top:0;z-index:3;width:40px;height:100%;line-height:40px;border:1px solid #eee;text-align:center;cursor:pointer;box-sizing:border-box;background-color:#fff;box-shadow:2px 0 5px 0 rgb(0 0 0 / 6%)}.layui-tabs-bar .layui-icon-next{left:auto;right:0;box-shadow:-2px 0 5px 0 rgb(0 0 0 / 6%)}.layui-tabs-header li .layui-tabs-close{position:relative;display:inline-block;width:16px;height:16px;line-height:18px;margin-left:8px;top:0;text-align:center;font-size:12px;color:#959595;border-radius:50%;font-weight:700;-webkit-transition:all .16s;transition:all .16s}.layui-tabs-header li .layui-tabs-close:hover{background-color:#ff5722;color:#fff}.layui-tabs-header li[lay-closable=false] .layui-tabs-close{display:none}.layui-tabs-body{padding:16px 0}.layui-tabs-item{display:none}.layui-tabs-card>.layui-tabs-header .layui-this{background-color:#fff}.layui-tabs-card>.layui-tabs-header .layui-this:after{border:1px solid #eee;border-bottom-color:#fff;border-radius:2px 2px 0 0}.layui-tabs-card>.layui-tabs-header li:first-child.layui-this:after{margin-left:-1px}.layui-tabs-card>.layui-tabs-header li:last-child.layui-this:after{margin-right:-1px}.layui-tabs-card.layui-panel>.layui-tabs-header .layui-this:after{border-top:0;border-radius:0}.layui-tabs-card.layui-panel>.layui-tabs-body{padding:16px}.layui-nav{position:relative;padding:0 15px;background-color:#2f363c;color:#fff;border-radius:2px;font-size:0;box-sizing:border-box}.layui-nav *{font-size:14px}.layui-nav .layui-nav-item{position:relative;display:inline-block;margin-top:0;list-style:none;vertical-align:middle;line-height:60px}.layui-nav .layui-nav-item a{display:block;padding:0 20px;color:#fff;color:rgba(255,255,255,.7);-webkit-transition:all .3s;transition:all .3s}.layui-nav .layui-this:after,.layui-nav-bar{content:"";position:absolute;left:0;top:0;width:0;height:3px;background-color:#16b777;-webkit-transition:all .2s;transition:all .2s;pointer-events:none}.layui-nav-bar{z-index:1000}.layui-nav[lay-bar=disabled] .layui-nav-bar{display:none}.layui-nav .layui-nav-item a:hover,.layui-nav .layui-this a{color:#fff;text-decoration:none}.layui-nav .layui-this:after{top:auto;bottom:0;width:100%}.layui-nav-img{width:30px;height:30px;margin-right:10px;border-radius:50%}.layui-nav .layui-nav-more{position:absolute;top:0;right:3px;left:auto!important;margin-top:0;font-size:12px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s}.layui-nav .layui-nav-mored,.layui-nav-itemed>a .layui-nav-more{transform:rotate(180deg)}.layui-nav-child{display:none;position:absolute;left:0;top:65px;min-width:100%;line-height:36px;padding:5px 0;box-shadow:0 2px 4px rgba(0,0,0,.12);border:1px solid #eee;background-color:#fff;z-index:100;border-radius:2px;white-space:nowrap;box-sizing:border-box}.layui-nav .layui-nav-child a{color:#5f5f5f;color:rgba(0,0,0,.8)}.layui-nav .layui-nav-child a:hover{background-color:#f8f8f8;color:rgba(0,0,0,.8)}.layui-nav-child dd{margin:1px 0;position:relative}.layui-nav-child dd.layui-this{background-color:#f8f8f8;color:#000}.layui-nav-child dd.layui-this:after{display:none}.layui-nav-child-r{left:auto;right:0}.layui-nav-child-c{text-align:center}.layui-nav.layui-nav-tree{width:200px;padding:0}.layui-nav-tree .layui-nav-item{display:block;width:100%;line-height:40px}.layui-nav-tree .layui-nav-item a{position:relative;height:40px;line-height:40px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-nav-tree .layui-nav-item>a{padding-top:5px;padding-bottom:5px}.layui-nav-tree .layui-nav-more{right:15px}.layui-nav-tree .layui-nav-item>a .layui-nav-more{padding:5px 0}.layui-nav-tree .layui-nav-bar{width:5px;height:0}.layui-side .layui-nav-tree .layui-nav-bar{width:2px}.layui-nav-tree .layui-nav-child dd.layui-this,.layui-nav-tree .layui-nav-child dd.layui-this a,.layui-nav-tree .layui-this,.layui-nav-tree .layui-this>a,.layui-nav-tree .layui-this>a:hover{background-color:#16baaa;color:#fff}.layui-nav-tree .layui-this:after{display:none}.layui-nav-itemed>a,.layui-nav-tree .layui-nav-title a,.layui-nav-tree .layui-nav-title a:hover{color:#fff!important}.layui-nav-tree .layui-nav-bar{background-color:#16baaa}.layui-nav-tree .layui-nav-child{position:relative;z-index:0;top:0;border:none;background:0 0;background-color:rgba(0,0,0,.3);box-shadow:none}.layui-nav-tree .layui-nav-child dd{margin:0}.layui-nav-tree .layui-nav-child a{color:#fff;color:rgba(255,255,255,.7)}.layui-nav-tree .layui-nav-child a:hover{background:0 0;color:#fff}.layui-nav-itemed>.layui-nav-child,.layui-nav-itemed>.layui-nav-child>.layui-this>.layui-nav-child{display:block}.layui-nav-side{position:fixed;top:0;bottom:0;left:0;overflow-x:hidden;z-index:999}.layui-nav-tree.layui-bg-gray a,.layui-nav.layui-bg-gray .layui-nav-item a{color:#373737;color:rgba(0,0,0,.8)}.layui-nav-tree.layui-bg-gray .layui-nav-itemed>a{color:#000!important}.layui-nav.layui-bg-gray .layui-this a{color:#16b777}.layui-nav-tree.layui-bg-gray .layui-nav-child{padding-left:11px;background:0 0}.layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this,.layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this a,.layui-nav-tree.layui-bg-gray .layui-this,.layui-nav-tree.layui-bg-gray .layui-this>a{background:0 0!important;color:#16b777!important;font-weight:700}.layui-nav-tree.layui-bg-gray .layui-nav-bar{background-color:#16b777}.layui-breadcrumb{visibility:hidden;font-size:0}.layui-breadcrumb>*{font-size:14px}.layui-breadcrumb a{color:#999!important}.layui-breadcrumb a:hover{color:#16b777!important}.layui-breadcrumb a cite{color:#5f5f5f;font-style:normal}.layui-breadcrumb span[lay-separator]{margin:0 10px;color:#999}.layui-tab{margin:10px 0;text-align:left!important}.layui-tab[overflow]>.layui-tab-title{overflow:hidden}.layui-tab .layui-tab-title{position:relative;left:0;height:40px;white-space:nowrap;font-size:0;-webkit-transition:all .2s;transition:all .2s}.layui-tab .layui-tab-title:after{content:"";border-bottom-color:#eee;border-bottom-width:1px;border-style:none none solid;bottom:0;left:0;right:auto;top:auto;pointer-events:none;position:absolute;width:100%;z-index:8}.layui-tab .layui-tab-title li{display:inline-block;vertical-align:middle;font-size:14px;-webkit-transition:all .2s;transition:all .2s}.layui-tab .layui-tab-title li{position:relative;line-height:40px;min-width:65px;margin:0;padding:0 15px;text-align:center;cursor:pointer}.layui-tab .layui-tab-title li a{display:block;padding:0 15px;margin:0 -15px}.layui-tab-title .layui-this{color:#000}.layui-tab-title .layui-this:after{position:absolute;left:0;top:0;content:"";width:100%;height:40px;border-width:1px;border-bottom-width:1px;border-style:solid;border-bottom-color:#fff;border-radius:2px 2px 0 0;box-sizing:border-box;pointer-events:none;z-index:9}.layui-tab-bar{box-sizing:border-box;position:absolute;right:0;top:0;z-index:10;width:30px;height:40px;line-height:40px;border-width:1px;border-style:solid;border-radius:2px;text-align:center;background-color:#fff;cursor:pointer}.layui-tab-bar .layui-icon{position:relative;display:inline-block;top:3px;-webkit-transition:all .3s;transition:all .3s}.layui-tab-item{display:none}.layui-tab-more{padding-right:30px;height:auto!important;white-space:normal!important}.layui-tab-more li.layui-this:after{border-bottom-color:#eee;border-radius:2px}.layui-tab-more .layui-tab-bar .layui-icon{top:-2px;top:3px\0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root .layui-tab-more .layui-tab-bar .layui-icon{top:-2px\0/IE9}.layui-tab-content{padding:15px 0}.layui-tab-title li .layui-tab-close{position:relative;display:inline-block;width:18px;height:18px;line-height:20px;margin-left:8px;top:1px;text-align:center;font-size:14px;color:#c2c2c2;-webkit-transition:all .2s;transition:all .2s}.layui-tab-title li .layui-tab-close:hover{border-radius:2px;background-color:#ff5722;color:#fff}.layui-tab-brief>.layui-tab-title .layui-this{color:#16baaa}.layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after{border:none;border-radius:0;border-bottom:2px solid #16b777}.layui-tab-card{border-width:1px;border-style:solid;border-radius:2px;box-shadow:0 2px 5px 0 rgba(0,0,0,.1)}.layui-tab-card>.layui-tab-title{background-color:#fafafa}.layui-tab-card>.layui-tab-title li{margin-right:-1px;margin-left:-1px}.layui-tab-card>.layui-tab-title .layui-this{background-color:#fff}.layui-tab-card>.layui-tab-title .layui-this:after{border-top:none;border-width:1px;border-bottom-color:#fff}.layui-tab-card>.layui-tab-title .layui-tab-bar{height:40px;line-height:40px;border-radius:0;border-top:none;border-right:none}.layui-tab-card>.layui-tab-more .layui-this{background:0 0;color:#16b777}.layui-tab-card>.layui-tab-more .layui-this:after{border:none}.layui-timeline{padding-left:5px}.layui-timeline-item{position:relative;padding-bottom:20px}.layui-timeline-axis{position:absolute;left:-5px;top:0;z-index:10;width:20px;height:20px;line-height:20px;background-color:#fff;color:#16b777;border-radius:50%;text-align:center;cursor:pointer}.layui-timeline-axis:hover{color:#ff5722}.layui-timeline-item:before{content:"";position:absolute;left:5px;top:0;z-index:0;width:1px;height:100%}.layui-timeline-item:first-child:before{display:block}.layui-timeline-item:last-child:before{display:none}.layui-timeline-content{padding-left:25px}.layui-timeline-title{position:relative;margin-bottom:10px;line-height:22px}.layui-badge,.layui-badge-dot,.layui-badge-rim{position:relative;display:inline-block;padding:0 6px;font-size:12px;text-align:center;background-color:#ff5722;color:#fff;border-radius:2px}.layui-badge{height:18px;line-height:18px}.layui-badge-dot{width:8px;height:8px;padding:0;border-radius:50%}.layui-badge-rim{height:18px;line-height:18px;border-width:1px;border-style:solid;background-color:#fff;color:#5f5f5f}.layui-btn .layui-badge,.layui-btn .layui-badge-dot{margin-left:5px}.layui-nav .layui-badge,.layui-nav .layui-badge-dot{position:absolute;top:50%;margin:-5px 6px 0}.layui-nav .layui-badge{margin-top:-10px}.layui-tab-title .layui-badge,.layui-tab-title .layui-badge-dot{left:5px;top:-2px}.layui-carousel{position:relative;left:0;top:0;background-color:#f8f8f8}.layui-carousel>[carousel-item]{position:relative;width:100%;height:100%;overflow:hidden}.layui-carousel>[carousel-item]:before{position:absolute;content:'\e63d';left:50%;top:50%;width:100px;line-height:20px;margin:-10px 0 0 -50px;text-align:center;color:#c2c2c2;font-family:layui-icon!important;font-size:30px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-carousel>[carousel-item]>*{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f8f8f8;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-updown>*{-webkit-transition:.3s ease-in-out up;transition:.3s ease-in-out up}.layui-carousel-arrow{display:none\0;opacity:0;position:absolute;left:10px;top:50%;margin-top:-18px;width:36px;height:36px;line-height:36px;text-align:center;font-size:20px;border:none 0;border-radius:50%;background-color:rgba(0,0,0,.2);color:#fff;-webkit-transition-duration:.3s;transition-duration:.3s;cursor:pointer}.layui-carousel-arrow[lay-type=add]{left:auto!important;right:10px}.layui-carousel[lay-arrow=always] .layui-carousel-arrow{opacity:1;left:20px}.layui-carousel[lay-arrow=always] .layui-carousel-arrow[lay-type=add]{right:20px}.layui-carousel[lay-arrow=none] .layui-carousel-arrow{display:none}.layui-carousel-arrow:hover,.layui-carousel-ind ul:hover{background-color:rgba(0,0,0,.35)}.layui-carousel:hover .layui-carousel-arrow{display:block\0;opacity:1;left:20px}.layui-carousel:hover .layui-carousel-arrow[lay-type=add]{right:20px}.layui-carousel-ind{position:relative;top:-35px;width:100%;line-height:0!important;text-align:center;font-size:0}.layui-carousel[lay-indicator=outside]{margin-bottom:30px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind{top:10px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind ul{background-color:rgba(0,0,0,.5)}.layui-carousel[lay-indicator=none] .layui-carousel-ind{display:none}.layui-carousel-ind ul{display:inline-block;padding:5px;background-color:rgba(0,0,0,.2);border-radius:10px;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind ul li{display:inline-block;width:10px;height:10px;margin:0 3px;font-size:14px;background-color:#eee;background-color:rgba(255,255,255,.5);border-radius:50%;cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind ul li:hover{background-color:rgba(255,255,255,.7)}.layui-carousel-ind ul li.layui-this{background-color:#fff}.layui-carousel>[carousel-item]>.layui-carousel-next,.layui-carousel>[carousel-item]>.layui-carousel-prev,.layui-carousel>[carousel-item]>.layui-this{display:block}.layui-carousel>[carousel-item]>.layui-this{-webkit-transform:translateX(0);transform:translateX(0)}.layui-carousel>[carousel-item]>.layui-carousel-prev{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.layui-carousel>[carousel-item]>.layui-carousel-next{-webkit-transform:translateX(100%);transform:translateX(100%)}.layui-carousel>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel>[carousel-item]>.layui-carousel-prev.layui-carousel-right{-webkit-transform:translateX(0);transform:translateX(0)}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.layui-carousel[lay-anim=updown] .layui-carousel-arrow{left:50%!important;top:20px;margin:0 0 0 -18px}.layui-carousel[lay-anim=updown] .layui-carousel-arrow[lay-type=add]{top:auto!important;bottom:20px}.layui-carousel[lay-anim=updown] .layui-carousel-ind{position:absolute;top:50%;right:20px;width:auto;height:auto}.layui-carousel[lay-anim=updown] .layui-carousel-ind ul{padding:3px 5px}.layui-carousel[lay-anim=updown] .layui-carousel-ind li{display:block;margin:6px 0}.layui-carousel[lay-anim=updown]>[carousel-item]>*{left:0!important}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this{-webkit-transform:translateY(0);transform:translateY(0)}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next{-webkit-transform:translateY(100%);transform:translateY(100%)}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{-webkit-transform:translateY(0);transform:translateY(0)}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-left{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-right{-webkit-transform:translateY(100%);transform:translateY(100%)}.layui-carousel[lay-anim=fade]>[carousel-item]>*{left:0!important}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev{opacity:0}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{opacity:1}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-right{opacity:0}.layui-fixbar{position:fixed;right:16px;bottom:16px;z-index:999999}.layui-fixbar li{width:50px;height:50px;line-height:50px;margin-bottom:1px;text-align:center;cursor:pointer;font-size:30px;background-color:#9f9f9f;color:#fff;border-radius:2px;opacity:.95}.layui-fixbar li:hover{opacity:.85}.layui-fixbar li:active{opacity:1}.layui-fixbar .layui-fixbar-top{display:none;font-size:40px}body .layui-util-face{border:none;background:0 0}body .layui-util-face .layui-layer-content{padding:0;background-color:#fff;color:#5f5f5f;box-shadow:none}.layui-util-face .layui-layer-TipsG{display:none}.layui-util-face ul{position:relative;width:372px;padding:10px;border:1px solid #d9d9d9;background-color:#fff;box-shadow:0 0 20px rgba(0,0,0,.2)}.layui-util-face ul li{cursor:pointer;float:left;border:1px solid #e8e8e8;height:22px;width:26px;overflow:hidden;margin:-1px 0 0 -1px;padding:4px 2px;text-align:center}.layui-util-face ul li:hover{position:relative;z-index:2;border:1px solid #eb7350;background:#fff9ec}.layui-code{display:block;position:relative;padding:15px;line-height:20px;border:1px solid #eee;border-left-width:6px;background-color:#fff;color:#333;font-family:"Courier New",Consolas,"Lucida Console",monospace;font-size:12px}.layui-transfer-box,.layui-transfer-header,.layui-transfer-search{border-width:0;border-style:solid;border-color:#eee}.layui-transfer-box{position:relative;display:inline-block;vertical-align:middle;border-width:1px;width:200px;height:360px;border-radius:2px;background-color:#fff}.layui-transfer-box .layui-form-checkbox{width:100%;margin:0!important}.layui-transfer-header{height:38px;line-height:38px;padding:0 11px;border-bottom-width:1px}.layui-transfer-search{position:relative;padding:11px;border-bottom-width:1px}.layui-transfer-search .layui-input{height:32px;padding-left:30px;font-size:12px}.layui-transfer-search .layui-icon-search{position:absolute;left:20px;top:50%;line-height:normal;margin-top:-8px;color:#5f5f5f}.layui-transfer-active{margin:0 15px;display:inline-block;vertical-align:middle}.layui-transfer-active .layui-btn{display:block;margin:0;padding:0 15px;background-color:#16b777;border-color:#16b777;color:#fff}.layui-transfer-active .layui-btn-disabled{background-color:#fbfbfb;border-color:#eee;color:#d2d2d2}.layui-transfer-active .layui-btn:first-child{margin-bottom:15px}.layui-transfer-active .layui-btn .layui-icon{margin:0;font-size:14px!important}.layui-transfer-data{padding:5px 0;overflow:auto}.layui-transfer-data li{height:32px;line-height:32px;margin-top:0!important;padding:0 11px;list-style-type:none!important}.layui-transfer-data li:hover{background-color:#f8f8f8;transition:.5s all}.layui-transfer-data .layui-none{padding:15px 11px;text-align:center;color:#999}.layui-rate,.layui-rate *{display:inline-block;vertical-align:middle}.layui-rate{padding:11px 6px 11px 0;font-size:0}.layui-rate li{margin-top:0!important}.layui-rate li i.layui-icon{font-size:20px;color:#ffb800}.layui-rate li i.layui-icon{margin-right:5px;-webkit-transition:all .3s;transition:all .3s}.layui-rate li i:hover,.layui-rate-hover{cursor:pointer;-webkit-transform:scale(1.12);transform:scale(1.12)}.layui-rate[readonly] li i:hover{cursor:default;transform:scale(1)}.layui-colorpicker{width:38px;height:38px;border:1px solid #eee;padding:5px;border-radius:2px;line-height:24px;display:inline-block;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;box-sizing:border-box}.layui-colorpicker:hover{border-color:#d2d2d2}.layui-colorpicker.layui-colorpicker-lg{width:44px;height:44px;line-height:30px}.layui-colorpicker.layui-colorpicker-sm{width:30px;height:30px;line-height:20px;padding:3px}.layui-colorpicker.layui-colorpicker-xs{width:22px;height:22px;line-height:16px;padding:1px}.layui-colorpicker-trigger-bgcolor{display:block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);border-radius:2px}.layui-colorpicker-trigger-span{display:block;height:100%;box-sizing:border-box;border:1px solid rgba(0,0,0,.15);border-radius:2px;text-align:center}.layui-colorpicker-trigger-i{display:inline-block;color:#fff;font-size:12px}.layui-colorpicker-trigger-i.layui-icon-close{color:#999}.layui-colorpicker-main{position:absolute;left:-999999px;top:-999999px;z-index:77777777;width:280px;margin:5px 0;padding:7px;background:#fff;border:1px solid #d2d2d2;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12)}.layui-colorpicker-main-wrapper{height:180px;position:relative}.layui-colorpicker-basis{width:260px;height:100%;position:relative;overflow:hidden}.layui-colorpicker-basis-white{width:100%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.layui-colorpicker-basis-black{width:100%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(0deg,#000,transparent)}.layui-colorpicker-basis-cursor{width:10px;height:10px;border:1px solid #fff;border-radius:50%;position:absolute;top:0;right:100%;cursor:pointer;transform:translate(-50%,-50%)}.layui-colorpicker-side{position:absolute;top:0;right:0;width:12px;height:100%;background:linear-gradient(red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.layui-colorpicker-side-slider{width:100%;height:5px;box-shadow:0 0 1px #888;box-sizing:border-box;background:#fff;border-radius:1px;border:1px solid #f0f0f0;cursor:pointer;position:absolute;left:0}.layui-colorpicker-main-alpha{display:none;height:12px;margin-top:7px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.layui-colorpicker-alpha-bgcolor{height:100%;position:relative}.layui-colorpicker-alpha-slider{width:5px;height:100%;box-shadow:0 0 1px #888;box-sizing:border-box;background:#fff;border-radius:1px;border:1px solid #f0f0f0;cursor:pointer;position:absolute;top:0}.layui-colorpicker-main-pre{padding-top:7px;font-size:0}.layui-colorpicker-pre{width:20px;height:20px;border-radius:2px;display:inline-block;margin-left:6px;margin-bottom:7px;cursor:pointer}.layui-colorpicker-pre:nth-child(11n+1){margin-left:0}.layui-colorpicker-pre-isalpha{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.layui-colorpicker-pre.layui-this{box-shadow:0 0 3px 2px rgba(0,0,0,.15)}.layui-colorpicker-pre>div{height:100%;border-radius:2px}.layui-colorpicker-main-input{text-align:right;padding-top:7px}.layui-colorpicker-main-input .layui-btn-container .layui-btn{margin:0 0 0 10px}.layui-colorpicker-main-input div.layui-inline{float:left;font-size:14px}.layui-colorpicker-main-input input.layui-input{width:168px;height:30px;color:#5f5f5f;padding-left:5px}.layui-slider{height:4px;background:#eee;border-radius:3px;position:relative;cursor:pointer}.layui-slider-bar{border-radius:3px;position:absolute;height:100%}.layui-slider-step{position:absolute;top:0;width:4px;height:4px;border-radius:50%;background:#fff;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.layui-slider-wrap{width:36px;height:36px;position:absolute;top:-16px;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:10;text-align:center}.layui-slider-wrap-btn{width:12px;height:12px;border-radius:50%;background:#fff;display:inline-block;vertical-align:middle;cursor:pointer;transition:.3s}.layui-slider-wrap:after{content:"";height:100%;display:inline-block;vertical-align:middle}.layui-slider-wrap-btn.layui-slider-hover,.layui-slider-wrap-btn:hover{transform:scale(1.2)}.layui-slider-wrap-btn.layui-disabled:hover{transform:scale(1)!important}.layui-slider-tips{position:absolute;top:-42px;z-index:77777777;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%);color:#fff;background:#000;border-radius:3px;height:25px;line-height:25px;padding:0 10px}.layui-slider-tips:after{content:"";position:absolute;bottom:-12px;left:50%;margin-left:-6px;width:0;height:0;border-width:6px;border-style:solid;border-color:#000 transparent transparent transparent}.layui-slider-input{width:70px;height:32px;border:1px solid #eee;border-radius:3px;font-size:16px;line-height:32px;position:absolute;right:0;top:-14px;box-sizing:border-box}.layui-slider-input-btn{position:absolute;top:0;right:0;width:20px;height:100%;border-left:1px solid #eee}.layui-slider-input-btn i{cursor:pointer;position:absolute;right:0;bottom:0;width:20px;height:50%;font-size:12px;line-height:16px;text-align:center;color:#999}.layui-slider-input-btn i:first-child{top:0;border-bottom:1px solid #eee}.layui-slider-input-txt{height:100%;font-size:14px}.layui-slider-input-txt input{height:100%;border:none;padding-right:21px}.layui-slider-input-btn i:hover{color:#16baaa}.layui-slider-vertical{width:4px;margin-left:33px}.layui-slider-vertical .layui-slider-bar{width:4px}.layui-slider-vertical .layui-slider-step{top:auto;left:0;-webkit-transform:translateY(50%);transform:translateY(50%)}.layui-slider-vertical .layui-slider-wrap{top:auto;left:-16px;-webkit-transform:translateY(50%);transform:translateY(50%)}.layui-slider-vertical .layui-slider-tips{top:auto;left:2px}@media \0screen{.layui-slider-wrap-btn{margin-left:-20px}.layui-slider-vertical .layui-slider-wrap-btn{margin-left:0;margin-bottom:-20px}.layui-slider-vertical .layui-slider-tips{margin-left:-8px}.layui-slider>span{margin-left:8px}}.layui-tree{line-height:22px}.layui-tree .layui-form-checkbox{margin:0!important}.layui-tree-set{width:100%;position:relative}.layui-tree-pack{display:none;padding-left:20px;position:relative}.layui-tree-line .layui-tree-pack{padding-left:27px}.layui-tree-line .layui-tree-set .layui-tree-set:after{content:"";position:absolute;top:14px;left:-9px;width:17px;height:0;border-top:1px dotted #c0c4cc}.layui-tree-entry{position:relative;padding:3px 0;height:26px;white-space:nowrap}.layui-tree-entry:hover{background-color:#eee}.layui-tree-line .layui-tree-entry:hover{background-color:rgba(0,0,0,0)}.layui-tree-line .layui-tree-entry:hover .layui-tree-txt{color:#999;text-decoration:underline;transition:.3s}.layui-tree-main{display:inline-block;vertical-align:middle;cursor:pointer;padding-right:10px}.layui-tree-line .layui-tree-set:before{content:"";position:absolute;top:0;left:-9px;width:0;height:100%;border-left:1px dotted #c0c4cc}.layui-tree-line .layui-tree-set.layui-tree-setLineShort:before{height:13px}.layui-tree-line .layui-tree-set.layui-tree-setHide:before{height:0}.layui-tree-iconClick{display:inline-block;vertical-align:middle;position:relative;height:20px;line-height:20px;margin:0 10px;color:#c0c4cc}.layui-tree-icon{height:14px;line-height:12px;width:14px;text-align:center;border:1px solid #c0c4cc}.layui-tree-iconClick .layui-icon{font-size:18px}.layui-tree-icon .layui-icon{font-size:12px;color:#5f5f5f}.layui-tree-iconArrow{padding:0 5px}.layui-tree-iconArrow:after{content:"";position:absolute;left:4px;top:3px;z-index:100;width:0;height:0;border-width:5px;border-style:solid;border-color:transparent transparent transparent #c0c4cc;transition:.5s}.layui-tree-spread>.layui-tree-entry .layui-tree-iconClick>.layui-tree-iconArrow:after{transform:rotate(90deg) translate(3px,4px)}.layui-tree-txt{display:inline-block;vertical-align:middle;color:#555}.layui-tree-search{margin-bottom:15px;color:#5f5f5f}.layui-tree-btnGroup{visibility:hidden;display:inline-block;vertical-align:middle;position:relative}.layui-tree-btnGroup .layui-icon{display:inline-block;vertical-align:middle;padding:0 2px;cursor:pointer}.layui-tree-btnGroup .layui-icon:hover{color:#999;transition:.3s}.layui-tree-entry:hover .layui-tree-btnGroup{visibility:visible}.layui-tree-editInput{position:relative;display:inline-block;vertical-align:middle;height:20px;line-height:20px;padding:0;border:none;background-color:rgba(0,0,0,.05)}.layui-tree-emptyText{text-align:center;color:#999}.layui-anim{-webkit-animation-duration:.3s;-webkit-animation-fill-mode:both;animation-duration:.3s;animation-fill-mode:both}.layui-anim.layui-icon{display:inline-block}.layui-anim-loop{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.layui-trans,.layui-trans a{-webkit-transition:all .2s;transition:all .2s}@-webkit-keyframes layui-rotate{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes layui-rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.layui-anim-rotate{-webkit-animation-name:layui-rotate;animation-name:layui-rotate;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes layui-up{from{-webkit-transform:translate3d(0,100%,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-up{from{transform:translate3d(0,100%,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-up{-webkit-animation-name:layui-up;animation-name:layui-up}@-webkit-keyframes layui-upbit{from{-webkit-transform:translate3d(0,15px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-upbit{from{transform:translate3d(0,15px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-upbit{-webkit-animation-name:layui-upbit;animation-name:layui-upbit}@keyframes layui-down{0%{opacity:.3;transform:translate3d(0,-100%,0)}100%{opacity:1;transform:translate3d(0,0,0)}}.layui-anim-down{animation-name:layui-down}@keyframes layui-downbit{0%{opacity:.3;transform:translate3d(0,-5px,0)}100%{opacity:1;transform:translate3d(0,0,0)}}.layui-anim-downbit{animation-name:layui-downbit}@-webkit-keyframes layui-scale{0%{opacity:.3;-webkit-transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale{0%{opacity:.3;-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-ms-transform:scale(1);transform:scale(1)}}.layui-anim-scale{-webkit-animation-name:layui-scale;animation-name:layui-scale}@-webkit-keyframes layui-scale-spring{0%{opacity:.5;-webkit-transform:scale(.5)}80%{opacity:.8;-webkit-transform:scale(1.1)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale-spring{0%{opacity:.5;transform:scale(.5)}80%{opacity:.8;transform:scale(1.1)}100%{opacity:1;transform:scale(1)}}.layui-anim-scaleSpring{-webkit-animation-name:layui-scale-spring;animation-name:layui-scale-spring}@keyframes layui-scalesmall{0%{opacity:.3;transform:scale(1.5)}100%{opacity:1;transform:scale(1)}}.layui-anim-scalesmall{animation-name:layui-scalesmall}@keyframes layui-scalesmall-spring{0%{opacity:.3;transform:scale(1.5)}80%{opacity:.8;transform:scale(.9)}100%{opacity:1;transform:scale(1)}}.layui-anim-scalesmall-spring{animation-name:layui-scalesmall-spring}@-webkit-keyframes layui-fadein{0%{opacity:0}100%{opacity:1}}@keyframes layui-fadein{0%{opacity:0}100%{opacity:1}}.layui-anim-fadein{-webkit-animation-name:layui-fadein;animation-name:layui-fadein}@-webkit-keyframes layui-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes layui-fadeout{0%{opacity:1}100%{opacity:0}}.layui-anim-fadeout{-webkit-animation-name:layui-fadeout;animation-name:layui-fadeout}html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-wrap{font-size:13px;font-family:"Courier New",Consolas,"Lucida Console",monospace}.layui-code-view{display:block;position:relative;padding:0!important;border:1px solid #eee;border-left-width:6px;background-color:#fff;color:#333}.layui-code-view pre{margin:0!important}.layui-code-header{position:relative;z-index:3;padding:0 11px;height:40px;line-height:40px;border-bottom:1px solid #eee;background-color:#fafafa;font-size:12px}.layui-code-header>.layui-code-header-about{position:absolute;right:11px;top:0;color:#b7b7b7}.layui-code-header-about>a{padding-left:10px}.layui-code-wrap{position:relative;display:block;z-index:1;margin:0!important;padding:11px 0!important;overflow-x:hidden;overflow-y:auto}.layui-code-line{position:relative;line-height:19px;margin:0!important}.layui-code-line-number{position:absolute;left:0;top:0;padding:0 8px;min-width:45px;height:100%;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;overflow:hidden}.layui-code-line-content{padding:0 11px;word-wrap:break-word;white-space:pre-wrap}.layui-code-ln-mode>.layui-code-wrap>.layui-code-line{padding-left:45px}.layui-code-ln-side{position:absolute;left:0;top:0;bottom:0;z-index:0;width:45px;border-right:1px solid #eee;border-color:rgb(126 122 122 / 15%);background-color:#fafafa;pointer-events:none}.layui-code-nowrap>.layui-code-wrap{overflow:auto}.layui-code-nowrap>.layui-code-wrap>.layui-code-line>.layui-code-line-content{white-space:pre;word-wrap:normal}.layui-code-nowrap>.layui-code-ln-side{border-right-width:0!important;background:0 0!important}.layui-code-fixbar{position:absolute;top:8px;right:11px;padding-right:45px;z-index:5}.layui-code-fixbar>span{position:absolute;right:0;top:0;padding:0 8px;color:#777;transition:all .3s}.layui-code-fixbar>span:hover{color:#16b777}.layui-code-copy{display:none;cursor:pointer}.layui-code-preview>.layui-code-view>.layui-code-fixbar .layui-code-copy{display:none!important}.layui-code-view:hover>.layui-code-fixbar .layui-code-copy{display:block}.layui-code-view:hover>.layui-code-fixbar .layui-code-lang-marker{display:none}.layui-code-theme-dark,.layui-code-theme-dark>.layui-code-header{border-color:rgb(126 122 122 / 15%);background-color:#1f1f1f}.layui-code-theme-dark{border-width:1px;color:#ccc}.layui-code-theme-dark>.layui-code-ln-side{border-right-color:#2a2a2a;background:0 0;color:#6e7681}.layui-code textarea{display:none}.layui-code-preview>.layui-code,.layui-code-preview>.layui-code-view{margin:0}.layui-code-preview>.layui-tab{position:relative;z-index:1;margin-bottom:0}.layui-code-preview .layui-code-item{display:none;border-top-width:0}.layui-code-item-preview{position:relative;padding:16px}.layui-code-item-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.layui-code-tools{position:absolute;right:11px;top:8px;line-height:normal}.layui-code-tools>i{display:inline-block;margin-left:6px;padding:3px;cursor:pointer}.layui-code-tools>i.layui-icon-file-b{color:#999}.layui-code-tools>i:hover{color:#16b777}.layui-code-full{position:fixed;left:0;top:0;z-index:1111111;width:100%;height:100%;background-color:#fff}.layui-code-full .layui-code-item{width:100%!important;border-width:0!important}.layui-code-full .layui-code-item,.layui-code-full .layui-code-view,.layui-code-full .layui-code-wrap{height:calc(100vh - 51px)!important;box-sizing:border-box}.layui-code-full .layui-code-item-preview{overflow:auto}.layui-code-view.layui-code-hl{line-height:20px!important;border-left-width:1px}.layui-code-view.layui-code-hl>.layui-code-ln-side{background-color:transparent}.layui-code-theme-dark.layui-code-hl,.layui-code-theme-dark.layui-code-hl>.layui-code-ln-side{border-color:rgb(126 122 122 / 15%)}.layui-code-line-highlighted{background-color:rgba(142,150,170,.14)}.layui-code-line-diff-add{background-color:rgba(16,185,129,.14)}.layui-code-line-diff-remove{background-color:rgba(244,63,94,.14)}.layui-code-line-diff-add:before{position:absolute;content:"+";color:#18794e}.layui-code-line-diff-remove:before{position:absolute;content:"-";color:#b8272c}.layui-code-has-focused-lines .layui-code-line:not(.layui-code-line-has-focus){filter:blur(.095rem);opacity:.7;-webkit-transition:filter .35s,opacity .35s;transition:filter .35s,opacity .35s}.layui-code-has-focused-lines:hover .layui-code-line:not(.layui-code-line-has-focus){filter:blur();opacity:1}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate,.layui-laydate *{box-sizing:border-box}.layui-laydate{position:absolute;z-index:99999999;margin:5px 0;border-radius:2px;font-size:14px;line-height:normal;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{-webkit-transition-duration:.3s;transition-duration:.3s}.layui-laydate-shade{top:0;left:0;width:100%;height:100%;position:fixed;pointer-events:auto}@keyframes laydate-downbit{0%{opacity:.3;transform:translate3d(0,-5px,0)}100%{opacity:1;transform:translate3d(0,0,0)}}.layui-laydate{animation-name:laydate-downbit}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;padding:0 5px;color:#999;font-size:18px;cursor:pointer}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-time-show .layui-laydate-header{padding-left:10px;padding-right:10px}.laydate-set-ym{width:100%;text-align:center;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-set-ym span{padding:0 10px;cursor:pointer}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:0;text-align:center}.layui-laydate-content th{font-weight:400}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.laydate-day-holidays:before{position:absolute;left:0;top:0;font-size:12px;transform:scale(.7)}.laydate-day-holidays:before{content:'\4F11';color:#ff5722}.laydate-day-holidays[type=workdays]:before{content:'\73ED';color:inherit}.layui-laydate .layui-this .laydate-day-holidays:before{color:#fff}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px}.layui-laydate-footer span{display:inline-block;vertical-align:top;height:26px;line-height:24px;padding:0 10px;border:1px solid #c9c9c9;border-radius:2px;background-color:#fff;font-size:12px;cursor:pointer;white-space:nowrap;transition:all .3s}.layui-laydate-footer span:hover{color:#16b777}.layui-laydate-footer span.layui-laydate-preview{cursor:default;border-color:transparent!important}.layui-laydate-footer span.layui-laydate-preview:hover{color:#777}.layui-laydate-footer span:first-child.layui-laydate-preview{padding-left:0}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{margin:0 0 0 -1px;border-radius:0}.laydate-footer-btns span:first-child{border-radius:2px 0 0 2px}.laydate-footer-btns span:last-child{border-radius:0 2px 2px 0}.layui-laydate-shortcut{width:80px;padding:6px 0;display:inline-block;vertical-align:top;overflow:auto;max-height:276px;text-align:center}.layui-laydate-shortcut+.layui-laydate-main{display:inline-block;border-left:1px solid #e2e2e2}.layui-laydate-shortcut>li{padding:5px 8px;cursor:pointer;line-height:18px}.layui-laydate .layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;box-sizing:border-box;background-color:#fff}.layui-laydate .layui-laydate-list>li{position:relative;display:inline-block;width:33.3%;height:36px;line-height:36px;margin:3px 0;vertical-align:middle;text-align:center;cursor:pointer;list-style:none}.layui-laydate .laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list{display:table}.layui-laydate .laydate-time-list>li{display:table-cell;height:100%;margin:0;line-height:normal;cursor:default}.layui-laydate .laydate-time-list p{position:relative;top:-4px;margin:0;line-height:29px}.layui-laydate .laydate-time-list ol{height:181px;overflow:hidden}.layui-laydate .laydate-time-list>li:hover ol{overflow-y:auto}.layui-laydate .laydate-time-list ol li{width:130%;padding-left:33px;height:30px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate .laydate-time-list-hide-1 ol li{padding-left:53px}.layui-laydate .laydate-time-list-hide-2 ol li{padding-left:117px}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px;color:#ff5722;white-space:pre-line}.layui-laydate-range{width:546px}.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle;max-width:50%}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content,.layui-laydate-range .laydate-main-list-1 .layui-laydate-header{border-left:1px solid #e2e2e2}.layui-laydate-range.layui-laydate-linkage .laydate-main-list-0 .laydate-next-m,.layui-laydate-range.layui-laydate-linkage .laydate-main-list-0 .laydate-next-y,.layui-laydate-range.layui-laydate-linkage .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range.layui-laydate-linkage .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range.layui-laydate-linkage .laydate-main-list-1 .layui-laydate-content,.layui-laydate-range.layui-laydate-linkage .laydate-main-list-1 .layui-laydate-header{border-left-style:dashed}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#777}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#16b777}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{color:#333}.layui-laydate-content td{color:#777}.layui-laydate-content td.laydate-day-now{color:#16b777}.layui-laydate-content td.laydate-day-now:after{content:'';position:absolute;width:100%;height:30px;left:0;top:0;border:1px solid #16b777;box-sizing:border-box}.layui-laydate-linkage .layui-laydate-content td.laydate-selected>div{background-color:#cffae9;transition:all .3s}.layui-laydate-linkage .laydate-selected:hover>div{background-color:#cffae9!important}.layui-laydate-content td.laydate-selected:after,.layui-laydate-content td:hover:after{content:none}.layui-laydate-content td>div:hover,.layui-laydate-list li:hover,.layui-laydate-shortcut>li:hover{background-color:#eee;color:#333;transition:all .3s}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.layui-laydate-linkage .laydate-selected.laydate-day-next>div,.layui-laydate-linkage .laydate-selected.laydate-day-prev>div{background:0 0!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#ff5722}.laydate-day-mark::after{background-color:#16b777}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#16b777}.layui-laydate .layui-this,.layui-laydate .layui-this>div{background-color:#16b777!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.layui-laydate .layui-this.laydate-disabled,.layui-laydate .layui-this.laydate-disabled>div{background-color:#eee!important}.layui-laydate-content td>div{padding:7px 0;height:100%}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#16baaa}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-molv .layui-this,.laydate-theme-molv .layui-this>div{background-color:#16baaa!important}.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead{border:1px solid #e2e2e2}.layui-laydate-linkage.laydate-theme-grid .laydate-selected,.layui-laydate-linkage.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#16baaa!important}.layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-next,.layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}.laydate-theme-grid .layui-laydate-content td>div{height:29px;margin-top:-1px}.laydate-theme-circle .layui-laydate-content td.layui-this>div,.laydate-theme-circle .layui-laydate-content td>div{width:28px;height:28px;line-height:28px;border-radius:14px;margin:0 4px;padding:0}.layui-laydate.laydate-theme-circle .layui-laydate-content table td.layui-this{background-color:transparent!important}.laydate-theme-grid.laydate-theme-circle .layui-laydate-content td>div{margin:0 3.5px}.laydate-theme-fullpanel .layui-laydate-main{width:526px}.laydate-theme-fullpanel .layui-laydate-list{width:252px;left:272px}.laydate-theme-fullpanel .laydate-set-ym span{display:none}.laydate-theme-fullpanel .laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-theme-fullpanel .laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-theme-fullpanel .laydate-time-show .layui-laydate-header .layui-icon{display:inline-block!important}.laydate-theme-fullpanel .laydate-btns-time{display:none}.laydate-theme-fullpanel .laydate-time-list-hide-1 ol li{padding-left:49px}.laydate-theme-fullpanel .laydate-time-list-hide-2 ol li{padding-left:107px}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{opacity:0;transition:opacity .35s cubic-bezier(.34,.69,.1,1);top:0;left:0;width:100%;height:100%}.layui-layer{top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #b2b2b2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(data:image/gif;base64,R0lGODlhJQAlAJECAL3L2AYrTv///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgACACwAAAAAJQAlAAACi5SPqcvtDyGYIFpF690i8xUw3qJBwUlSadmcLqYmGQu6KDIeM13beGzYWWy3DlB4IYaMk+Dso2RWkFCfLPcRvFbZxFLUDTt21BW56TyjRep1e20+i+eYMR145W2eefj+6VFmgTQi+ECVY8iGxcg35phGo/iDFwlTyXWphwlm1imGRdcnuqhHeop6UAAAIfkEBQoAAgAsEAACAAQACwAAAgWMj6nLXAAh+QQFCgACACwVAAUACgALAAACFZQvgRi92dyJcVJlLobUdi8x4bIhBQAh+QQFCgACACwXABEADAADAAACBYyPqcsFACH5BAUKAAIALBUAFQAKAAsAAAITlGKZwWoMHYxqtmplxlNT7ixGAQAh+QQFCgACACwQABgABAALAAACBYyPqctcACH5BAUKAAIALAUAFQAKAAsAAAIVlC+BGL3Z3IlxUmUuhtR2LzHhsiEFACH5BAUKAAIALAEAEQAMAAMAAAIFjI+pywUAIfkEBQoAAgAsBQAFAAoACwAAAhOUYJnAagwdjGq2amXGU1PuLEYBACH5BAUKAAIALBAAAgAEAAsAAAIFhI+py1wAIfkEBQoAAgAsFQAFAAoACwAAAhWUL4AIvdnciXFSZS6G1HYvMeGyIQUAIfkEBQoAAgAsFwARAAwAAwAAAgWEj6nLBQAh+QQFCgACACwVABUACgALAAACE5RgmcBqDB2MarZqZcZTU+4sRgEAIfkEBQoAAgAsEAAYAAQACwAAAgWEj6nLXAAh+QQFCgACACwFABUACgALAAACFZQvgAi92dyJcVJlLobUdi8x4bIhBQAh+QQFCgACACwBABEADAADAAACBYSPqcsFADs=) #fff center center no-repeat}.layui-layer-btn a,.layui-layer-setwin span{display:inline-block;vertical-align:middle}.layui-layer-move{display:none;position:fixed;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@-webkit-keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@keyframes layer-slide-down{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes layer-slide-down-out{from{transform:translate3d(0,0,0)}to{transform:translate3d(0,-100%,0)}}.layer-anim-slide-down{animation-name:layer-slide-down}.layer-anim-slide-down-out{animation-name:layer-slide-down-out}@keyframes layer-slide-left{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes layer-slide-left-out{from{transform:translate3d(0,0,0)}to{transform:translate3d(100%,0,0)}}.layer-anim-slide-left{animation-name:layer-slide-left}.layer-anim-slide-left-out{animation-name:layer-slide-left-out}@keyframes layer-slide-up{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes layer-slide-up-out{from{transform:translate3d(0,0,0)}to{transform:translate3d(0,100%,0)}}.layer-anim-slide-up{animation-name:layer-slide-up}.layer-anim-slide-up-out{animation-name:layer-slide-up-out}@keyframes layer-slide-right{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes layer-slide-right-out{from{transform:translate3d(0,0,0)}to{transform:translate3d(-100%,0,0)}}.layer-anim-slide-right{animation-name:layer-slide-right}.layer-anim-slide-right-out{animation-name:layer-slide-right-out}.layui-layer-title{padding:0 81px 0 16px;height:50px;line-height:50px;border-bottom:1px solid #f0f0f0;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;top:16px;font-size:0;line-height:initial}.layui-layer-setwin span{position:relative;width:16px;height:16px;line-height:18px;margin-left:10px;text-align:center;font-size:16px;cursor:pointer;color:#000;_overflow:hidden;box-sizing:border-box}.layui-layer-setwin .layui-layer-min:before{content:'';position:absolute;width:12px;border-bottom:1px solid #2e2d3c;left:50%;top:50%;margin:-.5px 0 0 -6px;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover:before{background-color:#2d93ca}.layui-layer-setwin .layui-layer-max:after,.layui-layer-setwin .layui-layer-max:before{content:'';position:absolute;left:50%;top:50%;z-index:1;width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid #2e2d3c}.layui-layer-setwin .layui-layer-max:hover:after,.layui-layer-setwin .layui-layer-max:hover:before{border-color:#2d93ca}.layui-layer-setwin .layui-layer-min:hover:before{background-color:#2d93ca}.layui-layer-setwin .layui-layer-maxmin:after,.layui-layer-setwin .layui-layer-maxmin:before{width:7px;height:7px;margin:-3px 0 0 -3px;background-color:#fff}.layui-layer-setwin .layui-layer-maxmin:after{z-index:0;margin:-5px 0 0 -1px}.layui-layer-setwin .layui-layer-close{cursor:pointer}.layui-layer-setwin .layui-layer-close:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;color:#fff;background-color:#787878;padding:3px;border:3px solid;width:28px;height:28px;font-size:16px;font-weight:bolder;border-radius:50%;margin-left:0}.layui-layer-setwin .layui-layer-close2:hover{opacity:unset;background-color:#3888f6}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.layui-layer-btn a{height:30px;line-height:30px;margin:5px 5px 0;padding:0 16px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none;box-sizing:border-box}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:transparent;background-color:#1e9fff;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-btn-is-loading{opacity:.5!important;cursor:not-allowed!important;cursor:wait!important;overflow:hidden;white-space:nowrap;-webkit-user-select:none;-ms-user-select:none;user-select:none}.layui-layer-btn-is-loading .layui-layer-btn-loading-icon{margin-right:8px;font-size:14px}.layui-layer-dialog{min-width:240px}.layui-layer-dialog .layui-layer-content{position:relative;padding:16px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-face{position:absolute;top:18px;left:16px;color:#959595;font-size:32px;_left:-40px}.layui-layer-dialog .layui-layer-content .layui-icon-tips{color:#f39b12}.layui-layer-dialog .layui-layer-content .layui-icon-success{color:#16b777}.layui-layer-dialog .layui-layer-content .layui-icon-error{top:19px;color:#ff5722}.layui-layer-dialog .layui-layer-content .layui-icon-question{color:#ffb800}.layui-layer-dialog .layui-layer-content .layui-icon-lock{color:#787878}.layui-layer-dialog .layui-layer-content .layui-icon-face-cry{color:#ff5722}.layui-layer-dialog .layui-layer-content .layui-icon-face-smile{color:#16b777}.layui-layer-rim{border:6px solid #8d8d8d;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #d3d4d3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-close{color:#fff}.layui-layer-hui .layui-layer-content{padding:11px 24px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:18px 24px 18px 58px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:76px;height:38px;line-height:38px;text-align:center}.layui-layer-loading-icon{font-size:38px;color:#959595}.layui-layer-loading2{text-align:center}.layui-layer-loading-2{position:relative;height:38px}.layui-layer-loading-2:after,.layui-layer-loading-2:before{content:'';position:absolute;left:50%;top:50%;width:38px;height:38px;margin:-19px 0 0 -19px;border-radius:50%;border:3px solid #d2d2d2;box-sizing:border-box}.layui-layer-loading-2:after{border-color:transparent;border-left-color:#1e9fff}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan .layui-layer-title{background:#4476a7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;border-top:1px solid #e9e7e7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#e9e7e7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#c9c5c5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92b8b1}.layui-layer-lan .layui-layer-setwin .layui-icon,.layui-layer-molv .layui-layer-setwin .layui-icon{color:#fff}.layui-layer-win10{border:1px solid #aaa;box-shadow:1px 1px 6px rgba(0,0,0,.3);border-radius:none}.layui-layer-win10 .layui-layer-title{height:32px;line-height:32px;padding-left:8px;border-bottom:none;font-size:12px}.layui-layer-win10 .layui-layer-setwin{right:0;top:0}.layui-layer-win10 .layui-layer-setwin span{margin-left:0;width:32px;height:32px;padding:8px}.layui-layer-win10.layui-layer-page .layui-layer-setwin span{width:38px}.layui-layer-win10 .layui-layer-setwin span:hover{background-color:#e5e5e5}.layui-layer-win10 .layui-layer-setwin span.layui-icon-close:hover{background-color:#e81123;color:#fff}.layui-layer-win10.layui-layer-dialog .layui-layer-content{padding:8px 16px 32px;color:#0033bc}.layui-layer-win10.layui-layer-dialog .layui-layer-padding{padding-top:18px;padding-left:58px}.layui-layer-win10 .layui-layer-btn{padding:5px 5px 10px;border-top:1px solid #dfdfdf;background-color:#f0f0f0}.layui-layer-win10 .layui-layer-btn a{height:20px;line-height:18px;background-color:#e1e1e1;border-color:#adadad;color:#000;font-size:12px;transition:all .3s}.layui-layer-win10 .layui-layer-btn a:hover{border-color:#2a8edd;background-color:#e5f1fb}.layui-layer-win10 .layui-layer-btn .layui-layer-btn0{border-color:#0078d7}.layui-layer-prompt .layui-layer-input{display:block;width:260px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:16px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;display:inline-block;vertical-align:top;border-left:1px solid transparent;border-right:1px solid transparent;min-width:80px;max-width:300px;padding:0 16px;text-align:center;cursor:default;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:51px;border-left-color:#eee;border-right-color:#eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left-color:transparent}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{background:0 0;box-shadow:none}.layui-layer-photos .layui-layer-content{overflow:visible;text-align:center}.layui-layer-photos .layer-layer-photos-main img{position:relative;width:100%;display:inline-block;vertical-align:top}.layui-layer-photos-next,.layui-layer-photos-prev{position:fixed;top:50%;width:52px;height:52px;line-height:52px;margin-top:-26px;cursor:pointer;font-size:52px;color:#717171}.layui-layer-photos-prev{left:32px}.layui-layer-photos-next{right:32px}.layui-layer-photos-next:hover,.layui-layer-photos-prev:hover{color:#959595}.layui-layer-photos-toolbar{position:fixed;left:0;right:0;bottom:0;width:100%;height:52px;line-height:52px;background-color:rgba(0,0,0,.32);color:#fff;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:0}.layui-layer-photos-toolbar>*{display:inline-block;vertical-align:top;padding:0 16px;font-size:12px;color:#fff}.layui-layer-photos-toolbar *{font-size:12px}.layui-layer-photos-header{top:0;bottom:auto}.layui-layer-photos-header>span{cursor:pointer}.layui-layer-photos-header>span:hover{background-color:rgba(51,51,51,.32)}.layui-layer-photos-header .layui-icon{font-size:18px}.layui-layer-photos-footer>h3{max-width:65%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-layer-photos-footer a:hover{text-decoration:underline}.layui-layer-photos-footer em{font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s} \ No newline at end of file diff --git a/public/static/plugs/layui-v2.x/font/iconfont.eot b/public/static/plugs/layui-v2.x/font/iconfont.eot new file mode 100644 index 0000000..3164c9f Binary files /dev/null and b/public/static/plugs/layui-v2.x/font/iconfont.eot differ diff --git a/public/static/plugs/layui-v2.x/font/iconfont.svg b/public/static/plugs/layui-v2.x/font/iconfont.svg new file mode 100644 index 0000000..67e85a7 --- /dev/null +++ b/public/static/plugs/layui-v2.x/font/iconfont.svg @@ -0,0 +1,409 @@ + + + + Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/layui-v2.x/font/iconfont.ttf b/public/static/plugs/layui-v2.x/font/iconfont.ttf new file mode 100644 index 0000000..8f49efb Binary files /dev/null and b/public/static/plugs/layui-v2.x/font/iconfont.ttf differ diff --git a/public/static/plugs/layui-v2.x/font/iconfont.woff b/public/static/plugs/layui-v2.x/font/iconfont.woff new file mode 100644 index 0000000..62d3491 Binary files /dev/null and b/public/static/plugs/layui-v2.x/font/iconfont.woff differ diff --git a/public/static/plugs/layui-v2.x/font/iconfont.woff2 b/public/static/plugs/layui-v2.x/font/iconfont.woff2 new file mode 100644 index 0000000..a3d8774 Binary files /dev/null and b/public/static/plugs/layui-v2.x/font/iconfont.woff2 differ diff --git a/public/static/plugs/layui-v2.x/layui.js b/public/static/plugs/layui-v2.x/layui.js new file mode 100644 index 0000000..6f3a6e3 --- /dev/null +++ b/public/static/plugs/layui-v2.x/layui.js @@ -0,0 +1 @@ +/** v2.12.0 | MIT Licensed */;!function(h){"use strict";var e,d=h.document,v=h.location,m={timeout:10,debug:!1,version:!1},g={modules:{},status:{},event:{},callback:{}},r=function(){this.v="2.12.0"},t=h.LAYUI_GLOBAL||{},b=(e=d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()?d.currentScript.src:function(){for(var e,t=d.getElementsByTagName("script"),n=t.length-1,r=n;01e3*m.timeout/5?j(o+" is not a valid module","error"):void((a?layui[o]=h[i.api]:g.status[o])?u():setTimeout(t,5))}()},0===n.length||layui["layui.all"]&&E[o]?u():(p=a?i.src:i,y=(E[o]?y+"modules/":p?"":m.base)+(p=(p=p||o).replace(/\s/g,"").replace(/\.js[^\/\.]*$/,""))+".js",!g.modules[o]&&layui[o]&&(g.modules[o]=y),g.modules[o]?c():(l=d.getElementsByTagName("head")[0],(s=d.createElement("script"))["async"]=!0,s.charset="utf-8",s.src=y+((p=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+p:""),l.appendChild(s),N(s,function(){l.removeChild(s),c()},function(){l.removeChild(s)}),g.modules[o]=y))),f},r.prototype.modules=Object.assign({},E),r.prototype.extend=function(e){var t,n,r=m.base||"",o=/^\{\/\}/;for(t in e=e||{})this[t]||this.modules[t]?j("the "+t+" module already exists, extend failure"):("string"==typeof(n=e[t])&&(n=((r=o.test(n)?"":r)+n).replace(o,"")),this.modules[t]=n);return this},r.prototype.disuse=function(e){var n=this;return e=n.isArray(e)?e:[e],n.each(e,function(e,t){delete n[t],delete E[t],delete n.modules[t],delete g.status[t],delete g.modules[t]}),n},r.prototype.getStyle=function(e,t){e=e.currentStyle||h.getComputedStyle(e,null);return e.getPropertyValue?e.getPropertyValue(t):e.getAttribute(t.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""}))},r.prototype.link=function(n,r,o){var i,a=this,e=d.getElementsByTagName("head")[0],t="function"==typeof r;if("string"==typeof r&&(o=r),"object"==typeof n)return i="array"===a.type(o),a.each(n,function(e,t){a.link(t,e===n.length-1&&r,i&&o[e])});o="layuicss-"+(o=o||n.replace(/^(#|(http(s?)):\/\/|\/\/)|\.|\/|\?.+/g,""));var u=d.getElementById(o);return u||((u=d.createElement("link")).href=n+(m.debug?"?v="+(new Date).getTime():""),u.rel="stylesheet",u.id=o,e.appendChild(u)),"complete"===u.__lay_readyState__?t&&r(u):N(u,function(){u.__lay_readyState__="complete",t&&r(u)},function(){j(n+" load error","error"),e.removeChild(u)}),a},r.prototype.addcss=function(e,t,n){return layui.link(m.dir+"css/"+e,t,n)},r.prototype.factory=function(e){if(layui[e])return"function"==typeof m.callback[e]?m.callback[e]:null},r.prototype.img=function(e,t,n){var r=new Image;if(r.src=e,r.complete)return t(r);r.onload=function(){r.onload=null,"function"==typeof t&&t(r)},r.onerror=function(e){r.onerror=null,"function"==typeof n&&n(e)}},r.prototype.router=r.prototype.hash=function(e){var n={path:[],pathname:[],search:{},hash:((e=e||v.hash).match(/[^#](#.*$)/)||[])[1]||"",href:""};return/^#/.test(e)&&(e=e.replace(/^#/,""),e=(n.href=e).replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(e,function(e,t){/^\w+=/.test(t)?(t=t.split("="),n.search[t[0]]=t[1]):n.path.push(t)}),n.pathname=n.path),n},r.prototype.url=function(e){var o,t,n=this;return{pathname:(e?((e.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):v.pathname).replace(/^\//,"").split("/"),search:(o={},t=(e?((e.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):v.search).replace(/^\?+/,"").split("&"),n.each(t,function(e,t){var n=t.indexOf("="),r=n<0?t.substr(0,t.length):0!==n&&t.substr(0,n);r&&(o[r]=0(d.innerHeight||h.documentElement.clientHeight)},p.getStyleRules=function(e,n){if(e)return e=(e=e.sheet||e.styleSheet||{}).cssRules||e.rules,"function"==typeof n&&layui.each(e,function(e,t){if(n(t,e))return!0}),e},p.style=function(e){e=e||{};var t=p.elem("style"),n=e.text||"",r=e.target;if(n)return"styleSheet"in t?(t.setAttribute("type","text/css"),t.styleSheet.cssText=n):t.innerHTML=n,t.id="LAY-STYLE-"+(e.id||(n=p.style.index||0,p.style.index++,"DF-"+n)),r&&((e=p(r).find("#"+t.id))[0]&&e.remove(),p(r).append(t)),t},p.position=function(e,t,n){var r,o,i,c,a,u,s,f,l;t&&(n=n||{},e!==h&&e!==p("body")[0]||(n.clickType="right"),r="right"===n.clickType?{left:(r=n.e||d.event||{}).clientX,top:r.clientY,right:r.clientX,bottom:r.clientY}:e.getBoundingClientRect(),a=t.offsetWidth,u=t.offsetHeight,o=function(e){return h.body[e=e?"scrollLeft":"scrollTop"]|h.documentElement[e]},i=function(e){return h.documentElement[e?"clientWidth":"clientHeight"]},c="margin"in n?n.margin:5,l=r.left,"center"===n.align?l-=(a-e.offsetWidth)/2:"right"===n.align&&(l=l-a+e.offsetWidth),(l=l+a+c>i("width")?i("width")-a-c:l)i()&&(r.top>u+c&&r.top<=i()?a=r.top-u-2*c:n.allowBottomOut||(a=i()-u-2*c)<0&&(a=0)),(u=n.position)&&(t.style.position=u),s=n.offset?n.offset[0]:0,f=n.offset?n.offset[1]:0,t.style.left=l+("fixed"===u?0:o(1))+s+"px",t.style.top=a+("fixed"===u?0:o())+f+"px",p.hasScrollbar()||(l=t.getBoundingClientRect(),!n.SYSTEM_RELOAD&&l.bottom+c>i()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){p.position(e,t,n)},50))))},p.options=function(e,t){if(t="object"==typeof t?t:{attr:t},e===h)return{};var e=p(e),n=t.attr||"lay-options",e=e.attr(n);try{return new Function("return "+(e||"{}"))()}catch(r){return layui.hint().error(t.errorText||[n+'="'+e+'"',"\n parseerror: "+r].join("\n"),"error"),{}}},p.isTopElem=function(n){var e=[h,p("body")[0]],r=!1;return p.each(e,function(e,t){if(t===n)return r=!0}),r},p.clipboard={writeText:function(n){var r=String(n.text);function e(){var e=h.createElement("textarea");e.value=r,e.style.position="fixed",e.style.opacity="0",e.style.top="0px",e.style.left="0px",h.body.appendChild(e),e.select();try{h.execCommand("copy"),"function"==typeof n.done&&n.done()}catch(t){"function"==typeof n.error&&n.error(t)}finally{e.remove?e.remove():h.body.removeChild(e)}}navigator&&"clipboard"in navigator?navigator.clipboard.writeText(r).then(n.done,function(){e()}):e()}},p.passiveSupported=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});d.addEventListener("test",null,t),d.removeEventListener("test",null,t)}catch(n){}return e}(),p.touchEventsSupported=function(){return"ontouchstart"in d},p.touchSwipe=function(e,t){var n,r,o,i,c=t,a=p(e)[0],u=!("preventDefault"in c)||c.preventDefault;a&&p.touchEventsSupported()&&(n={pointerStart:{x:0,y:0},pointerEnd:{x:0,y:0},distanceX:0,distanceY:0,direction:"none",timeStart:null},t=function(e){1===e.touches.length&&(a.addEventListener("touchmove",r,!!p.passiveSupported&&{passive:!1}),a.addEventListener("touchend",o),a.addEventListener("touchcancel",o),n.timeStart=Date.now(),n.pointerStart.x=n.pointerEnd.x=e.touches[0].clientX,n.pointerStart.y=n.pointerEnd.y=e.touches[0].clientY,n.distanceX=n.distanceY=0,n.direction="none",c.onTouchStart)&&c.onTouchStart(e,n)},r=function(e){u&&e.preventDefault(),n.pointerEnd.x=e.touches[0].clientX,n.pointerEnd.y=e.touches[0].clientY,n.distanceX=n.pointerStart.x-n.pointerEnd.x,n.distanceY=n.pointerStart.y-n.pointerEnd.y,Math.abs(n.distanceX)>Math.abs(n.distanceY)?n.direction=0]|&(?=#?[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?=#?[a-zA-Z0-9]+;?)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e},p.unescape=function(e){return e===undefined||null===e?"":String(e).replace(/\"/g,'"').replace(/\'/g,"'").replace(/\>/g,">").replace(/\</g,"<").replace(/\&/g,"&")},n=0,r=null,function(e){e=e||"id";var t=(new Date).getTime();return t===r?n++:(n=0,r=t),e+"-"+t+"-"+Math.floor(1e4*Math.random())+"-"+n});p.createSharedResizeObserver=function(r){var o,i,c;return"undefined"==typeof d.ResizeObserver?(d.console&&console.log("ResizeObserver is not supported in this browser."),null):(o="lay-"+(r=r||"")+"-resizeobserver-key",i={},c=new ResizeObserver(function(e){for(var t=0;t]|&(?=#?[a-zA-Z0-9]+)/g;return e===undefined||null===e?"":r.test(e+="")?e.replace(r,function(e){return"&#"+e.charCodeAt(0)+";"}):e}},m=function(e,r){return new RegExp(e,r||"g")},g=function(e,r,t){r=r||{};var e="Laytpl "+((r=Object.assign({errorContext:""},r)).type||"")+"Error: "+e,n=r.errorContext;return delete r.errorContext,"object"==typeof console&&console.error(e,"\n",n,"\n",r),"function"==typeof t&&t(r),e},o={open:"{{",close:"}}",cache:!0,condense:!0,tagStyle:""},t=function(e,r){var t=this;r=t.config=Object.assign({template:e},o,r),t.vars=Object.assign({include:function(e,r){e=document.getElementById(e),e=e?e.innerHTML:"";return e?t.render(e,r):""}},n),t.compile(r.template)},r=(t.prototype.render=function(r,t){var n=this,o=n.config,c=r?n.compile(r):n.compilerCache||n.compile(o.template),e=function(){t=t||o.data||{};try{return c(t)}catch(e){return r=r||o.template,g(e,{errorContext:n.extractErrorContext(r,t),template:r,type:"Render"},o.error)}}();return o.cache&&!r&&(n.compilerCache=c),e},t.prototype.compile=function(e){var t=this,o=t.config,c=o.open,a=o.close,i=o.condense,u=m,l="\u2028";if("string"!=typeof e||!e)return function(){return""};var p=function(e,r){e=["(?:"+c+(e[0]||"")+"\\s*)","("+(e[1]||"[\\s\\S]")+"*?)","(?:\\s*"+(e[2]||"")+a+")"];return(r=r||{}).before&&e.unshift(r.before),r.after&&e.push(r.after),u(e.join(""))},r=i?["",""]:["(?:(?:\\n)*\\s*)","(?:\\s*?)"],f={before:r[0],after:r[1]},s=function(e,r){return e=(e=i?e:e.replace(u(l),r?"":"\n")).replace(/\\(\\|")/g,"$1")},n=t.parse=function(e){var n,r,t;return(e=e||"")&&(e=(e=(e=i?e.replace(/\t/g," ").replace(/\s+/g," "):e).replace(u("([}\\]])"+a),"$1 "+a).replace(/(?=\\|")/g,"\\").replace(/\r?\n/g,i?"":l)).replace(p(["!","","!"],f),function(e,r){return r=r.replace(u(c+"|"+a),function(e){return e.replace(/(?=.)/g,"\\")})}),n=function(e){return['";',e,'__laytpl__+="'].join("\n")},r=function(e,r,t){return t&&(r="-"===r?"":"_escape",t=s(t,!0))?n("__laytpl__+="+r+"("+t+");"):""},t=function(e,r){return r?(r=s(r),n(r)):""},e="modern"===o.tagStyle?(e=(e=e.replace(p(["#"],f),"")).replace(p(["(=|-)"]),r)).replace(p([],f),t):(e=e.replace(p(["#"],f),t)).replace(p(["(=|-)*"]),r),i||(e=e.replace(u(l),"\\n"))),e},r=t.createCompiler=function(e,r){return r=r||d(e),new Function("laytpl","return "+r)(t.vars)},d=t.createBuilder=function(e,r){return r=r||["function(d){",'"use strict";','var __laytpl__="",'+function(){var e,r=[];for(e in t.vars)r.push(("escape"===e?"_":"")+e+"=laytpl."+e);return r.join(",")}()+";",'__laytpl__="'+n(e)+'";',"return __laytpl__;","};"].join("\n")};try{return r(e)}catch(y){return delete t.compilerCache,function(){return g(y,{errorContext:t.extractErrorContext(e),template:e,type:"Compile"},o.error)}}},t.prototype.extractErrorContext=function(e,r){var t=1,o=e.split(/\r?\n/g),n=(e=e.replace(/(?=^)/gm,function(){return"/*LINE:"+t+++"*/"}),this.createBuilder(e)),c=n.split(/\r?\n/),a="laytpl.builder.map";try{n+="\n//# sourceURL="+a;var i=this.createCompiler(e,n);r&&i(r)}catch(l){var e=m(a.replace(/\./g,"\\.")+":(\\d+)","i"),n=(l.stack.match(e)||[])[1]||0,u=function(e,r){var r=r?/\/\*LINE:(\d+)\*\/[^*]*$/:/\/\*LINE:(\d+)\*\//;return!(r=(String(c[e-1]).match(r)||[])[1])&&0n.pages?n.curr=n.pages:n.curr<1&&(n.curr=1),l<0?l=1:l>n.pages&&(l=n.pages),n.prev="prev"in n?n.prev:p.$t("laypage.prev"),n.next="next"in n?n.next:p.$t("laypage.next"),n.pages>l?Math.ceil((n.curr+(1'+n.prev+"":"",page:function(){var e=[];if(n.count<1)return"";1'+(n.first||1)+"");var a=Math.floor((l-1)/2),t=1n.pages?n.pages:a:l;for(i-t...');t<=i;t++)t===n.curr?e.push('"+t+""):e.push(''+t+"");return n.pages>l&&n.pages>i&&!1!==n.last&&(i+1...'),0!==l)&&e.push(''+(n.last||n.pages)+""),e.join("")}(),next:n.next?''+n.next+"":"",count:''+("object"==typeof n.countText?n.countText[0]+n.count+n.countText[1]:p.$t("laypage.total",{total:n.count}))+"",limit:(i=['"),refresh:['','',""].join(""),skip:[''+(e="object"==typeof n.skipText?n.skipText:[p.$t("laypage.goto"),p.$t("laypage.page"),p.$t("laypage.confirm")])[0],'',e[1]+'",""].join("")};return['
      ',(t=[],layui.each(n.layout,function(e,a){u[a]&&t.push(u[a])}),t.join("")),"
      "].join("")},t.prototype.jump=function(e,a){if(e){var t=this,i=t.config,n=e.children,l=e[c]("button")[0],r=e[c]("input")[0],e=e[c]("select")[0],u=function(){var e=Number(r.value.replace(/\s|\D/g,""));e&&(i.curr=e,t.render())};if(a)return u();for(var p=0,s=n.length;pi.pages||(i.curr=e,t.render())});e&&o.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),l&&o.on(l,"click",function(){u()})}},t.prototype.skip=function(t){var i,e;t&&(i=this,e=t[c]("input")[0])&&o.on(e,"keyup",function(e){var a=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(a)&&(this.value=a.replace(/\D/,"")),13===e&&i.jump(t,!0))})},t.prototype.render=function(e){var a=this,t=a.config,i=a.type(),n=a.view(),i=(2===i?t.elem&&(t.elem.innerHTML=n):3===i?t.elem.html(n):l[r](t.elem)&&(l[r](t.elem).innerHTML=n),t.jump&&t.jump(t,e),l[r]("layui-laypage-"+t.index));a.jump(i),t.hash&&!e&&(location.hash="!"+t.hash+"="+t.curr),a.skip(i)},{render:function(e){return new t(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(a,e,t){return a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1),this}});e("laypage",o)});layui.define(["lay","i18n"],function(e){"use strict";var M=layui.lay,a=layui.i18n,n="laydate",r="lay-"+n+"-id",o="zh-CN",l=["eu-ES","ja-JP","km-KH","ko-KR","pt-BR","si-LK","ms-MY","ug-CN","zh-CN","zh-HK","zh-TW"];function h(e){if("string"!=typeof e||e.length<=1)return e;for(var t="",a=0;a'+s.selectTime+""),(l.range||"datetime"!==l.type||l.fullPanel)&&p.push(''),M.each(l.btns,function(e,t){var a=s.tools[t]||"btn";l.range&&"now"===t||(d&&"clear"===t&&(a=s.tools.reset),n.push(''+a+""))}),p.push('"),p.join(""))),l.shortcuts&&(m.appendChild(t),M(t).html((i=[],M.each(l.shortcuts,function(e,t){i.push('
    • '+t.text+"
    • ")}),i.join(""))).find("li").on("click",function(e){var t=l.shortcuts[this.dataset.index]||{},t=("function"==typeof t.value?t.value():t.value)||[],n=(layui.isArray(t)||(t=[t]),l.type),t=(M.each(t,function(e,t){var a=[l.dateTime,o.endDate][e];"time"===n&&"date"!==layui.type(t)?o.EXP_IF.test(t)&&(t=(t.match(o.EXP_SPLIT)||[]).slice(1),M.extend(a,{hours:0|t[0],minutes:0|t[2],seconds:0|t[4]})):M.extend(a,o.systemDate("date"===layui.type(t)?t:new Date(t))),"time"!==n&&"datetime"!==n||(o[["startTime","endTime"][e]]={hours:a.hours,minutes:a.minutes,seconds:a.seconds}),0===e?o.startDate=M.extend({},a):o.endState=!0,"year"===n||"month"===n||"time"===n?o.listYM[e]=[a.year,a.month+1]:e&&o.autoCalendarModel.auto&&o.autoCalendarModel()}),o.checkDate("limit").calendar(null,null,"init"),M(o.footer).find("."+S).removeClass(C));t&&"date"===t.attr("lay-type")&&t[0].click(),o.done(null,"change"),M(this).addClass(k),"static"!==l.position&&o.setValue(o.parse()).done().remove()})),M.each(u,function(e,t){m.appendChild(t)}),l.showBottom&&m.appendChild(e),M.elem("style")),f=[],g=!0,t=(M.each(l.theme,function(e,t){g&&/^#/.test(t)?(g=!(r=!0),f.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",-1!==l.theme.indexOf("circle")?"":"#{{id}} .layui-this{background-color:{{theme}} !important;}","#{{id}} .laydate-day-now{color:{{theme}} !important;}","#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,o.elemID).replace(/{{theme}}/g,t))):!g&&/^#/.test(t)&&f.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,o.elemID).replace(/{{theme}}/g,t))}),l.shortcuts&&l.range&&f.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,o.elemID)),f.length&&(f=f.join(""),"styleSheet"in p?(p.setAttribute("type","text/css"),p.styleSheet.cssText=f):p.innerHTML=f,r&&M(m).addClass("laydate-theme-molv"),m.appendChild(p)),o.remove(w.thisElemDate),D.thisId=l.id,d?l.elem.append(m):(document.body.appendChild(m),o.position()),l.shade?'
      ':"");m.insertAdjacentHTML("beforebegin",t),o.checkDate().calendar(null,0,"init"),o.changeEvent(),w.thisElemDate=o.elemID,o.renderAdditional(),"function"==typeof l.ready&&l.ready(M.extend({},l.dateTime,{month:l.dateTime.month+1})),o.preview()},w.prototype.remove=function(e){var t=this,a=t.config,n=M("#"+(e||t.elemID));return n[0]&&(n.hasClass(v)||t.checkDate(function(){n.remove(),delete t.startDate,delete t.endDate,delete t.endState,delete t.startTime,delete t.endTime,delete D.thisId,"function"==typeof a.close&&a.close(t)}),M("."+x).remove()),t},w.prototype.position=function(){var e=this.config;return M.position(e.elem[0],this.elem,{position:e.position}),this},w.prototype.hint=function(e){var t=this,a=(t.config,M.elem("div",{"class":i}));t.elem&&(a.innerHTML=(e="object"==typeof e?e||{}:{content:e}).content||"",M(t.elem).find("."+i).remove(),t.elem.appendChild(a),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){M(t.elem).find("."+i).remove()},"ms"in e?e.ms:3e3))},w.prototype.getAsYM=function(e,t,a){return a?t--:t++,t<0&&(t=11,e--),11p[1]&&(e.year=p[1],l=!0),11t)&&(e.date=t,l=!0)},c=function(n,i,r){var o=["startTime","endTime"];i=(i.match(s.EXP_SPLIT)||[]).slice(1),r=r||0,d.range&&(s[o[r]]=s[o[r]]||{}),M.each(s.format,function(e,t){var a=parseFloat(i[e]);i[e].lengths.getDateTime(d.max)?(o=d.dateTime=M.extend({},d.max),i=!0):s.getDateTime(o)s.getDateTime(d.max))&&(s.endDate=M.extend({},d.max),i=!0),s.startTime={hours:d.dateTime.hours,minutes:d.dateTime.minutes,seconds:d.dateTime.seconds},s.endTime={hours:s.endDate.hours,minutes:s.endDate.minutes,seconds:s.endDate.seconds},"month"===d.type)&&(d.dateTime.date=1,s.endDate.date=1),i&&u&&(s.setValue(s.parse()),s.hint("value "+r.invalidDatePrompt+r.autoResetPrompt)),s.startDate=s.startDate||u&&M.extend({},d.dateTime),s.autoCalendarModel.auto&&s.autoCalendarModel(),s.endState=!d.range||!s.rangeLinked||!(!s.startDate||!s.endDate),e&&e()),s},w.prototype.markRender=function(e,a,t){var n;"object"==typeof t?M.each(t||{},function(e,t){e=e.split("-");e[0]!=a[0]&&0!=e[0]||e[1]!=a[1]&&0!=e[1]||e[2]!=a[2]||(n=t||a[2])}):"string"==typeof t&&(n=t||a[2]),n&&e.find("div").html(''+n+"")},w.prototype.mark=function(t,a){var n=this,e=n.config,i=function(e){n.markRender(t,a,e)};return e.calendar&&e.lang===o&&i(n.markerOfChineseFestivals),"function"==typeof e.mark?e.mark({year:a[0],month:a[1],date:a[2]},i):"object"==typeof e.mark&&i(e.mark),n},w.prototype.holidaysRender=function(o,l,e){var s=["holidays","workdays"],d=function(e,t,a){e.find("div").html(["",a,""].join(""))};"array"===layui.type(e)?M.each(e,function(r,e){M.each(e,function(e,t){var a,n,i;t=t,a=o.attr("lay-ymd"),n=t.split("-"),i=a.split("-"),M.each(n,function(e,t){n[e]=parseInt(t,10)}),M.each(i,function(e,t){i[e]=parseInt(t,10)}),n.join("-")===i.join("-")&&d(o,s[r],l[2])})}):"string"==typeof e&&-1!==s.indexOf(e)&&d(o,e,l[2])},w.prototype.holidays=function(t,a){var n=this,e=n.config,i=function(e){n.holidaysRender(t,a,e)};return"function"==typeof e.holidays?e.holidays({year:a[0],month:a[1],date:a[2]},i):"array"===layui.type(e.holidays)&&i(e.holidays),n},w.prototype.cellRender=function(t,e,a){var n=this.config;return"function"==typeof n.cellRender&&n.cellRender(e,function(e){"string"==typeof e?M(t).html(e):"object"==typeof e&&M(t).html("").append(M(e)[0])},{originElem:t,type:a}),this},w.prototype.startOfYear=function(e){e=new Date(e);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e},w.prototype.endOfYear=function(e){var e=new Date(e),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e},w.prototype.startOfMonth=function(e){e=new Date(e);return e.setDate(1),e.setHours(0,0,0,0),e},w.prototype.endOfMonth=function(e){var e=new Date(e),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e},w.prototype.addDays=function(e,t){e=new Date(e);return t&&e.setDate(e.getDate()+t),e},w.prototype.isDisabledYearOrMonth=function(e,t,a){for(var n=this,i=n.config,r="year"===t?n.startOfYear(e):n.startOfMonth(e),t="year"===t?n.endOfYear(e):n.endOfMonth(e),o=Math.floor((t.getTime()-r.getTime())/864e5)+1,l=0,s=0;s(t.time?0:41)?i.endDate:e.dateTime;return M.each({now:M.extend({},a,t.date||{}),min:e.min,max:e.max},function(e,a){var n;r[e]=i.newDate(M.extend({year:a.year,month:"year"===t.type?0:a.month,date:"year"===t.type||"month"===t.type?1:a.date},(n={},M.each(t.time,function(e,t){n[t]=a[t]}),n))).getTime()}),a=r.nowp[1]&&(d.year=p[1],s.hint(m.invalidDatePrompt)),s.firstDate||(s.firstDate=M.extend({},d)),n.setFullYear(d.year,d.month,1),r=(n.getDay()+(7-a.weekStart))%7,o=D.getEndDate(d.month||12,d.year),l=D.getEndDate(d.month+1,d.year),M.each(y,function(e,t){var a,n=[d.year,d.month];(t=M(t)).removeAttr("class"),e"+n[2]+"
      "),s.mark(t,n).holidays(t,n).limit({elem:t,date:{year:n[0],month:n[1]-1,date:n[2]},index:e,rangeType:i,disabledType:"date"}),s.cellRender(t,{year:n[0],month:n[1],date:n[2]},"date")}),M(c[0]).attr("lay-ym",d.year+"-"+(d.month+1)),M(c[1]).attr("lay-ym",d.year+"-"+(d.month+1)),s.panelYM||(s.panelYM={}),s.panelYM[i]={year:d.year,month:d.month},h(d.year+m.literal.year)),y=h(m.months[d.month]);return m.monthBeforeYear?(M(c[0]).attr("lay-type","month").html(y),M(c[1]).attr("lay-type","year").html(n)):(M(c[0]).attr("lay-type","year").html(n),M(c[1]).attr("lay-type","month").html(y)),u&&(a.range?!e&&"init"===t||(s.listYM=[[(s.startDate||a.dateTime).year,(s.startDate||a.dateTime).month+1],[s.endDate.year,s.endDate.month+1]],s.list(a.type,0).list(a.type,1),"time"===a.type?s.setBtnStatus(!0,M.extend({},s.systemDate(),s.startTime),M.extend({},s.systemDate(),s.endTime)):s.setBtnStatus(!0)):(s.listYM=[[d.year,d.month+1]],s.list(a.type,0))),a.range&&"init"===t&&(s.rangeLinked?(m=s.getAsYM(d.year,d.month,i?"sub":null),s.calendar(M.extend({},d,{year:m[0],month:m[1]}),1-i)):s.calendar(null,1-i)),a.range||(n=["hours","minutes","seconds"],s.limit({elem:M(s.footer).find(".laydate-btns-now"),date:s.systemDate(/^(datetime|time)$/.test(a.type)?new Date:null),index:0,time:n,disabledType:"datetime"}),s.limit({elem:M(s.footer).find(I),index:0,time:n,disabledType:"datetime"})),s.setBtnStatus(),M(s.shortcut).find("li."+k).removeClass(k),a.range&&!u&&"init"!==t&&s.stampRange(),s},w.prototype.list=function(n,i){var r,o,e,a,l,s,d=this,m=d.config,u=d.rangeLinked?m.dateTime:[m.dateTime,d.endDate][i],y=d.i18nMessages,c=m.range&&"date"!==m.type&&"datetime"!==m.type,h=M.elem("ul",{"class":b+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[n]}),t=d.elemHeader[i],p=M(t[2]).find("span"),f=d.elemCont[i||0],g=M(f).find("."+b)[0],D=y.monthBeforeYear,v=y.literal.year,T=d.listYM[i]||{},x=["hours","minutes","seconds"],w=["startTime","endTime"][i];return T[0]<1&&(T[0]=1),"year"===n?(e=r=T[0]-7,r<1&&(e=r=1),M.each(new Array(15),function(e){var t=M.elem("li",{"lay-ym":r}),a={year:r,month:0,date:1};r==T[0]&&M(t).addClass(k),t.innerHTML=r+v,h.appendChild(t),d.limit({elem:M(t),date:a,index:i,type:n,rangeType:i,disabledType:"date"}),d.cellRender(t,{year:r,month:1,date:1},"year"),r++}),M(p[D?1:0]).attr("lay-ym",r-8+"-"+T[1]).html(e+v+" - "+(r-1+v))):"month"===n?(M.each(new Array(12),function(e){var t=M.elem("li",{"lay-ym":e}),a={year:T[0],month:e,date:1};e+1==T[1]&&M(t).addClass(k),t.innerHTML=y.months[e],h.appendChild(t),d.limit({elem:M(t),date:a,index:i,type:n,rangeType:i,disabledType:"date"}),d.cellRender(t,{year:T[0],month:e+1,date:1},"month")}),M(p[D?1:0]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+v)):"time"===n&&(o=function(){M(h).find("ol").each(function(a,e){M(e).find("li").each(function(e,t){d.limit({elem:M(t),date:[{hours:e},{hours:d[w].hours,minutes:e},{hours:d[w].hours,minutes:d[w].minutes,seconds:e}][a],index:i,rangeType:i,disabledType:"time",time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][a]})})}),m.range||d.limit({elem:M(d.footer).find(I),date:d[w],index:0,time:["hours","minutes","seconds"],disabledType:"datetime"})},m.range?d[w]||(d[w]="startTime"===w?u:d.endDate):d[w]=u,M.each([24,60,60],function(t,e){var a=M.elem("li"),n=["

      "+y.time[t]+"

        "];M.each(new Array(e),function(e){n.push(""+M.digit(e,2)+"")}),a.innerHTML=n.join("")+"
      ",h.appendChild(a)}),o(),e=-1!==m.format.indexOf("H"),D=-1!==m.format.indexOf("m"),p=-1!==m.format.indexOf("s"),a=h.children,l=0,M.each([e,D,p],function(e,t){t||(a[e].className+=" layui-hide",l++)}),h.className+=" laydate-time-list-hide-"+l),g&&f.removeChild(g),f.appendChild(h),"year"===n||"month"===n?(M(d.elemMain[i]).addClass("laydate-ym-show"),M(h).find("li").on("click",function(){var e,t,a=0|M(this).attr("lay-ym");M(this).hasClass(C)||(d.rangeLinked?M.extend(u,{year:"year"===n?a:T[0],month:"year"===n?T[1]-1:a}):u[n]=a,e=-1!==["year","month"].indexOf(m.type),t="year"===n&&-1!==["date","datetime"].indexOf(m.type),e||t?(M(h).find("."+k).removeClass(k),M(this).addClass(k),("month"===m.type&&"year"===n||t)&&(d.listYM[i][0]=a,c&&((i?d.endDate:u).year=a),d.list("month",i))):(d.checkDate("limit").calendar(u,i,"init"),d.closeList()),m.range||d.limit({type:n,elem:M(d.footer).find(I),date:u,disabledType:"datetime"}),d.setBtnStatus(),!m.range&&m.autoConfirm&&("month"===m.type&&"month"===n||"year"===m.type&&"year"===n)&&d.setValue(d.parse()).done().remove(),d.autoCalendarModel.auto&&!d.rangeLinked?d.choose(M(f).find("td.layui-this"),i):d.endState&&d.done(null,"change"),M(d.footer).find("."+S).removeClass(C))})):(D=M.elem("span",{"class":E}),s=function(){M(h).find("ol").each(function(e){var a=this,t=M(a).find("li");a.scrollTop=30*(d[w][x[e]]-2),a.scrollTop<=0&&t.each(function(e,t){if(!M(this).hasClass(C))return a.scrollTop=30*(e-2),!0})})},p=M(t[2]).find("."+E),s(),D.innerHTML=m.range?[y.startTime,y.endTime][i]:y.selectTime,M(d.elemMain[i]).addClass("laydate-time-show"),p[0]&&p.remove(),t[2].appendChild(D),(g=M(h).find("ol")).each(function(t){var a=this;M(a).find("li").on("click",function(){var e=0|this.innerHTML;M(this).hasClass(C)||(m.range?d[w][x[t]]=e:u[x[t]]=e,M(a).find("."+k).removeClass(k),M(this).addClass(k),o(),s(),!d.endDate&&"time"!==m.type&&"datetime"!==m.type||d.done(null,"change"),d.setBtnStatus())})}),layui.device().mobile&&g.css({overflowY:"auto",touchAction:"pan-y"})),d},w.prototype.listYM=[],w.prototype.closeList=function(){var a=this;a.config;M.each(a.elemCont,function(e,t){M(this).find("."+b).remove(),M(a.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),M(a.elem).find("."+E).remove()},w.prototype.setBtnStatus=function(e,t,a){var n=this,i=n.config,r=n.i18nMessages,o=M(n.footer).find(I),l="datetime"===i.type||"time"===i.type?["hours","minutes","seconds"]:undefined;i.range&&(t=t||(n.rangeLinked?n.startDate:i.dateTime),a=a||n.endDate,i=!n.endState||n.newDate(t).getTime()>n.newDate(a).getTime(),n.limit({date:t,disabledType:"datetime",time:l,rangeType:0})||n.limit({date:a,disabledType:"datetime",time:l,rangeType:1})?o.addClass(C):o[i?"addClass":"removeClass"](C),e)&&i&&n.hint(r.rangeOrderPrompt)},w.prototype.parse=function(e,t){var a=this,n=a.config,i=a.rangeLinked?a.startDate:n.dateTime,t=t||("end"==e?M.extend({},a.endDate,a.endTime):n.range?M.extend({},i||n.dateTime,a.startTime):n.dateTime),i=D.parse(t,a.format,1);return n.range&&e===undefined?i+" "+a.rangeStr+" "+a.parse("end"):i},w.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},w.prototype.getDateTime=function(e){return this.newDate(e).getTime()},w.prototype.formatToDisplay=function(e,t){var a=this,n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(e,"value",M.extend({},n,{get:function(){return this.getAttribute("lay-date")},set:function(e){n.set.call(this,t.call(a,e)),this.setAttribute("lay-date",e)}}))},w.prototype.setValue=function(e){var t,a=this,n=a.config,i=n.elem[0];return"static"!==n.position&&(e=e||"",a.isInput(i)?M(i).val(e):(t=a.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+a.rangeStr+" ")),t[0].val(e[0]||""),t[1].val(e[1]||"")):(0===M(i).find("*").length&&(t="function"==typeof n.formatToDisplay?n.formatToDisplay(e):e,M(i).html(t)),M(i).attr("lay-date",e))),a},w.prototype.preview=function(){var e,t=this,a=t.config;a.isPreview&&(e=M(t.elem).find("."+T),t=!a.range||(t.rangeLinked?t.endState:t.endDate)?t.parse():"",e.html(t),e.html())&&(t="array"===layui.type(a.theme)?a.theme[0]:a.theme,e.css({color:/^#/.test(String(t))?t:"#16b777"}),setTimeout(function(){e.css({color:"#777"})},300))},w.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},w.prototype.stampRange=function(){var n,i=this,r=i.config,o=i.rangeLinked?i.startDate:r.dateTime,e=M(i.elem).find("td");r.range&&!i.endState&&M(i.footer).find(I).addClass(C),o=o&&i.newDate({year:o.year,month:o.month,date:o.date}).getTime(),n=i.endState&&i.endDate&&i.newDate({year:i.endDate.year,month:i.endDate.month,date:i.endDate.date}).getTime(),M.each(e,function(e,t){var a=M(t).attr("lay-ymd").split("-"),a=i.newDate({year:a[0],month:a[1]-1,date:a[2]}).getTime();r.rangeLinked&&!i.startDate&&a===i.newDate(i.systemDate()).getTime()&&M(t).addClass(M(t).hasClass(u)||M(t).hasClass(y)?"":"laydate-day-now"),M(t).removeClass(m+" "+k),a!==o&&a!==n||(i.rangeLinked||!i.rangeLinked&&(e<42?a===o:a===n))&&M(t).addClass(M(t).hasClass(u)||M(t).hasClass(y)?m:k),on.getDateTime(i.max)&&(n[t]={hours:i.max.hours,minutes:i.max.minutes,seconds:i.max.seconds},M.extend(r,n[t])))}),a||(n.startDate=M.extend({},r)),n.endState&&!n.limit({date:n.rangeLinked?n.startDate:n.thisDateTime(1-a),disabledType:"date"})&&(((o=n.endState&&n.autoCalendarModel.auto?n.autoCalendarModel():o)||n.rangeLinked&&n.endState)&&n.newDate(n.startDate)>n.newDate(n.endDate)&&(n.startDate.year===n.endDate.year&&n.startDate.month===n.endDate.month&&n.startDate.date===n.endDate.date&&(l=n.startTime,n.startTime=n.endTime,n.endTime=l),l=n.startDate,n.startDate=M.extend({},n.endDate,n.startTime),i.dateTime=M.extend({},n.startDate),n.endDate=M.extend({},l,n.endTime)),o)&&(i.dateTime=M.extend({},n.startDate)),n.rangeLinked?(e=n.checkPanelDate(r,t),l=M.extend({},r),s=o||e&&e.needFullRender?"init":null,e=e?e.index:t,n.calendar(l,e,s)):n.calendar(null,a,o?"init":null),n.endState&&n.done(null,"change")):"static"===i.position?n.calendar().done().done(null,"change"):"date"===i.type?i.autoConfirm?n.setValue(n.parse()).done().remove():n.calendar().done(null,"change"):"datetime"===i.type&&n.calendar().done(null,"change"))},w.prototype.tool=function(t,e){var a=this,n=a.config,i=a.i18nMessages,r=n.dateTime,o="static"===n.position,l={datetime:function(){M(t).hasClass(C)||(a.list("time",0),n.range&&a.list("time",1),M(t).attr("lay-type","date").html(a.i18nMessages.selectDate))},date:function(){a.closeList(),M(t).attr("lay-type","datetime").html(a.i18nMessages.selectTime)},clear:function(){o&&(M.extend(r,a.firstDate),a.calendar()),n.range&&(delete n.dateTime,delete a.endDate,delete a.startTime,delete a.endTime),a.setValue(""),a.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var e=new Date;if(M(t).hasClass(C))return a.hint(i.tools.now+", "+i.invalidDatePrompt);M.extend(r,a.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),a.setValue(a.parse()),o&&a.calendar(),a.done(null,"onNow").done().remove()},confirm:function(){var e;if(n.range){if(M(t).hasClass(C))return e="time"===n.type?a.startTime&&a.endTime&&a.newDate(a.startTime)>a.newDate(a.endTime):a.startDate&&a.endDate&&a.newDate(M.extend({},a.startDate,a.startTime||{}))>a.newDate(M.extend({},a.endDate,a.endTime||{})),a.hint(e?i.rangeOrderPrompt:i.invalidDatePrompt)}else if(M(t).hasClass(C))return a.hint(i.invalidDatePrompt);a.setValue(a.parse()),a.done(null,"onConfirm").done().remove()}};l[e]&&l[e]()},w.prototype.change=function(n){var i=this,r=i.config,o=i.thisDateTime(n),l=r.range&&("year"===r.type||"month"===r.type),s=i.elemCont[n||0],d=i.listYM[n],e=function(e){var t=M(s).find(".laydate-year-list")[0],a=M(s).find(".laydate-month-list")[0];return t&&(d[0]=e?d[0]-15:d[0]+15,i.list("year",n)),a&&(e?d[0]--:d[0]++,i.list("month",n)),(t||a)&&(M.extend(o,{year:d[0]}),l&&(o.year=d[0]),r.range||i.done(null,"change"),r.range||i.limit({elem:M(i.footer).find(I),date:{year:d[0],month:t?0:d[1]-1},disabledType:"datetime"})),i.setBtnStatus(),t||a};return{prevYear:function(){e("sub")||(i.rangeLinked?(r.dateTime.year--,i.checkDate("limit").calendar(null,null,"init")):(o.year--,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change")))},prevMonth:function(){var e,t;i.rangeLinked?(t=i.panelYM[0],t=i.getAsYM(t.year,t.month,"sub"),e=M.extend({},r.dateTime,i.panelYM[0],{year:t[0],month:t[1]}),i.checkDate("limit").calendar(e,null,"init")):(t=i.getAsYM(o.year,o.month,"sub"),M.extend(o,{year:t[0],month:t[1]}),i.checkDate("limit").calendar(null,null,"init"),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change"))},nextMonth:function(){var e,t;i.rangeLinked?(t=i.panelYM[0],t=i.getAsYM(t.year,t.month),e=M.extend({},r.dateTime,i.panelYM[0],{year:t[0],month:t[1]}),i.checkDate("limit").calendar(e,null,"init")):(t=i.getAsYM(o.year,o.month),M.extend(o,{year:t[0],month:t[1]}),i.checkDate("limit").calendar(null,null,"init"),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change"))},nextYear:function(){e()||(i.rangeLinked?(r.dateTime.year++,i.checkDate("limit").calendar(null,0,"init")):(o.year++,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change")))}}},w.prototype.changeEvent=function(){var i=this;i.config;M(i.elem).on("click",function(e){M.stope(e)}).on("mousedown",function(e){M.stope(e)}),M.each(i.elemHeader,function(n,e){M(e[0]).on("click",function(e){i.change(n).prevYear()}),M(e[1]).on("click",function(e){i.change(n).prevMonth()}),M(e[2]).find("span").on("click",function(e){var t=M(this),a=t.attr("lay-ym"),t=t.attr("lay-type");a&&(a=a.split("-"),i.listYM[n]=[0|a[0],0|a[1]],i.list(t,n),M(i.footer).find("."+S).addClass(C))}),M(e[3]).on("click",function(e){i.change(n).nextMonth()}),M(e[4]).on("click",function(e){i.change(n).nextYear()})}),M.each(i.table,function(e,t){M(t).find("td").on("click",function(){i.choose(M(this),e)})}),M(i.footer).find("span").on("click",function(){var e=M(this).attr("lay-type");i.tool(this,e)})},w.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(e.tagName)},w.prototype.events=function(){var e,t=this,a=t.config;a.elem[0]&&!a.elem[0].eventHandler&&(a.elem.on(a.trigger,e=function(){D.thisId!==a.id&&t.render()}),a.elem[0].eventHandler=!0,a.eventElem.on(a.trigger,e),t.unbind=function(){t.remove(),a.elem.off(a.trigger,e),a.elem.removeAttr("lay-key"),a.elem.removeAttr(r),a.elem[0].eventHandler=!1,a.eventElem.off(a.trigger,e),a.eventElem.removeAttr("lay-key"),delete d.that[a.id]})},M(document).on("mousedown",function(e){var t,a;D.thisId&&(t=d.getThis(D.thisId))&&(a=t.config,e.target===a.elem[0]||e.target===a.eventElem[0]||e.target===M(a.closeStop)[0]||a.elem[0]&&a.elem[0].contains(e.target)||t.remove())}).on("keydown",function(e){var t;D.thisId&&(t=d.getThis(D.thisId))&&"static"!==t.config.position&&13===e.keyCode&&M("#"+t.elemID)[0]&&t.elemID===w.thisElemDate&&(e.preventDefault(),M(t.footer).find(I)[0].click())}),M(window).on("resize",function(){if(D.thisId){var e=d.getThis(D.thisId);if(e)return!(!e.elem||!M(".layui-laydate")[0])&&void e.position()}}),d.that={},d.getThis=function(e){var t=d.that[e];return t||layui.hint().error(e?n+" instance with ID '"+e+"' not found":"ID argument required"),t},D.render=function(e){e=new w(e);return d.call(e)},D.reload=function(e,t){e=d.getThis(e);if(e)return e.reload(t)},D.getInst=function(e){e=d.getThis(e);if(e)return e.inst},D.hint=function(e,t){e=d.getThis(e);if(e)return e.hint(t)},D.unbind=function(e){e=d.getThis(e);if(e)return e.unbind()},D.close=function(e){e=d.getThis(e||D.thisId);if(e)return e.remove()},D.parse=function(a,n,i){return a=a||{},n=((n="string"==typeof n?d.formatArr(n):n)||[]).concat(),M.each(n,function(e,t){/yyyy|y/.test(t)?n[e]=M.digit(a.year,t.length):/MM|M/.test(t)?n[e]=M.digit(a.month+(i||0),t.length):/dd|d/.test(t)?n[e]=M.digit(a.date,t.length):/HH|H/.test(t)?n[e]=M.digit(a.hours,t.length):/mm|m/.test(t)?n[e]=M.digit(a.minutes,t.length):/ss|s/.test(t)&&(n[e]=M.digit(a.seconds,t.length))}),n.join("")},D.getEndDate=function(e,t){var a=new Date;return a.setFullYear(t||a.getFullYear(),e||a.getMonth()+1,1),new Date(a.getTime()-864e5).getDate()},e(n,D)});!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(T,M){"use strict";var t=[],R=Object.getPrototypeOf,a=t.slice,I=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},W=t.push,b=t.indexOf,F={},$=F.toString,B=F.hasOwnProperty,_=B.toString,z=_.call(Object),g={},v=function v(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},X=function X(e){return null!=e&&e===e.window},C=T.document,U={type:!0,src:!0,nonce:!0,noModule:!0};function V(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in U)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function G(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?F[$.call(e)]||"object":typeof e}var e="3.7.1",Y=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};function J(e){var t=!!e&&"length"in e&&e.length,n=G(e);return!v(e)&&!X(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+n+")"+n+"*"),xe=new RegExp(n+"|>"),be=new RegExp(s),we=new RegExp("^"+e+"$"),Te={ID:new RegExp("^#("+e+")"),CLASS:new RegExp("^\\.("+e+")"),TAG:new RegExp("^("+e+"|[*])"),ATTR:new RegExp("^"+o),PSEUDO:new RegExp("^"+s),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+n+"*(even|odd|(([+-]|)(\\d*)n|)"+n+"*(?:([+-]|)"+n+"*(\\d+)|))"+n+"*\\)|)","i"),bool:new RegExp("^(?:"+ge+")$","i"),needsContext:new RegExp("^"+n+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+n+"*((?:-\\d)?\\d*)"+n+"*\\)|)(?=[^-]|$)","i")},Ce=/^(?:input|select|textarea|button)$/i,Se=/^h\d$/i,Ee=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ke=/[+~]/,f=new RegExp("\\\\[\\da-fA-F]{1,6}"+n+"?|\\\\([^\\r\\n\\f])","g"),d=function(e,t){e="0x"+e.slice(1)-65536;return t||(e<0?String.fromCharCode(65536+e):String.fromCharCode(e>>10|55296,1023&e|56320))},je=function(){Oe()},Ae=Ie(function(e){return!0===e.disabled&&x(e,"fieldset")},{dir:"parentNode",next:"legend"});try{j.apply(t=a.call(i.childNodes),i.childNodes),t[i.childNodes.length].nodeType}catch(sr){j={apply:function(e,t){ue.apply(e,a.call(t))},call:function(e){ue.apply(e,a.call(arguments,1))}}}function N(e,t,n,r){var i,o,s,a,u,l,c=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!r&&(Oe(t),t=t||E,k)){if(11!==f&&(a=Ee.exec(e)))if(i=a[1]){if(9===f){if(!(l=t.getElementById(i)))return n;if(l.id===i)return j.call(n,l),n}else if(c&&(l=c.getElementById(i))&&N.contains(t,l)&&l.id===i)return j.call(n,l),n}else{if(a[2])return j.apply(n,t.getElementsByTagName(e)),n;if((i=a[3])&&t.getElementsByClassName)return j.apply(n,t.getElementsByClassName(i)),n}if(!(pe[e+" "]||p&&p.test(e))){if(l=e,c=t,1===f&&(xe.test(e)||ve.test(e))){for((c=ke.test(e)&&He(t.parentNode)||t)==t&&g.scope||((s=t.getAttribute("id"))?s=S.escapeSelector(s):t.setAttribute("id",s=A)),o=(u=Me(e)).length;o--;)u[o]=(s?"#"+s:":scope")+" "+Re(u[o]);l=u.join(",")}try{return j.apply(n,c.querySelectorAll(l)),n}catch(d){pe(e,!0)}finally{s===A&&t.removeAttribute("id")}}}return _e(e.replace(ee,"$1"),t,n,r)}function De(){var n=[];function r(e,t){return n.push(e+" ")>w.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function u(e){return e[A]=!0,e}function Ne(e){var t=E.createElement("fieldset");try{return!!e(t)}catch(sr){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function qe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function Le(s){return u(function(o){return o=+o,u(function(e,t){for(var n,r=s([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function He(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function Oe(e){var e=e?e.ownerDocument||e:i;return e!=E&&9===e.nodeType&&e.documentElement&&(r=(E=e).documentElement,k=!S.isXMLDoc(E),ae=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&i!=E&&(e=E.defaultView)&&e.top!==e&&e.addEventListener("unload",je),g.getById=Ne(function(e){return r.appendChild(e).id=S.expando,!E.getElementsByName||!E.getElementsByName(S.expando).length}),g.disconnectedMatch=Ne(function(e){return ae.call(e,"*")}),g.scope=Ne(function(){return E.querySelectorAll(":scope")}),g.cssHas=Ne(function(){try{E.querySelector(":has(*,:jqfake)")}catch(sr){return 1}}),g.getById?(w.filter.ID=function(e){var t=e.replace(f,d);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k)return(e=t.getElementById(e))?[e]:[]}):(w.filter.ID=function(e){var t=e.replace(f,d);return function(e){e="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},w.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&k)return t.getElementsByClassName(e)},p=[],Ne(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||p.push("\\["+n+"*(?:value|"+ge+")"),e.querySelectorAll("[id~="+A+"-]").length||p.push("~="),e.querySelectorAll("a#"+A+"+*").length||p.push(".#.+[+~]"),e.querySelectorAll(":checked").length||p.push(":checked"),(t=E.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(t=E.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||p.push("\\["+n+"*name"+n+"*="+n+"*(?:''|\"\")")}),g.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),he=function(e,t){var n;return e===t?(se=!0,0):(n=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===E||e.ownerDocument==i&&N.contains(i,e)?-1:t===E||t.ownerDocument==i&&N.contains(i,t)?1:oe?b.call(oe,e)-b.call(oe,t):0:4&n?-1:1)}),E}for(re in N.matches=function(e,t){return N(e,null,null,t)},N.matchesSelector=function(e,t){if(Oe(e),k&&!pe[t+" "]&&(!p||!p.test(t)))try{var n=ae.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(sr){pe(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(f,d),e[3]=(e[3]||e[4]||e[5]||"").replace(f,d),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||N.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&N.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Te.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&be.test(n)&&(t=(t=Me(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(f,d).toLowerCase();return"*"===e?function(){return!0}:function(e){return x(e,t)}},CLASS:function(e){var t=ce[e+" "];return t||(t=new RegExp("(^|"+n+")"+e+"("+n+"|$)"))&&ce(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(e){e=N.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===r:"!="===n?e!==r:"^="===n?r&&0===e.indexOf(r):"*="===n?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Ge(e,n,r){return v(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/,Ke=((S.fn.init=function(e,t,n){if(e){if(n=n||Ye,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):v(e)?n.ready!==undefined?n.ready(e):e(S):S.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:Je.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),Ve.test(r[1])&&S.isPlainObject(t))for(var r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r])}else(n=C.getElementById(r[2]))&&(this[0]=n,this.length=1)}return this}).prototype=S.fn,Ye=S(C),/^(?:parents|prev(?:Until|All))/),Qe={children:!0,contents:!0,next:!0,prev:!0};function Ze(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Et=/^$|^module$|\/(?:java|ecma)script/i,h=(o=C.createDocumentFragment().appendChild(C.createElement("div")),(s=C.createElement("input")).setAttribute("type","radio"),s.setAttribute("checked","checked"),s.setAttribute("name","t"),o.appendChild(s),g.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,o.innerHTML="",g.noCloneChecked=!!o.cloneNode(!0).lastChild.defaultValue,o.innerHTML="",g.option=!!o.lastChild,{thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]});function y(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x(e,t)?S.merge([e],n):n}function kt(e,t){for(var n=0,r=e.length;n",""]);var jt=/<|&#?\w+;/;function At(e,t,n,r,i){for(var o,s,a,u,l,c=t.createDocumentFragment(),f=[],d=0,p=e.length;d\s*$/g;function Rt(e,t){return x(e,"table")&&x(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function It(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Wt(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ft(e,t){var n,r,i,o;if(1===t.nodeType){if(m.hasData(e)&&(o=m.get(e).events))for(i in m.remove(t,"handle events"),o)for(n=0,r=o[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}}),[]),ir=/(=)\?(?=&|$)|\?\?/,or=(S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=rr.pop()||S.expando+"_"+Hn.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,s=!1!==e.jsonp&&(ir.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ir.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(ir,"$1"+r):!1!==e.jsonp&&(e.url+=(On.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=T[r],T[r]=function(){o=arguments},n.always(function(){i===undefined?S(T).removeProp(r):T[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,rr.push(r)),o&&v(i)&&i(o[0]),o=i=undefined}),"script"}),g.createHTMLDocument=((e=C.implementation.createHTMLDocument("").body).innerHTML="
      ",2===e.childNodes.length),S.parseHTML=function(e,t,n){var r;return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),r=!n&&[],(n=Ve.exec(e))?[t.createElement(n[1])]:(n=At([e],t,r),r&&r.length&&S(r).remove(),S.merge([],n.childNodes)))},S.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,s,a=S.css(e,"position"),u=S(e),l={};"static"===a&&(e.style.position="relative"),o=u.offset(),r=S.css(e,"top"),s=S.css(e,"left"),a=("absolute"===a||"fixed"===a)&&-1<(r+s).indexOf("auto")?(i=(a=u.position()).top,a.left):(i=parseFloat(r)||0,parseFloat(s)||0),null!=(t=v(t)?t.call(e,n,S.extend({},o)):t).top&&(l.top=t.top-o.top+i),null!=t.left&&(l.left=t.left-o.left+a),"using"in t?t.using.call(e,l):u.css(l)}},S.fn.extend({offset:function(t){var e,n;return arguments.length?t===undefined?this:this.each(function(e){S.offset.setOffset(this,t,e)}):(n=this[0])?n.getClientRects().length?(e=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||yt})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return c(this,function(e,t,n){var r;if(X(e)?r=e:9===e.nodeType&&(r=e.defaultView),n===undefined)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=on(g.pixelPosition,function(e,t){if(t)return t=rn(e,n),Jt.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(s,a){S.each({padding:"inner"+s,content:a,"":"outer"+s},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return c(this,function(e,t,n){var r;return X(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+s],r["scroll"+s],e.body["offset"+s],r["offset"+s],r["client"+s])):n===undefined?S.css(e,t,i):S.style(e,t,n,i)},a,n?e:undefined,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0'+(s?a.title[0]:a.title)+"
      ":"";return a.zIndex=o,t([a.shade?'
      ':"",'
      '+(e&&2!=a.type?"":s)+"'+(n=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],o="layui-anim layui-anim-rotate layui-anim-loop",0==a.type&&-1!==a.icon?'':3==a.type?(i=["layui-icon-loading","layui-icon-loading-1"],2==a.icon?'
      ':''):"")+((1!=a.type||!e)&&a.content||"")+'
      '+(n=[],r&&(n.push(''),n.push('')),a.closeBtn&&n.push(''),n.join(""))+"
      "+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t,i=0,n=a.btn.length;i'+a.btn[i]+"";return'
      '+e+"
      "}():"")+(a.resize?'':"")+"
      "],s,h('
      ')),this},i.pt.creat=function(){var e,t,i,n,a=this,o=a.config,s=a.index,r="object"==typeof(f=o.content),l=h("body"),c=function(e){var t;o.shift&&(o.anim=o.shift),u.anim[o.anim]&&(t="layer-anim "+u.anim[o.anim],e.addClass(t).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){h(this).removeClass(t)}))};if(o.id&&h("."+u[0]).find("#"+o.id)[0])e=h("#"+o.id).closest("."+u[0]),t=e.attr("times"),i=e.data("config"),n=h("#"+u.SHADE+t),"min"===(e.data("maxminStatus")||{})?b.restore(t):i.hideOnClose&&(n.show(),e.show(),c(e),setTimeout(function(){n.css({opacity:n.data(y)})},10));else{switch(o.removeFocus&&document.activeElement&&document.activeElement.blur(),"string"==typeof o.area&&(o.area="auto"===o.area?["",""]:[o.area,""]),6==b.ie&&(o.fixed=!1),o.type){case 0:o.btn="btn"in o?o.btn:x.$t("layer.confirm"),b.closeAll("dialog");break;case 2:var f=o.content=r?o.content:[o.content||"","auto"];o.content='';break;case 3:delete o.title,delete o.closeBtn,-1===o.icon&&o.icon,b.closeAll("loading");break;case 4:r||(o.content=[o.content,"body"]),o.follow=o.content[1],o.content=o.content[0]+'',delete o.title,o.tips="object"==typeof o.tips?o.tips:[o.tips,!0],o.tipsMore||b.closeAll("tips")}a.vessel(r,function(e,t,i){l.append(e[0]),r?2==o.type||4==o.type?h("body").append(e[1]):f.parents("."+u[0])[0]||(f.data("display",f.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),h("#"+u[0]+s).find("."+u[5]).before(t)):l.append(e[1]),h("#"+u.MOVE)[0]||l.append(d.moveElem=i),a.layero=h("#"+u[0]+s),a.shadeo=h("#"+u.SHADE+s),o.scrollbar||d.setScrollbar(s)}).auto(s),a.shadeo.css({"background-color":o.shade[1]||"#000",opacity:o.shade[0]||o.shade,transition:o.shade[2]||""}),a.shadeo.data(y,o.shade[0]||o.shade),2==o.type&&6==b.ie&&a.layero.find("iframe").attr("src",f[0]),4==o.type?a.tips():(a.offset(),parseInt(d.getStyle(document.getElementById(u.MOVE),"z-index"))||(a.layero.css("visibility","hidden"),b.ready(function(){a.offset(),a.layero.css("visibility","visible")}))),!o.fixed||d.events.resize[a.index]||(d.events.resize[a.index]=function(){a.resize()},g.on("resize",d.events.resize[a.index])),a.layero.data("config",o),o.time<=0||setTimeout(function(){b.close(a.index)},o.time),a.move().callback(),c(a.layero)}},i.pt.resize=function(){var e=this,t=e.config;e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(e.index),4==t.type&&e.tips()},i.pt.auto=function(e){var t=this.config,i=h("#"+u[0]+e),n=((""===t.area[0]||"auto"===t.area[0])&&0t.maxWidth)&&i.width(t.maxWidth),[i.innerWidth(),i.innerHeight()]),a=i.find(u[1]).outerHeight()||0,o=i.find("."+u[6]).outerHeight()||0,e=function(e){(e=i.find(e)).height(n[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===t.type?e("iframe"):""===t.area[1]||"auto"===t.area[1]?0t.maxHeight?(n[1]=t.maxHeight,e("."+u[5])):t.fixed&&n[1]>=g.height()&&(n[1]=g.height(),e("."+u[5])):e("."+u[5]),this},i.pt.offset=function(){var e=this.config,t=this.layero,t=d.updatePosition(t,e);this.offsetTop=t.offsetTop,this.offsetLeft=t.offsetLeft},i.pt.tips=function(){var e=this.config,t=this.layero,i=[t.outerWidth(),t.outerHeight()],n=h(e.follow),a={width:(n=n[0]?n:h("body")).outerWidth(),height:n.outerHeight(),top:n.offset().top,left:n.offset().left},o=t.find(".layui-layer-TipsG"),n=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0'):e.removeClass("layui-layer-btn-is-loading").removeAttr("disabled").find(".layui-layer-btn-loading-icon").remove()},i.pt.callback=function(){var n=this,a=n.layero,o=n.config;n.openLayer(),o.success&&(2==o.type?a.find("iframe").on("load",function(){o.success(a,n.index,n)}):o.success(a,n.index,n)),6==b.ie&&n.IE6(a),a.find("."+u[6]).children("a").on("click",function(){var e,t=h(this),i=t.index();t.attr("disabled")||(o.btnAsync?(e=0===i?o.yes||o.btn1:o["btn"+(i+1)],n.loading=function(e){n.btnLoading(t,e)},e?d.promiseLikeResolve(e.call(o,n.index,a,n)).then(function(e){!1!==e&&b.close(n.index)},function(e){e!==m&&p.console&&p.console.error("layer error hint: "+e)}):b.close(n.index)):0===i?o.yes?o.yes(n.index,a,n):o.btn1?o.btn1(n.index,a,n):b.close(n.index):!1!==(o["btn"+(i+1)]&&o["btn"+(i+1)](n.index,a,n))&&b.close(n.index))}),a.find("."+u[7]).on("click",function(){!1!==(o.cancel&&o.cancel(n.index,a,n))&&b.close(n.index)}),o.shadeClose&&n.shadeo.on("click",function(){b.close(n.index)}),a.find(".layui-layer-min").on("click",function(){!1!==(o.min&&o.min(a,n.index,n))&&b.min(n.index,o)}),a.find(".layui-layer-max").on("click",function(){h(this).hasClass("layui-layer-maxmin")?(b.restore(n.index),o.restore&&o.restore(a,n.index,n)):(b.full(n.index,o),setTimeout(function(){o.full&&o.full(a,n.index,n)},100))}),o.end&&(d.end[n.index]=o.end),o.beforeEnd&&(d.beforeEnd[n.index]=h.proxy(o.beforeEnd,o,a,n.index,n))},d.reselect=function(){h.each(h("select"),function(e,t){var i=h(this);i.parents("."+u[0])[0]||1==i.attr("layer")&&h("."+u[0]).length<1&&i.removeAttr("layer").show()})},i.pt.IE6=function(e){h("select").each(function(e,t){var i=h(this);i.parents("."+u[0])[0]||"none"!==i.css("display")&&i.attr({layer:"1"}).hide()})},i.pt.openLayer=function(){b.zIndex=this.config.zIndex,b.setTop=function(e){return b.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",function(){b.zIndex++,e.css("z-index",b.zIndex+1)}),b.zIndex}},d.record=function(e){if(!e[0])return p.console&&console.error("index error");var t=e.attr("type"),i=e.find(".layui-layer-content"),t=t===d.type[2]?i.children("iframe"):i,n=[e[0].style.width||d.getStyle(e[0],"width"),e[0].style.height||d.getStyle(e[0],"height"),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:n}),i.data(l,d.getStyle(t[0],"height"))},d.setScrollbar=function(e){u.html.css("overflow","hidden")},d.restScrollbar=function(t){u.html.css("overflow")&&0===h("."+u[0]).filter(function(){var e=h(this);return!1===(e.data("config")||{}).scrollbar&&"min"!==e.data("maxminStatus")&&e.attr("times")!==String(t)}).length&&u.html.css("overflow","")},d.promiseLikeResolve=function(e){var t=h.Deferred();return e&&"function"==typeof e.then?e.then(t.resolve,t.reject):t.resolve(e),t.promise()},d.updatePosition=function(e,t){var i=[e.outerWidth(),e.outerHeight()],n={offsetTop:(g.height()-i[1])/2,offsetLeft:(g.width()-i[0])/2};return"object"==typeof t.offset?(n.offsetTop=t.offset[0],n.offsetLeft=t.offset[1]||n.offsetLeft):"auto"!==t.offset&&("t"===t.offset?n.offsetTop=0:"r"===t.offset?n.offsetLeft=g.width()-i[0]:"b"===t.offset?n.offsetTop=g.height()-i[1]:"l"===t.offset?n.offsetLeft=0:"lt"===t.offset?(n.offsetTop=0,n.offsetLeft=0):"lb"===t.offset?(n.offsetTop=g.height()-i[1],n.offsetLeft=0):"rt"===t.offset?(n.offsetTop=0,n.offsetLeft=g.width()-i[0]):"rb"===t.offset?(n.offsetTop=g.height()-i[1],n.offsetLeft=g.width()-i[0]):n.offsetTop=t.offset),t.fixed||(n.offsetTop=/%$/.test(n.offsetTop)?g.height()*parseFloat(n.offsetTop)/100:parseFloat(n.offsetTop),n.offsetLeft=/%$/.test(n.offsetLeft)?g.width()*parseFloat(n.offsetLeft)/100:parseFloat(n.offsetLeft),n.offsetTop+=g.scrollTop(),n.offsetLeft+=g.scrollLeft()),"min"===e.data("maxminStatus")&&(n.offsetTop=g.height()-(e.find(u[1]).outerHeight()||0),n.offsetLeft=e.css("left")),e.css({top:n.offsetTop,left:n.offsetLeft}),n},(p.layer=b).getChildFrame=function(e,t){return t=t||h("."+u[4]).attr("times"),h("#"+u[0]+t).find("iframe").contents().find(e)},b.getFrameIndex=function(e){if(e)return h("#"+e).parents("."+u[4]).attr("times")},b.iframeAuto=function(e){var t,i,n,a,o;e&&(i=(t=h("#"+u[0]+e)).data("config"),e=b.getChildFrame("html",e).outerHeight(),n=t.find(u[1]).outerHeight()||0,a=t.find("."+u[6]).outerHeight()||0,(o="maxHeight"in i?i.maxHeight:g.height())&&(e=Math.min(e,o-n-a)),t.css({height:e+n+a}),t.find("iframe").css({height:e}),d.updatePosition(t,i))},b.iframeSrc=function(e,t){h("#"+u[0]+e).find("iframe").attr("src",t)},b.style=function(e,t,i){var e=h("#"+u[0]+e),n=e.find(".layui-layer-content"),a=e.attr("type"),o=e.find(u[1]).outerHeight()||0,s=e.find("."+u[6]).outerHeight()||0;e.attr("minLeft");a!==d.type[3]&&a!==d.type[4]&&(i||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-o-s<=64&&(t.height=64+o+s)),e.css(t),s=e.find("."+u[6]).outerHeight()||0,a===d.type[2]?e.find("iframe").css({height:("number"==typeof t.height?t.height:e.height())-o-s}):n.css({height:("number"==typeof t.height?t.height:e.height())-o-s-parseFloat(n.css("padding-top"))-parseFloat(n.css("padding-bottom"))}))},b.min=function(e,t){var i,n,a,o,s,r,l=h("#"+u[0]+e),c=l.data("maxminStatus");"min"!==c&&("max"===c&&b.restore(e),l.data("maxminStatus","min"),t=t||l.data("config")||{},c=h("#"+u.SHADE+e),i=l.find(".layui-layer-min"),n=l.find(u[1]).outerHeight()||0,o=(a="string"==typeof(o=l.attr("minLeft")))?o:181*d.minStackIndex+"px",s=l.css("position"),r={width:180,height:n,position:"fixed",overflow:"hidden"},d.record(l),0g.width()&&(o=g.width()-180-(d.minStackArr.edgeIndex=d.minStackArr.edgeIndex||0,d.minStackArr.edgeIndex+=3))<0&&(o=0),t.minStack&&(r.left=o,r.top=g.height()-n,a||d.minStackIndex++,l.attr("minLeft",o)),l.attr("position",s),b.style(e,r,!0),i.hide(),"page"===l.attr("type")&&l.find(u[4]).hide(),d.restScrollbar(e),c.hide())},b.restore=function(e){var t=h("#"+u[0]+e),i=h("#"+u.SHADE+e),n=t.find(".layui-layer-content"),a=t.attr("area").split(","),o=t.attr("type"),s=t.data("config")||{},r=n.data(l);t.removeData("maxminStatus"),b.style(e,{width:a[0],height:a[1],top:parseFloat(a[2]),left:parseFloat(a[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===o&&t.find(u[4]).show(),s.scrollbar?d.restScrollbar(e):d.setScrollbar(e),r!==m&&(n.removeData(l),(o===d.type[2]?n.children("iframe"):n).css({height:r})),i.show()},b.full=function(t){var i=h("#"+u[0]+t),e=i.data("maxminStatus");"max"!==e&&("min"===e&&b.restore(t),i.data("maxminStatus","max"),d.record(i),d.setScrollbar(t),setTimeout(function(){var e="fixed"===i.css("position");b.style(t,{top:e?0:g.scrollTop(),left:e?0:g.scrollLeft(),width:"100%",height:"100%"},!0),i.find(".layui-layer-min").hide()},100))},b.title=function(e,t){h("#"+u[0]+(t||b.index)).find(u[1]).html(e)},b.close=function(s,r){var e,t,l=(e=h("."+u[0]).children("#"+s).closest("."+u[0]))[0]?(s=e.attr("times"),e):h("#"+u[0]+s),c=l.attr("type"),i=l.data("config")||{},f=i.id&&i.hideOnClose;l[0]&&(t=function(){var o={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[i.anim]||"layer-anim-close",e=function(){var e="layui-layer-wrap";if(f)return l.removeClass("layer-anim "+o),l.hide();if(c===d.type[1]&&"object"===l.attr("conType")){l.children(":not(."+u[5]+")").remove();for(var t=l.find("."+e),i=0;i<2;i++)t.unwrap();t.css("display",t.data("display")).removeClass(e)}else{if(c===d.type[2])try{var n=h("#"+u[4]+s)[0];n.contentWindow.document.write(""),n.contentWindow.close(),l.find("."+u[5])[0].removeChild(n)}catch(a){}l[0].innerHTML="",l.remove()}"function"==typeof d.end[s]&&d.end[s](),delete d.end[s],"function"==typeof r&&r(),d.events.resize[s]&&(g.off("resize",d.events.resize[s]),delete d.events.resize[s])},t=h("#"+u.SHADE+s);b.ie&&b.ie<10||!i.isOutAnim?t[f?"hide":"remove"]():(t.css({opacity:0}),setTimeout(function(){t[f?"hide":"remove"]()},350)),i.isOutAnim&&l.addClass("layer-anim "+o),6==b.ie&&d.reselect(),d.restScrollbar(s),"string"==typeof l.attr("minLeft")&&(d.minStackIndex--,d.minStackArr.push(l.attr("minLeft"))),b.ie&&b.ie<10||!i.isOutAnim?e():setTimeout(function(){e()},200)},f||"function"!=typeof d.beforeEnd[s]?(delete d.beforeEnd[s],t()):d.promiseLikeResolve(d.beforeEnd[s]()).then(function(e){!1!==e&&(delete d.beforeEnd[s],t())},function(e){e!==m&&p.console&&p.console.error("layer error hint: "+e)}))},b.closeAll=function(n,a){"function"==typeof n&&(a=n,n=null);var o=h("."+u[0]);h.each(o,function(e){var t=h(this),i=n?t.attr("type")===n:1;i&&b.close(t.attr("times"),e===o.length-1?a:null)}),0===o.length&&"function"==typeof a&&a()},b.closeLast=function(i,e){var t,n=[],a=h.isArray(i);h("string"==typeof i?".layui-layer-"+i:".layui-layer").each(function(e,t){t=h(t);if(a&&-1===i.indexOf(t.attr("type"))||"none"===t.css("display"))return!0;n.push(Number(t.attr("times")))}),0":'",s=i.success;return delete i.success,b.open(h.extend({type:1,btn:[x.$t("layer.confirm"),x.$t("layer.cancel")],content:o,skin:"layui-layer-prompt"+w("prompt"),maxWidth:g.width(),success:function(e){(a=e.find(".layui-layer-input")).val(i.value||"").focus(),"function"==typeof s&&s(e)},resize:!1,yes:function(e){var t=a.val();t.length>(i.maxlength||500)?b.tips(x.$t("layer.prompt.InputLengthPrompt",{length:i.maxlength||500}),a,{tips:1}):n&&n(t,e,a)}},i))},b.tab=function(n){var a=(n=n||{}).tab||{},o="layui-this",s=n.success;return delete n.success,b.open(h.extend({type:1,skin:"layui-layer-tab"+w("tab"),resize:!1,title:function(){var e=a.length,t=1,i="";if(0'+a[0].title+"";t"+a[t].title+"";return i}(),content:'
        '+function(){var e=a.length,t=1,i="";if(0'+(a[0].content||"no content")+"";t'+(a[t].content||"no content")+"";return i}()+"
      ",success:function(e){var t=e.find(".layui-layer-title").children(),i=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var e=h(this),t=e.index();e.addClass(o).siblings().removeClass(o),i.eq(t).show().siblings().hide(),"function"==typeof n.change&&n.change(t)}),"function"==typeof s&&s(e)}},n))},b.photos=function(n,e,a){var s={};if((n=h.extend(!0,{toolbar:!0,footer:!0},n)).photos){var t=!("string"==typeof n.photos||n.photos instanceof h),i=t?n.photos:{},o=i.data||[],r=i.start||0,l=n.success;if(s.imgIndex=1+(0|r),n.img=n.img||"img",delete n.success,t){if(0===o.length)return b.msg(x.$t("layer.photos.noData"))}else{var c=h(n.photos),f=function(){o=[],c.find(n.img).each(function(e){var t=h(this);t.attr("layer-index",e),o.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(f(),e||c.on("click",n.img,function(){f();var e=h(this).attr("layer-index");b.photos(h.extend(n,{photos:{start:e,data:o,tab:n.tab},full:n.full}),!0)}),!e)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=o.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>o.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){var t;s.end||(t=e.keyCode,e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&b.close(s.index))},s.tabimg=function(e){if(!(o.length<=1))return i.start=s.imgIndex-1,b.close(s.index),b.photos(n,!0,e)},s.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},s.image={},s.getTransform=function(e){var t=[],i=e.rotate,n=e.scaleX,e=e.scale;return s.isNumber(i)&&0!==i&&t.push("rotate("+i+"deg)"),s.isNumber(n)&&1!==n&&t.push("scaleX("+n+")"),s.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},s.event=function(e,i,n){var a,o;s.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),s.imgprev(!0)}),s.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),s.imgnext(!0)}),h(document).on("keyup",s.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=h(this);switch(e.attr("toolbar-event")){case"rotate":s.image.rotate=((s.image.rotate||0)+Number(e.attr("data-option")))%360,s.imgElem.css({transform:s.getTransform(s.image)});break;case"scalex":s.image.scaleX=-1===s.image.scaleX?1:-1,s.imgElem.css({transform:s.getTransform(s.image)});break;case"zoom":var t=Number(e.attr("data-option"));s.image.scale=(s.image.scale||1)+t,t<0&&s.image.scale<0-t&&(s.image.scale=0-t),s.imgElem.css({transform:s.getTransform(s.image)});break;case"reset":s.image.scaleX=1,s.image.scale=1,s.image.rotate=0,s.imgElem.css({transform:"none"});break;case"close":b.close(i)}n.offset(),n.auto(i)}),s.main.on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,i=s.main.find('[toolbar-event="zoom"]');(0n)&&("left"===t.direction?s.imgnext(!0):"right"===t.direction&&s.imgprev(!0))},h.each([n.shadeo,s.main],function(e,t){a.touchSwipe(t,{onTouchEnd:o})}))},s.loadi=b.load(1,{shade:!("shade"in n)&&[.9,m,"unset"],scrollbar:!1});var t=o[r].src,d=function(e){b.close(s.loadi);var t,i=o[r].alt||"";a&&(n.anim=-1),s.index=b.open(h.extend({type:1,id:"layui-layer-photos",area:(e=[e.width,e.height],t=[h(p).width()-100,h(p).height()-100],!n.full&&(t[0]'+i+''+(t=['
      '],1','','',"
      "].join("")),n.toolbar&&t.push(['
      ','','','','','','',"
      "].join("")),n.footer&&t.push(['"].join("")),t.push("
      "),t.join(""))+"
      ",success:function(e,t,i){s.main=e.find(".layer-layer-photos-main"),s.footer=e.find(".layui-layer-photos-footer"),s.imgElem=s.main.children("img"),s.event(e,t,i),n.tab&&n.tab(o[r],e),"function"==typeof l&&l(e)},end:function(){s.end=!0,h(document).off("keyup",s.keyup)}},n))},u=function(){b.close(s.loadi),b.msg(''+x.$t("layer.photos.urlError.prompt")+"",{time:3e4,btn:[x.$t("layer.photos.urlError.confirm"),x.$t("layer.photos.urlError.cancel")],yes:function(){1").addClass(r));layui.each(i.bars,function(t,e){var n=s('
    • ');n.addClass(e.icon).attr({"lay-type":e.type,style:e.style||(i.bgcolor?"background-color: "+i.bgcolor:"")}).html(e.content),n.on("click",function(){var t=s(this).attr("lay-type");"top"===t&&("body"===i.target?s("html,body"):c).animate({scrollTop:0},i.duration),"function"==typeof i.click&&i.click.call(this,t)}),"object"===layui.type(i.on)&&layui.each(i.on,function(t,e){n.on(t,function(){var t=s(this).attr("lay-type");"function"==typeof e&&e.call(this,t)})}),"top"===e.type&&(n.addClass("layui-fixbar-top"),o=n),l.append(n)}),u.find("."+r).remove(),"object"==typeof i.css&&l.css(i.css),u.append(l),o&&(e=function e(){return c.scrollTop()>=i.margin?t||(o.show(),t=1):t&&(o.hide(),t=0),e}()),c.on("scroll",function(){e&&(clearTimeout(n),n=setTimeout(function(){e()},100))})},countdown:function(i){i=s.extend(!0,{date:new Date,now:new Date},i);var o=arguments,r=(1r-t.margin||u."+w,O=function(e){var i=this;i.index=++a.index,i.config=c.extend({},i.config,a.config,e),i.stopClickOutsideEvent=c.noop,i.stopResizeEvent=c.noop,i.init()};O.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:[200,300],shade:0,accordion:!1,closeOnClick:!0},O.prototype.reload=function(e,i){var t=this;t.config=c.extend({},t.config,e),t.init(!0,i)},O.prototype.init=function(e,i){var t=this,n=t.config,o=c(n.elem);return 1",(t="href"in i?''+a+"":a,n?'
      '+t+("parent"===l?'':"group"===l&&s.isAllowSpread?'':"")+"
      ":'
      '+t+"
      "),"
    • "].join(""))).data("item",i),n&&(o=c('
      '),t=c("
        "),"parent"===l?(o.append(u(t,i[d.children])),a.append(o)):a.append(u(t,i[d.children]))),r.append(a))}),r},t=['
        ',"
        "].join(""),n=s.content||(n=c('
          '),0'+r.$t("dropdown.noData")+""),n),o=v.findMainElem(s.id);"reloadData"===e&&o.length?(i=a.mainElem=o).html(n):((i=a.mainElem=c(t)).append(n),i.addClass(s.className),i.attr("style",s.style),a.remove(s.id),s.target.append(i),s.elem.data(y,!0),e=s.shade?'
          ':"",o=c(e),"touchstart"==f&&o.on(f,function(e){e.preventDefault()}),i.before(o),"mouseenter"===s.trigger&&i.on("mouseenter",function(){clearTimeout(a.timer)}).on("mouseleave",function(){a.delayRemove()})),a.position(),i.find(".layui-menu").on(f,function(e){layui.stope(e)}),i.find(".layui-menu li").on("click",function(e){var i=c(this),t=i.data("item")||{},n=t[d.children]&&0n.width()&&(t.addClass(b),(i=t[0].getBoundingClientRect()).left<0)&&t.removeClass(b),i.bottom>n.height())&&t.eq(0).css("margin-top",-(i.bottom-n.height()+5))}).on("mouseleave",t,function(e){var i=c(this).children("."+o);i.removeClass(b),i.css("margin-top",0)}),a.close=function(e){e=v.getThis(e);return e?(e.remove(),v.call(e)):this},a.open=function(e){e=v.getThis(e);return e?(e.render(),v.call(e)):this},a.reload=function(e,i,t){e=v.getThis(e);return e?(e.reload(i,t),v.call(e)):this},a.reloadData=function(){var t=c.extend([],arguments),n=(t[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(t[1],function(e,i){n.test(e)||delete t[1][e]}),a.reload.apply(null,t)},a.render=function(e){e=new O(e);return v.call(e)},e(s,a)});layui.define(["component","jquery","lay"],function(e){"use strict";var E=layui.$,I=layui.lay,t=layui.component({name:"slider",config:{type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,tipsAlways:!1,input:!1,range:!1,height:200,disabled:!1,theme:"#16baaa"},CONST:{ELEM_VIEW:"layui-slider",SLIDER_BAR:"layui-slider-bar",SLIDER_WRAP:"layui-slider-wrap",SLIDER_WRAP_BTN:"layui-slider-wrap-btn",SLIDER_TIPS:"layui-slider-tips",SLIDER_INPUT:"layui-slider-input",SLIDER_INPUT_TXT:"layui-slider-input-txt",SLIDER_INPUT_BTN:"layui-slider-input-btn",ELEM_HOVER:"layui-slider-hover"},render:function(e){var t,a=this,n=a.config,i=(n.step<=0&&(n.step=1),n.maxn.max&&(n.value=n.max),s=(n.value-n.min)/(n.max-n.min)*100+"%"),n.disabled?"#c2c2c2":n.theme),l='
          '+(n.tips?'
          ":"")+'
          '+(n.range?'
          ':"")+"
          ",s=E(n.elem),o=s.next("."+S.ELEM_VIEW);if(o[0]&&o.remove(),a.elemTemp=E(l),n.range?(a.elemTemp.find("."+S.SLIDER_WRAP).eq(0).data("value",n.value[0]),a.elemTemp.find("."+S.SLIDER_WRAP).eq(1).data("value",n.value[1])):a.elemTemp.find("."+S.SLIDER_WRAP).data("value",n.value),s.html(a.elemTemp),"vertical"===n.type&&a.elemTemp.height(n.height+"px"),n.showstep){for(var r=(n.max-n.min)/n.step,u="",c=1;c<1+r;c++){var d=100*c/r;d<100&&(u+='
          ')}a.elemTemp.append(u)}function p(e){e=e.parent().data("value"),e=n.setTips?n.setTips(e):e;a.elemTemp.find("."+S.SLIDER_TIPS).html(e)}function m(e){var t="vertical"===n.type?n.height:a.elemTemp[0].offsetWidth,i=a.elemTemp.find("."+S.SLIDER_WRAP);return("vertical"===n.type?t-e.parent()[0].offsetTop-i.height():e.parent()[0].offsetLeft)/t*100}function v(e){"vertical"===n.type?a.elemTemp.find("."+S.SLIDER_TIPS).css({bottom:e+"%","margin-bottom":"20px",display:"inline-block"}):a.elemTemp.find("."+S.SLIDER_TIPS).css({left:e+"%",display:"inline-block"})}n.input&&!n.range&&(i=E('
          '),s.css("position","relative"),s.append(i),s.find("."+S.SLIDER_INPUT_TXT).children("input").val(n.value),"vertical"===n.type?i.css({left:0,top:-48}):a.elemTemp.css("margin-right",i.outerWidth()+15)),n.disabled?(a.elemTemp.addClass(S.CLASS_DISABLED),a.elemTemp.find("."+S.SLIDER_WRAP_BTN).addClass(S.CLASS_DISABLED)):a.slide(),n.tips&&(n.tipsAlways?(p(o=a.elemTemp.find("."+S.SLIDER_WRAP_BTN)),v(m(o))):a.elemTemp.find("."+S.SLIDER_WRAP_BTN).on("mouseover",function(){p(E(this));var e=m(E(this));clearTimeout(t),t=setTimeout(function(){v(e)},300)}).on("mouseout",function(){clearTimeout(t),n.tipsAlways||a.elemTemp.find("."+S.SLIDER_TIPS).css("display","none")}))},extendsInstance:function(){var i=this,a=i.config;return{setValue:function(e,t){return e=(e=e>a.max?a.max:e)a[1]&&a.reverse(),u.value=c.range?a:l,c.change&&c.change(u.value),"done"===i&&c.done&&c.done(u.value)},y=function(e){var t=e/p()*100/v,i=Math.round(t)*v;return i=e==p()?Math.ceil(t)*v:i},T=E(['
          p()?p():t)/p()*100/v;h(t,o),r.addClass(S.ELEM_HOVER),d.find("."+S.SLIDER_TIPS).show(),e.preventDefault()},a=function(e){r.removeClass(S.ELEM_HOVER),c.tipsAlways||setTimeout(function(){d.find("."+S.SLIDER_TIPS).hide()},e)},n=function(){a&&a(I.touchEventsSupported()?1e3:0),T.remove(),c.done&&c.done(u.value),I.touchEventsSupported()&&(t[0].removeEventListener("touchmove",i,!!I.passiveSupported&&{passive:!1}),t[0].removeEventListener("touchend",n),t[0].removeEventListener("touchcancel",n))},E("#LAY-slider-moving")[0]||E("body").append(T),T.on("mousemove",i),T.on("mouseup",n).on("mouseleave",n),I.touchEventsSupported()&&(t[0].addEventListener("touchmove",i,!!I.passiveSupported&&{passive:!1}),t[0].addEventListener("touchend",n),t[0].addEventListener("touchcancel",n))})}),d.on("click",function(e){var t=E("."+S.SLIDER_WRAP_BTN),i=E(this);!t.is(event.target)&&0===t.has(event.target).length&&t.length&&(i=(t=(t=(t="vertical"===c.type?p()-e.clientY+i.offset().top-E(window).scrollTop():e.clientX-i.offset().left-E(window).scrollLeft())<0?0:t)>p()?p():t)/p()*100/v,t=c.range?"vertical"===c.type?Math.abs(t-parseInt(E(m[0]).css("bottom")))>Math.abs(t-parseInt(E(m[1]).css("bottom")))?1:0:Math.abs(t-m[0].offsetLeft)>Math.abs(t-m[1].offsetLeft)?1:0:0,h(i,t,"done"),e.preventDefault())}),o.children("."+S.SLIDER_INPUT_BTN).children("i").each(function(t){E(this).on("click",function(){r=o.children("."+S.SLIDER_INPUT_TXT).children("input").val();var e=((r=1==t?r-c.stepc.max?c.max:Number(r)+c.step)-c.min)/(c.max-c.min)*100/v;h(e,0,"done")})});var a=function(){var e=this.value,e=(e=(e=(e=isNaN(e)?0:e)c.max?c.max:e,((this.value=e)-c.min)/(c.max-c.min)*100/v);h(e,0,"done")};o.children("."+S.SLIDER_INPUT_TXT).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),a.call(this))}).on("change",a)},e(S.MOD_NAME,t)});layui.define(["i18n","jquery","lay"],function(e){"use strict";var x=layui.$,P=layui.lay,o=layui.hint(),n=layui.i18n,i=layui.device().mobile?"click":"mousedown",l={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var i=this;return i.config=x.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this.config,i=e.id;return r.that[i]=this,{config:e}},t="colorpicker",c="layui-colorpicker",a=".layui-colorpicker-main",C="layui-icon-down",w="layui-icon-close",T="layui-colorpicker-trigger-span",B="layui-colorpicker-trigger-i",I="layui-colorpicker-side-slider",E="layui-colorpicker-basis",D="layui-colorpicker-alpha-bgcolor",Y="layui-colorpicker-alpha-slider",M="layui-colorpicker-basis-cursor",X="layui-colorpicker-main-input",j=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),t=Math.max(e.r,e.g,e.b),r=t-o;return i.b=t,i.s=0!==t?255*r/t:0,0!==i.s?e.r==t?i.h=(e.g-e.b)/r:e.g==t?i.h=2+(e.b-e.r)/r:i.h=4+(e.r-e.g)/r:i.h=-1,t===o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},F=function(e){var i,o={},t=e.h,r=255*e.s/100,e=255*e.b/100;return 0==r?o.r=o.g=o.b=e:(e=t%60*((i=e)-(r=(255-r)*e/255))/60,(t=360===t?0:t)<60?(o.r=i,o.b=r,o.g=r+e):t<120?(o.g=i,o.b=r,o.r=i-e):t<180?(o.g=i,o.r=r,o.b=r+e):t<240?(o.b=i,o.r=r,o.g=i-e):t<300?(o.b=i,o.g=r,o.r=r+e):t<360?(o.r=i,o.g=r,o.b=i-e):(o.r=0,o.g=0,o.b=0)),{r:Math.round(o.r),g:Math.round(o.g),b:Math.round(o.b)}},H=function(e){var e=F(e),o=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];return x.each(o,function(e,i){1===i.length&&(o[e]="0"+i)}),o.join("")},L=function(e){e=e.match(/[0-9]{1,3}/g)||[];return{r:e[0],g:e[1],b:e[2]}},W=x(window),s=x(document),d=function(e){this.index=++l.index,this.config=x.extend({},this.config,l.config,e),this.render()};d.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#16baaa","#16b777","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},d.prototype.render=function(){var e=this,i=e.config;if(1<(t=x(i.elem)).length)return layui.each(t,function(){l.render(x.extend({},i,{elem:this}))}),e;x.extend(i,P.options(t[0]));var o=x(['
          ',"",'','',"","","
          "].join("")),t=i.elem=x(i.elem);i.size&&o.addClass("layui-colorpicker-"+i.size),t.addClass("layui-inline").html(e.elemColorBox=o),i.id="id"in i?i.id:t.attr("id")||e.index,e.color=e.elemColorBox.find("."+T)[0].style.background,e.events()},d.prototype.renderPicker=function(){var o,e=this,i=e.config,t=e.elemColorBox[0],r=e.elemPicker=x(['
          ','
          ','
          ','
          ','
          ','
          ',"
          ",'
          ','
          ',"
          ","
          ",'
          ','
          ','
          ',"
          ","
          ",i.predefine?(o=['
          '],layui.each(i.colors,function(e,i){o.push(['
          ','
          ',"
          "].join(""))}),o.push("
          "),o.join("")):"",'
          ','
          ','',"
          ",'
          ','",'","","
          "].join(""));e.elemColorBox.find("."+T)[0];x(a)[0]&&x(a).data("index")==e.index?e.removePicker(d.thisElemInd):(e.removePicker(d.thisElemInd),x("body").append(r)),l.thisId=i.id,d.thisElemInd=e.index,d.thisColor=t.style.background,e.position(),e.pickerEvents()},d.prototype.removePicker=function(e){var i=this.config,e=x("#layui-colorpicker"+(e||this.index));return e[0]&&(e.remove(),delete l.thisId,"function"==typeof i.close)&&i.close(this.color),this},d.prototype.position=function(){var e=this,i=e.config;return P.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:i.position,align:"center"}),e},d.prototype.val=function(){var e,i=this,o=(i.config,i.elemColorBox.find("."+T)),t=i.elemPicker.find("."+X),r=o[0].style.backgroundColor;r?(e=j(L(r)),o=o.attr("lay-type"),i.select(e.h,e.s,e.b),"torgb"===o?t.find("input").val(r):"rgba"===o?(o=L(r),3===(r.match(/[0-9]{1,3}/g)||[]).length?(t.find("input").val("rgba("+o.r+", "+o.g+", "+o.b+", 1)"),i.elemPicker.find("."+Y).css("left",280)):(t.find("input").val(r),r=280*r.slice(r.lastIndexOf(",")+1,r.length-1),i.elemPicker.find("."+Y).css("left",r)),i.elemPicker.find("."+D)[0].style.background="linear-gradient(to right, rgba("+o.r+", "+o.g+", "+o.b+", 0), rgb("+o.r+", "+o.g+", "+o.b+"))"):t.find("input").val("#"+H(e))):(i.select(0,100,100),t.find("input").val(""),i.elemPicker.find("."+D)[0].style.background="",i.elemPicker.find("."+Y).css("left",280))},d.prototype.side=function(){var n=this,l=n.config,c=n.elemColorBox.find("."+T),a=c.attr("lay-type"),s=n.elemPicker.find(".layui-colorpicker-side"),o=n.elemPicker.find("."+I),d=n.elemPicker.find("."+E),t=n.elemPicker.find("."+M),u=n.elemPicker.find("."+D),f=n.elemPicker.find("."+Y),p=o[0].offsetTop/180*360,h=100-t[0].offsetTop/180*100,g=t[0].offsetLeft/260*100,v=Math.round(f[0].offsetLeft/280*100)/100,m=n.elemColorBox.find("."+B),e=n.elemPicker.find(".layui-colorpicker-pre").children("div"),y=function(e,i,o,t){n.select(e,i,o);var r=F({h:e,s:i,b:o}),e=H({h:e,s:i,b:o}),i=n.elemPicker.find("."+X).find("input");m.addClass(C).removeClass(w),c[0].style.background="rgb("+r.r+", "+r.g+", "+r.b+")","torgb"===a?i.val("rgb("+r.r+", "+r.g+", "+r.b+")"):"rgba"===a?(f.css("left",280*t),i.val("rgba("+r.r+", "+r.g+", "+r.b+", "+t+")"),c[0].style.background="rgba("+r.r+", "+r.g+", "+r.b+", "+t+")",u[0].style.background="linear-gradient(to right, rgba("+r.r+", "+r.g+", "+r.b+", 0), rgb("+r.r+", "+r.g+", "+r.b+"))"):i.val("#"+e),l.change&&l.change(x.trim(n.elemPicker.find("."+X).find("input").val()))},i=x(['
          '].join("")),b=function(e){x("#LAY-colorpicker-moving")[0]||x("body").append(i),i.on("mousemove",e),i.on("mouseup",function(){i.remove()}).on("mouseleave",function(){i.remove()})},r=!0,k=!0;o.on("mousedown",function(e,i){var t=this.offsetTop,r=(e.clientY===undefined?i:e).clientY;k&&layui.stope(e),b(function(e){var i=t+(e.clientY-r),o=s[0].offsetHeight,o=(i=o<(i=i<0?0:i)?o:i)/180*360;y(p=o,g,h,v),e.preventDefault()}),e.preventDefault()}),s.on("mousedown",function(e){var i=e.clientY-x(this).offset().top+W.scrollTop(),i=(i=(i=i<0?0:i)>this.offsetHeight?this.offsetHeight:i)/180*360;y(p=i,g,h,v),e.preventDefault(),r&&o.trigger("mousedown",e)}),t.on("mousedown",function(e,i){var n=this.offsetTop,l=this.offsetLeft,c=(e.clientY===undefined?i:e).clientY,a=(e.clientX===undefined?i:e).clientX;k&&layui.stope(e),b(function(e){var i=n+(e.clientY-c),o=l+(e.clientX-a),t=d[0].offsetHeight,r=d[0].offsetWidth,r=(o=r<(o=o<0?0:o)?r:o)/260*100,o=100-(i=t<(i=i<0?0:i)?t:i)/180*100;y(p,g=r,h=o,v),e.preventDefault()}),e.preventDefault()}),d.on("mousedown",function(e){var i=e.clientY-x(this).offset().top+W.scrollTop(),o=e.clientX-x(this).offset().left+W.scrollLeft(),o=((i=i<0?0:i)>this.offsetHeight&&(i=this.offsetHeight),(o=(o=o<0?0:o)>this.offsetWidth?this.offsetWidth:o)/260*100),i=100-i/180*100;y(p,g=o,h=i,v),layui.stope(e),e.preventDefault(),r&&t.trigger("mousedown",e)}),f.on("mousedown",function(e,i){var t=this.offsetLeft,r=(e.clientX===undefined?i:e).clientX;k&&layui.stope(e),b(function(e){var i=t+(e.clientX-r),o=u[0].offsetWidth,o=(o<(i=i<0?0:i)&&(i=o),Math.round(i/280*100)/100);y(p,g,h,v=o),e.preventDefault()}),e.preventDefault()}),u.on("mousedown",function(e){var i=e.clientX-x(this).offset().left,i=((i=i<0?0:i)>this.offsetWidth&&(i=this.offsetWidth),Math.round(i/280*100)/100);y(p,g,h,v=i),e.preventDefault(),r&&f.trigger("mousedown",e)}),e.each(function(){x(this).on("click",function(){x(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e=this.style.backgroundColor,i=j(L(e)),o=e.slice(e.lastIndexOf(",")+1,e.length-1);p=i.h,g=i.s,h=i.b,3===(e.match(/[0-9]{1,3}/g)||[]).length&&(o=1),v=o,y(i.h,i.s,i.b,o)})}),P.touchEventsSupported()&&layui.each([{elem:s,eventType:"mousedown"},{elem:u,eventType:"mousedown"},{elem:d,eventType:"mousedown"}],function(e,t){P.touchSwipe(t.elem,{onTouchStart:function(){k=r=!1},onTouchMove:function(e){var i,o;e=e,i=t.eventType,e=e.touches[0],(o=document.createEvent("MouseEvent")).initMouseEvent(i,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(o)},onTouchEnd:function(){i.remove(),k=r=!0}})})},d.prototype.select=function(e,i,o,t){this.config;var r=H({h:e,s:100,b:100}),e=(H({h:e,s:i,b:o}),e/360*180),o=180-o/100*180,i=i/100*260,n=this.elemPicker.find("."+E)[0];this.elemPicker.find("."+I).css("top",e),n.style.background="#"+r,this.elemPicker.find("."+M).css({top:o/n.offsetHeight*100+"%",left:i/n.offsetWidth*100+"%"})},d.prototype.pickerEvents=function(){var c=this,a=c.config,s=c.elemColorBox.find("."+T),d=c.elemPicker.find("."+X+" input"),o={clear:function(e){s[0].style.background="",c.elemColorBox.find("."+B).removeClass(C).addClass(w),c.color="",a.done&&a.done(""),c.removePicker()},confirm:function(e,i){var o,t,r,n,l=x.trim(d.val());-1>16,g:(65280&r)>>8,b:255&r},t=j(n),s[0].style.background=o="#"+H(t),c.elemColorBox.find("."+B).removeClass(w).addClass(C)),"change"===i?(c.select(t.h,t.s,t.b,i),a.change&&a.change(o)):(c.color=l,a.done&&a.done(l),c.removePicker())}};c.elemPicker.on("click","*[colorpicker-events]",function(){var e=x(this),i=e.attr("colorpicker-events");o[i]&&o[i].call(this,e)}),d.on("keyup",function(e){var i=x(this);o.confirm.call(this,i,13===e.keyCode?null:"change")})},d.prototype.events=function(){var e=this;e.config;e.elemColorBox.on("click",function(){e.renderPicker(),x(a)[0]&&(e.val(),e.side())})},s.on(i,function(e){var i,o,t;l.thisId&&(i=r.getThis(l.thisId))&&(o=i.config,t=i.elemColorBox.find("."+T),x(e.target).hasClass(c)||x(e.target).parents("."+c)[0]||x(e.target).hasClass(a.replace(/\./g,""))||x(e.target).parents(a)[0]||i.elemPicker&&(i.color?(e=j(L(i.color)),i.select(e.h,e.s,e.b)):i.elemColorBox.find("."+B).removeClass(C).addClass(w),t[0].style.background=i.color||"","function"==typeof o.cancel&&o.cancel(i.color),i.removePicker()))}),W.on("resize",function(){if(l.thisId){var e=r.getThis(l.thisId);if(e)return!(!e.elemPicker||!x(a)[0])&&void e.position()}}),r.that={},r.getThis=function(e){var i=r.that[e];return i||o.error(e?t+" instance with ID '"+e+"' not found":"ID argument required"),i},l.render=function(e){e=new d(e);return r.call(e)},e(t,l)});layui.define("jquery",function(t){"use strict";var u=layui.$,d=(layui.hint(),layui.device()),r="element",f="layui-this",y="layui-show",c=".layui-tab-title",i=function(){this.config={}},h=(i.prototype.set=function(t){return u.extend(!0,this.config,t),this},i.prototype.on=function(t,i){return layui.onevent.call(this,r,t,i)},i.prototype.tabAdd=function(t,i){var a,e=u(".layui-tab[lay-filter="+t+"]"),l=e.children(c),n=l.children(".layui-tab-bar"),s=e.children(".layui-tab-content"),o=""+(i.title||"unnaming")+"";return n[0]?n.before(o):l.append(o),s.append('
          "+(i.content||"")+"
          "),i.change&&this.tabChange(t,i.id),l.data("LAY_TAB_CHANGE",i.change),w.tabAuto(i.change?"change":null,e),this},i.prototype.tabDelete=function(t,i,a){t=u(".layui-tab[lay-filter="+t+"]").children(c).find('>li[lay-id="'+i+'"]');return w.tabDelete.call(t[0],{liElem:t,force:a}),this},i.prototype.tabChange=function(t,i,a){t=u(".layui-tab[lay-filter="+t+"]").children(c).find('>li[lay-id="'+i+'"]');return w.tabClick.call(t[0],{liElem:t,force:a}),this},i.prototype.tab=function(a){a=a||{},e.on("click",a.headerElem,function(t){var i=u(a.headerElem).index(u(this));w.tabClick.call(this,{index:i,options:a})})},i.prototype.progress=function(t,i){var a="layui-progress",t=u("."+a+"[lay-filter="+t+"]").find("."+a+"-bar"),a=t.find("."+a+"-text");return t.css("width",function(){return/^.+\/.+$/.test(i)?100*new Function("return "+i)()+"%":i}).attr("lay-percent",i),a.text(i),this},".layui-nav"),p="layui-nav-item",v="layui-nav-bar",b="layui-nav-tree",m="layui-nav-child",g="layui-nav-more",C="layui-anim layui-anim-upbit",w={tabClick:function(t){var i=(t=t||{}).options||{},a=t.liElem||u(this),e=i.headerElem?a.parent():a.parents(".layui-tab").eq(0),i=i.bodyElem?u(i.bodyElem):e.children(".layui-tab-content").children(".layui-tab-item"),l=a.find("a"),l="javascript:;"!==l.attr("href")&&"_blank"===l.attr("target"),n="string"==typeof a.attr("lay-unselect"),s=e.attr("lay-filter"),o=a.attr("lay-id"),c="index"in t?t.index:a.parent().children("li").index(a);if(!t.force){var t=a.siblings("."+f);if(!1===layui.event.call(this,r,"tabBeforeChange("+s+")",{elem:e,from:{index:a.parent().children("li").index(t),id:t.attr("lay-id")},to:{index:c,id:o}}))return}l||n||(a.addClass(f).siblings().removeClass(f),(o?t=(t=i.filter('[lay-id="'+o+'"]')).length?t:i.eq(c):i.eq(c)).addClass(y).siblings().removeClass(y)),layui.event.call(this,r,"tab("+s+")",{elem:e,index:c,id:o})},tabDelete:function(t){var i=(t=t||{}).liElem||u(this).parent(),a=i.parent().children("li").index(i),e=i.closest(".layui-tab"),l=e.children(".layui-tab-content").children(".layui-tab-item"),n=e.attr("lay-filter"),s=i.attr("lay-id");if(!t.force&&!1===layui.event.call(i[0],r,"tabBeforeDelete("+n+")",{elem:e,index:a,id:s}))return;i.hasClass(f)&&(i.next()[0]&&i.next().is("li")?w.tabClick.call(i.next()[0],{index:a+1}):i.prev()[0]&&i.prev().is("li")&&w.tabClick.call(i.prev()[0],null,a-1)),i.remove(),(s?t=(t=l.filter('[lay-id="'+s+'"]')).length?t:l.eq(a):l.eq(a)).remove(),setTimeout(function(){w.tabAuto(null,e)},50),layui.event.call(this,r,"tabDelete("+n+")",{elem:e,index:a,id:s})},tabAuto:function(l,t){var n="layui-tab-more",s="layui-tab-bar",o="layui-tab-close",c=this;(t||u(".layui-tab")).each(function(){var t=u(this),a=t.children(".layui-tab-title"),i=(t.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),i=u(''),e=(c===window&&d.ie,t.attr("lay-allowclose"));e&&"false"!==e&&a.find("li").each(function(){var t,i=u(this);i.find("."+o)[0]||"false"===i.attr("lay-allowclose")||((t=u('')).on("click",function(t){w.tabDelete.call(this,{e:t})}),i.append(t))}),"string"!=typeof t.attr("lay-unauto")&&(a.prop("scrollWidth")>a.outerWidth()+1||a.find("li").length&&a.height()>(e=a.find("li").eq(0).height())+e/2?("change"===l&&a.data("LAY_TAB_CHANGE")&&a.addClass(n),a.find("."+s)[0]||(a.append(i),t.attr("overflow",""),i.on("click",function(t){var i=a.hasClass(n);a[i?"removeClass":"addClass"](n)}))):(a.find("."+s).remove(),t.removeAttr("overflow")))})},hideTabMore:function(t){var i=u(".layui-tab-title");!0!==t&&"tabmore"===u(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=u(this),i=t.closest(h),a=i.attr("lay-filter"),e=t.parent(),l=t.siblings("."+m),n="string"==typeof e.attr("lay-unselect");if("javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||n||l[0]||(i.find("."+f).removeClass(f),e.addClass(f)),i.hasClass(b)){var n=p+"ed",s=!e.hasClass(n),o=function(){u(this).css({display:""}),i.children("."+v).css({opacity:0})};if(l.is(":animated"))return;l.removeClass(C),l[0]&&(s?(l.slideDown(200,o),e.addClass(n)):(e.removeClass(n),l.show().slideUp(200,o)),"string"!=typeof i.attr("lay-accordion")&&"all"!==i.attr("lay-shrink")||((s=e.siblings("."+n)).removeClass(n),s.children("."+m).show().stop().slideUp(200,o)))}layui.event.call(this,r,"nav("+a+")",t)},collapse:function(){var t=u(this),i=t.closest(".layui-collapse"),a=i.attr("lay-filter"),e=".layui-colla-content",l=t.parent(".layui-colla-item"),n=t.siblings(e),s="none"===n.css("display"),i="string"==typeof i.attr("lay-accordion"),o=function(){u(this).css("display","")};n.is(":animated")||(s?(n.slideDown(200,o),l.addClass(y)):(l.removeClass(y),n.show().slideUp(200,o)),i&&((i=l.siblings("."+y)).removeClass(y),i.children(e).show().slideUp(200,o)),layui.event.call(this,r,"collapse("+a+")",{title:t,content:n,show:s}))}},a=(i.prototype.render=i.prototype.init=function(t,i){var a="string"==typeof i&&i?'[lay-filter="'+i+'"]':"",e={tab:function(t){t=t||u(".layui-tab"+a);w.tabAuto.call({},null,t)},nav:function(t){var s={},o={},c={},r="layui-nav-title";(t||u(h+a)).each(function(t){var i=u(this),a=u(''),e=i.find("."+p),l=i.find("."+v);l[0]&&l.remove(),i.append(a),(i.hasClass(b)?e.find("dd,>."+r):e).off("mouseenter.lay_nav").on("mouseenter.lay_nav",function(){!function(t,i,a){var e,l=u(this),n=l.find("."+m);i.hasClass(b)?n[0]||(e=l.children("."+r),t.css({top:l.offset().top-i.offset().top+i.scrollTop(),height:(e[0]?e:l).outerHeight(),opacity:1})):(n.addClass(C),n.hasClass("layui-nav-child-c")&&n.css({left:-(n.outerWidth()-l.width())/2}),n[0]?t.css({left:t.position().left+t.width()/2,width:0,opacity:0}):t.css({left:l.position().left+parseFloat(l.css("marginLeft")),top:l.position().top+l.height()-t.height()}),s[a]=setTimeout(function(){t.css({width:n[0]?0:l.width(),opacity:n[0]?0:1})},d.ie&&d.ie<10?0:200),clearTimeout(c[a]),"block"===n.css("display")&&clearTimeout(o[a]),o[a]=setTimeout(function(){n.addClass(y),l.find("."+g).addClass(g+"d")},300))}.call(this,a,i,t)}).off("mouseleave.lay_nav").on("mouseleave.lay_nav",function(){i.hasClass(b)?a.css({height:0,opacity:0}):(clearTimeout(o[t]),o[t]=setTimeout(function(){i.find("."+m).removeClass(y),i.find("."+g).removeClass(g+"d")},300))}),i.off("mouseleave.lay_nav").on("mouseleave.lay_nav",function(){clearTimeout(s[t]),c[t]=setTimeout(function(){i.hasClass(b)||a.css({width:0,left:a.position().left+a.width()/2,opacity:0})},200)}),e.find("a").each(function(){var t=u(this);t.parent();t.siblings("."+m)[0]&&!t.children("."+g)[0]&&t.append(''),t.off("click",w.clickThis).on("click",w.clickThis)})})},breadcrumb:function(t){(t||u(".layui-breadcrumb"+a)).each(function(){var t=u(this),i="lay-separator",a=t.attr(i)||"/",e=t.find("a");e.next("span["+i+"]")[0]||(e.each(function(t){t!==e.length-1&&u(this).after(""+a+"")}),t.css("visibility","visible"))})},progress:function(t){var e="layui-progress";(t||u("."+e+a)).each(function(){var t=u(this),i=t.find(".layui-progress-bar"),a=i.attr("lay-percent");i.css("width",function(){return/^.+\/.+$/.test(a)?100*new Function("return "+a)()+"%":a}),t.attr("lay-showpercent")&&setTimeout(function(){i.html(''+a+"")},350)})},collapse:function(t){(t||u(".layui-collapse"+a)).each(function(){u(this).find(".layui-colla-item").each(function(){var t=u(this),i=t.find(".layui-colla-title"),a=t.find(".layui-colla-content"),e="none"===a.css("display");i.find(".layui-colla-icon").remove(),i.append(''),t[e?"removeClass":"addClass"](y),a.hasClass(y)&&a.removeClass(y),i.off("click",w.collapse).on("click",w.collapse)})})}};return t&&"object"==typeof i&&i instanceof u?e[t](i):e[t]?e[t]():layui.each(e,function(t,i){i()})},new i),e=u(document);u(function(){a.render()}),e.on("click",".layui-tab-title li",w.tabClick),u(window).on("resize",w.tabAuto),t(r,a)});layui.define(["lay","i18n","layer"],function(e){"use strict";var F=layui.$,a=layui.lay,i=layui.layer,R=layui.device(),T=layui.i18n,t="upload",f="layui_"+t+"_index",w={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var i=this;return i.config=F.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,t,e,i)}},o=function(){var i=this,e=i.config.id;return{upload:function(e){i.upload.call(i,e)},reload:function(e){i.reload.call(i,e)},config:(o.that[e]=i).config}},l="layui-upload-file",r="layui-upload-form",L="layui-upload-iframe",E="layui-upload-choose",O="UPLOADING",D=function(e){var i=this;i.index=++w.index,i.config=F.extend({},i.config,w.config,e),i.render()};D.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",force:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1,text:{"cross-domain":"Cross-domain requests are not supported","data-format-error":"Please return JSON data format","check-error":"",error:"","limit-number":null,"limit-size":null}},D.prototype.reload=function(e){var i=this;i.config=F.extend({},i.config,e),i.render(!0)},D.prototype.render=function(e){var i=this,t=i.config,n=F(t.elem);return 1"].join("")),n=i.elem.next();(n.hasClass(l)||n.hasClass(r))&&n.remove(),R.ie&&R.ie<10&&i.elem.wrap('
          '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(t),R.ie&&R.ie<10&&e.initIE()},D.prototype.initIE=function(){var t,e=this.config,i=F(''),n=F(['
          ',"
          "].join(""));F("#"+L)[0]||F("body").append(i),e.elem.next().hasClass(r)||(this.elemFile.wrap(n),e.elem.next("."+r).append((t=[],layui.each(e.data,function(e,i){i="function"==typeof i?i():i,t.push('')}),t.join(""))))},D.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},D.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},D.prototype.preview=function(n){window.FileReader&&layui.each(this.chooseFiles,function(e,i){var t=new FileReader;t.readAsDataURL(i),t.onload=function(){n&&n(e,i,this.result)}})},D.prototype.upload=function(e,i){var t,n,a,o,l,u=this,s=u.config,f=s.text||{},r=u.elemFile[0],c=function(){return e||u.files||u.chooseFiles||r.files},d=function(){var a=0,o=0,l=c(),r=function(){s.multiple&&a+o===u.fileLength&&"function"==typeof s.allDone&&s.allDone({total:u.fileLength,successful:a,failed:o})},t=function(t){var n=new FormData,i=function(e){t.unified?layui.each(l,function(e,i){delete i[O]}):delete e[O]};if(layui.each(s.data,function(e,i){i="function"==typeof i?t.unified?i():i(t.index,t.file):i,n.append(e,i)}),t.unified)layui.each(l,function(e,i){i[O]||(i[O]=!0,n.append(s.field,i))});else{if(t.file[O])return;n.append(s.field,t.file),t.file[O]=!0}var e={url:s.url,type:"post",data:n,dataType:s.dataType||"json",contentType:!1,processData:!1,headers:s.headers||{},success:function(e){s.unified?a+=u.fileLength:a++,m(t.index,e),r(t.index),i(t.file)},error:function(e){s.unified?o+=u.fileLength:o++,u.msg(f.error||["Upload failed, please try again.","status: "+(e.status||"")+" - "+(e.statusText||"error")].join("
          ")),g(t.index,e.responseText,e),r(t.index),i(t.file)}};"function"==typeof s.progress&&(e.xhr=function(){var e=F.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var i;e.lengthComputable&&(i=Math.floor(e.loaded/e.total*100),s.progress(i,(s.item||s.elem)[0],e,t.index))}),e}),F.ajax(e)};s.unified?t({unified:!0,index:0}):layui.each(l,function(e,i){t({index:e,file:i})})},p=function(){var n=F("#"+L);u.elemFile.parent().submit(),clearInterval(D.timer),D.timer=setInterval(function(){var e,i=n.contents().find("body");try{e=i.text()}catch(t){u.msg(f["cross-domain"]),clearInterval(D.timer),g()}e&&(clearInterval(D.timer),i.html(""),m(0,e))},30)},h=function(e){if("json"===s.force&&"object"!=typeof e)try{return{status:"CONVERTED",data:JSON.parse(e)}}catch(i){return u.msg(f["data-format-error"]),{status:"FORMAT_ERROR",data:{}}}return{status:"DO_NOTHING",data:{}}},m=function(e,i){u.elemFile.next("."+E).remove(),r.value="";var t=h(i);switch(t.status){case"CONVERTED":i=t.data;break;case"FORMAT_ERROR":return}"function"==typeof s.done&&s.done(i,e||0,function(e){u.upload(e)})},g=function(e,i,t){s.auto&&(r.value="");var n=h(i);switch(n.status){case"CONVERTED":i=n.data;break;case"FORMAT_ERROR":return}"function"==typeof s.error&&s.error(e||0,function(e){u.upload(e)},i,t)},v=s.exts,y=(n=[],layui.each(e||u.chooseFiles,function(e,i){n.push(i.name)}),n),x={preview:function(e){u.preview(e)},upload:function(e,i){var t={};t[e]=i,u.upload(t)},pushFile:function(){return u.files=u.files||{},layui.each(u.chooseFiles,function(e,i){u.files[e]=i}),u.files},resetFile:function(e,i,t){i=new File([i],t);u.files=u.files||{},u.files[e]=i},getChooseFiles:function(){return u.chooseFiles}},b={file:T.$t("upload.fileType.file"),images:T.$t("upload.fileType.image"),video:T.$t("upload.fileType.video"),audio:T.$t("upload.fileType.audio")}[s.accept]||T.$t("upload.fileType.file"),y=0===y.length?r.value.match(/[^\/\\]+\..+/g)||[]:y;if(0!==y.length){switch(s.accept){case"file":layui.each(y,function(e,i){if(v&&!RegExp(".\\.("+v+")$","i").test(escape(i)))return t=!0});break;case"video":layui.each(y,function(e,i){if(!RegExp(".\\.("+(v||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(i)))return t=!0});break;case"audio":layui.each(y,function(e,i){if(!RegExp(".\\.("+(v||"mp3|wav|mid")+")$","i").test(escape(i)))return t=!0});break;default:layui.each(y,function(e,i){if(!RegExp(".\\.("+(v||"jpg|png|gif|bmp|jpeg|svg|webp")+")$","i").test(escape(i)))return t=!0})}if(t)return u.msg(f["check-error"]||T.$t("upload.validateMessages.fileExtensionError",{fileType:b})),r.value="";if("choose"!==i&&!s.auto||(s.choose&&s.choose(x),"choose"!==i)){if(u.fileLength=(a=0,b=c(),layui.each(b,function(){a++}),a),s.number&&u.fileLength>s.number)return u.msg("function"==typeof f["limit-number"]?f["limit-number"](s,u.fileLength):T.$t("upload.validateMessages.filesOverLengthLimit",{length:s.number})+"
          "+T.$t("upload.validateMessages.currentFilesLength",{length:u.fileLength}));if(01024*s.size&&(i=1<=(i=s.size/1024)?i.toFixed(2)+"MB":s.size+"KB",r.value="",o=i)}),o)return u.msg("function"==typeof f["limit-size"]?f["limit-size"](s,o):T.$t("upload.validateMessages.fileOverSizeLimit",{size:o}));l=function(){if(R.ie)return(9'+e+"")},r=function(t){var n=!0;return layui.each(a.files,function(e,i){if(!(n=!(i.name===t.name)))return!0}),n},u=function(e){var t=function(e){e.ext=e.name.substr(e.name.lastIndexOf(".")+1).toLowerCase(),e.sizes=w.util.parseSize(e.size)};return e instanceof FileList?layui.each(e,function(e,i){t(i)}):t(e),e},s=function(e){var t;return(e=e||[]).length?a.files?(t=[],layui.each(e,function(e,i){r(i)&&t.push(u(i))}),t):u(e):[]};n.elem.off("upload.start").on("upload.start",function(){var e=F(this);a.config.item=e,a.elemFile[0].click()}),R.ie&&R.ie<10||n.elem.off("upload.over").on("upload.over",function(){F(this).attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){F(this).removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(e,i){var t=F(this),i=s(i.originalEvent.dataTransfer.files);t.removeAttr("lay-over"),o(i),n.auto?a.upload():l(i)}),a.elemFile.on("change",function(){var e=s(this.files);0!==e.length&&(o(e),n.auto?a.upload():l(e))}),n.bindAction.off("upload.action").on("upload.action",function(){a.upload()}),n.elem.data(f)||(n.elem.on("click",function(){a.isFile()||F(this).trigger("upload.start")}),n.drag&&n.elem.on("dragover",function(e){e.preventDefault(),F(this).trigger("upload.over")}).on("dragleave",function(e){F(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),F(this).trigger("upload.drop",e)}),n.bindAction.on("click",function(){F(this).trigger("upload.action")}),n.elem.data(f,n.id))},w.util={parseSize:function(e,i){var t,n;return i=i||2,null!=e&&e?(t="string"==typeof e?parseFloat(e):e,n=Math.floor(Math.log(t)/Math.log(1024)),(e=(e=t/Math.pow(1024,n))%1==0?e:parseFloat(e.toFixed(i)))+["Bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"][n]):"0"},promiseLikeResolve:function(e){var i=F.Deferred();return e&&"function"==typeof e.then?e.then(i.resolve,i.reject):i.resolve(e),i.promise()}},o.that={},o.getThis=function(e){var i=o.that[e];return i||hint.error(e?t+" instance with ID '"+e+"' not found":"ID argument required"),i},w.render=function(e){e=new D(e);return o.call(e)},e(t,w)});layui.define(["lay","i18n","layer","util"],function(e){"use strict";var $=layui.$,h=layui.layer,p=layui.util,N=layui.lay,l=layui.hint(),T=(layui.device(),layui.i18n),M="form",f=".layui-form",E="layui-this",O="layui-hide",A="layui-disabled",y="layui-input-number-invalid",S=N.createSharedResizeObserver(M),v=N.ie&&8===parseFloat(N.ie)||void 0===Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"checked"),t=function(){this.config={verify:{required:function(e){if(!/[\S]+/.test(e)||e===undefined||null===e)return T.$t("form.validateMessages.required")},phone:function(e){if(e&&!/^1\d{10}$/.test(e))return T.$t("form.validateMessages.phone")},email:function(e){if(e&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e))return T.$t("form.validateMessages.email")},url:function(e){if(e&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(e))return T.$t("form.validateMessages.url")},number:function(e){if(e&&isNaN(e))return T.$t("form.validateMessages.number")},date:function(e){if(e&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(e))return T.$t("form.validateMessages.date")},identity:function(e){if(e&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e))return T.$t("form.validateMessages.identity")}},autocomplete:null}},i=(t.prototype.set=function(e){return $.extend(!0,this.config,e),this},t.prototype.verify=function(e){return $.extend(!0,this.config.verify,e),this},t.prototype.getFormElem=function(e){return $(f+(e?'[lay-filter="'+e+'"]':""))},t.prototype.on=function(e,t){return layui.onevent.call(this,M,e,t)},t.prototype.val=function(e,o){return this.getFormElem(e).each(function(e,t){var i,a,n,l,r=$(this);for(i in o)N.hasOwn(o,i)&&(n=o[i],(l=r.find('[name="'+i+'"]'))[0])&&("checkbox"===(a=l[0].type)?l[0].checked=n:"radio"===a?l.each(function(){this.checked=this.value==n+""}):l.val(n))}),r.render(null,e),this.getValue(e)},t.prototype.getValue=function(e,t){t=t||this.getFormElem(e);var n={},l={},e=t.find("input,select,textarea");return layui.each(e,function(e,t){var i,a=$(this);t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name&&(/^.*\[\]$/.test(t.name)&&(i=t.name.match(/^(.*)\[\]$/g)[0],n[i]=0|n[i],i=t.name.replace(/^(.*)\[\]$/,"$1["+n[i]+++"]")),/^(checkbox|radio)$/.test(t.type)&&!t.checked||(l[i||t.name]="SELECT"===this.tagName&&"string"==typeof this.getAttribute("multiple")?a.val()||[]:this.value))}),l},t.prototype.render=function(e,t){var d=this,i=d.config,a=$(f+(t?'[lay-filter="'+t+'"]':"")),n={input:function(e){var e=e||a.find("input,textarea"),h=(i.autocomplete&&e.attr("autocomplete",i.autocomplete),function(e,t){var i=e.val(),a=Number(i),n=Number(e.attr("step"))||1,l=Number(e.attr("min")),r=Number(e.attr("max")),o=Number(e.attr("lay-precision")),s="click"!==t&&""===i,c="init"===t,u=isNaN(a),d="string"==typeof e.attr("lay-step-strictly");if(e.toggleClass(y,u),!u){if("click"===t){if("text"===e[0].type&&"string"==typeof e.attr("readonly"))return;a=!!$(this).index()?a-n:a+n}u=function(e){return((e.toString().match(/\.(\d+$)/)||[])[1]||"").length},o=0<=o?o:Math.max(u(n),u(i));s||(c||r<=(a=(a=d?Math.round(a/n)*n:a)<=l?l:a)&&(a=r),0===o?a=parseInt(a):0'),e=layui.isArray(i.value)?i.value:[i.value],e=$((a=[],layui.each(e,function(e,t){a.push('')}),a.join(""))),n=(t.append(e),i.split&&t.addClass("layui-input-split"),i.className&&t.addClass(i.className),r.next("."+u)),l=(n[0]&&n.remove(),r.parent().hasClass(s)||r.wrap('
          '),r.next("."+c));l[0]?((n=l.find("."+u))[0]&&n.remove(),l.prepend(t),r.css("padding-right",function(){return(r.closest(".layui-input-group")[0]?0:l.outerWidth())+t.outerWidth()})):(t.addClass(c),r.after(t)),"auto"===i.show&&d(t,r.val()),"function"==typeof i.init&&i.init.call(this,r,i),r.on("input propertychange",function(){var e=this.value;"auto"===i.show&&d(t,e)}),r.on("blur",function(){"function"==typeof i.blur&&i.blur.call(this,r,i)}),e.on("click",function(){var e=r.attr("lay-filter");$(this).hasClass(A)||("function"==typeof i.click&&i.click.call(this,r,i),layui.event.call(this,M,"input-affix("+e+")",{elem:r[0],affix:o,options:i}))})},p={eye:{value:"eye-invisible",click:function(e,t){var i="LAY_FORM_INPUT_AFFIX_SHOW",a=e.data(i);e.attr("type",a?"password":"text").data(i,!a),n({value:a?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(e){e.val("").focus(),d($(this).parent(),null)},show:"auto",disabled:e},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:r.is("[disabled]"),init:function(a){var e,n,l,t,i,r;"text"!==a.attr("type")&&"text"!==a[0].type||(l=n=!(e=".lay_input_number"),t="string"==typeof a.attr("readonly"),i="string"==typeof a.attr("lay-wheel"),r=a.next(".layui-input-number").children("i"),a.attr("lay-input-mirror",a.val()),a.off(e),a.on("keydown"+e,function(e){n=!1,8!==e.keyCode&&46!==e.keyCode||(n=!0),t||2!==r.length||38!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),r.eq(38===e.keyCode?0:1).click())}),a.on("input"+e+" propertychange"+e,function(e){var t,i;l||"propertychange"===e.type&&"value"!==e.originalEvent.propertyName||(n||""===(e=this.value)||"00"!==e.slice(0,2)&&!e.match(/\s/g)&&!((t=e.match(/\./g))&&1=Math.abs(e.deltaY)?e.deltaX:e.deltaY):"mousewheel"===e.type?t=-e.originalEvent.wheelDelta:"DOMMouseScroll"===e.type&&(t=e.originalEvent.detail),r.eq(0j.height()&&t<=e&&l.addClass(C+"up"),h(),s&&g.off("mousedown.lay_select_ieph").on("mousedown.lay_select_ieph",function(){m[0].__ieph=!0,setTimeout(function(){m[0].__ieph=!1},60)}),n=N.onClickOutside((a?l:g)[0],function(){p(),x&&m.val(x)},{ignore:v,detectIframe:!0,capture:!1})},p=function(e){v.parent().removeClass(C+"ed "+C+"up"),m.blur(),u&&g.children("."+_).remove(),"function"==typeof n&&(n(),n=null),a&&(l.detach(),$(window).off("resize.lay_select_resize"),S)&&S.unobserve(l[0]),e||f(m.val(),function(e){var t=y[0].selectedIndex;e&&(x=$(y[0].options[t]).prop("text"),0===t&&x===m.attr("placeholder")&&(x=""),m.val(x||""))})},h=function(){var e,t,i=g.children("dd."+E);i[0]&&(e=i.position().top,t=g.height(),i=i.height(),t").addClass(_).attr("lay-value",n).text(n),a=(i=g.children().eq(0)).hasClass("layui-select-tips"),i[a?"after":"before"](t)):e?g.find("."+w)[0]||g.append('

          '+T.$t("form.select.noMatch")+"

          "):g.find("."+w).remove()},"keyup"),""===n&&(y.val(""),g.find("."+E).removeClass(E),(y[0].options[0]||{}).value||g.children("dd:eq(0)").addClass(E),g.find("."+w).remove(),u)&&g.children("."+_).remove(),void h()))},50)).on("blur",function(e){var t=y[0].selectedIndex;x=$(y[0].options[t]).prop("text"),0===t&&x===m.attr("placeholder")&&(x=""),setTimeout(function(){f(m.val(),function(e){x||m.val("")},"blur")},200)}),g.on("click","dd",function(){var e,t,i=$(this),a=i.attr("lay-value"),n=y.attr("lay-filter");return i.hasClass(A)||(u&&i.hasClass(_)&&(t=(e=$("
          "].join(""));i.after(l),function(i,a){var n=$(this),e=n.attr("lay-skin")||"primary",t="switch"===e,e="primary"===e;n.off(u).on(u,function(e){var t=n.attr("lay-filter");n[0].disabled||(n[0].indeterminate&&(n[0].indeterminate=!1),n[0].checked=n[0].checked,layui.event.call(n[0],M,a[2]+"("+t+")",{elem:n[0],value:n[0].value,othis:i}))}),i.on("click",function(){n.closest("label").length||n.trigger("click")}),d.syncAppearanceOnPropChanged(this,"checked",function(){var e;t&&(e=(i.next("*[lay-checkbox]")[0]?i.next().html():n.attr("title")||"").split("|"),i.children("div").html(!this.checked&&e[1]||e[0])),i.toggleClass(a[1],this.checked)}),e&&d.syncAppearanceOnPropChanged(this,"indeterminate",function(){this.indeterminate?i.children(".layui-icon-ok").removeClass("layui-icon-ok").addClass(c.SUBTRA):i.children("."+c.SUBTRA).removeClass(c.SUBTRA).addClass("layui-icon-ok")})}.call(this,l,r)})},radio:function(e){var s="layui-form-radio",c=["layui-icon-radio","layui-icon-circle"],e=e||a.find("input[type=radio]"),u="click.lay_radio_click";e.each(function(e,t){var i=$(this),a=i.next("."+s),n=this.disabled,l=i.attr("lay-skin");if(i.closest("[lay-ignore]").length)return i.show();v&&m.call(t,"lay-form-sync-checked",t.checked),a[0]&&a.remove();var a=p.escape(t.title||""),r=[],o=(i.next("[lay-radio]")[0]&&(a=(o=i.next()).html()||"",1",'',"
          "+a+"
          ","
          "].join("")));i.after(o),function(i){var a=$(this),n="layui-anim-scaleSpring";a.off(u).on(u,function(){var e=a.attr("lay-filter");a[0].disabled||(a[0].checked=!0,layui.event.call(a[0],M,"radio("+e+")",{elem:a[0],value:a[0].value,othis:i}))}),i.on("click",function(){a.closest("label").length||a.trigger("click")}),d.syncAppearanceOnPropChanged(this,"checked",function(){var e,t=this;t.checked?(i.addClass(s+"ed"),i.children(".layui-icon").addClass(n+" "+c[0]),e=a.parents(f).find("input[name="+t.name.replace(/(\.|#|\[|\])/g,"\\$1")+"]"),layui.each(e,function(){t!==this&&(this.checked=!1)})):(i.removeClass(s+"ed"),i.children(".layui-icon").removeClass(n+" "+c[0]).addClass(c[1]))})}.call(this,o)})}},t=function(){layui.each(n,function(e,t){t()})};return"object"===layui.type(e)?$(e).is(f)?(a=$(e),t()):e.each(function(e,t){var i=$(t);i.closest(f).length&&("SELECT"===t.tagName?n.select(i):"INPUT"===t.tagName&&("checkbox"===(t=t.type)||"radio"===t?n[t](i):n.input(i)))}):e?n[e]?n[e]():l.error('[form] "'+e+'" is an unsupported form element type'):t(),d},t.prototype.syncAppearanceOnPropChanged=v?function(e,t,i){var a=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,t);Object.defineProperty(e,t,N.extend({},a,{get:function(){return"string"==typeof this.getAttribute("lay-form-sync-"+t)},set:function(e){m.call(this,"lay-form-sync-"+t,e),i.call(this)}}))}:function(e,t,i){var a=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,t);Object.defineProperty(e,t,N.extend({},a,{get:function(){return a.get.call(this)},set:function(e){a.set.call(this,e),i.call(this)}}))},t.prototype.validate=function(e){var u,d=this.config.verify,p="layui-form-danger";return!(e=$(e))[0]||(e.attr("lay-verify")!==undefined||!1!==this.validate(e.find("*[lay-verify]")))&&(layui.each(e,function(e,r){var o=$(this),t=(o.attr("lay-verify")||"").split("|"),s=o.attr("lay-vertype"),c="string"==typeof(c=o.val())?$.trim(c):c;if(o.removeClass(p),layui.each(t,function(e,t){var i="",a=d[t];if(a){var n="function"==typeof a?i=a(c,r):!a[0].test(c),l="select"===r.tagName.toLowerCase()||/^(checkbox|radio)$/.test(r.type),i=i||a[1];if("required"===t&&(i=o.attr("lay-reqtext")||i),n)return"tips"===s?h.tips(i,!o.closest("[lay-ignore]").length&&l?o.next():o,{tips:1}):"alert"===s?h.alert(i,{title:T.$t("form.verifyErrorPromptTitle"),shadeClose:!0}):/\b(string|number)\b/.test(typeof i)&&h.msg(i,{icon:5,shift:6}),setTimeout(function(){(l?o.next().find("input"):r).focus()},7),o.addClass(p),u=!0}}),u)return u}),!u)},t.prototype.submit=function(e,t){var i={},a=$(this),e="string"==typeof e?e:a.attr("lay-filter"),n=this.getFormElem?this.getFormElem(e):a.parents(f).eq(0),l=n.find("*[lay-verify]");return!!r.validate(l)&&(i=r.getValue(null,n),l={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?n:a.parents("form"))[0],field:i},"function"==typeof t&&t(l),layui.event.call(this,M,"submit("+e+")",l))});function m(e,t){var i=!!t,t=2===arguments.length&&!t;return null!==this.getAttribute(e)?i||(this.removeAttribute(e),!1):!t&&(this.setAttribute(e,""),!0)}var g=["-",".","e","E","+"];var r=new t,t=$(document),j=$(window);$(function(){r.render()}),t.on("reset",f,function(){var e=$(this).attr("lay-filter");setTimeout(function(){r.render(null,e)},50)}),t.on("submit",f,i).on("click","*[lay-submit]",i),e(M,r)});layui.define(["lay","i18n","laytpl","laypage","form","util"],function(c){"use strict";var f=layui.$,d=layui.lay,m=layui.laytpl,p=layui.laypage,g=layui.layer,i=layui.form,v=layui.util,b=layui.hint(),x=layui.device(),s=layui.i18n,w={config:{checkName:"LAY_CHECKED",indexName:"LAY_INDEX",initIndexName:"LAY_INDEX_INIT",numbersName:"LAY_NUM",disabledName:"LAY_DISABLED"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){return this.config=f.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,R,e,t)}},k=function(){var a=this,e=a.config,i=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){w.reloadData(i,e,t)},setColsWidth:function(){a.setColsWidth.call(a)},resize:function(){a.resize.call(a)}}},C=function(e){var t=k.that[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},l=function(e){var t=k.config[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},T=function(e){var t=this.config||{},a=(e=e||{}).item3,i=e.content;"numbers"===a.type&&(i=e.tplData[w.config.numbersName]);("escape"in a?a:t).escape&&(i=v.escape(i));t=e.text&&a.exportTemplet||a.templet||a.toolbar;return t&&(i="function"==typeof t?t.call(a,e.tplData,e.obj):m(function(e){try{return d(e).html()}catch(t){return e}}(t)||String(i)).render(f.extend({LAY_COL:a},e.tplData))),e.text?f("
          "+i+"
          ").text():i},R="table",N="lay-"+R+"-id",u=".layui-table",_="layui-hide",h="layui-hide-v",y="layui-none",F="layui-table-view",P=".layui-table-header",W=".layui-table-body",I=".layui-table-fixed",O=".layui-table-fixed-r",B=".layui-table-pageview",D=".layui-table-sort",H="layui-table-checked",E="layui-table-edit",L="layui-table-hover",K="laytable-cell-group",S="layui-table-col-special",M="layui-table-tool-panel",A="layui-table-expanded",G="layui-table-disabled-transition",r="layui-table-fixed-height-patch",j="LAY_TABLE_MOVE_DICT",n=d.createSharedResizeObserver(R),e=function(e){return['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
          ','
          ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
          ","
          "].join("")},t=['',"","
          "].join(""),Y=[,"{{# if(d.data.toolbar){ }}",'
          ','
          ','
          ',"
          ","{{# } }}",'
          ',"{{# if(d.data.loading){ }}",'
          ','
          ','{{# if(typeof d.data.loading === "string"){ }}',"{{- d.data.loading}}","{{# } else{ }}",'',"{{# } }}","
          ","
          ","{{# } }}","{{# var left, right; }}",'
          ',e(),"
          ",'
          ',t,"
          ","{{# if(left){ }}",'
          ','
          ',e({fixed:!0}),"
          ",'
          ',t,"
          ","
          ","{{# }; }}","{{# if(right){ }}",'
          ','
          ',e({fixed:"right"}),'
          ',"
          ",'
          ',t,"
          ","
          ","{{# }; }}","
          ","{{# if(d.data.totalRow){ }}",'
          ','','',"
          ","
          ","{{# } }}",'
          ','
          ',"
          "].join(""),o=f(window),z=f(document),a=function(e){var t=this;t.index=++w.index,t.config=f.extend({},t.config,w.config,e),t.unobserveResize=f.noop,t.render()},$=(a.prototype.config={limit:10,loading:!0,escape:!0,cellMinWidth:60,cellMaxWidth:Number.MAX_VALUE,editTrigger:"click",defaultToolbar:["filter","exports","print"],defaultContextmenu:!0,autoSort:!0,cols:[]},a.prototype.render=function(e){var t=this,a=t.config,i=(a.elem=f(a.elem),a.where=a.where||{},a.id="id"in a?a.id:a.elem.attr("id")||t.index);if(k.that[i]&&k.that[i]!==t&&k.that[i].dispose(),k.that[i]=t,(k.config[i]=a).request=f.extend({pageName:"page",limitName:"limit"},a.request),a.response=f.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),null!==a.page&&"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,t.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),a.text=f.extend(!0,{none:s.$t("table.noData")},a.text),!a.elem[0])return t;if(a.elem.attr("lay-filter")||a.elem.attr("lay-filter",a.id),"reloadData"===e)return t.pullData(t.page,{type:"reloadData"});a.index=t.index,t.key=a.id||a.index,t.setInit(),a.height&&/^full-.+$/.test(a.height)?(t.fullHeightGap=a.height.split("-")[1],a.height=o.height()-(parseFloat(t.fullHeightGap)||0)):a.height&&/^#\w+\S*-.+$/.test(a.height)?(i=a.height.split("-"),t.parentHeightGap=i.pop(),t.parentDiv=i.join("-"),a.height=f(t.parentDiv).height()-(parseFloat(t.parentHeightGap)||0)):"function"==typeof a.height&&(t.customHeightFunc=a.height,a.height=t.customHeightFunc());var l,e=a.elem,i=e.next("."+F),n=t.elem=f("
          ");n.addClass((l=[F,F+"-"+t.index,"layui-form","layui-border-box"],a.className&&l.push(a.className),l.join(" "))).attr(((l={"lay-filter":"LAY-TABLE-FORM-DF-"+t.index,style:(l=[],a.width&&l.push("width:"+a.width+"px;"),l.join(""))})[N]=a.id,l)).html(m(Y,{open:"{{",close:"}}",tagStyle:"legacy"}).render({data:a,index:t.index,i18nMessages:{table_sort_asc:s.$t("table.sort.asc"),table_sort_desc:s.$t("table.sort.desc")}})),t.renderStyle(),i[0]&&i.remove(),e.after(n),t.layTool=n.find(".layui-table-tool"),t.layBox=n.find(".layui-table-box"),t.layHeader=n.find(P),t.layMain=n.find(".layui-table-main"),t.layBody=n.find(W),t.layFixed=n.find(I),t.layFixLeft=n.find(".layui-table-fixed-l"),t.layFixRight=n.find(O),t.layTotal=n.find(".layui-table-total"),t.layPage=n.find(".layui-table-page"),t.renderToolbar(),t.renderPagebar(),t.fullSize(),t.setColsWidth({isInit:!0}),t.pullData(t.page),t.events(),t.observeResize()},a.prototype.initOpts=function(e){this.config;e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||{checkbox:50,radio:50,space:30,numbers:60}[e.type])},a.prototype.setInit=function(e){var n,a,r=this,d=r.config;if(d.clientWidth=d.width||(n=function(e){var t,a;e=e||d.elem.parent(),t=r.getContentWidth(e);try{a="none"===e.css("display")}catch(l){}var i=e.parent();return e[0]&&i&&i[0]&&(!t||a)?n(i):t})(),"width"===e)return d.clientWidth;d.height=d.maxHeight||d.height,d.css&&-1===d.css.indexOf(F)&&(a=d.css.split("}"),layui.each(a,function(e,t){t&&(a[e]="."+F+"-"+r.index+" "+t)}),d.css=a.join("}"));var c=function(a,e,i,l){var n,o;l?(l.key=[d.index,a,i].join("-"),l.colspan=l.colspan||0,l.rowspan=l.rowspan||0,r.initOpts(l),(n=a+(parseInt(l.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(x.ie?[".layui-table-edit{height: "+i+";}","td[data-edit]:hover:after{height: "+i+";}"]:[]),function(e,t){t&&o.push(a+" "+t)})),l.css&&o.push(l.css),o.push("."+r+"{height:auto;}"),d.style({target:this.elem[0],text:o.join(""),id:"DF-table-"+n})},a.prototype.renderToolbar=function(){var l,o=this,e=o.config,r=e.elem.attr("lay-filter"),t=['
          ','
          ','
          '].join(""),a=o.layTool.find(".layui-table-tool-temp"),n=("default"===e.toolbar?a.html(t):"string"==typeof e.toolbar&&(t=f(e.toolbar).html()||"")&&a.html(m(t).render(e)),{filter:{title:s.$t("table.tools.filter.title"),layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols",onClick:function(e){var a,n=e.config;(0,e.openPanel)({list:(a=[],o.eachCols(function(e,t){t.field&&"normal"==t.type&&a.push('
        • "+(t.fieldTitle||t.title||t.field)+"
        • ").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">')}),a.join("")),done:function(){i.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var e=f(e.elem),t=this.checked,a=e.data("key"),i=o.col(a),l=i.hide,e=e.data("parentkey");i.key&&(i.hide=!t,o.elem.find('*[data-key="'+a+'"]')[t?"removeClass":"addClass"](_),l!=i.hide&&o.setParentCol(!t,e),o.resize(),layui.event.call(this,R,"colToggled("+r+")",{col:i,config:n}))})}})}},exports:{title:s.$t("table.tools.export.title"),layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export",onClick:function(e){var t=e.data,a=e.config,i=e.openPanel,e=e.elem;if(!t.length)return g.tips(s.$t("table.tools.export.noDataPrompt"),e,{tips:3});x.ie?g.tips(s.$t("table.tools.export.compatPrompt"),e,{tips:3}):i({list:['
        • '+s.$t("table.tools.export.csvText")+"
        • "].join(""),done:function(e,t){t.on("click",function(){var e=f(this).data("type");w.exportFile.call(o,a.id,null,e)})}})}},print:{title:s.$t("table.tools.print.title"),layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print",onClick:function(e){var t=e.data,e=e.elem;if(!t.length)return g.tips(s.$t("table.tools.print.noDataPrompt"),e,{tips:3});var t=window.open("about:blank","_blank"),e=[""].join(""),a=f(o.layHeader.html());a.append(o.layMain.find("table").html()),a.append(o.layTotal.find("table").html()),a.find("th.layui-table-patch").remove(),a.find("thead>tr>th."+S).filter(function(e,t){return!f(t).children("."+K).length}).remove(),a.find("tbody>tr>td."+S).remove(),t.document.write(e+a.prop("outerHTML")),t.document.close(),layui.device("edg").edg?(t.onafterprint=t.close,t.print()):(t.print(),t.close())}}});"object"==typeof e.defaultToolbar&&(l=[],e.defaultToolbar=f.map(e.defaultToolbar,function(e,t){var a="string"==typeof e,i=a?n[e]:e;return i&&(!(i=i.name&&n[i.name]?f.extend({},n[i.name],i):i).name&&a&&(i.name=e),l.push('
          ')),i}),o.layTool.find(".layui-table-tool-self").html(l.join("")))},a.prototype.renderPagebar=function(){var e,t=this.config,a=this.layPagebar=f('
          ');t.pagebar&&((e=f(t.pagebar).html()||"")&&a.append(m(e).render(t)),this.layPage.append(a))},a.prototype.setParentCol=function(e,t){var a=this.config,i=this.layHeader.find('th[data-key="'+t+'"]'),l=parseInt(i.attr("colspan"))||0;i[0]&&(t=t.split("-"),t=a.cols[t[1]][t[2]],e?l--:l++,i.attr("colspan",l),i[l?"removeClass":"addClass"](_),t.colspan2=l,t.hide=l<1,a=i.data("parentkey"))&&this.setParentCol(e,a)},a.prototype.setColsPatch=function(){var a=this,e=a.config;layui.each(e.cols,function(e,t){layui.each(t,function(e,t){t.hide&&a.setParentCol(t.hide,t.parentKey)})})},a.prototype.setGroupWidth=function(i){var e,l=this;l.config.cols.length<=1||((e=l.layHeader.find((i?"th[data-key="+i.data("parentkey")+"]>":"")+"."+K)).css("width",0),layui.each(e.get().reverse(),function(){var e=f(this),t=e.parent().data("key"),a=0;l.layHeader.eq(0).find("th[data-parentkey="+t+"]").width(function(e,t){f(this).hasClass(_)||0o.layMain.prop("clientHeight")&&(e.style.width=parseFloat(e.style.width)-i+"px")}),!p&&y?h.width(o.getContentWidth(l)):h.width("auto"),o.setGroupWidth()},a.prototype.resize=function(){var e=this;e.layMain&&("isConnected"in e.layMain[0]?e.layMain[0].isConnected:f.contains(document.body,e.layMain[0]))&&(e.fullSize(),e.setColsWidth(),e.scrollPatch())},a.prototype.reload=function(e,t,a){var i=this;e=e||{},delete i.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete i.config[e]}),i.config=f.extend(t,{},i.config,e),"reloadData"!==a&&(layui.each(i.config.cols,function(e,t){layui.each(t,function(e,t){delete t.colspan2})}),delete i.config.HAS_SET_COLS_PATCH),i.render(a)},a.prototype.errorView=function(e){var t=this,a=t.layMain.find("."+y),e=f('
          '+(e||"Error")+"
          ");a[0]&&(t.layNone.remove(),a.remove()),t.layFixed.addClass(_),t.layMain.find("tbody").html(""),t.layMain.append(t.layNone=e),t.layTotal.addClass(h),t.layPage.find(B).addClass(h),w.cache[t.key]=[],t.syncCheckAll(),t.renderForm(),t.setColsWidth(),t.loading(!1)},a.prototype.page=1,a.prototype.pullData=function(i,l){var e,t,n=this,o=n.config,a=(o.HAS_SET_COLS_PATCH||n.setColsPatch(),o.HAS_SET_COLS_PATCH=!0,o.request),r=o.response,d=function(){"object"==typeof o.initSort&&n.sort({field:o.initSort.field,type:o.initSort.type,reloadType:l.type})},c=function(e,t){n.setColsWidth(),n.loading(!1),"function"==typeof o.done&&o.done(e,i,e[r.countName],t)};l=l||{},"function"==typeof o.before&&o.before(o),n.startTime=(new Date).getTime(),l.renderData?((e={})[r.dataName]=w.cache[n.key],e[r.countName]=o.url?"object"===layui.type(o.page)?o.page.count:e[r.dataName].length:o.data.length,"object"==typeof o.totalRow&&(e[r.totalRowName]=f.extend({},n.totalRow)),n.renderData({res:e,curr:i,count:e[r.countName],type:l.type,sort:!0}),c(e,"renderData")):o.url?(t={},o.page&&(t[a.pageName]=i,t[a.limitName]=o.limit),a=f.extend(t,o.where),o.contentType&&0==o.contentType.indexOf("application/json")&&(a=JSON.stringify(a)),n.loading(!0),t={type:o.method||"get",url:o.url,contentType:o.contentType,data:a,dataType:o.dataType||"json",jsonpCallback:o.jsonpCallback,headers:o.headers||{},complete:"function"==typeof o.complete?o.complete:undefined,success:function(e){var t,a;(e="function"==typeof o.parseData?o.parseData(e)||e:e)[r.statusName]!=r.statusCode?n.errorView(e[r.msgName]||s.$t("table.dataFormatError",{statusName:r.statusName,statusCode:r.statusCode})):(t=e[r.countName],(a=Math.ceil(t/o.limit)||1)','
          "+function(){var e,t=f.extend(!0,{LAY_COL:l},o),a=w.config.checkName,i=w.config.disabledName;switch(l.type){case"checkbox":return'';case"radio":return'';case"numbers":return c}return l.toolbar?m(f(l.toolbar).html()||"").render(t):T.call(s,{item3:l,content:n,tplData:t})}(),"
          "].join(""),i.push(e),l.fixed&&"right"!==l.fixed&&r.push(e),"right"===l.fixed&&d.push(e))}),e=['data-index="'+e+'"'],o[w.config.checkName]&&e.push('class="'+H+'"'),e=e.join(" "),h.push(""+i.join("")+""),y.push(""+r.join("")+""),p.push(""+d.join("")+""))}),{trs:h,trs_fixed:y,trs_fixed_r:p}},w.getTrHtml=function(e,t){e=C(e);return e.getTrHtml(t,null,e.page)},a.prototype.renderData=function(e){var a=this,i=a.config,t=e.res,l=e.curr,n=a.count=e.count,o=e.sort,r=t[i.response.dataName]||[],t=t[i.response.totalRowName],d=[],c=[],s=[],u=function(){if(!o&&a.sortKey)return a.sort({field:a.sortKey.field,type:a.sortKey.sort,pull:!0,reloadType:e.type});a.getTrHtml(r,o,l,{trs:d,trs_fixed:c,trs_fixed_r:s}),"fixed"===i.scrollPos&&"reloadData"===e.type||a.layBody.scrollTop(0),"reset"===i.scrollPos&&a.layBody.scrollLeft(0),a.layMain.find("."+y).remove(),a.layMain.find("tbody").html(d.join("")),a.layFixLeft.find("tbody").html(c.join("")),a.layFixRight.find("tbody").html(s.join("")),a.syncCheckAll(),a.renderForm(),a.fullSize(),a.haveInit?a.scrollPatch():setTimeout(function(){a.scrollPatch()},50),a.haveInit=!0,a.needSyncFixedRowHeight&&a.calcFixedRowHeight(),g.close(a.tipsIndex)};return w.cache[a.key]=r,a.layTotal[0==r.length?"addClass":"removeClass"](h),a.layPage[i.page||i.pagebar?"removeClass":"addClass"](_),a.layPage.find(B)[!i.page||0==n||0===r.length&&1==l?"addClass":"removeClass"](h),0===r.length?a.errorView(i.text.none):(a.layFixLeft.removeClass(_),o?u():(u(),a.renderTotal(r,t),a.layTotal&&a.layTotal.removeClass(_),void(i.page&&(i.page=f.extend({elem:"layui-table-page"+i.index,count:n,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(a.page=e.curr,i.limit=e.limit,a.pullData(e.curr))}},i.page),i.page.count=n,p.render(i.page)))))},w.renderData=function(e){e=C(e);e&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},a.prototype.renderTotal=function(e,o){var r,d=this,c=d.config,s={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||d.eachCols(function(e,t){var e=t.field||e,a=i[e];t.totalRow&&(s[e]=(s[e]||0)+(parseFloat(a)||0))})}),d.dataTotal=[],r=[],d.eachCols(function(e,t){var e=t.field||e,a=o&&o[t.field],i="totalRowDecimals"in t?t.totalRowDecimals:2,i=s[e]?parseFloat(s[e]||0).toFixed(i):"",i=(n=t.totalRowText||"",(l={LAY_COL:t})[e]=i,l=t.totalRow&&T.call(d,{item3:t,content:i,tplData:l})||n,a||l),l="string"==typeof(n=t.totalRow||c.totalRow)?m(n).render(f.extend({TOTAL_NUMS:a||s[e],TOTAL_ROW:o||{},LAY_COL:t},t)):i,n=(t.field&&d.dataTotal.push({field:t.field,total:f("
          "+l+"
          ").text()}),['','
          "+l,"
          "].join(""));r.push(n)}),e=d.layTotal.find(".layui-table-patch"),d.layTotal.find("tbody").html(""+r.join("")+(e.length?e.get(0).outerHTML:"")+""))},a.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},a.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");i.render(e,t)},a.prototype.renderFormByElem=function(a){layui.each(["input","select"],function(e,t){i.render(a.find(t))})},a.prototype.syncCheckAll=function(){var a,e=this,i=e.config,t=e.layHeader.find('input[name="layTableCheckbox"]'),l=w.checkStatus(e.key);t[0]&&(a=l.isAll,e.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=a)}),t.prop({checked:l.isAll,indeterminate:!l.isAll&&l.data.length}))},a.prototype.setRowActive=function(e,t,a){this.config;e=this.layBody.find('tr[data-index="'+e+'"]');if(t=t||"layui-table-click",a)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},a.prototype.setRowChecked=function(i){var a,e,l,t,n,o,r,d=this,c=d.config,s="all"===i.index,u="array"===layui.type(i.index),h=s||u;c.tree&&c.tree.view||h&&(d.layBox.addClass(G),"radio"===i.type)||(u&&(a={},layui.each(i.index,function(e,t){a[t]=!0}),i.index=a),e=d.layBody.children(".layui-table").children("tbody"),r=h?"tr":'tr[data-index="'+i.index+'"]',r=e.children(r),e=s?r:r.filter(u?function(){var e=f(this).data("index");return i.index[e]}:'[data-index="'+i.index+'"]'),i=f.extend({type:"checkbox"},i),l=w.cache[d.key],t="checked"in i,n=function(e){return"radio"===i.type||(t?i.checked:!e)},e.each(function(){var e=f(this),t=e.attr("data-index"),a=l[t];t&&"array"!==layui.type(a)&&!a[c.disabledName]&&(a=a[c.checkName]=n(e.hasClass(H)),e.toggleClass(H,!!a),"radio"===i.type)&&(o=t,e.siblings().removeClass(H))}),o&&layui.each(l,function(e,t){Number(o)!==Number(e)&&delete t[c.checkName]}),r=(u=(s=e.children("td").children(".layui-table-cell").children('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[i.type]||"checkbox")+'"]:not(:disabled)')).last()).closest(O),("radio"===i.type&&r.hasClass(_)?s.first():s).prop("checked",n(u.prop("checked"))),d.syncCheckAll(),h&&setTimeout(function(){d.layBox.removeClass(G)},100))},a.prototype.sort=function(l){var e,t=this,a={},i=t.config,n=i.elem.attr("lay-filter"),o=w.cache[t.key];"string"==typeof(l=l||{}).field&&(r=l.field,t.layHeader.find("th").each(function(e,t){var a=f(this),i=a.data("field");if(i===l.field)return l.field=a,r=i,!1}));try{var r=r||l.field.data("field"),d=l.field.data("key");if(t.sortKey&&!l.pull&&r===t.sortKey.field&&l.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+d).find(D);t.layHeader.find("th").find(D).removeAttr("lay-sort"),c.attr("lay-sort",l.type||null),t.layFixed.find("th")}catch(s){b.error("Table modules: sort field '"+r+"' not matched")}t.sortKey={field:r,sort:l.type},i.autoSort&&("asc"===l.type?e=layui.sort(o,r,null,!0):"desc"===l.type?e=layui.sort(o,r,!0,!0):(e=layui.sort(o,w.config.initIndexName,null,!0),delete t.sortKey,delete i.initSort)),a[i.response.dataName]=e||o,t.renderData({res:a,curr:t.page,count:t.count,sort:!0,type:l.reloadType}),l.fromEvent&&(i.initSort={field:r,type:l.type},layui.event.call(l.field,R,"sort("+n+")",f.extend({config:i},i.initSort)))},a.prototype.loading=function(e){this.config.loading&&this.layBox.find(".layui-table-init").toggleClass(_,!e)},a.prototype.cssRules=function(t,a){var e=this.elem.children("style")[0];d.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return a(e),!0})},a.prototype.fullSize=function(){var e,a,i=this,t=i.config,l=t.height;i.fullHeightGap?(l=o.height()-i.fullHeightGap)<135&&(l=135):i.parentDiv&&i.parentHeightGap?(l=f(i.parentDiv).height()-i.parentHeightGap)<135&&(l=135):i.customHeightFunc&&(l=i.customHeightFunc())<135&&(l=135),1
          ')).find("div").css({width:a}),e.find("tr").append(t)):e.find(".layui-table-patch").remove()};n(e.layHeader),n(e.layTotal);n=e.layMain.height()-i;e.layFixed.find(W).css("height",t.height()>=n?n:"auto").scrollTop(e.layMain.scrollTop()),e.layFixRight[w.cache[e.key]&&w.cache[e.key].length&&0');a.html(t),s.height&&a.css("max-height",s.height-(c.layTool.outerHeight()||50)),i.find("."+M)[0]||i.append(a),c.renderForm(),a.on("click",function(e){layui.stope(e)}),e.done&&e.done(a,t)};layui.stope(e),z.trigger("table.tool.panel.remove"),g.close(c.tipsIndex),layui.each(s.defaultToolbar,function(e,t){if(t.layEvent===a)return"function"==typeof t.onClick&&t.onClick({data:l,config:s,openPanel:n,elem:i}),!0}),layui.event.call(this,R,"toolbar("+o+")",f.extend({event:a,config:s},{}))}),c.layHeader.on("click","*[lay-event]",function(e){var t=f(this),a=t.attr("lay-event"),t=t.closest("th").data("key"),t=c.col(t);layui.event.call(this,R,"colTool("+o+")",f.extend({event:a,config:s,col:t},{}))}),c.layPagebar.on("click","*[lay-event]",function(e){var t=f(this).attr("lay-event");layui.event.call(this,R,"pagebar("+o+")",f.extend({event:t,config:s},{}))}),e.on("mousemove",function(e){var t=f(this),a=t.offset().left,e=e.clientX-a;t.data("unresize")||k.eventMoveElem||(d.allowResize=t.width()-e<=10,r.css("cursor",d.allowResize?"col-resize":""))}).on("mouseleave",function(){f(this);k.eventMoveElem||(d.allowResize=!1,r.css("cursor",""))}).on("mousedown",function(e){var t,a=f(this);d.allowResize&&(t=a.data("key"),e.preventDefault(),d.offset=[e.clientX,e.clientY],c.cssRules(t,function(e){var t=e.style.width||a.outerWidth();d.rule=e,d.ruleWidth=parseFloat(t),d.minWidth=a.data("minwidth")||s.cellMinWidth,d.maxWidth=a.data("maxwidth")||s.cellMaxWidth}),a.data(j,d),k.eventMoveElem=a)}),k.docEvent||z.on("mousemove",function(e){var t,a;k.eventMoveElem&&(t=k.eventMoveElem.data(j)||{},k.eventMoveElem.data("resizing",1),e.preventDefault(),t.rule)&&(e=t.ruleWidth+e.clientX-t.offset[0],a=k.eventMoveElem.closest("."+F).attr(N),a=C(a))&&((e=et.maxWidth&&(e=t.maxWidth),t.rule.style.width=e+"px",a.setGroupWidth(k.eventMoveElem),g.close(c.tipsIndex))}).on("mouseup",function(e){var t,a,i,l,n;k.eventMoveElem&&(i=(t=k.eventMoveElem).closest("."+F).attr(N),a=C(i))&&(i=t.data("key"),l=a.col(i),n=a.config.elem.attr("lay-filter"),d={},r.css("cursor",""),a.scrollPatch(),t.removeData(j),delete k.eventMoveElem,a.cssRules(i,function(e){l.width=parseFloat(e.style.width),layui.event.call(t[0],R,"colResized("+n+")",{col:l,config:a.config})}))}),k.docEvent=!0,e.on("click",function(e){var t=f(this),a=t.find(D),i=a.attr("lay-sort");if(!a[0]||1===t.data("resizing"))return t.removeData("resizing");c.sort({field:t,type:"asc"===i?"desc":"desc"===i?null:"asc",fromEvent:!0})}).find(D+" .layui-edge ").on("click",function(e){var t=f(this),a=t.index(),t=t.parents("th").eq(0).data("field");layui.stope(e),0===a?c.sort({field:t,type:"asc",fromEvent:!0}):c.sort({field:t,type:"desc",fromEvent:!0})}),c.commonMember=function(e){var a=f(this).parents("tr").eq(0).data("index"),t=c.layBody.find('tr[data-index="'+a+'"]'),i=(w.cache[c.key]||[])[a]||{},l={tr:t,config:s,data:w.clearCacheKey(i),dataCache:i,index:a,del:function(){w.cache[c.key][a]=[],t.remove(),c.scrollPatch()},update:function(e,t){c.updateRow({index:a,data:e=e||{},related:t},function(e,t){l.data[e]=t})},setRowChecked:function(e){c.setRowChecked(f.extend({index:a},e))}};return f.extend(l,e)}),t=(c.elem.on("click",'input[name="layTableCheckbox"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=(c.layBody.find('input[name="layTableCheckbox"]'),t.parents("tr").eq(0).data("index")),l=t[0].checked,n="layTableAllChoose"===t.attr("lay-filter");t[0].disabled||(n?c.setRowChecked({index:"all",checked:l}):c.setRowChecked({index:i,checked:l}),layui.stope(e),layui.event.call(t[0],R,"checkbox("+o+")",h.call(t[0],{checked:l,type:n?"all":"one",getCol:function(){return c.col(a.data("key"))}})))}),c.elem.on("click",'input[lay-type="layTableRadio"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=t[0].checked,l=t.parents("tr").eq(0).data("index");if(layui.stope(e),t[0].disabled)return!1;c.setRowChecked({type:"radio",index:l}),layui.event.call(t[0],R,"radio("+o+")",h.call(t[0],{checked:i,getCol:function(){return c.col(a.data("key"))}}))}),c.layBody.on("mouseenter","tr",function(){var e=f(this),t=e.index();e.data("off")||((e=c.layBody.find("tr:eq("+t+")")).addClass(L),c.needSyncFixedRowHeight&&c.fixedRowHeightPatchOnHover(this,e,!0))}).on("mouseleave","tr",function(){var e=f(this),t=e.index();e.data("off")||((e=c.layBody.find("tr:eq("+t+")")).removeClass(L),c.needSyncFixedRowHeight&&c.fixedRowHeightPatchOnHover(this,e,!1))}).on("click","tr",function(e){t.call(this,"row",e)}).on("dblclick","tr",function(e){t.call(this,"rowDouble",e)}).on("contextmenu","tr",function(e){s.defaultContextmenu||e.preventDefault(),t.call(this,"rowContextmenu",e)}),function(e,t){var a=f(this);if(!a.data("off")){if("rowContextmenu"!==e){var i=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]",'[lay-type="layTableCheckbox"]','[lay-type="layTableRadio"]'].join(",");if(f(t.target).is(i)||f(t.target).closest(i)[0])return}layui.event.call(this,R,e+"("+o+")",h.call(a.children("td")[0],{e:t}))}}),n=function(e,t){var a,i,l;(e=f(e)).data("off")||(l=e.data("field"),i=e.data("key"),i=c.col(i),a=e.closest("tr").data("index"),a=w.cache[c.key][a],e.children(u),(i="function"==typeof i.edit?i.edit(a):i.edit)&&((i=f("textarea"===i?'':''))[0].value=(l=e.data("content")||a[l])===undefined||null===l?"":l,e.find("."+E)[0]||e.append(i),i.focus(),t)&&layui.stope(t))},i=(c.layBody.on("change","."+E,function(){var e=f(this),t=e.parent(),a=this.value,i=e.parent().data("field"),e=e.closest("tr").data("index"),e=w.cache[c.key][e],l=h.call(t[0],{value:a,field:i,oldValue:e[i],td:t,reedit:function(){setTimeout(function(){n(l.td);var e={};e[i]=l.oldValue,l.update(e)})},getCol:function(){return c.col(t.data("key"))}}),e={};e[i]=a,l.update(e),layui.event.call(t[0],R,"edit("+o+")",l)}).on("blur","."+E,function(){f(this).remove()}),c.layBody.on(s.editTrigger,"td",function(e){n(this,e)}).on("mouseenter","td",function(){a.call(this)}).on("mouseleave","td",function(){a.call(this,"hide")}),c.layTotal.on("mouseenter","td",function(){a.call(this)}).on("mouseleave","td",function(){a.call(this,"hide")}),"layui-table-grid-down"),a=function(e){var t=f(this),a=t.children(u);t.data("off")||t.parent().hasClass(A)||(e?t.find(".layui-table-grid-down").remove():!(a.prop("scrollWidth")>a.prop("clientWidth")||0
          '))},l=function(e,t){var a=f(this),i=a.parent(),l=i.data("key"),n=c.col(l),o=i.parent().data("index"),r=i.children(u),i="layui-table-cell-c",d=f('');"tips"===(t=t||n.expandedMode||s.cellExpandedMode)?c.tipsIndex=g.tips(['
          ',r.html(),"
          ",''].join(""),r[0],{tips:[3,""],time:-1,anim:-1,maxWidth:x.ios||x.android?300:c.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){g.close(t)})}}):(c.elem.find("."+i).trigger("click"),c.cssRules(l,function(e){var t=e.style.width,a=n.expandedWidth||s.cellExpandedWidth;a.layui-table-body>table>tbody>tr"),i=e.layFixRight.find(">.layui-table-body>table>tbody>tr"),t=t.find(">tbody>tr"),l=[];t.each(function(){l.push(e.getElementSize(this).height)}),a.length&&a.each(function(e){l[e]&&(this.style.height=l[e]+"px")}),i.length&&i.each(function(e){l[e]&&(this.style.height=l[e]+"px")})},a.prototype.fixedRowHeightPatchOnHover=function(t,e,a){var i,l=this,n=l.elem.children("style")[0],o="."+r;e.toggleClass(r,a),a?d.getStyleRules(n,function(e){e.selectorText===o&&e.style.setProperty("height",l.getElementSize(t).height+"px","important")}):(d.getStyleRules(n,function(e){e.selectorText===o&&e.style.setProperty("height","auto")}),(e=e.filter(function(){var e=f(this),t=0tr").each(function(i){n.cols[i]=[],f(this).children().each(function(e){var t=f(this),a=t.attr("lay-data"),a=d.options(this,{attr:a?"lay-data":null,errorText:r+(a||t.attr("lay-options"))}),t=f.extend({title:t.text(),colspan:parseInt(t.attr("colspan"))||1,rowspan:parseInt(t.attr("rowspan"))||1},a);n.cols[i].push(t)})}),e.find("tbody>tr")),t=w.render(n);!a.length||o.data||t.config.url||(l=0,w.eachCols(t.config.id,function(e,i){a.each(function(e){n.data[e]=n.data[e]||{};var t=f(this),a=i.field;n.data[e][a]=t.children("td").eq(l).html()}),l++}),t.reloadData({data:n.data}))}),this},k.that={},k.config={},function(a,i,e,l){var n,o;l.colGroup&&(n=0,a++,l.CHILD_COLS=[],o=e+(parseInt(l.rowspan)||1),layui.each(i[o],function(e,t){t.parentKey?t.parentKey===l.key&&(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),$(a,i,o,t)):t.PARENT_COL_INDEX||1<=n&&n==(l.colspan||1)||(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),n+=parseInt(1td').filter('[data-field="'+e+'"]')}}})).replace(/"/g,'""'),n.push(a='"'+a+'"')):t.field&&"normal"!==t.type&&0==i&&(u[t.field]=!0)}),c.push(n.join(","))}),o&&layui.each(o.dataTotal,function(e,t){u[t.field]||s.push('"'+(t.total||"")+'"')}),d.join(",")+"\r\n"+c.join("\r\n")+"\r\n"+s.join(","))),r.download=(a.title||l.title||"table_"+(l.index||""))+"."+i,document.body.appendChild(r),r.click(),document.body.removeChild(r)},w.getOptions=l,w.hideCol=function(e,l){var n=C(e);n&&("boolean"===layui.type(l)?n.eachCols(function(e,t){var a=t.key,i=n.col(a),t=t.parentKey;i.hide!=l&&(i=i.hide=l,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](_),n.setParentCol(i,t))}):(l=layui.isArray(l)?l:[l],layui.each(l,function(e,l){n.eachCols(function(e,t){var a,i;l.field===t.field&&(a=t.key,i=n.col(a),t=t.parentKey,"hide"in l)&&i.hide!=l.hide&&(i=i.hide=!!l.hide,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](_),n.setParentCol(i,t))})})),f("."+M).remove(),n.resize())},w.reload=function(e,t,a,i){if(l(e))return(e=C(e)).reload(t,a,i),k.call(e)},w.reloadData=function(){var a=f.extend([],arguments),i=(a[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(a[1],function(e,t){i.test(e)&&delete a[1][e]}),w.reload.apply(null,a)},w.render=function(e){e=new a(e);return k.call(e)},w.clearCacheKey=function(e){return delete(e=f.extend({},e))[w.config.checkName],delete e[w.config.indexName],delete e[w.config.initIndexName],delete e[w.config.numbersName],delete e[w.config.disabledName],e},f(function(){w.init()}),c(R,w)});layui.define(["table"],function(e){"use strict";var P=layui.$,h=layui.form,B=layui.table,y=layui.hint(),j={config:{},on:B.on,eachCols:B.eachCols,index:B.index,set:function(e){var t=this;return t.config=P.extend({},t.config,e),t},resize:B.resize,getOptions:B.getOptions,hideCol:B.hideCol,renderData:B.renderData},i=function(){var a=this,e=a.config,n=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){j.reloadData(n,e,t)}}},F=function(e){var t=i.that[e];return t||y.error(e?"The treeTable instance with ID '"+e+"' not found":"ID argument required"),t||null},L="lay-table-id",q="layui-hide",s=".layui-table-body",R=".layui-table-main",Y=".layui-table-fixed-l",z=".layui-table-fixed-r",d="layui-table-checked",m="layui-table-tree",H="LAY_DATA_INDEX",b="LAY_DATA_INDEX_HISTORY",f="LAY_PARENT_INDEX",g="LAY_CHECKBOX_HALF",X="LAY_EXPAND",V="LAY_HAS_EXPANDED",U="LAY_ASYNC_STATUS",n=["all","parent","children","none"],t=/<[^>]+?>/,p=["flexIconClose","flexIconOpen","iconClose","iconOpen","iconLeaf","icon"],a=function(e){var t=this;t.index=++j.index,t.config=P.extend(!0,{},t.config,j.config,e),t.init(),t.render()},x=function(n,i,e){var d=B.cache[n];layui.each(e||d,function(e,t){var a=t[H]||"";-1!==a.indexOf("-")&&(d[a]=t),t[i]&&x(n,i,t[i])})},l=function(l,a,e){var r=F(l),o=("reloadData"!==e&&(r.status={expand:{}}),P.extend(!0,{},r.getOptions(),a)),n=o.tree,c=n.customName.children,i=n.customName.id,d=(delete a.hasNumberCol,delete a.hasChecboxCol,delete a.hasRadioCol,B.eachCols(null,function(e,t){"numbers"===t.type?a.hasNumberCol=!0:"checkbox"===t.type?a.hasChecboxCol=!0:"radio"===t.type&&(a.hasRadioCol=!0)},o.cols),a.parseData),u=a.done;"reloadData"===e&&"fixed"===o.scrollPos&&(r.scrollTopCache=r.config.elem.next().find(s).scrollTop()),o.url?e&&(!d||d.mod)||(a.parseData=function(){var e=this,t=arguments,a=t[0],t=("function"===layui.type(d)&&(a=d.apply(e,t)||t[0]),e.response.dataName);return n.data.isSimpleData&&!n["async"].enable&&(a[t]=r.flatToTree(a[t])),N(a[t],function(e){e[X]=X in e?e[X]:e[i]!==undefined&&r.status.expand[e[i]]},c),e.autoSort&&e.initSort&&e.initSort.type&&layui.sort(a[t],e.initSort.field,"desc"===e.initSort.type,!0),r.initData(a[t]),a},a.parseData.mod=!0):a.data!==undefined&&(a.data=a.data||[],n.data.isSimpleData&&(a.data=r.flatToTree(a.data)),r.initData(a.data)),e&&(!u||u.mod)||(a.done=function(){var e,t=arguments,a=t[3],n="renderData"===a,i=(n||delete r.isExpandAll,this.elem.next()),d=(r.updateStatus(null,{LAY_HAS_EXPANDED:!1}),x(l,c),i.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(d.length&&(e=j.checkStatus(l),d.prop({checked:e.isAll&&e.data.length,indeterminate:!e.isAll&&e.data.length})),!n&&o.autoSort&&o.initSort&&o.initSort.type&&j.sort(l),r.renderTreeTable(i),"reloadData"===a&&"fixed"===this.scrollPos&&i.find(s).scrollTop(r.scrollTopCache),"function"===layui.type(u))return u.apply(this,t)},a.done.mod=!0),a&&a.tree&&a.tree.view&&layui.each(p,function(e,t){a.tree.view[t]!==undefined&&(a.tree.view[t]=r.normalizedIcon(a.tree.view[t]))})};a.prototype.init=function(){var e=this.config,t=e.tree.data.cascade,t=(-1===n.indexOf(t)&&(e.tree.data.cascade="all"),B.render(P.extend({},e,{data:[],url:"",done:null}))),a=t.config.id;(i.that[a]=this).tableIns=t,l(a,e)},a.prototype.config={tree:{customName:{children:"children",isParent:"isParent",name:"name",id:"id",pid:"parentId",icon:"icon"},view:{indent:14,flexIconClose:'',flexIconOpen:'',showIcon:!0,icon:"",iconClose:'',iconOpen:'',iconLeaf:'',showFlexIconIfNotParent:!1,dblClickExpand:!0,expandAllDefault:!1},data:{isSimpleData:!1,rootPid:null,cascade:"all"},"async":{enable:!1,url:"",type:null,contentType:null,headers:null,where:null,autoParam:[]},callback:{beforeExpand:null,onExpand:null}}},a.prototype.normalizedIcon=function(e){return e?t.test(e)?e:'':""},a.prototype.getOptions=function(){return this.tableIns?B.getOptions(this.tableIns.config.id):this.config},a.prototype.flatToTree=function(e){var n,i,d,l,r,o,c,u,t=this.getOptions(),a=t.tree,s=a.customName;return e=e||B.cache[t.id],t=e,n=s.id,i=s.pid,d=s.children,l=a.data.rootPid,n=n||"id",i=i||"parentId",d=d||"children",c={},u=[],layui.each(t,function(e,t){r=n+t[n],o=n+t[i],c[r]||(c[r]={},c[r][d]=[]);var a={};a[d]=c[r][d],c[r]=P.extend({},t,a),((l?c[r][i]===l:!c[r][i])?u:(c[o]||(c[o]={},c[o][d]=[]),c[o][d])).push(c[r])}),u},a.prototype.treeToFlat=function(e,n,i){var d=this,l=d.getOptions().tree.customName,r=l.children,o=l.pid,c=[];return layui.each(e,function(e,t){var e=(i?i+"-":"")+e,a=P.extend({},t);a[o]="undefined"!=typeof t[o]?t[o]:n,c.push(a),c=c.concat(d.treeToFlat(t[r],t[l.id],e))}),c},a.prototype.getTreeNode=function(e){var t,a=this;return e?(t=a.getOptions().tree,t.customName,{data:e,dataIndex:e[H],getParentNode:function(){return a.getNodeByIndex(e[f])}}):y.error("Node data not found")},a.prototype.getNodeByIndex=function(t){var a,e,n=this,i=n.getNodeDataByIndex(t);return i?((e=n.getOptions()).tree.customName.parent,a=e.id,(e={data:i,dataIndex:i[H],getParentNode:function(){return n.getNodeByIndex(i[f])},update:function(e){return j.updateNode(a,t,e)},remove:function(){return j.removeNode(a,t)},expand:function(e){return j.expandNode(a,P.extend({},e,{index:t}))},setChecked:function(e){return j.setRowChecked(a,P.extend({},e,{index:t}))}}).dataIndex=t,e):y.error("Node data not found by index: "+t)},a.prototype.getNodeById=function(a){var e=this.getOptions(),n=e.tree.customName.id,i="",e=j.getData(e.id,!0);if(layui.each(e,function(e,t){if(t[n]===a)return i=t[H],!0}),i)return this.getNodeByIndex(i)},a.prototype.getNodeDataByIndex=function(e,t,a){var n=this.getOptions(),i=n.tree,n=B.cache[n.id],d=n[e];if("delete"!==a&&d)return P.extend(d,a),t?P.extend({},d):d;for(var l=n,r=String(e).split("-"),o=0,c=i.customName.children;o
          '),I=function(e){p[U]="success",p[f.children]=e,u.initData(p[f.children],p[H]),K(t,!0,!x&&n,i,d,l)},D=b.format,"function"===layui.type(D)?D(p,c,I):(C=P.extend({},b.where||c.where),D=b.autoParam,layui.each(D,function(e,t){t=t.split("=");C[t[0].trim()]=p[(t[1]||t[0]).trim()]}),(D=b.contentType||c.contentType)&&0==D.indexOf("application/json")&&(C=JSON.stringify(C)),S=b.method||c.method,T=b.dataType||c.dataType,_=b.jsonpCallback||c.jsonpCallback,k=b.headers||c.headers,w=b.parseData||c.parseData,O=b.response||c.response,b={type:S||"get",url:g,contentType:D,data:C,dataType:T||"json",jsonpCallback:_,headers:k||{},success:function(e){(e="function"==typeof w?w.call(c,e)||e:e)[O.statusName]!=O.statusCode?(p[U]="error",p[X]=!1,v.html('')):I(e[O.dataName])},error:function(e,t){p[U]="error",p[X]=!1,"function"==typeof c.error&&c.error(e,t)}},c.ajax?c.ajax(b,"treeNodes"):P.ajax(b)),m;p[V]=!0,N.length&&(!c.initSort||c.url&&!c.autoSort||((S=c.initSort).type?layui.sort(N,S.field,"desc"===S.type,!0):layui.sort(N,B.config.indexName,null,!0)),u.initData(p[f.children],p[H]),g=B.getTrHtml(o,N,null,null,e),E={trs:P(g.trs.join("")),trs_fixed:P(g.trs_fixed.join("")),trs_fixed_r:P(g.trs_fixed_r.join(""))},A=(e.split("-").length-1||0)+1,layui.each(N,function(e,t){E.trs.eq(e).attr({"data-index":t[H],"lay-data-index":t[H],"data-level":A}).data("index",t[H]),E.trs_fixed.eq(e).attr({"data-index":t[H],"lay-data-index":t[H],"data-level":A}).data("index",t[H]),E.trs_fixed_r.eq(e).attr({"data-index":t[H],"lay-data-index":t[H],"data-level":A}).data("index",t[H])}),r.find(R).find('tbody tr[lay-data-index="'+e+'"]').after(E.trs),r.find(Y).find('tbody tr[lay-data-index="'+e+'"]').after(E.trs_fixed),r.find(z).find('tbody tr[lay-data-index="'+e+'"]').after(E.trs_fixed_r),u.renderTreeTable(E.trs,A),n)&&!x&&layui.each(N,function(e,t){K({dataIndex:t[H],trElem:r.find('tr[lay-data-index="'+t[H]+'"]').first(),tableViewElem:r,tableId:o,options:c},a,n,i,d,l)})}else u.isExpandAll=!1,(n&&!x?(layui.each(N,function(e,t){K({dataIndex:t[H],trElem:r.find('tr[lay-data-index="'+t[H]+'"]').first(),tableViewElem:r,tableId:o,options:c},a,n,i,d,l)}),r.find(N.map(function(e,t,a){return'tr[lay-data-index="'+e[H]+'"]'}).join(","))):(D=u.treeToFlat(N,p[f.id],e),r.find(D.map(function(e,t,a){return'tr[lay-data-index="'+e[H]+'"]'}).join(",")))).addClass(q);J("resize-"+o,function(){j.resize(o)},0)(),d&&"loading"!==p[U]&&(T=s.callback.onExpand,"function"===layui.type(T))&&T(o,p,h),"function"===layui.type(l)&&"loading"!==p[U]&&l(o,p,h)}return m},v=(j.expandNode=function(e,t){var a,n,i,d,e=F(e);if(e)return a=(t=t||{}).index,n=t.expandFlag,i=t.inherit,d=t.callbackFlag,e=e.getOptions().elem.next(),K({trElem:e.find('tr[lay-data-index="'+a+'"]').first()},n,i,null,d,t.done)},j.expandAll=function(a,e){if("boolean"!==layui.type(e))return y.error('treeTable.expandAll param "expandFlag" must be a boolean value.');var t=F(a);if(t){t.isExpandAll=e;var n=t.getOptions(),i=n.tree,d=n.elem.next(),l=i.customName.isParent,r=i.customName.id,o=i.view.showFlexIconIfNotParent;if(e){e=j.getData(a,!0);if(i["async"].enable){var c=!0;if(layui.each(e,function(e,t){if(t[l]&&!t[U])return!(c=!1)}),!c)return void layui.each(j.getData(a),function(e,t){j.expandNode(a,{index:t[H],expandFlag:!0,inherit:!0})})}var u=!0;if(layui.each(e,function(e,t){if(t[l]&&!t[V])return!(u=!1)}),u)t.updateStatus(null,function(e){(e[l]||o)&&(e[X]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),d.find('tbody tr[data-level!="0"]').removeClass(q),d.find(".layui-table-tree-flexIcon").html(i.view.flexIconOpen),i.view.showIcon&&d.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconOpen);else{if(t.updateStatus(null,function(e){(e[l]||o)&&(e[X]=!0,e[V]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),n.initSort&&n.initSort.type&&n.autoSort)return j.sort(a);var s,n=B.getTrHtml(a,e),f={trs:P(n.trs.join("")),trs_fixed:P(n.trs_fixed.join("")),trs_fixed_r:P(n.trs_fixed_r.join(""))};layui.each(e,function(e,t){var a=t[H].split("-").length-1;s={"data-index":t[H],"lay-data-index":t[H],"data-level":a},f.trs.eq(e).attr(s).data("index",t[H]),f.trs_fixed.eq(e).attr(s).data("index",t[H]),f.trs_fixed_r.eq(e).attr(s).data("index",t[H])}),layui.each(["main","fixed-l","fixed-r"],function(e,t){d.find(".layui-table-"+t+" tbody").html(f[["trs","trs_fixed","trs_fixed_r"][e]])}),t.renderTreeTable(d,0,!1)}}else t.updateStatus(null,function(e){(e[l]||o)&&(e[X]=!1,e[r]!==undefined)&&(t.status.expand[e[r]]=!1)}),d.find('.layui-table-box tbody tr[data-level!="0"]').addClass(q),d.find(".layui-table-tree-flexIcon").html(i.view.flexIconClose),i.view.showIcon&&d.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconClose);j.resize(a)}},a.prototype.updateNodeIcon=function(e){var t=this.getOptions().tree||{},a=e.scopeEl,n=e.isExpand,e=e.isParent;a.find(".layui-table-tree-flexIcon").css("visibility",e||t.view.showFlexIconIfNotParent?"visible":"hidden").html(n?t.view.flexIconOpen:t.view.flexIconClose),t.view.showIcon&&(a=a.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom)"),n=e?n?t.view.iconOpen:t.view.iconClose:t.view.iconLeaf,a.toggleClass("layui-table-tree-iconLeaf",!e).html(n))},a.prototype.renderTreeTable=function(e,t,a){var d=this,n=d.getOptions(),l=n.elem.next(),i=(l.hasClass(m)||l.addClass(m),n.id),r=n.tree||{},o=(r.data,r.view||{}),c=r.customName||{},u=c.isParent,s=(l.attr("lay-filter"),d),f=n.data.length,y=((t=t||0)||(l.find(".layui-table-body tr:not([data-level])").attr("data-level",t),layui.each(B.cache[i],function(e,t){f&&(t[H]=String(e));t=t[H];l.find('.layui-table-main tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t),l.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t),l.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t)})),null),p=c.name,x=o.indent||14;if(layui.each(e.find('td[data-field="'+p+'"]'),function(e,t){var a,n,i=(t=P(t)).closest("tr"),t=t.children(".layui-table-cell");t.hasClass("layui-table-tree-item")||(n=i.attr("lay-data-index"))&&(i=l.find('tr[lay-data-index="'+n+'"]'),(a=s.getNodeDataByIndex(n))[X]&&a[u]&&((y=y||{})[n]=!0),a[g]&&i.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate",!0),n=t.html(),(t=i.find('td[data-field="'+p+'"]>div.layui-table-cell')).addClass("layui-table-tree-item"),t.html(['
          ',a[X]?o.flexIconOpen:o.flexIconClose,"
          ",o.showIcon?'
          '+(d.normalizedIcon(a[c.icon])||o.icon||(a[u]?a[X]?o.iconOpen:o.iconClose:o.iconLeaf)||"")+"
          ":"",n].join("")).find(".layui-table-tree-flexIcon").on("click",function(e){layui.stope(e),K({trElem:i},null,null,null,!0)}))}),!t&&r.view.expandAllDefault&&d.isExpandAll===undefined)return j.expandAll(i,!0);(!1!==a&&y?(layui.each(y,function(e,t){e=l.find('tr[lay-data-index="'+e+'"]');e.find(".layui-table-tree-flexIcon").html(o.flexIconOpen),K({trElem:e.first()},!0)}),J("renderTreeTable2-"+i,function(){h.render(P(".layui-table-tree["+L+'="'+i+'"]'))},0)):J("renderTreeTable-"+i,function(){n.hasNumberCol&&v(d),h.render(P(".layui-table-tree["+L+'="'+i+'"]'))},0))()},function(a){var e=a.getOptions(),t=e.elem.next(),n=0,i=t.find(".layui-table-main tbody tr"),d=t.find(".layui-table-fixed-l tbody tr"),l=t.find(".layui-table-fixed-r tbody tr");layui.each(a.treeToFlat(B.cache[e.id]),function(e,t){t.LAY_HIDE||(a.getNodeDataByIndex(t[H]).LAY_NUM=++n,i.eq(e).find(".laytable-cell-numbers").html(n),d.eq(e).find(".laytable-cell-numbers").html(n),l.eq(e).find(".laytable-cell-numbers").html(n))})}),N=(a.prototype.render=function(e){var t=this;t.tableIns=B["reloadData"===e?"reloadData":"reload"](t.tableIns.config.id,P.extend(!0,{},t.config)),t.config=t.tableIns.config},a.prototype.reload=function(e,t,a){var n=this;e=e||{},delete n.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete n.config[e]}),l(n.getOptions().id,e,a||!0),n.config=P.extend(t,{},n.config,e),n.render(a)},j.reloadData=function(){var e=P.extend(!0,[],arguments);return e[3]="reloadData",j.reload.apply(null,e)},function(e,a,n,i){var d=[];return layui.each(e,function(e,t){"function"===layui.type(a)?a(t):P.extend(t,a),d.push(P.extend({},t)),i||(d=d.concat(N(t[n],a,n,i)))}),d}),o=(a.prototype.updateStatus=function(e,t,a){var n=this.getOptions(),i=n.tree;return e=e||B.cache[n.id],N(e,t,i.customName.children,a)},a.prototype.getTableData=function(){var e=this.getOptions();return B.cache[e.id]},j.updateStatus=function(e,t,a){var e=F(e),n=e.getOptions();return a=a||(n.url?B.cache[n.id]:n.data),e.updateStatus(a,t)},j.sort=function(e){var t,a,i,d,n,l=F(e);l&&(n=(t=l.getOptions()).tree,a=j.getData(e),i=n.customName.children,d=function(e,a,n){layui.sort(e,a,n,!0),layui.each(e,function(e,t){d(t[i]||[],a,n)})},t.autoSort)&&((n=t.initSort).type?d(a,n.field,"desc"===n.type):d(a,B.config.indexName,null),B.cache[e]=a,l.initData(a),j.renderData(e))},function(n){var t=n.config.id,i=F(t),a=n.data=j.getNodeDataByIndex(t,n.index),d=a[H],l=(n.dataIndex=d,n.update);n.update=function(){var e=arguments,t=(P.extend(i.getNodeDataByIndex(d),e[0]),l.apply(this,e)),a=n.config.tree.customName.name;return a in e[0]&&n.tr.find('td[data-field="'+a+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),i.renderTreeTable(n.tr,n.tr.attr("data-level"),!1),t},n.del=function(){j.removeNode(t,a)},n.setRowChecked=function(e){j.setRowChecked(t,{index:a,checked:e})}}),u=(j.updateNode=function(e,a,t){var n,i,d,l,r,o=F(e);o&&((l=o.getOptions()).tree,l=(n=l.elem.next()).find('tr[lay-data-index="'+a+'"]'),i=l.attr("data-index"),d=l.attr("data-level"),t)&&(l=o.getNodeDataByIndex(a,!1,t),r=B.getTrHtml(e,[l]),layui.each(["main","fixed-l","fixed-r"],function(e,t){n.find(".layui-table-"+t+' tbody tr[lay-data-index="'+a+'"]').replaceWith(P(r[["trs","trs_fixed","trs_fixed_r"][e]].join("")).attr({"data-index":i,"lay-data-index":a,"data-level":d}).data("index",i))}),o.renderTreeTable(n.find('tr[lay-data-index="'+a+'"]'),d))},j.removeNode=function(e,t,a){var n,i,d,l,r,o,c,u,s=F(e);s&&(i=(u=(n=s.getOptions()).tree).customName.isParent,d=u.customName.children,l=n.elem.next(),r=[],o=B.cache[e],t=s.getNodeDataByIndex("string"===layui.type(t)?t:t[H],!1,"delete"),c=s.getNodeDataByIndex(t[f]),s.updateCheckStatus(c),u=s.treeToFlat([t],t[u.customName.pid],t[f]),layui.each(u,function(e,t){t=t[H];r.push('tr[lay-data-index="'+t+'"]'),-1!==t.indexOf("-")&&delete o[t]}),l.find(r.join(",")).remove(),t=s.initData(),function(){for(var e in o)-1!==e.indexOf("-")&&e!==o[e][H]&&delete o[e]}(),layui.each(s.treeToFlat(t),function(e,t){t[b]&&t[b]!==t[H]&&l.find('tr[lay-data-index="'+t[b]+'"]').attr({"data-index":t[H],"lay-data-index":t[H]}).data("index",t[H])}),layui.each(o,function(e,t){l.find('tr[data-level="0"][lay-data-index="'+t[H]+'"]').attr("data-index",e).data("index",e)}),n.hasNumberCol&&v(s),c&&(u=l.find('tr[lay-data-index="'+c[H]+'"]'),a||(c[i]=!(!c[d]||!c[d].length)),s.updateNodeIcon({scopeEl:u,isExpand:c[X],isParent:c[i]})),j.resize(e))},j.addNodes=function(e,t){var a=F(e);if(a){var n=a.getOptions(),i=n.tree,d=n.elem.next(),l=B.config.checkName,r=(t=t||{}).parentIndex,o=t.index,c=t.data,t=t.focus,u=(r="number"===layui.type(r)?r.toString():r)?a.getNodeDataByIndex(r):null,o="number"===layui.type(o)?o:-1,c=P.extend(!0,[],layui.isArray(c)?c:[c]);layui.each(c,function(e,t){l in t||!u||(t[l]=u[l])}),a.getTableData();if(u){var s=i.customName.isParent,f=i.customName.children;u[s]=!0;var y=(y=u[f])?(p=y.splice(-1===o?y.length:o),u[f]=y.concat(c,p)):u[f]=c,f=(a.updateStatus(y,function(e){(e[s]||i.view.showFlexIconIfNotParent)&&(e[V]=!1)}),a.treeToFlat(y));d.find(f.map(function(e){return'tr[lay-data-index="'+e[H]+'"]'}).join(",")).remove(),a.initData(),u[V]=!1,u[U]="local",K({trElem:d.find('tr[lay-data-index="'+r+'"]')},!0)}else{var p=B.cache[e].splice(-1===o?B.cache[e].length:o);if(B.cache[e]=B.cache[e].concat(c,p),n.url||(n.page?(y=n.page,n.data.splice.apply(n.data,[y.limit*(y.curr-1),y.limit].concat(B.cache[e]))):n.data=B.cache[e]),a.initData(),d.find(".layui-none").length)return B.renderData(e),c;var x,f=B.getTrHtml(e,c),h={trs:P(f.trs.join("")),trs_fixed:P(f.trs_fixed.join("")),trs_fixed_r:P(f.trs_fixed_r.join(""))},r=(layui.each(c,function(e,t){x={"data-index":t[H],"lay-data-index":t[H],"data-level":"0"},h.trs.eq(e).attr(x).data("index",t[H]),h.trs_fixed.eq(e).attr(x).data("index",t[H]),h.trs_fixed_r.eq(e).attr(x).data("index",t[H])}),parseInt(c[0][H])-1),y=d.find(R),n=d.find(Y),f=d.find(z);-1==r?y.find('tr[data-level="0"][data-index="0"]')[0]?(y.find('tr[data-level="0"][data-index="0"]').before(h.trs),n.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed_r)):(y.find("tbody").prepend(h.trs),n.find("tbody").prepend(h.trs_fixed),f.find("tbody").prepend(h.trs_fixed_r)):-1===o?(y.find("tbody").append(h.trs),n.find("tbody").append(h.trs_fixed),f.find("tbody").append(h.trs_fixed_r)):(r=p[0][b],y.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs),n.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed_r)),layui.each(B.cache[e],function(e,t){d.find('tr[data-level="0"][lay-data-index="'+t[H]+'"]').attr("data-index",e).data("index",e)}),a.renderTreeTable(d.find(c.map(function(e,t,a){return'tr[lay-data-index="'+e[H]+'"]'}).join(",")))}return a.updateCheckStatus(u),u&&(o=d.find('tr[lay-data-index="'+u[H]+'"]'),a.updateNodeIcon({scopeEl:o,isExpand:u[X],isParent:u[s]})),j.resize(e),t&&d.find(R).find('tr[lay-data-index="'+c[0][H]+'"]').get(0).scrollIntoViewIfNeeded(),c}},j.checkStatus=function(e,n){var i,t,a,d=F(e);if(d)return d=d.getOptions().tree,i=B.config.checkName,t=j.getData(e,!0).filter(function(e,t,a){return e[i]||n&&e[g]}),a=!0,layui.each("all"===d.data.cascade?B.cache[e]:j.getData(e,!0),function(e,t){if(!t[i])return!(a=!1)}),{data:t,isAll:a}},j.on("sort",function(e){var e=e.config,t=e.elem.next(),e=e.id;t.hasClass(m)&&j.sort(e)}),j.on("row",function(e){e.config.elem.next().hasClass(m)&&o(e)}),j.on("rowDouble",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&(o(e),(t.tree||{}).view.dblClickExpand)&&K({trElem:e.tr.first()},null,null,null,!0)}),j.on("rowContextmenu",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&o(e)}),j.on("tool",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&o(e)}),j.on("edit",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&(o(e),e.field===t.tree.customName.name)&&((a={})[e.field]=e.value,e.update(a))}),j.on("radio",function(e){var t=e.config,a=t.elem.next(),t=t.id;a.hasClass(m)&&(a=F(t),o(e),u.call(a,e.tr,e.checked))}),a.prototype.setRowCheckedClass=function(e,t){var a=this.getOptions(),n=(e.data("index"),a.elem.next());e[t?"addClass":"removeClass"](d),e.each(function(){var e=P(this).data("index");n.find('.layui-table-fixed-r tbody tr[data-index="'+e+'"]')[t?"addClass":"removeClass"](d)})},a.prototype.updateCheckStatus=function(e,t){var a,n,i,d,l,r,o,c=this,u=c.getOptions();return!!u.hasChecboxCol&&(a=u.tree,n=u.id,i=u.elem.next(),d=B.config.checkName,"all"!==(l=a.data.cascade)&&"parent"!==l||!e||(l=c.updateParentCheckStatus(e,"boolean"===layui.type(t)?t:null),layui.each(l,function(e,t){var a=i.find('tr[lay-data-index="'+t[H]+'"] input[name="layTableCheckbox"]:not(:disabled)'),n=t[d];c.setRowCheckedClass(a.closest("tr"),n),a.prop({checked:n,indeterminate:t[g]})})),o=!(r=!0),0<(e=(e="all"===a.data.cascade?B.cache[n]:j.getData(n,!0)).filter(function(e){return!e[u.disabledName]})).length?layui.each(e,function(e,t){if((t[d]||t[g])&&(o=!0),t[d]||(r=!1),o&&!r)return!0}):r=!1,o=o&&!r,i.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:r,indeterminate:o}),r)},a.prototype.updateParentCheckStatus=function(a,n){var i,e=this.getOptions(),t=e.tree,e=e.id,d=B.config.checkName,t=t.customName.children,l=[];return!(a[g]=!1)===n?a[t].length?layui.each(a[t],function(e,t){if(!t[d])return n=!1,a[g]=!0}):n=!1:!1===n?layui.each(a[t],function(e,t){if(t[d]||t[g])return a[g]=!0}):(n=!1,i=0,layui.each(a[t],function(e,t){t[d]&&i++}),n=a[t].length?a[t].length===i:a[d],a[g]=!n&&0li"],n.bodyElem=["."+C.CONST.BODY+":eq(0)",">."+C.CONST.ITEM],n.getContainer=function(){var e=n.documentElem||t.elem;return{header:{elem:e.find(n.headerElem[0]),items:e.find(n.headerElem.join(""))},body:{elem:e.find(n.bodyElem[0]),items:e.find(n.bodyElem.join(""))}}},"array"===layui.type(t.header)?"string"==typeof t.header[0]?(n.headerElem=t.header.concat(),n.documentElem=p(document)):(n.elemView=p('
          '),t.className&&n.elemView.addClass(t.className),a=p('
            '),i=p('
            '),layui.each(t.header,function(e,t){t=n.renderHeaderItem(t);a.append(t)}),layui.each(t.body,function(e,t){t=n.renderBodyItem(t);i.append(t)}),n.elemView.append(a).append(i),t.elem.html(n.elemView)):n.renderClose(),"array"===layui.type(t.body)&&"string"==typeof t.body[0]&&(n.documentElem=p(document),n.bodyElem=t.body.concat()),n.data());"index"in t&&e.index!=t.index?n.change(n.findHeaderItem(t.index),!0):-1===e.index&&n.change(n.findHeaderItem(0),!0),n.roll("auto"),t.elem.hasClass(C.CONST.CLASS_HIDEV)&&t.elem.removeClass(C.CONST.CLASS_HIDEV),"function"==typeof t.afterRender&&t.afterRender(e),layui.event.call(t.elem[0],C.CONST.MOD_NAME,"afterRender("+t.id+")",e)},events:function(){var e,t=this,a=t.config,i=t.getContainer(),n=C.CONST.MOD_NAME,i=(t.documentElem?i.header:a).elem,a=a.trigger+(".lay_"+n+"_trigger"),n=t.documentElem?t.headerElem[1]:t.headerElem.join("");i.off(a).on(a,n,function(){t.change(p(this))}),r.onresize||(p(window).on("resize",function(){clearTimeout(e),e=setTimeout(function(){layui.each(C.cache.id,function(e){e=C.getInst(e);e&&e.roll("init")})},50)}),r.onresize=!0)}}),r={},t=C.Class;t.prototype.add=function(e){var t,a,i=this,n=(i.config,i.getContainer()),r=i.renderHeaderItem(e),d=i.renderBodyItem(e),o=i.data();e=p.extend({active:!0},e),/(before|after)/.test(e.mode)?(a=(t=e.hasOwnProperty("index"))?i.findHeaderItem(e.index):o.thisHeaderItem,t=t?i.findBodyItem(e.index):o.thisHeaderItem,a[e.mode](r),t[e.mode](d)):(a={prepend:"prepend",append:"append"}[e.mode||"append"]||"append",n.header.elem[a](r),n.body.elem[a](d)),e.active?i.change(r,!0):i.roll("auto"),"function"==typeof e.done&&e.done(p.extend(o,{headerItem:r,bodyItem:d}))},t.prototype.close=function(e,t){if(e&&e[0]){var a=this,i=a.config,n=e.attr("lay-id"),r=e.index();if("false"!==e.attr("lay-closable")){var d=a.data();if(!t)if(!1===layui.event.call(e[0],C.CONST.MOD_NAME,"beforeClose("+i.id+")",p.extend(d,{index:r})))return;e.hasClass(C.CONST.CLASS_THIS)&&(e.next()[0]?a.change(e.next(),!0):e.prev()[0]&&a.change(e.prev(),!0)),a.findBodyItem(n||r).remove(),e.remove(),a.roll("auto",r);d=a.data();layui.event.call(d.thisHeaderItem[0],C.CONST.MOD_NAME,"afterClose("+i.id+")",d)}}},t.prototype.closeMult=function(i,e){var n=this,t=n.config,a=n.getContainer(),r=n.data(),d=a.header.items,a=(a.body.items,'[lay-closable="false"]'),o=(e=e===undefined?r.index:e,n.findHeaderItem(e)),l=(n.findBodyItem(e),o.index()),r=("false"!==r.thisHeaderItem.attr("lay-closable")&&("all"!==i&&i?e!==r.index&&n.change(o,!0):(e=d.filter(":gt("+r.index+")"+a).eq(0),o=p(d.filter(":lt("+r.index+")"+a).get().reverse()).eq(0),e[0]?n.change(e,!0):o[0]&&n.change(o,!0))),d.each(function(e){var t=p(this),a=t.attr("lay-id"),a=n.findBodyItem(a||e);"false"!==t.attr("lay-closable")&&("other"===i&&e!==l||"right"===i&&l");return t.html(e.title||"New Tab").attr("lay-id",e.id),this.appendClose(t,e),t},t.prototype.renderBodyItem=function(e){var t=this.config,t=p(e.bodyItem||t.bodyItem||'
            ');return t.html(e.content||"").attr("lay-id",e.id),t},t.prototype.appendClose=function(e,t){var a=this;a.config.closable&&(0==(t=t||{}).closable&&e.attr("lay-closable","false"),"false"===e.attr("lay-closable")||e.find("."+C.CONST.CLOSE)[0]||((t=p('')).on("click",function(){return a.close(p(this).parent()),!1}),e.append(t)))},t.prototype.renderClose=function(){var t=this,a=t.config;t.getContainer().header.items.each(function(){var e=p(this);a.closable?t.appendClose(e):e.find("."+C.CONST.CLOSE).remove()})},t.prototype.roll=function(e,i){var n=this,t=n.config,a=n.getContainer(),r=a.header.elem,d=a.header.items,a=r.prop("scrollWidth"),o=Math.ceil(r.outerWidth()),l=r.data("left")||0,s="scroll"===t.headerMode,c="layui-tabs-scroll",f="layui-tabs-bar",u=["layui-icon-prev","layui-icon-next"],m={elem:p('
            '),bar:p(['
            ','','',"
            "].join(""))};if("normal"!==t.headerMode){var h,y=r.parent("."+c);if(s||!s&&o=o-l)return r.css("left",-a).data("left",-a),!1}),l=r.data("left")||0,y.find("."+u[0])[l<0?"removeClass":"addClass"](C.CONST.CLASS_DISABLED),y.find("."+u[1])[0
            ')),t=(e.tree(a),i.elem=p(i.elem));if(t[0]){if(e.key=i.id||e.index,e.elem=a,e.elemNone=p('
            '+i.text.none+"
            "),t.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);i.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=p(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(L),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(L)}),e.events()}},l.prototype.renderForm=function(e){i.render(e,"LAY-tree-"+this.index)},l.prototype.tree=function(r,e){var d=this,s=d.config,o=s.customName,e=e||s.data;layui.each(e,function(e,i){var a,t,n=i[o.children]&&0
            "),c=p(['
            ','
            ','
            ',s.showLine?n?'':'':'',s.showCheckbox?'':"",s.isJump&&i.href?''+(i[o.title]||i.label||s.text.defaultNodeName)+"":''+(i[o.title]||i.label||s.text.defaultNodeName)+"","
            ",s.edit?(a={add:'',update:'',del:''},t=['
            '],!0===s.edit&&(s.edit=["update","del"]),"object"==typeof s.edit?(layui.each(s.edit,function(e,i){t.push(a[i]||"")}),t.join("")+"
            "):void 0):"","
            "].join(""));n&&(c.append(l),d.tree(l,i[o.children])),r.append(c),c.prev("."+C)[0]&&c.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),n||c.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),d.spread(c,i),s.showCheckbox&&(i.checked&&d.checkids.push(i[o.id]),d.checkClick(c,i)),s.edit&&d.operate(c,i)})},l.prototype.spread=function(t,n){var l=this,c=l.config,e=t.children("."+g),i=e.children("."+w),a=i.find('input[same="layuiTreeCheck"]'),r=e.find("."+v),e=e.find("."+N),d=c.onlyIconControl?r:i,s="";d.on("click",function(e){var i=t.children("."+F),a=(d.children(".layui-icon")[0]?d:d.find(".layui-tree-icon")).children(".layui-icon");i[0]?t.hasClass(T)?(t.removeClass(T),i.slideUp(200),a.removeClass(b).addClass(x),l.updateFieldValue(n,"spread",!1)):(t.addClass(T),i.slideDown(200),a.addClass(b).removeClass(x),l.updateFieldValue(n,"spread",!0),c.accordion&&((i=t.siblings("."+C)).removeClass(T),i.children("."+F).slideUp(200),i.find(".layui-tree-icon").children(".layui-icon").removeClass(b).addClass(x))):s="normal"}),e.on("click",function(){p(this).hasClass(u)||(s=t.hasClass(T)?c.onlyIconControl?"open":"close":c.onlyIconControl?"close":"open",a[0]&&l.updateFieldValue(n,"checked",a.prop("checked")),c.click&&c.click({elem:t,state:s,data:n}))})},l.prototype.updateFieldValue=function(e,i,a){i in e&&(e[i]=a)},l.prototype.setCheckbox=function(e,i,a){var n,t=this,l=t.config.customName,c=a.prop("checked");a.prop("disabled")||("object"!=typeof i[l.children]&&!e.find("."+F)[0]||e.find("."+F).find('input[same="layuiTreeCheck"]').each(function(e){this.disabled||((e=i[l.children][e])&&t.updateFieldValue(e,"checked",c),t.updateFieldValue(this,"checked",c))}),(n=function(e){var i,a,t;e.parents("."+C)[0]&&(a=(e=e.parent("."+F)).parent(),t=e.prev().find('input[same="layuiTreeCheck"]'),c?t.prop("checked",c):(e.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||t.prop("checked",!1)),n(a))})(e),t.renderForm("checkbox"))},l.prototype.checkClick=function(a,t){var n=this,l=n.config;a.children("."+g).children("."+w).on("click",'input[same="layuiTreeCheck"]+',function(e){layui.stope(e);var e=p(this).prev(),i=e.prop("checked");e.prop("disabled")||(n.setCheckbox(a,t,e),n.updateFieldValue(t,"checked",i),l.oncheck&&l.oncheck({elem:a,checked:i,data:t}))})},l.prototype.operate=function(r,d){var s=this,o=s.config,u=o.customName,e=r.children("."+g),h=e.children("."+w);e.children(".layui-tree-btnGroup").on("click",".layui-icon",function(e){layui.stope(e);var i,e=p(this).data("type"),t=r.children("."+F),n={data:d,type:e,elem:r};if("add"==e){t[0]||(o.showLine?(h.find("."+v).addClass("layui-tree-icon"),h.find("."+v).children(".layui-icon").addClass(x).removeClass("layui-icon-file")):h.find(".layui-tree-iconArrow").removeClass(k),r.append('
            '));var a,l=o.operate&&o.operate(n),c={};if(c[u.title]=o.text.defaultNodeName,c[u.id]=l,s.tree(r.children("."+F),[c]),o.showLine&&(t[0]?(t.hasClass(I)||t.addClass(I),r.find("."+F).each(function(){p(this).children("."+C).last().addClass(L)}),(t.children("."+C).last().prev().hasClass(L)?t.children("."+C).last().prev():t.children("."+C).last()).removeClass(L),!r.parent("."+F)[0]&&r.next()[0]&&t.children("."+C).last().removeClass(L)):(l=r.siblings("."+C),a=1,c=r.parent("."+F),layui.each(l,function(e,i){p(i).children("."+F)[0]||(a=0)}),(1==a?(l.children("."+F).addClass(S),l.children("."+F).children("."+C).removeClass(L),r.children("."+F).addClass(S),c.removeClass(I),c.children("."+C).last().children("."+F).children("."+C).last()):r.children("."+F).children("."+C)).addClass(L))),!o.showCheckbox)return;h.find('input[same="layuiTreeCheck"]')[0].checked&&(r.children("."+F).children("."+C).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),s.renderForm("checkbox")}else"update"==e?(l=h.children("."+N).html(),h.children("."+N).html(""),h.append(''),h.children(".layui-tree-editInput").val(f.unescape(l)).focus(),i=function(e){var i=f.escape(e.val().trim())||o.text.defaultNodeName;e.remove(),h.children("."+N).html(i),n.data[u.title]=i,o.operate&&o.operate(n)},h.children(".layui-tree-editInput").blur(function(){i(p(this))}),h.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),i(p(this)))})):(c=m.$t("tree.deleteNodePrompt",{name:d[u.title]||""}),y.confirm(c,function(e){var l,a,i;o.operate&&o.operate(n),n.status="remove",y.close(e),r.prev("."+C)[0]||r.next("."+C)[0]||r.parent("."+F)[0]?(r.siblings("."+C).children("."+g)[0]?(o.showCheckbox&&(l=function(e){var i,a,t,n;e.parents("."+C)[0]&&(i=e.siblings("."+C).children("."+g),a=(e=e.parent("."+F).prev()).find('input[same="layuiTreeCheck"]')[0],t=1,(n=0)==a.checked)&&(i.each(function(e,i){i=p(i).find('input[same="layuiTreeCheck"]')[0];0!=i.checked||i.disabled||(t=0),i.disabled||(n=1)}),1==t)&&1==n&&(a.checked=!0,s.renderForm("checkbox"),l(e.parent("."+C)))})(r),o.showLine&&(e=r.siblings("."+C),a=1,i=r.parent("."+F),layui.each(e,function(e,i){p(i).children("."+F)[0]||(a=0)}),1==a?(t[0]||(i.removeClass(I),e.children("."+F).addClass(S),e.children("."+F).children("."+C).removeClass(L)),(r.next()[0]?i.children("."+C).last():r.prev()).children("."+F).children("."+C).last().addClass(L),r.next()[0]||r.parents("."+C)[1]||r.parents("."+C).eq(0).next()[0]||r.prev("."+C).addClass(L)):!r.next()[0]&&r.hasClass(L)&&r.prev().addClass(L))):(e=r.parent("."+F).prev(),o.showLine?(e.find("."+v).removeClass("layui-tree-icon"),e.find("."+v).children(".layui-icon").removeClass(b).addClass("layui-icon-file"),(i=e.parents("."+F).eq(0)).addClass(I),i.children("."+C).each(function(){p(this).children("."+F).children("."+C).last().addClass(L)})):e.find(".layui-tree-iconArrow").addClass(k),r.parents("."+C).eq(0).removeClass(T),r.parent("."+F).remove()),r.remove()):(r.remove(),s.elem.append(s.elemNone))}))})},l.prototype.events=function(){var i=this,n=i.config;i.elem.find(".layui-tree-checkedFirst");i.setChecked(i.checkids),i.elem.find(".layui-tree-search").on("keyup",function(){var e=p(this),a=e.val(),e=e.nextAll(),t=[];e.find("."+N).each(function(){var i,e=p(this).parents("."+g);-1!=p(this).html().indexOf(a)&&(t.push(p(this).parent()),(i=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+F)[0]&&i(e.parent("."+F).parent("."+C))})(e.parent("."+C)))}),e.find("."+g).each(function(){var e=p(this).parent("."+C);e.hasClass("layui-tree-searchShow")||e.addClass(k)}),0==e.find(".layui-tree-searchShow").length&&i.elem.append(i.elemNone),n.onsearch&&n.onsearch({elem:t})}),i.elem.find(".layui-tree-search").on("keydown",function(){p(this).nextAll().find("."+g).each(function(){p(this).parent("."+C).removeClass("layui-tree-searchShow "+k)}),p(".layui-tree-emptyText")[0]&&p(".layui-tree-emptyText").remove()})},l.prototype.getChecked=function(){var n=this,e=n.config,l=e.customName,i=[],a=[],c=(n.elem.find(".layui-form-checked").each(function(){i.push(p(this).prev()[0].value)}),function(e,t){layui.each(e,function(e,a){layui.each(i,function(e,i){if(a[l.id]==i)return n.updateFieldValue(a,"checked",!0),delete(i=p.extend({},a))[l.children],t.push(i),a[l.children]&&(i[l.children]=[],c(a[l.children],i[l.children])),!0})})});return c(p.extend({},e.data),a),a},l.prototype.setChecked=function(l){this.config;this.elem.find("."+C).each(function(e,i){var a=p(this).data("id"),t=p(i).children("."+g).find('input[same="layuiTreeCheck"]'),n=t.next();if("number"==typeof l){if(a.toString()==l.toString())return t[0].checked||n.click(),!1}else"object"==typeof l&&layui.each(l,function(e,i){if(i.toString()==a.toString()&&!t[0].checked)return n.click(),!0})})},t.that={},t.config={},n.reload=function(e,i){e=t.that[e];return e.reload(i),t.call(e)},n.getChecked=function(e){return t.that[e].getChecked()},n.setChecked=function(e,i){return t.that[e].setChecked(i)},n.render=function(e){e=new l(e);return t.call(e)},e(a,n)});layui.define(["i18n","laytpl","form"],function(e){"use strict";var s=layui.$,n=layui.laytpl,t=layui.form,a=layui.i18n,i="transfer",l={config:{},index:layui[i]?layui[i].index+1e4:0,set:function(e){var t=this;return t.config=s.extend({},t.config,e),t},on:function(e,t){return layui.onevent.call(this,i,e,t)}},r=function(){var t=this,e=t.config,a=e.id||t.index;return r.that[a]=t,{config:r.config[a]=e,reload:function(e){t.reload.call(t,e)},getData:function(){return t.getData.call(t)}}},d="layui-hide",u="layui-btn-disabled",c="layui-none",o="layui-transfer-box",h="layui-transfer-header",f="layui-transfer-search",y="layui-transfer-data",p=function(e){return['
            ','
            ','","
            ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
              ',"
              "].join("")},v=function(e){var t=this;t.index=++l.index,t.config=s.extend({title:a.$t("transfer.title"),text:{none:a.$t("transfer.noData"),searchNone:a.$t("transfer.noMatch")}},t.config,l.config,e),t.render()};v.prototype.config={width:200,height:360,data:[],value:[],showSearch:!1,id:""},v.prototype.reload=function(e){var t=this;t.config=s.extend({},t.config,e),t.render()},v.prototype.render=function(){var e=this,t=e.config,a=['
              ',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'
              ','",'","
              ",p({index:1,checkAllName:"layTransferRightCheckAll"}),"
              "].join(""),a=e.elem=s(n(a,{open:"{{",close:"}}",tagStyle:"legacy"}).render({data:t,index:e.index})),i=t.elem=s(t.elem);i[0]&&(t.data=t.data||[],t.value=t.value||[],t.id="id"in t?t.id:elem.attr("id")||e.index,e.key=t.id,i.html(e.elem),e.layBox=e.elem.find("."+o),e.layHeader=e.elem.find("."+h),e.laySearch=e.elem.find("."+f),e.layData=a.find("."+y),e.layBtn=a.find(".layui-transfer-active .layui-btn"),e.layBox.css({width:t.width,height:t.height}),e.layData.css({height:(i=t.height-e.layHeader.outerHeight(),t.showSearch&&(i-=e.laySearch.outerHeight()),i-2)}),e.renderData(),e.events())},v.prototype.renderData=function(){var e=this,t=e.config,l=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];e.parseData(function(a){var i=a.selected?1:0,n=["
            • ",'',"
            • "].join("");i?layui.each(t.value,function(e,t){t==a.value&&a.selected&&(l[i].views[e]=n)}):l[i].views.push(n),delete a.selected}),e.layData.eq(0).html(l[0].views.join("")),e.layData.eq(1).html(l[1].views.join("")),e.renderCheckBtn()},v.prototype.renderForm=function(e){t.render(e,"LAY-transfer-"+this.index)},v.prototype.renderCheckBtn=function(r){var c=this,o=c.config;r=r||{},c.layBox.each(function(e){var t=s(this),a=t.find("."+y),t=t.find("."+h).find('input[type="checkbox"]'),i=a.find('input[type="checkbox"]'),n=0,l=!1;i.each(function(){var e=s(this).data("hide");(this.checked||this.disabled||e)&&n++,this.checked&&!e&&(l=!0)}),t.prop("checked",l&&n===i.length),c.layBtn.eq(e)[l?"removeClass":"addClass"](u),r.stopNone||(i=a.children("li:not(."+d+")").length,c.noneView(a,i?"":o.text.none))}),c.renderForm("checkbox")},v.prototype.noneView=function(e,t){var a=s('

              '+(t||"")+"

              ");e.find("."+c)[0]&&e.find("."+c).remove(),t.replace(/\s/g,"")&&e.append(a)},v.prototype.setValue=function(){var e=this.config,t=[];return this.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){s(this).data("hide")||t.push(this.value)}),e.value=t,this},v.prototype.parseData=function(t){var i=this.config,n=[];return layui.each(i.data,function(e,a){a=("function"==typeof i.parseData?i.parseData(a):a)||a,n.push(a=s.extend({},a)),layui.each(i.value,function(e,t){t==a.value&&(a.selected=!0)}),t&&t(a)}),i.data=n,this},v.prototype.getData=function(e){var t=this.config,i=[];return this.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&i.push(t)})}),i},v.prototype.transfer=function(e,t){var a,i=this,n=i.config,l=i.layBox.eq(e),r=[],t=(t?((a=(t=t).find('input[type="checkbox"]'))[0].checked=!1,l.siblings("."+o).find("."+y).append(t.clone()),t.remove(),r.push(a[0].value),i.setValue()):l.each(function(e){s(this).find("."+y).children("li").each(function(){var e=s(this),t=e.find('input[type="checkbox"]'),a=t.data("hide");t[0].checked&&!a&&(t[0].checked=!1,l.siblings("."+o).find("."+y).append(e.clone()),e.remove(),r.push(t[0].value)),i.setValue()})}),i.renderCheckBtn(),l.siblings("."+o).find("."+f+" input"));""!==t.val()&&t.trigger("keyup"),n.onchange&&n.onchange(i.getData(r),e)},v.prototype.events=function(){var n=this,l=n.config;n.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var e=s(this).prev(),t=e[0].checked,a=e.parents("."+o).eq(0).find("."+y);e[0].disabled||("all"===e.attr("lay-type")&&a.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=t)}),setTimeout(function(){n.renderCheckBtn({stopNone:!0})},0))}),n.elem.on("dblclick","."+y+">li",function(e){var t=s(this),a=t.children('input[type="checkbox"]'),i=t.parent().parent().data("index");a[0].disabled||!1!==("function"==typeof l.dblclick?l.dblclick({elem:t,data:n.getData([a[0].value])[0],index:i}):null)&&n.transfer(i,t)}),n.layBtn.on("click",function(){var e=s(this),t=e.data("index");e.hasClass(u)||n.transfer(t)}),n.laySearch.find("input").on("keyup",function(){var i=this.value,e=s(this).parents("."+f).eq(0).siblings("."+y),t=e.children("li"),t=(t.each(function(){var e=s(this),t=e.find('input[type="checkbox"]'),a=t[0].title,a=("cs"!==l.showSearch&&(a=a.toLowerCase(),i=i.toLowerCase()),-1!==a.indexOf(i));e[a?"removeClass":"addClass"](d),t.data("hide",!a)}),n.renderCheckBtn(),t.length===e.children("li."+d).length);n.noneView(e,t?l.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,t){e=r.that[e];return e.reload(t),r.call(e)},l.getData=function(e){return r.that[e].getData()},l.render=function(e){e=new v(e);return r.call(e)},e(i,l)});layui.define(["jquery","lay"],function(e){"use strict";var o=layui.$,l=layui.lay,t=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=o.extend({},n.config,e),n},on:function(e,n){return layui.onevent.call(this,r,e,n)}}),r="carousel",s="layui-this",u="layui-carousel-left",c="layui-carousel-right",m="layui-carousel-prev",h="layui-carousel-next",a="layui-carousel-arrow",d="layui-carousel-ind",n=function(e){var n=this;n.config=o.extend({},n.config,t.config,e),n.render()};n.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},n.prototype.render=function(){var e=this,n=e.config,i=o(n.elem);if(1*[carousel-item]>*"),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(s),e.indicator(),e.arrow(),e.autoplay(),1=this.elemItem.length?0:e},n.prototype.addIndex=function(e){var n=this.config;n.index=n.index+(e=e||1),n.index>=this.elemItem.length&&(n.index=0)},n.prototype.subIndex=function(e){var n=this.config;n.index=n.index-(e=e||1),n.index<0&&(n.index=this.elemItem.length-1)},n.prototype.autoplay=function(){var e=this,n=e.config,i=e.elemItem.length;n.autoplay&&(clearInterval(e.timer),1',''].join(""));e.elem.attr("lay-arrow",e.arrow),e.elem.find("."+a)[0]&&e.elem.find("."+a).remove(),1i.index?n.slide("add",e-i.index):e
                ',(n=[],layui.each(e.elemItem,function(e){n.push("")}),n.join("")),"
              "].join(""));i.elem.attr("lay-indicator",i.indicator),i.elem.find("."+d)[0]&&i.elem.find("."+d).remove(),1t[a?"height":"width"]()/3)&&o.slide(0"),i=1;i<=a.length;i++){var n='
            • ";a.half&&parseInt(a.value)!==a.value&&i==Math.ceil(a.value)?t=t+'
            • ":t+=n}t+="",a.text&&(t+=''+a.value+"");var s=a.elem,o=s.next("."+c.ELEM);o[0]&&o.remove(),e.elemTemplate=u(t),a.span=e.elemTemplate.next("span"),a.setText&&a.setText(a.value),s.html(e.elemTemplate),s.addClass("layui-inline"),a.readonly||e.action()},extendsInstance:function(){var a=this,l=a.config;return{setvalue:function(e){l.value=e,a.render()}}}}),c=l.CONST;l.Class.prototype.action=function(){var n=this.config,t=this.elemTemplate,i=t.find("i").width(),l=t.children("li");l.each(function(e){var a=e+1,l=u(this);l.on("click",function(e){n.value=a,n.half&&e.pageX-u(this).offset().left<=i/2&&(n.value=n.value-.5),n.text&&t.next("span").text(n.value),n.choose&&n.choose(n.value),n.setText&&n.setText(n.value)}),l.on("mousemove",function(e){t.find("i").each(function(){u(this).addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF)}),t.find("i:lt("+a+")").each(function(){u(this).addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE)}),n.half&&e.pageX-u(this).offset().left<=i/2&&l.children("i").addClass(c.ICON_RATE_HALF).removeClass(c.ICON_RATE_SOLID)}),l.on("mouseleave",function(){t.find("i").each(function(){u(this).addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF)}),t.find("i:lt("+Math.floor(n.value)+")").each(function(){u(this).addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE)}),n.half&&parseInt(n.value)!==n.value&&t.children("li:eq("+Math.floor(n.value)+")").children("i").addClass(c.ICON_RATE_HALF).removeClass(c.ICON_SOLID_RATE)})}),a.touchSwipe(t,{onTouchMove:function(e,a){var i;Date.now()-a.timeStart<=200||(a=e.touches[0].pageX,e=t.width()/n.length,a=(a-t.offset().left)/e,(i=(i=(e=a%1)<=.5&&n.half?.5+(a-e):Math.ceil(a))>n.length?n.length:i)<0&&(i=0),l.each(function(e){var a=u(this).children("i"),l=Math.ceil(i)-e==1,t=Math.ceil(i)>e,e=i-e==.5;t?(a.addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE),n.half&&e&&a.addClass(c.ICON_RATE_HALF).removeClass(c.ICON_RATE_SOLID)):a.addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF),a.toggleClass("layui-rate-hover",l)}),n.value=i,n.text&&t.next("span").text(n.value),n.setText&&n.setText(n.value))},onTouchEnd:function(e,a){Date.now()-a.timeStart<=200||(t.find("i").removeClass("layui-rate-hover"),n.choose&&n.choose(n.value),n.setText&&n.setText(n.value))}})},e(c.MOD_NAME,l)});layui.define(["i18n","jquery"],function(o){"use strict";var w=layui.$,E=layui.i18n,l=function(o){};l.prototype.load=function(o){var i,n,r,l,c,a,e,t,m,f,s,u,p,d,y,g=this,h=0,v=w((o=o||{}).elem);if(v[0])return c=w(o.scrollElem||document),a="mb"in o?o.mb:50,e=!("isAuto"in o)||o.isAuto,t=o.moreText||E.$t("flow.loadMore"),m=o.end||E.$t("flow.noMore"),f="top"===(o.direction||"bottom"),g._cleanup(v,c),s=o.scrollElem&&o.scrollElem!==document,p=w('"),v.find(".layui-flow-more")[0]||v[f?"prepend":"append"](p),d=function(o,l){var e=s?c.prop("scrollHeight"):document.documentElement.scrollHeight,t=c.scrollTop();o=w(o),p[f?"after":"before"](o),(l=0==l||null)?p.html(m):p.find("a").html(u),n=l,i=null,r&&r(),f&&(o=s?c.prop("scrollHeight"):document.documentElement.scrollHeight,1===h?c.scrollTop(o):1'),"function"==typeof o.done&&o.done(++h,d)})(),p.find("a").on("click.flow",function(){w(this);n||i||y()}),o.isLazyimg&&(r=g.lazyimg({elem:o.elem+" img",scrollElem:o.scrollElem,direction:o.direction})),e&&c.on("scroll.flow",function(){var e=w(this),t=e.scrollTop();l&&clearTimeout(l),!n&&v.width()&&(l=setTimeout(function(){var o=(s?e:w(window)).height(),l=s?e.prop("scrollHeight"):document.documentElement.scrollHeight;(f?t<=a:l-t-o<=a)&&!i&&y()},100))}),g},l.prototype.lazyimg=function(o){var l,a=this,m=0,f=w((o=o||{}).scrollElem||document),s=o.elem||"img",n="top"===(o.direction||"bottom"),u=o.scrollElem&&o.scrollElem!==document,p=function(l,o){var e,t=f.scrollTop(),o=t+o,i=u?l.offset().top-f.offset().top+t:l.offset().top;(n?i+l.height():i)>=t&&i<=o&&l.attr("lay-src")&&(e=l.attr("lay-src"),layui.img(e,function(){var o=a.lazyimg.elem.eq(m);l.attr("src",e).removeAttr("lay-src"),o[0]&&r(o),m++},function(){a.lazyimg.elem.eq(m);l.removeAttr("lay-src")}))},r=function(o,l){var e=(u?l||f:w(window)).height(),t=f.scrollTop(),i=t+e;if(a.lazyimg.elem=w(s),o)p(o,e);else for(var n=0;n"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1,highlightLine:{focus:{range:"",comment:!1,classActiveLine:"layui-code-line-has-focus",classActivePre:"layui-code-has-focused-lines"},hl:{comment:!1,classActiveLine:"layui-code-line-highlighted"},"++":{comment:!1,classActiveLine:"layui-code-line-diff-add"},"--":{comment:!1,classActiveLine:"layui-code-line-diff-remove"}}},O=layui.code?layui.code.index+1e4:0,P=function(e){return String(e).replace(/\s+$/,"").replace(/^\n|\n$/,"")},R=function(e){return"string"!=typeof e?[]:A.map(e.split(","),function(e){var e=e.split("-"),t=parseInt(e[0],10),e=parseInt(e[1],10);return t&&e?A.map(new Array(e-t+1),function(e,i){return t+i}):t||undefined})},H=/(?:\/\/|\/\*{1,2}||-->)?/;e("code",function(r,e){var u,a,i,t,l,n,o,c,s,d,y,p,E,h,f,v,m,L,g,M,_,C={config:r=A.extend(!0,{},j,r),reload:function(e){layui.code(this.updateOptions(e))},updateOptions:function(e){return delete(e=e||{}).elem,A.extend(!0,r,e)},reloadCode:function(e){layui.code(this.updateOptions(e),"reloadCode")}},w=A(r.elem);return 1',r.ln?['
              ',x.digit(i+1)+".","
              "].join(""):"",'
              ',(d.needParseComment?e.replace(H,""):e)||" ","
              ",""].join("")}),d.preClass&&u.addClass(d.preClass),{lines:s,html:e}},t=r.code,l=function(e){return"function"==typeof r.codeParse?r.codeParse(e,r):e},"reloadCode"===e?u.children(".layui-code-wrap").html(w(l(t)).html):(n=layui.code.index=++O,u.attr("lay-code-index",n),(M=T.CDDE_DATA_CLASS in u.data())&&u.attr("class",u.data(T.CDDE_DATA_CLASS)||""),M||u.data(T.CDDE_DATA_CLASS,u.attr("class")),o={copy:{className:"file-b",title:[W.$t("code.copy")],event:function(e){var i=x.unescape(l(r.code)),t="function"==typeof r.onCopy;lay.clipboard.writeText({text:i,done:function(){if(t&&!1===r.onCopy(i,!0))return;N.msg(W.$t("code.copied"),{icon:1})},error:function(){if(t&&!1===r.onCopy(i,!1))return;N.msg(W.$t("code.copyError"),{icon:2})}})}}},function b(){var e=u.parent("."+T.ELEM_PREVIEW),i=e.children("."+T.ELEM_TAB),t=e.children("."+T.ELEM_ITEM+"-preview");return i.remove(),t.remove(),e[0]&&u.unwrap(),b}(),r.preview&&(M="LAY-CODE-DF-"+n,h=r.layout||["code","preview"],c="iframe"===r.preview,E=A('
              '),_=A('
              '),s=A('
              '),g=A('
              '),d=A('
              '),r.id&&E.attr("id",r.id),E.addClass(r.className),_.attr("lay-filter",M),layui.each(h,function(e,i){var t=A('
            • ');0===e&&t.addClass("layui-this"),t.html(r.text[i]),s.append(t)}),A.extend(o,{full:{className:"screen-full",title:[W.$t("code.maximize"),W.$t("code.restore")],event:function(e){var e=e.elem,i=e.closest("."+T.ELEM_PREVIEW),t="layui-icon-"+this.className,a="layui-icon-screen-restore",l=this.title,n=A("html,body"),o="layui-scrollbar-hide";e.hasClass(t)?(i.addClass(T.ELEM_FULL),e.removeClass(t).addClass(a),e.attr("title",l[1]),n.addClass(o)):(i.removeClass(T.ELEM_FULL),e.removeClass(a).addClass(t),e.attr("title",l[0]),n.removeClass(o))}},window:{className:"release",title:[W.$t("code.preview")],event:function(e){x.openWin({content:l(r.code)})}}}),r.copy&&("array"===layui.type(r.tools)?-1===r.tools.indexOf("copy")&&r.tools.unshift("copy"):r.tools=["copy"]),d.on("click",">i",function(){var e=A(this),i=e.data("type"),e={elem:e,type:i,options:r,rawCode:r.code,finalCode:x.unescape(l(r.code))};o[i]&&"function"==typeof o[i].event&&o[i].event(e),"function"==typeof r.toolsEvent&&r.toolsEvent(e)}),r.addTools&&r.tools&&(r.tools=[].concat(r.tools,r.addTools)),layui.each(r.tools,function(e,i){var t="object"==typeof i,a=t?i:o[i]||{className:i,title:[i]},l=a.className||a.type,n=a.title||[""],t=t?a.type||l:i;t&&(o[t]||((i={})[t]=a,A.extend(o,i)),d.append(''))}),u.addClass(T.ELEM_ITEM).wrap(E),_.append(s),r.tools&&_.append(d),u.before(_),c&&g.html(''),y=function(e){var i=e.children("iframe")[0];c&&i?i.srcdoc=l(r.code):e.html(r.code),setTimeout(function(){"function"==typeof r.done&&r.done({container:e,options:r,render:function(){S.render(e.find(".layui-form")),I.render(),D.render({elem:["."+T.ELEM_PREVIEW,".layui-tabs"].join(" ")})}})},3)},"preview"===h[0]?(g.addClass(T.ELEM_SHOW),u.before(g),y(g)):u.addClass(T.ELEM_SHOW).after(g),r.previewStyle=[r.style,r.previewStyle].join(""),g.attr("style",r.previewStyle),I.on("tab("+M+")",function(e){var i=A(this),t=A(e.elem).closest("."+T.ELEM_PREVIEW).find("."+T.ELEM_ITEM),e=t.eq(e.index);t.removeClass(T.ELEM_SHOW),e.addClass(T.ELEM_SHOW),"preview"===i.attr("lay-id")&&y(e),L()})),p=A(''),u.addClass((E=["layui-code-view layui-border-box"],r.wordWrap||E.push("layui-code-nowrap"),E.join(" "))),(_=r.theme||r.skin)&&(u.removeClass("layui-code-theme-dark layui-code-theme-light"),u.addClass("layui-code-theme-"+_)),r.highlighter&&u.addClass([r.highlighter,"language-"+r.lang,"layui-code-hl"].join(" ")),h=w(r.encode?x.escape(l(t)):t),f=h.lines,u.html(p.html(h.html)),r.ln&&u.append('
              '),r.height&&p.css("max-height",r.height),r.codeStyle=[r.style,r.codeStyle].join(""),r.codeStyle&&p.attr("style",function(e,i){return(i||"")+r.codeStyle}),v=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,i){e.style["padding-left"]=i+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,i){e.style.width=i+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,i){e.style.width=i+"px"}}],m=lay.style({target:u[0],id:"DF-code-"+n,text:A.map(A.map(v,function(e){return e.selector}),function(e,i){return['.layui-code-view[lay-code-index="'+n+'"]',e].join(" ")}).join("")}),L=function b(){var e,a;return r.ln&&(e=Math.floor(f.length/100),a=p.children("."+T.ELEM_LINE).last().children("."+T.ELEM_LINE_NUM).outerWidth(),u.addClass(T.ELEM_LN_MODE),e)&&a>T.LINE_RAW_WIDTH&&lay.getStyleRules(m,function(e,i){try{v[i].setValue(e,a)}catch(t){}}),b}(),r.header&&((g=A('
              ')).html(r.title||r.text.code),u.prepend(g)),M=A('
              '),r.copy&&!r.preview&&((_=A(['','',""].join(""))).on("click",function(){o.copy.event()}),M.append(_)),r.langMarker&&M.append(''+r.lang+""),r.about&&M.append(r.about),u.append(M),r.preview||setTimeout(function(){"function"==typeof r.done&&r.done({})},3),r.elem.length===1+n&&"function"==typeof r.allDone&&r.allDone())),C})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss"); \ No newline at end of file diff --git a/public/static/plugs/lazyload/lazyload.min.js b/public/static/plugs/lazyload/lazyload.min.js new file mode 100644 index 0000000..d76e8af --- /dev/null +++ b/public/static/plugs/lazyload/lazyload.min.js @@ -0,0 +1,2 @@ +/*! Lazy Load 2.0.0-rc.2 - MIT license - Copyright 2007-2019 Mika Tuupola */ +!function(t,e){"object"==typeof exports?module.exports=e(t):"function"==typeof define&&define.amd?define([],e):t.LazyLoad=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";function e(t,e){this.settings=s(r,e||{}),this.images=t||document.querySelectorAll(this.settings.selector),this.observer=null,this.init()}"function"==typeof define&&define.amd&&(t=window);const r={src:"data-src",srcset:"data-srcset",selector:".lazyload",root:null,rootMargin:"0px",threshold:0},s=function(){let t={},e=!1,r=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],r++);for(;r.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active{pointer-events:auto}.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube .swiper-slide-next+.swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden} \ No newline at end of file diff --git a/public/static/plugs/swiper/swiper-bundle.min.js b/public/static/plugs/swiper/swiper-bundle.min.js new file mode 100644 index 0000000..ed7b497 --- /dev/null +++ b/public/static/plugs/swiper/swiper-bundle.min.js @@ -0,0 +1,17 @@ +/** + * Swiper 11.1.15 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * https://swiperjs.com + * + * Copyright 2014-2024 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: November 18, 2024 + */ + +let _link = ''; +document.body.insertAdjacentHTML('beforeend', _link); + +var Swiper=function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(s,a){void 0===s&&(s={}),void 0===a&&(a={}),Object.keys(a).forEach((i=>{void 0===s[i]?s[i]=a[i]:e(a[i])&&e(s[i])&&Object.keys(a[i]).length>0&&t(s[i],a[i])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const i={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function r(){const e="undefined"!=typeof window?window:{};return t(e,i),e}function n(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}function l(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function o(){return Date.now()}function d(e,t){void 0===t&&(t="x");const s=r();let a,i,n;const l=function(e){const t=r();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(i=l.transform||l.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),n=new s.WebKitCSSMatrix("none"===i?"":i)):(n=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),a=n.toString().split(",")),"x"===t&&(i=s.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=s.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function c(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function p(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let a=1;at.indexOf(e)<0));for(let t=0,a=s.length;tn?"next":"prev",p=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{l=(new Date).getTime(),null===o&&(o=l);const e=Math.max(Math.min((l-o)/d,1),0),r=.5-Math.cos(e*Math.PI)/2;let c=n+r*(s-n);if(p(c,s)&&(c=s),t.wrapperEl.scrollTo({[a]:c}),p(c,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[a]:c})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function h(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function f(e,t){void 0===t&&(t="");const s=[...e.children];return e instanceof HTMLSlotElement&&s.push(...e.assignedElements()),t?s.filter((e=>e.matches(t))):s}function g(e){try{return void console.warn(e)}catch(e){}}function v(e,t){void 0===t&&(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:n(t)),s}function w(e){const t=r(),s=a(),i=e.getBoundingClientRect(),n=s.body,l=e.clientTop||n.clientTop||0,o=e.clientLeft||n.clientLeft||0,d=e===t?t.scrollY:e.scrollTop,c=e===t?t.scrollX:e.scrollLeft;return{top:i.top+d-l,left:i.left+c-o}}function b(e,t){return r().getComputedStyle(e,null).getPropertyValue(t)}function y(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function E(e,t){const s=[];let a=e.parentElement;for(;a;)t?a.matches(t)&&s.push(a):s.push(a),a=a.parentElement;return s}function x(e,t){t&&e.addEventListener("transitionend",(function s(a){a.target===e&&(t.call(e,a),e.removeEventListener("transitionend",s))}))}function S(e,t,s){const a=r();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(a.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(a.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function T(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}function M(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}let C,P,L;function I(){return C||(C=function(){const e=r(),t=a();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),C}function z(e){return void 0===e&&(e={}),P||(P=function(e){let{userAgent:t}=void 0===e?{}:e;const s=I(),a=r(),i=a.navigator.platform,n=t||a.navigator.userAgent,l={ios:!1,android:!1},o=a.screen.width,d=a.screen.height,c=n.match(/(Android);?[\s\/]+([\d.]+)?/);let p=n.match(/(iPad).*OS\s([\d_]+)/);const u=n.match(/(iPod)(.*OS\s([\d_]+))?/),m=!p&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let f="MacIntel"===i;return!p&&f&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${d}`)>=0&&(p=n.match(/(Version)\/([\d.]+)/),p||(p=[0,1,"13_0_0"]),f=!1),c&&!h&&(l.os="android",l.android=!0),(p||m||u)&&(l.os="ios",l.ios=!0),l}(e)),P}function A(){return L||(L=function(){const e=r(),t=z();let s=!1;function a(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(a()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,a]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));s=e<16||16===e&&a<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),n=a();return{isSafari:s||n,needPerspectiveFix:s,need3dFix:n||i&&t.ios,isWebView:i}}()),L}var $={on(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;const i=s?"unshift":"push";return e.split(" ").forEach((e=>{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][i](t)})),a},once(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;function i(){a.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&s.eventsListeners[e].splice(i,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,a;for(var i=arguments.length,r=new Array(i),n=0;n{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(a,[t,...s])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(a,s)}))})),e}};const k=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};const O=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};const D=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(s.shadowRoot?t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{s.shadowRoot&&(t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},G=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},H=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const a="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,r=[s-t];return r.push(...Array.from({length:t}).map(((e,t)=>s+a+t))),void e.slides.forEach(((t,s)=>{r.includes(t.column)&&G(e,s)}))}const r=i+a-1;if(e.params.rewind||e.params.loop)for(let a=i-t;a<=r+t;a+=1){const t=(a%s+s)%s;(tr)&&G(e,t)}else for(let a=Math.max(i-t,0);a<=Math.min(r+t,s-1);a+=1)a!==i&&(a>r||a=0?x=parseFloat(x.replace("%",""))/100*r:"string"==typeof x&&(x=parseFloat(x)),e.virtualSize=-x,c.forEach((e=>{n?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),s.centeredSlides&&s.cssMode&&(u(a,"--swiper-centered-offset-before",""),u(a,"--swiper-centered-offset-after",""));const P=s.grid&&s.grid.rows>1&&e.grid;let L;P?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();const I="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter((e=>void 0!==s.breakpoints[e].slidesPerView)).length>0;for(let a=0;a1&&m.push(e.virtualSize-r)}if(o&&s.loop){const t=g[0]+x;if(s.slidesPerGroup>1){const a=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/s.slidesPerGroup),i=t*s.slidesPerGroup;for(let e=0;e!(s.cssMode&&!s.loop)||t!==c.length-1)).forEach((e=>{e.style[t]=`${x}px`}))}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;g.forEach((t=>{e+=t+(x||0)})),e-=x;const t=e>r?e-r:0;m=m.map((e=>e<=0?-v:e>t?t+w:e))}if(s.centerInsufficientSlides){let e=0;g.forEach((t=>{e+=t+(x||0)})),e-=x;const t=(s.slidesOffsetBefore||0)+(s.slidesOffsetAfter||0);if(e+t{m[t]=e-s})),h.forEach(((e,t)=>{h[t]=e+s}))}}if(Object.assign(e,{slides:c,snapGrid:m,slidesGrid:h,slidesSizesGrid:g}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){u(a,"--swiper-centered-offset-before",-m[0]+"px"),u(a,"--swiper-centered-offset-after",e.size/2-g[g.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}if(p!==d&&e.emit("slidesLengthChange"),m.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==E&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(o||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,a=e.el.classList.contains(t);p<=s.maxBackfaceHiddenSlides?a||e.el.classList.add(t):a&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],a=t.virtual&&t.params.virtual.enabled;let i,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const n=e=>a?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{s.push(e)}));else for(i=0;it.slides.length&&!a)break;s.push(n(e))}else s.push(n(t.activeIndex));for(i=0;ir?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let a=0;a=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e=0&&u<=t.size-t.slidesSizesGrid[e],f=u>=0&&u1&&m<=t.size||u<=0&&m>=t.size;f&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e)),k(o,f,s.slideVisibleClass),k(o,h,s.slideFullyVisibleClass),o.progress=i?-c:c,o.originalProgress=i?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:r,isEnd:n,progressLoop:l}=t;const o=r,d=n;if(0===a)i=0,r=!0,n=!0;else{i=(e-t.minTranslate())/a;const s=Math.abs(e-t.minTranslate())<1,l=Math.abs(e-t.maxTranslate())<1;r=s||i<=0,n=l||i>=1,s&&(i=0),l&&(i=1)}if(s.loop){const s=t.getSlideIndexByData(0),a=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[s],r=t.slidesGrid[a],n=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs(e);l=o>=i?(o-i)/n:(o+n-r)/n,l>1&&(l-=1)}Object.assign(t,{progress:i,progressLoop:l,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!d&&t.emit("reachEnd toEdge"),(o&&!r||d&&!n)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:a,activeIndex:i}=e,r=e.virtual&&s.virtual.enabled,n=e.grid&&s.grid&&s.grid.rows>1,l=e=>f(a,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let o,d,c;if(r)if(s.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),o=l(`[data-swiper-slide-index="${t}"]`)}else o=l(`[data-swiper-slide-index="${i}"]`);else n?(o=t.filter((e=>e.column===i))[0],c=t.filter((e=>e.column===i+1))[0],d=t.filter((e=>e.column===i-1))[0]):o=t[i];o&&(n||(c=function(e,t){const s=[];for(;e.nextElementSibling;){const a=e.nextElementSibling;t?a.matches(t)&&s.push(a):s.push(a),e=a}return s}(o,`.${s.slideClass}, swiper-slide`)[0],s.loop&&!c&&(c=t[0]),d=function(e,t){const s=[];for(;e.previousElementSibling;){const a=e.previousElementSibling;t?a.matches(t)&&s.push(a):s.push(a),e=a}return s}(o,`.${s.slideClass}, swiper-slide`)[0],s.loop&&0===!d&&(d=t[t.length-1]))),t.forEach((e=>{O(e,e===o,s.slideActiveClass),O(e,e===c,s.slideNextClass),O(e,e===d,s.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:a,params:i,activeIndex:r,realIndex:n,snapIndex:l}=t;let o,d=e;const c=e=>{let s=e-t.virtual.slidesBefore;return s<0&&(s=t.virtual.slides.length+s),s>=t.virtual.slides.length&&(s-=t.virtual.slides.length),s};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:s}=e,a=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e=t[e]&&a=t[e]&&a=t[e]&&(i=e);return s.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),a.indexOf(s)>=0)o=a.indexOf(s);else{const e=Math.min(i.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/i.slidesPerGroup)}if(o>=a.length&&(o=a.length-1),d===r&&!t.params.loop)return void(o!==l&&(t.snapIndex=o,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=c(d));const p=t.grid&&i.grid&&i.grid.rows>1;let u;if(t.virtual&&i.virtual.enabled&&i.loop)u=c(d);else if(p){const e=t.slides.filter((e=>e.column===d))[0];let s=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(s)&&(s=Math.max(t.slides.indexOf(e),0)),u=Math.floor(s/i.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");u=e?parseInt(e,10):d}else u=d;Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:n,realIndex:u,previousIndex:r,activeIndex:d}),t.initialized&&H(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(n!==u&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const s=this,a=s.params;let i=e.closest(`.${a.slideClass}, swiper-slide`);!i&&s.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!i&&e.matches&&e.matches(`.${a.slideClass}, swiper-slide`)&&(i=e)}));let r,n=!1;if(i)for(let e=0;eo?o:a&&en?"next":r=o.length&&(v=o.length-1);const w=-o[v];if(l.normalizeSlideIndex)for(let e=0;e=s&&t=s&&t=s&&(n=e)}if(r.initialized&&n!==p){if(!r.allowSlideNext&&(u?w>r.translate&&w>r.minTranslate():wr.translate&&w>r.maxTranslate()&&(p||0)!==n)return!1}let b;n!==(c||0)&&s&&r.emit("beforeSlideChangeStart"),r.updateProgress(w),b=n>p?"next":n0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{h[e?"scrollLeft":"scrollTop"]=s}))):h[e?"scrollLeft":"scrollTop"]=s,y&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}));else{if(!r.support.smoothScroll)return m({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(w),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,a),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,a){if(void 0===e&&(e=0),void 0===s&&(s=!0),"string"==typeof e){e=parseInt(e,10)}const i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);const r=i.grid&&i.params.grid&&i.params.grid.rows>1;let n=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)n+=i.virtual.slidesBefore;else{let e;if(r){const t=n*i.params.grid.rows;e=i.slides.filter((e=>1*e.getAttribute("data-swiper-slide-index")===t))[0].column}else e=i.getSlideIndexByData(n);const t=r?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:s}=i.params;let l=i.params.slidesPerView;"auto"===l?l=i.slidesPerViewDynamic():(l=Math.ceil(parseFloat(i.params.slidesPerView,10)),s&&l%2==0&&(l+=1));let o=t-e1*t.getAttribute("data-swiper-slide-index")===e))[0].column}else n=i.getSlideIndexByData(n)}return requestAnimationFrame((()=>{i.slideTo(n,t,s,a)})),i},slideNext:function(e,t,s){void 0===t&&(t=!0);const a=this,{enabled:i,params:r,animating:n}=a;if(!i||a.destroyed)return a;void 0===e&&(e=a.params.speed);let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(a.slidesPerViewDynamic("current",!0),1));const o=a.activeIndex{a.slideTo(a.activeIndex+o,e,t,s)})),!0}return r.rewind&&a.isEnd?a.slideTo(0,e,t,s):a.slideTo(a.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===t&&(t=!0);const a=this,{params:i,snapGrid:r,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=a;if(!o||a.destroyed)return a;void 0===e&&(e=a.params.speed);const c=a.virtual&&i.virtual.enabled;if(i.loop){if(d&&!c&&i.loopPreventsSliding)return!1;a.loopFix({direction:"prev"}),a._clientLeft=a.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?a.translate:-a.translate),m=r.map((e=>p(e)));let h=r[m.indexOf(u)-1];if(void 0===h&&i.cssMode){let e;r.forEach(((t,s)=>{u>=t&&(e=s)})),void 0!==e&&(h=r[e>0?e-1:e])}let f=0;if(void 0!==h&&(f=n.indexOf(h),f<0&&(f=a.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(f=f-a.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),i.rewind&&a.isBeginning){const i=a.params.virtual&&a.params.virtual.enabled&&a.virtual?a.virtual.slides.length-1:a.slides.length-1;return a.slideTo(i,e,t,s)}return i.loop&&0===a.activeIndex&&i.cssMode?(requestAnimationFrame((()=>{a.slideTo(f,e,t,s)})),!0):a.slideTo(f,e,t,s)},slideReset:function(e,t,s){void 0===t&&(t=!0);const a=this;if(!a.destroyed)return void 0===e&&(e=a.params.speed),a.slideTo(a.activeIndex,e,t,s)},slideToClosest:function(e,t,s,a){void 0===t&&(t=!0),void 0===a&&(a=.5);const i=this;if(i.destroyed)return;void 0===e&&(e=i.params.speed);let r=i.activeIndex;const n=Math.min(i.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/i.params.slidesPerGroup),o=i.rtlTranslate?i.translate:-i.translate;if(o>=i.snapGrid[l]){const e=i.snapGrid[l];o-e>(i.snapGrid[l+1]-e)*a&&(r+=i.params.slidesPerGroup)}else{const e=i.snapGrid[l-1];o-e<=(i.snapGrid[l]-e)*a&&(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:s}=e,a="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,r=e.clickedIndex;const n=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?re.slides.length-e.loopedSlides+a/2?(e.loopFix(),r=e.getSlideIndex(f(s,`${n}[data-swiper-slide-index="${i}"]`)[0]),l((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-a?(e.loopFix(),r=e.getSlideIndex(f(s,`${n}[data-swiper-slide-index="${i}"]`)[0]),l((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var R={loopCreate:function(e){const t=this,{params:s,slidesEl:a}=t;if(!s.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{f(a,`.${s.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},r=t.grid&&s.grid&&s.grid.rows>1,n=s.slidesPerGroup*(r?s.grid.rows:1),l=t.slides.length%n!=0,o=r&&t.slides.length%s.grid.rows!=0,d=e=>{for(let a=0;a1;d.lengthe.classList.contains(m.slideActiveClass)))[0]):x=r;const S="next"===a||!a,T="prev"===a||!a;let M=0,C=0;const P=b?Math.ceil(d.length/m.grid.rows):d.length,L=(b?d[r].column:r)+(h&&void 0===i?-f/2+.5:0);if(L=0;t-=1)d[t].column===e&&y.push(t)}else y.push(P-t-1)}}else if(L+f>P-w){C=Math.max(L-(P-2*w),v);for(let e=0;e{e.column===t&&E.push(s)})):E.push(t)}}if(o.__preventObserver__=!0,requestAnimationFrame((()=>{o.__preventObserver__=!1})),T&&y.forEach((e=>{d[e].swiperLoopMoveDOM=!0,u.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),S&&E.forEach((e=>{d[e].swiperLoopMoveDOM=!0,u.append(d[e]),d[e].swiperLoopMoveDOM=!1})),o.recalcSlides(),"auto"===m.slidesPerView?o.updateSlides():b&&(y.length>0&&T||E.length>0&&S)&&o.slides.forEach(((e,t)=>{o.grid.updateSlide(t,e,o.slides)})),m.watchSlidesProgress&&o.updateSlidesOffset(),s)if(y.length>0&&T){if(void 0===t){const e=o.slidesGrid[x],t=o.slidesGrid[x+M]-e;l?o.setTranslate(o.translate-t):(o.slideTo(x+Math.ceil(M),0,!1,!0),i&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-t,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-t))}else if(i){const e=b?y.length/m.grid.rows:y.length;o.slideTo(o.activeIndex+e,0,!1,!0),o.touchEventsData.currentTranslate=o.translate}}else if(E.length>0&&S)if(void 0===t){const e=o.slidesGrid[x],t=o.slidesGrid[x-C]-e;l?o.setTranslate(o.translate-t):(o.slideTo(x-C,0,!1,!0),i&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-t,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-t))}else{const e=b?E.length/m.grid.rows:E.length;o.slideTo(o.activeIndex-e,0,!1,!0)}if(o.allowSlidePrev=c,o.allowSlideNext=p,o.controller&&o.controller.control&&!n){const e={slideRealIndex:t,direction:a,setTranslate:i,activeSlideIndex:r,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===m.slidesPerView&&s})})):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...e,slideTo:o.controller.control.params.slidesPerView===m.slidesPerView&&s})}o.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const a=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;a[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),a.forEach((e=>{s.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function q(e,t,s){const a=r(),{params:i}=e,n=i.edgeSwipeDetection,l=i.edgeSwipeThreshold;return!n||!(s<=l||s>=a.innerWidth-l)||"prevent"===n&&(t.preventDefault(),!0)}function F(e){const t=this,s=a();let i=e;i.originalEvent&&(i=i.originalEvent);const n=t.touchEventsData;if("pointerdown"===i.type){if(null!==n.pointerId&&n.pointerId!==i.pointerId)return;n.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(n.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void q(t,i,i.targetTouches[0].pageX);const{params:l,touches:d,enabled:c}=t;if(!c)return;if(!l.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&l.preventInteractionOnTransition)return;!t.animating&&l.cssMode&&l.loop&&t.loopFix();let p=i.target;if("wrapper"===l.touchEventsTarget&&!function(e,t){const s=t.contains(e);if(!s&&t instanceof HTMLSlotElement)return[...t.assignedElements()].includes(e);return s}(p,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(n.isTouched&&n.isMoved)return;const u=!!l.noSwipingClass&&""!==l.noSwipingClass,m=i.composedPath?i.composedPath():i.path;u&&i.target&&i.target.shadowRoot&&m&&(p=m[0]);const h=l.noSwipingSelector?l.noSwipingSelector:`.${l.noSwipingClass}`,f=!(!i.target||!i.target.shadowRoot);if(l.noSwiping&&(f?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===a()||s===r())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(h,p):p.closest(h)))return void(t.allowClick=!0);if(l.swipeHandler&&!p.closest(l.swipeHandler))return;d.currentX=i.pageX,d.currentY=i.pageY;const g=d.currentX,v=d.currentY;if(!q(t,i,g))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),d.startX=g,d.startY=v,n.touchStartTime=o(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,l.threshold>0&&(n.allowThresholdMove=!1);let w=!0;p.matches(n.focusableElements)&&(w=!1,"SELECT"===p.nodeName&&(n.isTouched=!1)),s.activeElement&&s.activeElement.matches(n.focusableElements)&&s.activeElement!==p&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!p.matches(n.focusableElements))&&s.activeElement.blur();const b=w&&t.allowTouchMove&&l.touchStartPreventDefault;!l.touchStartForcePreventDefault&&!b||p.isContentEditable||i.preventDefault(),l.freeMode&&l.freeMode.enabled&&t.freeMode&&t.animating&&!l.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function V(e){const t=a(),s=this,i=s.touchEventsData,{params:r,touches:n,rtlTranslate:l,enabled:d}=s;if(!d)return;if(!r.simulateTouch&&"mouse"===e.pointerType)return;let c,p=e;if(p.originalEvent&&(p=p.originalEvent),"pointermove"===p.type){if(null!==i.touchId)return;if(p.pointerId!==i.pointerId)return}if("touchmove"===p.type){if(c=[...p.changedTouches].filter((e=>e.identifier===i.touchId))[0],!c||c.identifier!==i.touchId)return}else c=p;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",p));const u=c.pageX,m=c.pageY;if(p.preventedByNestedSwiper)return n.startX=u,void(n.startY=m);if(!s.allowTouchMove)return p.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(n,{startX:u,startY:m,currentX:u,currentY:m}),i.touchStartTime=o()));if(r.touchReleaseOnEdges&&!r.loop)if(s.isVertical()){if(mn.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(un.startX&&s.translate>=s.minTranslate())return;if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==p.target&&"mouse"!==p.pointerType&&t.activeElement.blur(),t.activeElement&&p.target===t.activeElement&&p.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);i.allowTouchCallbacks&&s.emit("touchMove",p),n.previousX=n.currentX,n.previousY=n.currentY,n.currentX=u,n.currentY=m;const h=n.currentX-n.startX,f=n.currentY-n.startY;if(s.params.threshold&&Math.sqrt(h**2+f**2)=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(h))/Math.PI,i.isScrolling=s.isHorizontal()?e>r.touchAngle:90-e>r.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",p),void 0===i.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===p.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!r.cssMode&&p.cancelable&&p.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&p.stopPropagation();let g=s.isHorizontal()?h:f,v=s.isHorizontal()?n.currentX-n.previousX:n.currentY-n.previousY;r.oneWayMovement&&(g=Math.abs(g)*(l?1:-1),v=Math.abs(v)*(l?1:-1)),n.diff=g,g*=r.touchRatio,l&&(g=-g,v=-v);const w=s.touchesDirection;s.swipeDirection=g>0?"prev":"next",s.touchesDirection=v>0?"prev":"next";const b=s.params.loop&&!r.cssMode,y="next"===s.touchesDirection&&s.allowSlideNext||"prev"===s.touchesDirection&&s.allowSlidePrev;if(!i.isMoved){if(b&&y&&s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});s.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!r.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",p)}if((new Date).getTime(),i.isMoved&&i.allowThresholdMove&&w!==s.touchesDirection&&b&&y&&Math.abs(g)>=1)return Object.assign(n,{startX:u,startY:m,currentX:u,currentY:m,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);s.emit("sliderMove",p),i.isMoved=!0,i.currentTranslate=g+i.startTranslate;let E=!0,x=r.resistanceRatio;if(r.touchReleaseOnEdges&&(x=0),g>0?(b&&y&&i.allowThresholdMove&&i.currentTranslate>(r.centeredSlides?s.minTranslate()-s.slidesSizesGrid[s.activeIndex+1]-("auto"!==r.slidesPerView&&s.slides.length-r.slidesPerView>=2?s.slidesSizesGrid[s.activeIndex+1]+s.params.spaceBetween:0)-s.params.spaceBetween:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>s.minTranslate()&&(E=!1,r.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+g)**x))):g<0&&(b&&y&&i.allowThresholdMove&&i.currentTranslate<(r.centeredSlides?s.maxTranslate()+s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween+("auto"!==r.slidesPerView&&s.slides.length-r.slidesPerView>=2?s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween:0):s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===r.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(r.slidesPerView,10)))}),i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),r.threshold>0){if(!(Math.abs(g)>r.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=s.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}r.followFinger&&!r.cssMode&&((r.freeMode&&r.freeMode.enabled&&s.freeMode||r.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),r.freeMode&&r.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function _(e){const t=this,s=t.touchEventsData;let a,i=e;i.originalEvent&&(i=i.originalEvent);if("touchend"===i.type||"touchcancel"===i.type){if(a=[...i.changedTouches].filter((e=>e.identifier===s.touchId))[0],!a||a.identifier!==s.touchId)return}else{if(null!==s.touchId)return;if(i.pointerId!==s.pointerId)return;a=i}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(i.type)){if(!(["pointercancel","contextmenu"].includes(i.type)&&(t.browser.isSafari||t.browser.isWebView)))return}s.pointerId=null,s.touchId=null;const{params:r,touches:n,rtlTranslate:d,slidesGrid:c,enabled:p}=t;if(!p)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(s.allowTouchCallbacks&&t.emit("touchEnd",i),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&r.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);r.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=o(),m=u-s.touchStartTime;if(t.allowClick){const e=i.path||i.composedPath&&i.composedPath();t.updateClickedSlide(e&&e[0]||i.target,e),t.emit("tap click",i),m<300&&u-s.lastClickTime<300&&t.emit("doubleTap doubleClick",i)}if(s.lastClickTime=o(),l((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===n.diff&&!s.loopSwapReset||s.currentTranslate===s.startTranslate&&!s.loopSwapReset)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let h;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,h=r.followFinger?d?t.translate:-t.translate:-s.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});const f=h>=-t.maxTranslate()&&!t.params.loop;let g=0,v=t.slidesSizesGrid[0];for(let e=0;e=c[e]&&h=c[e])&&(g=e,v=c[c.length-1]-c[c.length-2])}let w=null,b=null;r.rewind&&(t.isBeginning?b=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(w=0));const y=(h-c[g])/v,E=gr.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?w:g+E):t.slideTo(g)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(g+E):null!==b&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(b):t.slideTo(g))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(i.target===t.navigation.nextEl||i.target===t.navigation.prevEl)?i.target===t.navigation.nextEl?t.slideTo(g+E):t.slideTo(g):("next"===t.swipeDirection&&t.slideTo(null!==w?w:g+E),"prev"===t.swipeDirection&&t.slideTo(null!==b?b:g))}}function W(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:i,snapGrid:r}=e,n=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l?e.params.loop&&!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=i,e.allowSlideNext=a,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function j(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function U(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:a}=e;if(!a)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();i=0===r?0:(e.translate-e.minTranslate())/r,i!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function K(e){const t=this;D(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function Z(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Q=(e,t)=>{const s=a(),{params:i,el:r,wrapperEl:n,device:l}=e,o=!!i.nested,d="on"===t?"addEventListener":"removeEventListener",c=t;r&&"string"!=typeof r&&(s[d]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:o}),r[d]("touchstart",e.onTouchStart,{passive:!1}),r[d]("pointerdown",e.onTouchStart,{passive:!1}),s[d]("touchmove",e.onTouchMove,{passive:!1,capture:o}),s[d]("pointermove",e.onTouchMove,{passive:!1,capture:o}),s[d]("touchend",e.onTouchEnd,{passive:!0}),s[d]("pointerup",e.onTouchEnd,{passive:!0}),s[d]("pointercancel",e.onTouchEnd,{passive:!0}),s[d]("touchcancel",e.onTouchEnd,{passive:!0}),s[d]("pointerout",e.onTouchEnd,{passive:!0}),s[d]("pointerleave",e.onTouchEnd,{passive:!0}),s[d]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&r[d]("click",e.onClick,!0),i.cssMode&&n[d]("scroll",e.onScroll),i.updateOnWindowResize?e[c](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",W,!0):e[c]("observerUpdate",W,!0),r[d]("load",e.onLoad,{capture:!0}))};const J=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var ee={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function te(e,t){return function(s){void 0===s&&(s={});const a=Object.keys(s)[0],i=s[a];"object"==typeof i&&null!==i?(!0===e[a]&&(e[a]={enabled:!0}),"navigation"===a&&e[a]&&e[a].enabled&&!e[a].prevEl&&!e[a].nextEl&&(e[a].auto=!0),["pagination","scrollbar"].indexOf(a)>=0&&e[a]&&e[a].enabled&&!e[a].el&&(e[a].auto=!0),a in e&&"enabled"in i?("object"!=typeof e[a]||"enabled"in e[a]||(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),p(t,s)):p(t,s)):p(t,s)}}const se={eventsEmitter:$,update:B,translate:N,transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`,s.wrapperEl.style.transitionDelay=0===e?"0ms":""),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;a.cssMode||(a.autoHeight&&s.updateAutoHeight(),X({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;s.animating=!1,a.cssMode||(s.setTransition(0),X({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:Y,loop:R,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=F.bind(e),e.onTouchMove=V.bind(e),e.onTouchEnd=_.bind(e),e.onDocumentTouchStart=Z.bind(e),t.cssMode&&(e.onScroll=U.bind(e)),e.onClick=j.bind(e),e.onLoad=K.bind(e),Q(e,"on")},detachEvents:function(){Q(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:a,el:i}=e,r=a.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const n=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!n||e.currentBreakpoint===n)return;const l=(n in r?r[n]:void 0)||e.originalParams,o=J(e,a),d=J(e,l),c=e.params.grabCursor,u=l.grabCursor,m=a.enabled;o&&!d?(i.classList.remove(`${a.containerModifierClass}grid`,`${a.containerModifierClass}grid-column`),e.emitContainerClasses()):!o&&d&&(i.classList.add(`${a.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===a.grid.fill)&&i.classList.add(`${a.containerModifierClass}grid-column`),e.emitContainerClasses()),c&&!u?e.unsetGrabCursor():!c&&u&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===l[t])return;const s=a[t]&&a[t].enabled,i=l[t]&&l[t].enabled;s&&!i&&e[t].disable(),!s&&i&&e[t].enable()}));const h=l.direction&&l.direction!==a.direction,f=a.loop&&(l.slidesPerView!==a.slidesPerView||h),g=a.loop;h&&s&&e.changeDirection(),p(e.params,l);const v=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!v?e.disable():!m&&v&&e.enable(),e.currentBreakpoint=n,e.emit("_beforeBreakpoint",l),s&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!g&&w?(e.loopCreate(t),e.updateSlides()):g&&!w&&e.loopDestroy()),e.emit("breakpoint",l)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let a=!1;const i=r(),n="window"===t?i.innerHeight:s.clientHeight,l=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}}));l.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;es}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:a,el:i,device:r}=e,n=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((a=>{e[a]&&s.push(t+a)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:a},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},ae={};class ie{constructor(){let e,t;for(var s=arguments.length,i=new Array(s),r=0;r1){const e=[];return n.querySelectorAll(t.el).forEach((s=>{const a=p({},t,{el:s});e.push(new ie(a))})),e}const l=this;l.__swiper__=!0,l.support=I(),l.device=z({userAgent:t.userAgent}),l.browser=A(),l.eventsListeners={},l.eventsAnyListeners=[],l.modules=[...l.__modules__],t.modules&&Array.isArray(t.modules)&&l.modules.push(...t.modules);const o={};l.modules.forEach((e=>{e({params:t,swiper:l,extendParams:te(t,o),on:l.on.bind(l),once:l.once.bind(l),off:l.off.bind(l),emit:l.emit.bind(l)})}));const d=p({},ee,o);return l.params=p({},d,ae,t),l.originalParams=p({},l.params),l.passedParams=p({},t),l.params&&l.params.on&&Object.keys(l.params.on).forEach((e=>{l.on(e,l.params.on[e])})),l.params&&l.params.onAny&&l.onAny(l.params.onAny),Object.assign(l,{enabled:l.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===l.params.direction,isVertical:()=>"vertical"===l.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:l.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.emit("_swiper"),l.params.init&&l.init(),l}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:s}=this,a=y(f(t,`.${s.slideClass}, swiper-slide`)[0]);return y(e)-a}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=f(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const a=s.minTranslate(),i=(s.maxTranslate()-a)*e+a;s.translateTo(i,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((s=>{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if("number"==typeof s.slidesPerView)return s.slidesPerView;if(s.centeredSlides){let e,t=a[l]?Math.ceil(a[l].swiperSlideSize):0;for(let s=l+1;sn&&(e=!0));for(let s=l-1;s>=0;s-=1)a[s]&&!e&&(t+=a[s].swiperSlideSize,o+=1,t>n&&(e=!0))}else if("current"===e)for(let e=l+1;e=0;e-=1){i[l]-i[e]{t.complete&&D(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode&&s.freeMode.enabled&&!s.cssMode)a(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||a()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,a=s.params.direction;return e||(e="horizontal"===a?"vertical":"horizontal"),e===a||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${a}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let s=e||t.params.el;if("string"==typeof s&&(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.parentNode&&s.parentNode.host&&s.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const a=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=(()=>{if(s&&s.shadowRoot&&s.shadowRoot.querySelector){return s.shadowRoot.querySelector(a())}return f(s,a())[0]})();return!i&&t.params.createElements&&(i=v("div",t.params.wrapperClass),s.append(i),f(s,`.${t.params.slideClass}`).forEach((e=>{i.append(e)}))),Object.assign(t,{el:s,wrapperEl:i,slidesEl:t.isElement&&!s.parentNode.host.slideSlots?s.parentNode.host:i,hostEl:t.isElement?s.parentNode.host:s,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===b(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===b(s,"direction")),wrongRTL:"-webkit-box"===b(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach((e=>{e.complete?D(t,e):e.addEventListener("load",(e=>{D(t,e.target)}))})),H(t),t.initialized=!0,H(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:a,el:i,wrapperEl:r,slides:n}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),i&&"string"!=typeof i&&i.removeAttribute("style"),r&&r.removeAttribute("style"),n&&n.length&&n.forEach((e=>{e.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off(e)})),!1!==e&&(s.el&&"string"!=typeof s.el&&(s.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){p(ae,e)}static get extendedDefaults(){return ae}static get defaults(){return ee}static installModule(e){ie.prototype.__modules__||(ie.prototype.__modules__=[]);const t=ie.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>ie.installModule(e))),ie):(ie.installModule(e),ie)}}function re(e,t,s,a){return e.params.createElements&&Object.keys(a).forEach((i=>{if(!s[i]&&!0===s.auto){let r=f(e.el,`.${a[i]}`)[0];r||(r=v("div",a[i]),r.className=a[i],e.el.append(r)),s[i]=r,t[i]=r}})),s}function ne(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function le(e){const t=this,{params:s,slidesEl:a}=t;s.loop&&t.loopDestroy();const i=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,a.append(t.children[0]),t.innerHTML=""}else a.append(e)};if("object"==typeof e&&"length"in e)for(let t=0;t{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,i.prepend(t.children[0]),t.innerHTML=""}else i.prepend(e)};if("object"==typeof e&&"length"in e){for(let t=0;t=l)return void s.appendSlide(t);let o=n>e?n+1:n;const d=[];for(let t=l-1;t>=e;t-=1){const e=s.slides[t];e.remove(),d.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;ee?n+t.length:n}else r.append(t);for(let e=0;e{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),a("setTranslate",(()=>{s.params.effect===t&&i()})),a("setTransition",((e,a)=>{s.params.effect===t&&r(a)})),a("transitionEnd",(()=>{if(s.params.effect===t&&o){if(!d||!d().slideShadows)return;s.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),o()}})),a("virtualUpdate",(()=>{s.params.effect===t&&(s.slides.length||(c=!0),requestAnimationFrame((()=>{c&&s.slides&&s.slides.length&&(i(),c=!1)})))}))}function me(e,t){const s=h(t);return s!==t&&(s.style.backfaceVisibility="hidden",s.style["-webkit-backface-visibility"]="hidden"),s}function he(e){let{swiper:t,duration:s,transformElements:a,allSlides:i}=e;const{activeIndex:r}=t;if(t.params.virtualTranslate&&0!==s){let e,s=!1;e=i?a:a.filter((e=>{const s=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter((t=>t.shadowRoot&&t.shadowRoot===e.parentNode))[0];return e.parentElement})(e):e;return t.getSlideIndex(s)===r})),e.forEach((e=>{x(e,(()=>{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function fe(e,t,s){const a=`swiper-slide-shadow${s?`-${s}`:""}${e?` swiper-slide-shadow-${e}`:""}`,i=h(t);let r=i.querySelector(`.${a.split(" ").join(".")}`);return r||(r=v("div",a.split(" ")),i.append(r)),r}Object.keys(se).forEach((e=>{Object.keys(se[e]).forEach((t=>{ie.prototype[t]=se[e][t]}))})),ie.use([function(e){let{swiper:t,on:s,emit:a}=e;const i=r();let n=null,l=null;const o=()=>{t&&!t.destroyed&&t.initialized&&(a("beforeResize"),a("resize"))},d=()=>{t&&!t.destroyed&&t.initialized&&a("orientationchange")};s("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(n=new ResizeObserver((e=>{l=i.requestAnimationFrame((()=>{const{width:s,height:a}=t;let i=s,r=a;e.forEach((e=>{let{contentBoxSize:s,contentRect:a,target:n}=e;n&&n!==t.el||(i=a?a.width:(s[0]||s).inlineSize,r=a?a.height:(s[0]||s).blockSize)})),i===s&&r===a||o()}))})),n.observe(t.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",d))})),s("destroy",(()=>{l&&i.cancelAnimationFrame(l),n&&n.unobserve&&t.el&&(n.unobserve(t.el),n=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",d)}))},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=[],l=r(),o=function(e,s){void 0===s&&(s={});const a=new(l.MutationObserver||l.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const s=function(){i("observerUpdate",e[0])};l.requestAnimationFrame?l.requestAnimationFrame(s):l.setTimeout(s,0)}));a.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:t.isElement||(void 0===s.childList||s).childList,characterData:void 0===s.characterData||s.characterData}),n.push(a)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=E(t.hostEl);for(let t=0;t{n.forEach((e=>{e.disconnect()})),n.splice(0,n.length)}))}]);const ge=[function(e){let t,{swiper:s,extendParams:i,on:r,emit:n}=e;i({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const l=a();s.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const o=l.createElement("div");function d(e,t){const a=s.params.virtual;if(a.cache&&s.virtual.cache[t])return s.virtual.cache[t];let i;return a.renderSlide?(i=a.renderSlide.call(s,e,t),"string"==typeof i&&(o.innerHTML=i,i=o.children[0])):i=s.isElement?v("swiper-slide"):v("div",s.params.slideClass),i.setAttribute("data-swiper-slide-index",t),a.renderSlide||(i.innerHTML=e),a.cache&&(s.virtual.cache[t]=i),i}function c(e,t){const{slidesPerView:a,slidesPerGroup:i,centeredSlides:r,loop:l,initialSlide:o}=s.params;if(t&&!l&&o>0)return;const{addSlidesBefore:c,addSlidesAfter:p}=s.params.virtual,{from:u,to:m,slides:h,slidesGrid:g,offset:v}=s.virtual;s.params.cssMode||s.updateActiveIndex();const w=s.activeIndex||0;let b,y,E;b=s.rtlTranslate?"right":s.isHorizontal()?"left":"top",r?(y=Math.floor(a/2)+i+p,E=Math.floor(a/2)+i+c):(y=a+(i-1)+p,E=(l?a:i)+c);let x=w-E,S=w+y;l||(x=Math.max(x,0),S=Math.min(S,h.length-1));let T=(s.slidesGrid[x]||0)-(s.slidesGrid[0]||0);function M(){s.updateSlides(),s.updateProgress(),s.updateSlidesClasses(),n("virtualUpdate")}if(l&&w>=E?(x-=E,r||(T+=s.slidesGrid[0])):l&&w{e.style[b]=T-Math.abs(s.cssOverflowAdjustment())+"px"})),s.updateProgress(),void n("virtualUpdate");if(s.params.virtual.renderExternal)return s.params.virtual.renderExternal.call(s,{offset:T,from:x,to:S,slides:function(){const e=[];for(let t=x;t<=S;t+=1)e.push(h[t]);return e}()}),void(s.params.virtual.renderExternalUpdate?M():n("virtualUpdate"));const C=[],P=[],L=e=>{let t=e;return e<0?t=h.length+e:t>=h.length&&(t-=h.length),t};if(e)s.slides.filter((e=>e.matches(`.${s.params.slideClass}, swiper-slide`))).forEach((e=>{e.remove()}));else for(let e=u;e<=m;e+=1)if(eS){const t=L(e);s.slides.filter((e=>e.matches(`.${s.params.slideClass}[data-swiper-slide-index="${t}"], swiper-slide[data-swiper-slide-index="${t}"]`))).forEach((e=>{e.remove()}))}const I=l?-h.length:0,z=l?2*h.length:h.length;for(let t=I;t=x&&t<=S){const s=L(t);void 0===m||e?P.push(s):(t>m&&P.push(s),t{s.slidesEl.append(d(h[e],e))})),l)for(let e=C.length-1;e>=0;e-=1){const t=C[e];s.slidesEl.prepend(d(h[t],t))}else C.sort(((e,t)=>t-e)),C.forEach((e=>{s.slidesEl.prepend(d(h[e],e))}));f(s.slidesEl,".swiper-slide, swiper-slide").forEach((e=>{e.style[b]=T-Math.abs(s.cssOverflowAdjustment())+"px"})),M()}r("beforeInit",(()=>{if(!s.params.virtual.enabled)return;let e;if(void 0===s.passedParams.virtual.slides){const t=[...s.slidesEl.children].filter((e=>e.matches(`.${s.params.slideClass}, swiper-slide`)));t&&t.length&&(s.virtual.slides=[...t],e=!0,t.forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t),s.virtual.cache[t]=e,e.remove()})))}e||(s.virtual.slides=s.params.virtual.slides),s.classNames.push(`${s.params.containerModifierClass}virtual`),s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0,c(!1,!0)})),r("setTranslate",(()=>{s.params.virtual.enabled&&(s.params.cssMode&&!s._immediateVirtual?(clearTimeout(t),t=setTimeout((()=>{c()}),100)):c())})),r("init update resize",(()=>{s.params.virtual.enabled&&s.params.cssMode&&u(s.wrapperEl,"--swiper-virtual-size",`${s.virtualSize}px`)})),Object.assign(s.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t{const a=e[s],r=a.getAttribute("data-swiper-slide-index");r&&a.setAttribute("data-swiper-slide-index",parseInt(r,10)+i),t[parseInt(s,10)+i]=a})),s.virtual.cache=t}c(!0),s.slideTo(a,0)},removeSlide:function(e){if(null==e)return;let t=s.activeIndex;if(Array.isArray(e))for(let a=e.length-1;a>=0;a-=1)s.params.virtual.cache&&(delete s.virtual.cache[e[a]],Object.keys(s.virtual.cache).forEach((t=>{t>e&&(s.virtual.cache[t-1]=s.virtual.cache[t],s.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete s.virtual.cache[t])}))),s.virtual.slides.splice(e[a],1),e[a]{t>e&&(s.virtual.cache[t-1]=s.virtual.cache[t],s.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete s.virtual.cache[t])}))),s.virtual.slides.splice(e,1),e0&&0===E(t.el,`.${t.params.slideActiveClass}`).length)return;const a=t.el,i=a.clientWidth,r=a.clientHeight,n=o.innerWidth,l=o.innerHeight,d=w(a);s&&(d.left-=a.scrollLeft);const c=[[d.left,d.top],[d.left+i,d.top],[d.left,d.top+r],[d.left+i,d.top+r]];for(let t=0;t=0&&s[0]<=n&&s[1]>=0&&s[1]<=l){if(0===s[0]&&0===s[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((d||c||p||u)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),((c||u)&&!s||(d||p)&&s)&&t.slideNext(),((d||p)&&!s||(c||u)&&s)&&t.slidePrev()):((d||c||m||h)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(c||h)&&t.slideNext(),(d||m)&&t.slidePrev()),n("keyPress",i)}}function c(){t.keyboard.enabled||(l.addEventListener("keydown",d),t.keyboard.enabled=!0)}function p(){t.keyboard.enabled&&(l.removeEventListener("keydown",d),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},s({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),i("init",(()=>{t.params.keyboard.enabled&&c()})),i("destroy",(()=>{t.keyboard.enabled&&p()})),Object.assign(t.keyboard,{enable:c,disable:p})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=r();let d;s({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let c,p=o();const u=[];function m(){t.enabled&&(t.mouseEntered=!0)}function h(){t.enabled&&(t.mouseEntered=!1)}function f(e){return!(t.params.mousewheel.thresholdDelta&&e.delta=6&&o()-p<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),p=(new n.Date).getTime(),!1)))}function g(e){let s=e,a=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const r=t.params.mousewheel;t.params.cssMode&&s.preventDefault();let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget));const p=n&&n.contains(s.target);if(!t.mouseEntered&&!p&&!r.releaseOnEdges)return!0;s.originalEvent&&(s=s.originalEvent);let m=0;const h=t.rtlTranslate?-1:1,g=function(e){let t=0,s=0,a=0,i=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),a=10*t,i=10*s,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=i,i=0),(a||i)&&e.deltaMode&&(1===e.deltaMode?(a*=40,i*=40):(a*=800,i*=800)),a&&!t&&(t=a<1?-1:1),i&&!s&&(s=i<1?-1:1),{spinX:t,spinY:s,pixelX:a,pixelY:i}}(s);if(r.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;m=-g.pixelX*h}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;m=-g.pixelY}else m=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*h:-g.pixelY;if(0===m)return!0;r.invert&&(m=-m);let v=t.getTranslate()+m*r.sensitivity;if(v>=t.minTranslate()&&(v=t.minTranslate()),v<=t.maxTranslate()&&(v=t.maxTranslate()),a=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),a&&t.params.nested&&s.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:o(),delta:Math.abs(m),direction:Math.sign(m)},a=c&&e.time=t.minTranslate()&&(n=t.minTranslate()),n<=t.maxTranslate()&&(n=t.maxTranslate()),t.setTransition(0),t.setTranslate(n),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!o&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(d),d=void 0,u.length>=15&&u.shift();const s=u.length?u[u.length-1]:void 0,a=u[0];if(u.push(e),s&&(e.delta>s.delta||e.direction!==s.direction))u.splice(0);else if(u.length>=15&&e.time-a.time<500&&a.delta-e.delta>=1&&e.delta<=6){const s=m>0?.8:.2;c=e,u.splice(0),d=l((()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,s)}),0)}d||(d=l((()=>{if(t.destroyed||!t.params)return;c=e,u.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)}),500))}if(a||i("scroll",s),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),r.releaseOnEdges&&(n===t.minTranslate()||n===t.maxTranslate()))return!0}}else{const s={time:o(),delta:Math.abs(m),direction:Math.sign(m),raw:e};u.length>=2&&u.shift();const a=u.length?u[u.length-1]:void 0;if(u.push(s),a?(s.direction!==a.direction||s.delta>a.delta||s.time>a.time+150)&&f(s):f(s),function(e){const s=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&s.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function v(e){let s=t.el;"container"!==t.params.mousewheel.eventsTarget&&(s=document.querySelector(t.params.mousewheel.eventsTarget)),s[e]("mouseenter",m),s[e]("mouseleave",h),s[e]("wheel",g)}function w(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",g),!0):!t.mousewheel.enabled&&(v("addEventListener"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,g),!0):!!t.mousewheel.enabled&&(v("removeEventListener"),t.mousewheel.enabled=!1,!0)}a("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&b(),t.params.mousewheel.enabled&&w()})),a("destroy",(()=>{t.params.cssMode&&w(),t.mousewheel.enabled&&b()})),Object.assign(t.mousewheel,{enable:w,disable:b})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;function r(e){let s;return e&&"string"==typeof e&&t.isElement&&(s=t.el.querySelector(e)||t.hostEl.querySelector(e),s)?s:(e&&("string"==typeof e&&(s=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&s&&s.length>1&&1===t.el.querySelectorAll(e).length?s=t.el.querySelector(e):s&&1===s.length&&(s=s[0])),e&&!s?e:s)}function n(e,s){const a=t.params.navigation;(e=T(e)).forEach((e=>{e&&(e.classList[s?"add":"remove"](...a.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=s),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](a.lockClass))}))}function l(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return n(s,!1),void n(e,!1);n(s,t.isBeginning&&!t.params.rewind),n(e,t.isEnd&&!t.params.rewind)}function o(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function d(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function c(){const e=t.params.navigation;if(t.params.navigation=re(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let s=r(e.nextEl),a=r(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:a}),s=T(s),a=T(a);const i=(s,a)=>{s&&s.addEventListener("click","next"===a?d:o),!t.enabled&&s&&s.classList.add(...e.lockClass.split(" "))};s.forEach((e=>i(e,"next"))),a.forEach((e=>i(e,"prev")))}function p(){let{nextEl:e,prevEl:s}=t.navigation;e=T(e),s=T(s);const a=(e,s)=>{e.removeEventListener("click","next"===s?d:o),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>a(e,"next"))),s.forEach((e=>a(e,"prev")))}s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},a("init",(()=>{!1===t.params.navigation.enabled?u():(c(),l())})),a("toEdge fromEdge lock unlock",(()=>{l()})),a("destroy",(()=>{p()})),a("enable disable",(()=>{let{nextEl:e,prevEl:s}=t.navigation;e=T(e),s=T(s),t.enabled?l():[...e,...s].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),a("click",((e,s)=>{let{nextEl:a,prevEl:r}=t.navigation;a=T(a),r=T(r);const n=s.target;let l=r.includes(n)||a.includes(n);if(t.isElement&&!l){const e=s.path||s.composedPath&&s.composedPath();e&&(l=e.find((e=>a.includes(e)||r.includes(e))))}if(t.params.navigation.hideOnClick&&!l){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===n||t.pagination.el.contains(n)))return;let e;a.length?e=a[0].classList.contains(t.params.navigation.hiddenClass):r.length&&(e=r[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...a,...r].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const u=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),p()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),l()},disable:u,update:l,init:c,destroy:p})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const r="swiper-pagination";let n;s({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let l=0;function o(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,s){const{bulletActiveClass:a}=t.params.pagination;e&&(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${a}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&e.classList.add(`${a}-${s}-${s}`))}function c(e){const s=e.target.closest(ne(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const a=y(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===a)return;const e=(i=t.realIndex,r=a,n=t.slides.length,(r%=n)==1+(i%=n)?"next":r===i-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(a)}else t.slideTo(a);var i,r,n}function p(){const e=t.rtl,s=t.params.pagination;if(o())return;let a,r,c=t.pagination.el;c=T(c);const p=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,u=t.params.loop?Math.ceil(p/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,a=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(a=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,a=t.activeIndex||0),"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const i=t.pagination.bullets;let o,p,u;if(s.dynamicBullets&&(n=S(i[0],t.isHorizontal()?"width":"height",!0),c.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=n*(s.dynamicMainBullets+4)+"px"})),s.dynamicMainBullets>1&&void 0!==r&&(l+=a-(r||0),l>s.dynamicMainBullets-1?l=s.dynamicMainBullets-1:l<0&&(l=0)),o=Math.max(a-l,0),p=o+(Math.min(i.length,s.dynamicMainBullets)-1),u=(p+o)/2),i.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),c.length>1)i.forEach((e=>{const i=y(e);i===a?e.classList.add(...s.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),s.dynamicBullets&&(i>=o&&i<=p&&e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),i===o&&d(e,"prev"),i===p&&d(e,"next"))}));else{const e=i[a];if(e&&e.classList.add(...s.bulletActiveClass.split(" ")),t.isElement&&i.forEach(((e,t)=>{e.setAttribute("part",t===a?"bullet-active":"bullet")})),s.dynamicBullets){const e=i[o],t=i[p];for(let e=o;e<=p;e+=1)i[e]&&i[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(s.dynamicBullets){const a=Math.min(i.length,s.dynamicMainBullets+4),r=(n*a-n)/2-u*n,l=e?"right":"left";i.forEach((e=>{e.style[t.isHorizontal()?l:"top"]=`${r}px`}))}}c.forEach(((e,r)=>{if("fraction"===s.type&&(e.querySelectorAll(ne(s.currentClass)).forEach((e=>{e.textContent=s.formatFractionCurrent(a+1)})),e.querySelectorAll(ne(s.totalClass)).forEach((e=>{e.textContent=s.formatFractionTotal(u)}))),"progressbar"===s.type){let i;i=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(a+1)/u;let n=1,l=1;"horizontal"===i?n=r:l=r,e.querySelectorAll(ne(s.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${l})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===s.type&&s.renderCustom?(e.innerHTML=s.renderCustom(t,a+1,u),0===r&&i("paginationRender",e)):(0===r&&i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass)}))}function u(){const e=t.params.pagination;if(o())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let a=t.pagination.el;a=T(a);let r="";if("bullets"===e.type){let a=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&a>s&&(a=s);for(let s=0;s`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):` / `),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):``),t.pagination.bullets=[],a.forEach((s=>{"custom"!==e.type&&(s.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...s.querySelectorAll(ne(e.bulletClass)))})),"custom"!==e.type&&i("paginationRender",a[0])}function m(){t.params.pagination=re(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&&t.isElement&&(s=t.el.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&&0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(s)&&s.length>1&&(s=[...t.el.querySelectorAll(e.el)],s.length>1&&(s=s.filter((e=>E(e,".swiper")[0]===t.el))[0])),Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(t.pagination,{el:s}),s=T(s),s.forEach((s=>{"bullets"===e.type&&e.clickable&&s.classList.add(...(e.clickableClass||"").split(" ")),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),l=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.classList.add(e.progressbarOppositeClass),e.clickable&&s.addEventListener("click",c),t.enabled||s.classList.add(e.lockClass)})))}function h(){const e=t.params.pagination;if(o())return;let s=t.pagination.el;s&&(s=T(s),s.forEach((s=>{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(s.classList.remove(...(e.clickableClass||"").split(" ")),s.removeEventListener("click",c))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}a("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=T(s),s.forEach((s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),a("init",(()=>{!1===t.params.pagination.enabled?f():(m(),u(),p())})),a("activeIndexChange",(()=>{void 0===t.snapIndex&&p()})),a("snapIndexChange",(()=>{p()})),a("snapGridLengthChange",(()=>{u(),p()})),a("destroy",(()=>{h()})),a("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=T(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),a("lock unlock",(()=>{p()})),a("click",((e,s)=>{const a=s.target,r=T(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&a===t.navigation.nextEl||t.navigation.prevEl&&a===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const f=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=T(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),h()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=T(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),m(),u(),p()},disable:f,render:u,update:p,init:m,destroy:h})},function(e){let{swiper:t,extendParams:s,on:i,emit:r}=e;const o=a();let d,c,p,u,m=!1,h=null,f=null;function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:s}=t,{dragEl:a,el:i}=e,r=t.params.scrollbar,n=t.params.loop?t.progressLoop:t.progress;let l=c,o=(p-c)*n;s?(o=-o,o>0?(l=c-o,o=0):-o+c>p&&(l=p+o)):o<0?(l=c+o,o=0):o+c>p&&(l=p-o),t.isHorizontal()?(a.style.transform=`translate3d(${o}px, 0, 0)`,a.style.width=`${l}px`):(a.style.transform=`translate3d(0px, ${o}px, 0)`,a.style.height=`${l}px`),r.hide&&(clearTimeout(h),i.style.opacity=1,h=setTimeout((()=>{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3))}function b(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:s,el:a}=e;s.style.width="",s.style.height="",p=t.isHorizontal()?a.offsetWidth:a.offsetHeight,u=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),c="auto"===t.params.scrollbar.dragSize?p*u:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?s.style.width=`${c}px`:s.style.height=`${c}px`,a.style.display=u>=1?"none":"",t.params.scrollbar.hide&&(a.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function y(e){return t.isHorizontal()?e.clientX:e.clientY}function E(e){const{scrollbar:s,rtlTranslate:a}=t,{el:i}=s;let r;r=(y(e)-w(i)[t.isHorizontal()?"left":"top"]-(null!==d?d:c/2))/(p-c),r=Math.max(Math.min(r,1),0),a&&(r=1-r);const n=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*r;t.updateProgress(n),t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}function x(e){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:n,dragEl:l}=a;m=!0,d=e.target===l?y(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.style.transitionDuration="100ms",l.style.transitionDuration="100ms",E(e),clearTimeout(f),n.style.transitionDuration="0ms",s.hide&&(n.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),r("scrollbarDragStart",e)}function S(e){const{scrollbar:s,wrapperEl:a}=t,{el:i,dragEl:n}=s;m&&(e.preventDefault&&e.cancelable?e.preventDefault():e.returnValue=!1,E(e),a.style.transitionDuration="0ms",i.style.transitionDuration="0ms",n.style.transitionDuration="0ms",r("scrollbarDragMove",e))}function M(e){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:n}=a;m&&(m=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",i.style.transitionDuration=""),s.hide&&(clearTimeout(f),f=l((()=>{n.style.opacity=0,n.style.transitionDuration="400ms"}),1e3)),r("scrollbarDragEnd",e),s.snapOnRelease&&t.slideToClosest())}function C(e){const{scrollbar:s,params:a}=t,i=s.el;if(!i)return;const r=i,n=!!a.passiveListeners&&{passive:!1,capture:!1},l=!!a.passiveListeners&&{passive:!0,capture:!1};if(!r)return;const d="on"===e?"addEventListener":"removeEventListener";r[d]("pointerdown",x,n),o[d]("pointermove",S,n),o[d]("pointerup",M,l)}function P(){const{scrollbar:e,el:s}=t;t.params.scrollbar=re(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const a=t.params.scrollbar;if(!a.el)return;let i,r;if("string"==typeof a.el&&t.isElement&&(i=t.el.querySelector(a.el)),i||"string"!=typeof a.el)i||(i=a.el);else if(i=o.querySelectorAll(a.el),!i.length)return;t.params.uniqueNavElements&&"string"==typeof a.el&&i.length>1&&1===s.querySelectorAll(a.el).length&&(i=s.querySelector(a.el)),i.length>0&&(i=i[0]),i.classList.add(t.isHorizontal()?a.horizontalClass:a.verticalClass),i&&(r=i.querySelector(ne(t.params.scrollbar.dragClass)),r||(r=v("div",t.params.scrollbar.dragClass),i.append(r))),Object.assign(e,{el:i,dragEl:r}),a.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&C("on"),i&&i.classList[t.enabled?"remove":"add"](...n(t.params.scrollbar.lockClass))}function L(){const e=t.params.scrollbar,s=t.scrollbar.el;s&&s.classList.remove(...n(t.isHorizontal()?e.horizontalClass:e.verticalClass)),t.params.scrollbar.el&&t.scrollbar.el&&C("off")}s({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},i("changeDirection",(()=>{if(!t.scrollbar||!t.scrollbar.el)return;const e=t.params.scrollbar;let{el:s}=t.scrollbar;s=T(s),s.forEach((s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),i("init",(()=>{!1===t.params.scrollbar.enabled?I():(P(),b(),g())})),i("update resize observerUpdate lock unlock changeDirection",(()=>{b()})),i("setTranslate",(()=>{g()})),i("setTransition",((e,s)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(s)})),i("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](...n(t.params.scrollbar.lockClass))})),i("destroy",(()=>{L()}));const I=()=>{t.el.classList.add(...n(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.add(...n(t.params.scrollbar.scrollbarDisabledClass)),L()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(...n(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.remove(...n(t.params.scrollbar.scrollbarDisabledClass)),P(),b(),g()},disable:I,updateSize:b,setTranslate:g,init:P,destroy:L})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({parallax:{enabled:!1}});const i="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",r=(e,s)=>{const{rtl:a}=t,i=a?-1:1,r=e.getAttribute("data-swiper-parallax")||"0";let n=e.getAttribute("data-swiper-parallax-x"),l=e.getAttribute("data-swiper-parallax-y");const o=e.getAttribute("data-swiper-parallax-scale"),d=e.getAttribute("data-swiper-parallax-opacity"),c=e.getAttribute("data-swiper-parallax-rotate");if(n||l?(n=n||"0",l=l||"0"):t.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")>=0?parseInt(n,10)*s*i+"%":n*s*i+"px",l=l.indexOf("%")>=0?parseInt(l,10)*s+"%":l*s+"px",null!=d){const t=d-(d-1)*(1-Math.abs(s));e.style.opacity=t}let p=`translate3d(${n}, ${l}, 0px)`;if(null!=o){p+=` scale(${o-(o-1)*(1-Math.abs(s))})`}if(c&&null!=c){p+=` rotate(${c*s*-1}deg)`}e.style.transform=p},n=()=>{const{el:e,slides:s,progress:a,snapGrid:n,isElement:l}=t,o=f(e,i);t.isElement&&o.push(...f(t.hostEl,i)),o.forEach((e=>{r(e,a)})),s.forEach(((e,s)=>{let l=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(l+=Math.ceil(s/2)-a*(n.length-1)),l=Math.min(Math.max(l,-1),1),e.querySelectorAll(`${i}, [data-swiper-parallax-rotate]`).forEach((e=>{r(e,l)}))}))};a("beforeInit",(()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)})),a("init",(()=>{t.params.parallax.enabled&&n()})),a("setTranslate",(()=>{t.params.parallax.enabled&&n()})),a("setTransition",((e,s)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{el:s,hostEl:a}=t,r=[...s.querySelectorAll(i)];t.isElement&&r.push(...a.querySelectorAll(i)),r.forEach((t=>{let s=parseInt(t.getAttribute("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),t.style.transitionDuration=`${s}ms`}))}(s)}))},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=r();s({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let l,o,c=1,p=!1;const u=[],m={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},h={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let v,b=1;function y(){if(u.length<2)return 1;const e=u[0].pageX,t=u[0].pageY,s=u[1].pageX,a=u[1].pageY;return Math.sqrt((s-e)**2+(a-t)**2)}function x(){const e=t.params.zoom,s=m.imageWrapEl.getAttribute("data-swiper-zoom")||e.maxRatio;if(e.limitToOriginalSize&&m.imageEl&&m.imageEl.naturalWidth){const e=m.imageEl.naturalWidth/m.imageEl.offsetWidth;return Math.min(e,s)}return s}function S(e){const s=t.isElement?"swiper-slide":`.${t.params.slideClass}`;return!!e.target.matches(s)||t.slides.filter((t=>t.contains(e.target))).length>0}function T(e){if("mouse"===e.pointerType&&u.splice(0,u.length),!S(e))return;const s=t.params.zoom;if(l=!1,o=!1,u.push(e),!(u.length<2)){if(l=!0,m.scaleStart=y(),!m.slideEl){m.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`),m.slideEl||(m.slideEl=t.slides[t.activeIndex]);let a=m.slideEl.querySelector(`.${s.containerClass}`);if(a&&(a=a.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),m.imageEl=a,m.imageWrapEl=a?E(m.imageEl,`.${s.containerClass}`)[0]:void 0,!m.imageWrapEl)return void(m.imageEl=void 0);m.maxRatio=x()}if(m.imageEl){const[e,t]=function(){if(u.length<2)return{x:null,y:null};const e=m.imageEl.getBoundingClientRect();return[(u[0].pageX+(u[1].pageX-u[0].pageX)/2-e.x-n.scrollX)/c,(u[0].pageY+(u[1].pageY-u[0].pageY)/2-e.y-n.scrollY)/c]}();m.originX=e,m.originY=t,m.imageEl.style.transitionDuration="0ms"}p=!0}}function M(e){if(!S(e))return;const s=t.params.zoom,a=t.zoom,i=u.findIndex((t=>t.pointerId===e.pointerId));i>=0&&(u[i]=e),u.length<2||(o=!0,m.scaleMove=y(),m.imageEl&&(a.scale=m.scaleMove/m.scaleStart*c,a.scale>m.maxRatio&&(a.scale=m.maxRatio-1+(a.scale-m.maxRatio+1)**.5),a.scalet.pointerId===e.pointerId));i>=0&&u.splice(i,1),l&&o&&(l=!1,o=!1,m.imageEl&&(a.scale=Math.max(Math.min(a.scale,m.maxRatio),s.minRatio),m.imageEl.style.transitionDuration=`${t.params.speed}ms`,m.imageEl.style.transform=`translate3d(0,0,0) scale(${a.scale})`,c=a.scale,p=!1,a.scale>1&&m.slideEl?m.slideEl.classList.add(`${s.zoomedSlideClass}`):a.scale<=1&&m.slideEl&&m.slideEl.classList.remove(`${s.zoomedSlideClass}`),1===a.scale&&(m.originX=0,m.originY=0,m.slideEl=void 0)))}function P(){t.touchEventsData.preventTouchMoveFromPointerMove=!1}function L(e){if(!S(e)||!function(e){const s=`.${t.params.zoom.containerClass}`;return!!e.target.matches(s)||[...t.hostEl.querySelectorAll(s)].filter((t=>t.contains(e.target))).length>0}(e))return;const s=t.zoom;if(!m.imageEl)return;if(!h.isTouched||!m.slideEl)return;h.isMoved||(h.width=m.imageEl.offsetWidth||m.imageEl.clientWidth,h.height=m.imageEl.offsetHeight||m.imageEl.clientHeight,h.startX=d(m.imageWrapEl,"x")||0,h.startY=d(m.imageWrapEl,"y")||0,m.slideWidth=m.slideEl.offsetWidth,m.slideHeight=m.slideEl.offsetHeight,m.imageWrapEl.style.transitionDuration="0ms");const a=h.width*s.scale,i=h.height*s.scale;h.minX=Math.min(m.slideWidth/2-a/2,0),h.maxX=-h.minX,h.minY=Math.min(m.slideHeight/2-i/2,0),h.maxY=-h.minY,h.touchesCurrent.x=u.length>0?u[0].pageX:e.pageX,h.touchesCurrent.y=u.length>0?u[0].pageY:e.pageY;if(Math.max(Math.abs(h.touchesCurrent.x-h.touchesStart.x),Math.abs(h.touchesCurrent.y-h.touchesStart.y))>5&&(t.allowClick=!1),!h.isMoved&&!p){if(t.isHorizontal()&&(Math.floor(h.minX)===Math.floor(h.startX)&&h.touchesCurrent.xh.touchesStart.x))return h.isTouched=!1,void P();if(!t.isHorizontal()&&(Math.floor(h.minY)===Math.floor(h.startY)&&h.touchesCurrent.yh.touchesStart.y))return h.isTouched=!1,void P()}e.cancelable&&e.preventDefault(),e.stopPropagation(),clearTimeout(v),t.touchEventsData.preventTouchMoveFromPointerMove=!0,v=setTimeout((()=>{t.destroyed||P()})),h.isMoved=!0;const r=(s.scale-c)/(m.maxRatio-t.params.zoom.minRatio),{originX:n,originY:l}=m;h.currentX=h.touchesCurrent.x-h.touchesStart.x+h.startX+r*(h.width-2*n),h.currentY=h.touchesCurrent.y-h.touchesStart.y+h.startY+r*(h.height-2*l),h.currentXh.maxX&&(h.currentX=h.maxX-1+(h.currentX-h.maxX+1)**.8),h.currentYh.maxY&&(h.currentY=h.maxY-1+(h.currentY-h.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=h.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=h.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(h.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(h.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(h.touchesCurrent.x-g.prevPositionX)<2&&(g.x=0),Math.abs(h.touchesCurrent.y-g.prevPositionY)<2&&(g.y=0),g.prevPositionX=h.touchesCurrent.x,g.prevPositionY=h.touchesCurrent.y,g.prevTime=Date.now(),m.imageWrapEl.style.transform=`translate3d(${h.currentX}px, ${h.currentY}px,0)`}function I(){const e=t.zoom;m.slideEl&&t.activeIndex!==t.slides.indexOf(m.slideEl)&&(m.imageEl&&(m.imageEl.style.transform="translate3d(0,0,0) scale(1)"),m.imageWrapEl&&(m.imageWrapEl.style.transform="translate3d(0,0,0)"),m.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`),e.scale=1,c=1,m.slideEl=void 0,m.imageEl=void 0,m.imageWrapEl=void 0,m.originX=0,m.originY=0)}function z(e){const s=t.zoom,a=t.params.zoom;if(!m.slideEl){e&&e.target&&(m.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`)),m.slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.slideEl=f(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:m.slideEl=t.slides[t.activeIndex]);let s=m.slideEl.querySelector(`.${a.containerClass}`);s&&(s=s.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),m.imageEl=s,m.imageWrapEl=s?E(m.imageEl,`.${a.containerClass}`)[0]:void 0}if(!m.imageEl||!m.imageWrapEl)return;let i,r,l,o,d,p,u,g,v,b,y,S,T,M,C,P,L,I;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),m.slideEl.classList.add(`${a.zoomedSlideClass}`),void 0===h.touchesStart.x&&e?(i=e.pageX,r=e.pageY):(i=h.touchesStart.x,r=h.touchesStart.y);const z="number"==typeof e?e:null;1===c&&z&&(i=void 0,r=void 0,h.touchesStart.x=void 0,h.touchesStart.y=void 0);const A=x();s.scale=z||A,c=z||A,!e||1===c&&z?(u=0,g=0):(L=m.slideEl.offsetWidth,I=m.slideEl.offsetHeight,l=w(m.slideEl).left+n.scrollX,o=w(m.slideEl).top+n.scrollY,d=l+L/2-i,p=o+I/2-r,v=m.imageEl.offsetWidth||m.imageEl.clientWidth,b=m.imageEl.offsetHeight||m.imageEl.clientHeight,y=v*s.scale,S=b*s.scale,T=Math.min(L/2-y/2,0),M=Math.min(I/2-S/2,0),C=-T,P=-M,u=d*s.scale,g=p*s.scale,uC&&(u=C),gP&&(g=P)),z&&1===s.scale&&(m.originX=0,m.originY=0),m.imageWrapEl.style.transitionDuration="300ms",m.imageWrapEl.style.transform=`translate3d(${u}px, ${g}px,0)`,m.imageEl.style.transitionDuration="300ms",m.imageEl.style.transform=`translate3d(0,0,0) scale(${s.scale})`}function A(){const e=t.zoom,s=t.params.zoom;if(!m.slideEl){t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.slideEl=f(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:m.slideEl=t.slides[t.activeIndex];let e=m.slideEl.querySelector(`.${s.containerClass}`);e&&(e=e.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),m.imageEl=e,m.imageWrapEl=e?E(m.imageEl,`.${s.containerClass}`)[0]:void 0}m.imageEl&&m.imageWrapEl&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,c=1,h.touchesStart.x=void 0,h.touchesStart.y=void 0,m.imageWrapEl.style.transitionDuration="300ms",m.imageWrapEl.style.transform="translate3d(0,0,0)",m.imageEl.style.transitionDuration="300ms",m.imageEl.style.transform="translate3d(0,0,0) scale(1)",m.slideEl.classList.remove(`${s.zoomedSlideClass}`),m.slideEl=void 0,m.originX=0,m.originY=0)}function $(e){const s=t.zoom;s.scale&&1!==s.scale?A():z(e)}function k(){return{passiveListener:!!t.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!t.params.passiveListeners||{passive:!1,capture:!0}}}function O(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const{passiveListener:s,activeListenerWithCapture:a}=k();t.wrapperEl.addEventListener("pointerdown",T,s),t.wrapperEl.addEventListener("pointermove",M,a),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.addEventListener(e,C,s)})),t.wrapperEl.addEventListener("pointermove",L,a)}function D(){const e=t.zoom;if(!e.enabled)return;e.enabled=!1;const{passiveListener:s,activeListenerWithCapture:a}=k();t.wrapperEl.removeEventListener("pointerdown",T,s),t.wrapperEl.removeEventListener("pointermove",M,a),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.removeEventListener(e,C,s)})),t.wrapperEl.removeEventListener("pointermove",L,a)}Object.defineProperty(t.zoom,"scale",{get:()=>b,set(e){if(b!==e){const t=m.imageEl,s=m.slideEl;i("zoomChange",e,t,s)}b=e}}),a("init",(()=>{t.params.zoom.enabled&&O()})),a("destroy",(()=>{D()})),a("touchStart",((e,s)=>{t.zoom.enabled&&function(e){const s=t.device;if(!m.imageEl)return;if(h.isTouched)return;s.android&&e.cancelable&&e.preventDefault(),h.isTouched=!0;const a=u.length>0?u[0]:e;h.touchesStart.x=a.pageX,h.touchesStart.y=a.pageY}(s)})),a("touchEnd",((e,s)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!m.imageEl)return;if(!h.isTouched||!h.isMoved)return h.isTouched=!1,void(h.isMoved=!1);h.isTouched=!1,h.isMoved=!1;let s=300,a=300;const i=g.x*s,r=h.currentX+i,n=g.y*a,l=h.currentY+n;0!==g.x&&(s=Math.abs((r-h.currentX)/g.x)),0!==g.y&&(a=Math.abs((l-h.currentY)/g.y));const o=Math.max(s,a);h.currentX=r,h.currentY=l;const d=h.width*e.scale,c=h.height*e.scale;h.minX=Math.min(m.slideWidth/2-d/2,0),h.maxX=-h.minX,h.minY=Math.min(m.slideHeight/2-c/2,0),h.maxY=-h.minY,h.currentX=Math.max(Math.min(h.currentX,h.maxX),h.minX),h.currentY=Math.max(Math.min(h.currentY,h.maxY),h.minY),m.imageWrapEl.style.transitionDuration=`${o}ms`,m.imageWrapEl.style.transform=`translate3d(${h.currentX}px, ${h.currentY}px,0)`}()})),a("doubleTap",((e,s)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&$(s)})),a("transitionEnd",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&I()})),a("slideChange",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&I()})),Object.assign(t.zoom,{enable:O,disable:D,in:z,out:A,toggle:$})},function(e){let{swiper:t,extendParams:s,on:a}=e;function i(e,t){const s=function(){let e,t,s;return(a,i)=>{for(t=-1,e=a.length;e-t>1;)s=e+t>>1,a[s]<=i?t=s:e=s;return e}}();let a,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(i=s(this.x,e),a=i-1,(e-this.x[a])*(this.y[i]-this.y[a])/(this.x[i]-this.x[a])+this.y[a]):0},this}function r(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}s({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},a("beforeInit",(()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){("string"==typeof t.params.controller.control?[...document.querySelectorAll(t.params.controller.control)]:[t.params.controller.control]).forEach((e=>{if(t.controller.control||(t.controller.control=[]),e&&e.swiper)t.controller.control.push(e.swiper);else if(e){const s=`${t.params.eventsPrefix}init`,a=i=>{t.controller.control.push(i.detail[0]),t.update(),e.removeEventListener(s,a)};e.addEventListener(s,a)}}))}else t.controller.control=t.params.controller.control})),a("update",(()=>{r()})),a("resize",(()=>{r()})),a("observerUpdate",(()=>{r()})),a("setTranslate",((e,s,a)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(s,a)})),a("setTransition",((e,s,a)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(s,a)})),Object.assign(t.controller,{setTranslate:function(e,s){const a=t.controller.control;let r,n;const l=t.constructor;function o(e){if(e.destroyed)return;const s=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline=t.params.loop?new i(t.slidesGrid,e.slidesGrid):new i(t.snapGrid,e.snapGrid)}(e),n=-t.controller.spline.interpolate(-s)),n&&"container"!==t.params.controller.by||(r=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(r)&&Number.isFinite(r)||(r=1),n=(s-t.minTranslate())*r+e.minTranslate()),t.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(a))for(let e=0;e{s.updateAutoHeight()})),x(s.wrapperEl,(()=>{i&&s.transitionEnd()}))))}if(Array.isArray(i))for(r=0;r{e.setAttribute("tabIndex","0")}))}function p(e){(e=T(e)).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function u(e,t){(e=T(e)).forEach((e=>{e.setAttribute("role",t)}))}function m(e,t){(e=T(e)).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function h(e,t){(e=T(e)).forEach((e=>{e.setAttribute("aria-label",t)}))}function f(e){(e=T(e)).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function g(e){(e=T(e)).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function w(e){if(13!==e.keyCode&&32!==e.keyCode)return;const s=t.params.a11y,a=e.target;if(!t.pagination||!t.pagination.el||a!==t.pagination.el&&!t.pagination.el.contains(e.target)||e.target.matches(ne(t.params.pagination.bulletClass))){if(t.navigation&&t.navigation.prevEl&&t.navigation.nextEl){const e=T(t.navigation.prevEl);T(t.navigation.nextEl).includes(a)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?d(s.lastSlideMessage):d(s.nextSlideMessage)),e.includes(a)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?d(s.firstSlideMessage):d(s.prevSlideMessage))}t.pagination&&a.matches(ne(t.params.pagination.bulletClass))&&a.click()}}function b(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function E(){return b()&&t.params.pagination.clickable}const x=(e,t,s)=>{c(e),"BUTTON"!==e.tagName&&(u(e,"button"),e.addEventListener("keydown",w)),h(e,s),function(e,t){(e=T(e)).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},S=e=>{n&&n!==e.target&&!n.contains(e.target)&&(r=!0),t.a11y.clicked=!0},M=()=>{r=!1,requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},C=e=>{o=(new Date).getTime()},P=e=>{if(t.a11y.clicked||!t.params.a11y.scrollOnFocus)return;if((new Date).getTime()-o<100)return;const s=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!s||!t.slides.includes(s))return;n=s;const a=t.slides.indexOf(s)===t.activeIndex,i=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(s);a||i||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,requestAnimationFrame((()=>{r||(t.params.loop?t.slideToLoop(parseInt(s.getAttribute("data-swiper-slide-index")),0):t.slideTo(t.slides.indexOf(s),0),r=!1)})))},L=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&m(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&u(t.slides,e.slideRole);const s=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((a,i)=>{const r=t.params.loop?parseInt(a.getAttribute("data-swiper-slide-index"),10):i;h(a,e.slideLabelMessage.replace(/\{\{index\}\}/,r+1).replace(/\{\{slidesLength\}\}/,s))}))},I=()=>{const e=t.params.a11y;t.el.append(l);const s=t.el;e.containerRoleDescriptionMessage&&m(s,e.containerRoleDescriptionMessage),e.containerMessage&&h(s,e.containerMessage),e.containerRole&&u(s,e.containerRole);const i=t.wrapperEl,r=e.id||i.getAttribute("id")||`swiper-wrapper-${n=16,void 0===n&&(n=16),"x".repeat(n).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var n;const o=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var d;d=r,T(i).forEach((e=>{e.setAttribute("id",d)})),function(e,t){(e=T(e)).forEach((e=>{e.setAttribute("aria-live",t)}))}(i,o),L();let{nextEl:c,prevEl:p}=t.navigation?t.navigation:{};if(c=T(c),p=T(p),c&&c.forEach((t=>x(t,r,e.nextSlideMessage))),p&&p.forEach((t=>x(t,r,e.prevSlideMessage))),E()){T(t.pagination.el).forEach((e=>{e.addEventListener("keydown",w)}))}a().addEventListener("visibilitychange",C),t.el.addEventListener("focus",P,!0),t.el.addEventListener("focus",P,!0),t.el.addEventListener("pointerdown",S,!0),t.el.addEventListener("pointerup",M,!0)};i("beforeInit",(()=>{l=v("span",t.params.a11y.notificationClass),l.setAttribute("aria-live","assertive"),l.setAttribute("aria-atomic","true")})),i("afterInit",(()=>{t.params.a11y.enabled&&I()})),i("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&L()})),i("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:s}=t.navigation;s&&(t.isBeginning?(f(s),p(s)):(g(s),c(s))),e&&(t.isEnd?(f(e),p(e)):(g(e),c(e)))}()})),i("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;b()&&t.pagination.bullets.forEach((s=>{t.params.pagination.clickable&&(c(s),t.params.pagination.renderBullet||(u(s,"button"),h(s,e.paginationBulletMessage.replace(/\{\{index\}\}/,y(s)+1)))),s.matches(ne(t.params.pagination.bulletActiveClass))?s.setAttribute("aria-current","true"):s.removeAttribute("aria-current")}))}()})),i("destroy",(()=>{t.params.a11y.enabled&&function(){l&&l.remove();let{nextEl:e,prevEl:s}=t.navigation?t.navigation:{};e=T(e),s=T(s),e&&e.forEach((e=>e.removeEventListener("keydown",w))),s&&s.forEach((e=>e.removeEventListener("keydown",w))),E()&&T(t.pagination.el).forEach((e=>{e.removeEventListener("keydown",w)}));a().removeEventListener("visibilitychange",C),t.el&&"string"!=typeof t.el&&(t.el.removeEventListener("focus",P,!0),t.el.removeEventListener("pointerdown",S,!0),t.el.removeEventListener("pointerup",M,!0))}()}))},function(e){let{swiper:t,extendParams:s,on:a}=e;s({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,n={};const l=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=e=>{const t=r();let s;s=e?new URL(e):t.location;const a=s.pathname.slice(1).split("/").filter((e=>""!==e)),i=a.length;return{key:a[i-2],value:a[i-1]}},d=(e,s)=>{const a=r();if(!i||!t.params.history.enabled)return;let n;n=t.params.url?new URL(t.params.url):a.location;const o=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${s}"]`):t.slides[s];let d=l(o.getAttribute("data-history"));if(t.params.history.root.length>0){let s=t.params.history.root;"/"===s[s.length-1]&&(s=s.slice(0,s.length-1)),d=`${s}/${e?`${e}/`:""}${d}`}else n.pathname.includes(e)||(d=`${e?`${e}/`:""}${d}`);t.params.history.keepQuery&&(d+=n.search);const c=a.history.state;c&&c.value===d||(t.params.history.replaceState?a.history.replaceState({value:d},null,d):a.history.pushState({value:d},null,d))},c=(e,s,a)=>{if(s)for(let i=0,r=t.slides.length;i{n=o(t.params.url),c(t.params.speed,n.value,!1)};a("init",(()=>{t.params.history.enabled&&(()=>{const e=r();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);i=!0,n=o(t.params.url),n.key||n.value?(c(0,n.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",p)):t.params.history.replaceState||e.addEventListener("popstate",p)}})()})),a("destroy",(()=>{t.params.history.enabled&&(()=>{const e=r();t.params.history.replaceState||e.removeEventListener("popstate",p)})()})),a("transitionEnd _freeModeNoMomentumRelease",(()=>{i&&d(t.params.history.key,t.activeIndex)})),a("slideChange",(()=>{i&&t.params.cssMode&&d(t.params.history.key,t.activeIndex)}))},function(e){let{swiper:t,extendParams:s,emit:i,on:n}=e,l=!1;const o=a(),d=r();s({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,s){if(t.virtual&&t.params.virtual.enabled){const e=t.slides.filter((e=>e.getAttribute("data-hash")===s))[0];if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return t.getSlideIndex(f(t.slidesEl,`.${t.params.slideClass}[data-hash="${s}"], swiper-slide[data-hash="${s}"]`)[0])}}});const c=()=>{i("hashChange");const e=o.location.hash.replace("#",""),s=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex];if(e!==(s?s.getAttribute("data-hash"):"")){const s=t.params.hashNavigation.getSlideIndex(t,e);if(void 0===s||Number.isNaN(s))return;t.slideTo(s)}},p=()=>{if(!l||!t.params.hashNavigation.enabled)return;const e=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex],s=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";t.params.hashNavigation.replaceState&&d.history&&d.history.replaceState?(d.history.replaceState(null,null,`#${s}`||""),i("hashSet")):(o.location.hash=s||"",i("hashSet"))};n("init",(()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;l=!0;const e=o.location.hash.replace("#","");if(e){const s=0,a=t.params.hashNavigation.getSlideIndex(t,e);t.slideTo(a||0,s,t.params.runCallbacksOnInit,!0)}t.params.hashNavigation.watchState&&d.addEventListener("hashchange",c)})()})),n("destroy",(()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&d.removeEventListener("hashchange",c)})),n("transitionEnd _freeModeNoMomentumRelease",(()=>{l&&p()})),n("slideChange",(()=>{l&&t.params.cssMode&&p()}))},function(e){let t,s,{swiper:i,extendParams:r,on:n,emit:l,params:o}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},r({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let d,c,p,u,m,h,f,g,v=o&&o.autoplay?o.autoplay.delay:3e3,w=o&&o.autoplay?o.autoplay.delay:3e3,b=(new Date).getTime();function y(e){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",y),g||e.detail&&e.detail.bySwiperTouchMove||C())}const E=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?c=!0:c&&(w=d,c=!1);const e=i.autoplay.paused?d:b+w-(new Date).getTime();i.autoplay.timeLeft=e,l("autoplayTimeLeft",e,e/v),s=requestAnimationFrame((()=>{E()}))},x=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(s),E();let a=void 0===e?i.params.autoplay.delay:e;v=i.params.autoplay.delay,w=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:i.slides[i.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,v=r,w=r),d=a;const n=i.params.speed,o=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,n,!0,!0),l("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,n,!0,!0),l("autoplay")),i.params.cssMode&&(b=(new Date).getTime(),requestAnimationFrame((()=>{x()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{o()}),a)):requestAnimationFrame((()=>{o()})),a},S=()=>{b=(new Date).getTime(),i.autoplay.running=!0,x(),l("autoplayStart")},T=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(s),l("autoplayStop")},M=(e,s)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(f=!0);const a=()=>{l("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",y):C()};if(i.autoplay.paused=!0,s)return h&&(d=i.params.autoplay.delay),h=!1,void a();const r=d||i.params.autoplay.delay;d=r-((new Date).getTime()-b),i.isEnd&&d<0&&!i.params.loop||(d<0&&(d=0),a())},C=()=>{i.isEnd&&d<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(b=(new Date).getTime(),f?(f=!1,x(d)):x(),i.autoplay.paused=!1,l("autoplayResume"))},P=()=>{if(i.destroyed||!i.autoplay.running)return;const e=a();"hidden"===e.visibilityState&&(f=!0,M(!0)),"visible"===e.visibilityState&&C()},L=e=>{"mouse"===e.pointerType&&(f=!0,g=!0,i.animating||i.autoplay.paused||M(!0))},I=e=>{"mouse"===e.pointerType&&(g=!1,i.autoplay.paused&&C())};n("init",(()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",L),i.el.addEventListener("pointerleave",I)),a().addEventListener("visibilitychange",P),S())})),n("destroy",(()=>{i.el&&"string"!=typeof i.el&&(i.el.removeEventListener("pointerenter",L),i.el.removeEventListener("pointerleave",I)),a().removeEventListener("visibilitychange",P),i.autoplay.running&&T()})),n("_freeModeStaticRelease",(()=>{(u||f)&&C()})),n("_freeModeNoMomentumRelease",(()=>{i.params.autoplay.disableOnInteraction?T():M(!0,!0)})),n("beforeTransitionStart",((e,t,s)=>{!i.destroyed&&i.autoplay.running&&(s||!i.params.autoplay.disableOnInteraction?M(!0,!0):T())})),n("sliderFirstMove",(()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?T():(p=!0,u=!1,f=!1,m=setTimeout((()=>{f=!0,u=!0,M(!0)}),200)))})),n("touchEnd",(()=>{if(!i.destroyed&&i.autoplay.running&&p){if(clearTimeout(m),clearTimeout(t),i.params.autoplay.disableOnInteraction)return u=!1,void(p=!1);u&&i.params.cssMode&&C(),u=!1,p=!1}})),n("slideChange",(()=>{!i.destroyed&&i.autoplay.running&&(h=!0)})),Object.assign(i.autoplay,{start:S,stop:T,pause:M,resume:C})},function(e){let{swiper:t,extendParams:s,on:i}=e;s({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let r=!1,n=!1;function l(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const s=e.clickedIndex,a=e.clickedSlide;if(a&&a.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let i;i=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):s,t.params.loop?t.slideToLoop(i):t.slideTo(i)}function o(){const{thumbs:e}=t.params;if(r)return!1;r=!0;const s=t.constructor;if(e.swiper instanceof s)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(c(e.swiper)){const a=Object.assign({},e.swiper);Object.assign(a,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new s(a),n=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",l),!0}function d(e){const s=t.thumbs.swiper;if(!s||s.destroyed)return;const a="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;let i=1;const r=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(i=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(i=1),i=Math.floor(i),s.slides.forEach((e=>e.classList.remove(r))),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let e=0;e{e.classList.add(r)}));else for(let e=0;ee.getAttribute("data-swiper-slide-index")===`${t.realIndex}`))[0];r=s.slides.indexOf(e),o=t.activeIndex>t.previousIndex?"next":"prev"}else r=t.realIndex,o=r>t.previousIndex?"next":"prev";l&&(r+="next"===o?n:-1*n),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(r)<0&&(s.params.centeredSlides?r=r>i?r-Math.floor(a/2)+1:r+Math.floor(a/2)-1:r>i&&s.params.slidesPerGroup,s.slideTo(r,e?0:void 0))}}t.thumbs={swiper:null},i("beforeInit",(()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const s=a(),i=()=>{const a="string"==typeof e.swiper?s.querySelector(e.swiper):e.swiper;if(a&&a.swiper)e.swiper=a.swiper,o(),d(!0);else if(a){const s=`${t.params.eventsPrefix}init`,i=r=>{e.swiper=r.detail[0],a.removeEventListener(s,i),o(),d(!0),e.swiper.update(),t.update()};a.addEventListener(s,i)}return a},r=()=>{if(t.destroyed)return;i()||requestAnimationFrame(r)};requestAnimationFrame(r)}else o(),d(!0)})),i("slideChange update resize observerUpdate",(()=>{d()})),i("setTransition",((e,s)=>{const a=t.thumbs.swiper;a&&!a.destroyed&&a.setTransition(s)})),i("beforeDestroy",(()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&n&&e.destroy()})),Object.assign(t.thumbs,{init:o,update:d})},function(e){let{swiper:t,extendParams:s,emit:a,once:i}=e;s({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){if(t.params.cssMode)return;const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){if(t.params.cssMode)return;const{touchEventsData:e,touches:s}=t;0===e.velocities.length&&e.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:o()})},onTouchEnd:function(e){let{currentPos:s}=e;if(t.params.cssMode)return;const{params:r,wrapperEl:n,rtlTranslate:l,snapGrid:d,touchEventsData:c}=t,p=o()-c.touchStartTime;if(s<-t.minTranslate())t.slideTo(t.activeIndex);else if(s>-t.maxTranslate())t.slides.length1){const e=c.velocities.pop(),s=c.velocities.pop(),a=e.position-s.position,i=e.time-s.time;t.velocity=a/i,t.velocity/=2,Math.abs(t.velocity)150||o()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=r.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*r.freeMode.momentumRatio;const s=t.velocity*e;let p=t.translate+s;l&&(p=-p);let u,m=!1;const h=20*Math.abs(t.velocity)*r.freeMode.momentumBounceRatio;let f;if(pt.minTranslate())r.freeMode.momentumBounce?(p-t.minTranslate()>h&&(p=t.minTranslate()+h),u=t.minTranslate(),m=!0,c.allowMomentumBounce=!0):p=t.minTranslate(),r.loop&&r.centeredSlides&&(f=!0);else if(r.freeMode.sticky){let e;for(let t=0;t-p){e=t;break}p=Math.abs(d[e]-p){t.loopFix()})),0!==t.velocity){if(e=l?Math.abs((-p-t.translate)/t.velocity):Math.abs((p-t.translate)/t.velocity),r.freeMode.sticky){const s=Math.abs((l?-p:p)-t.translate),a=t.slidesSizesGrid[t.activeIndex];e=s{t&&!t.destroyed&&c.allowMomentumBounce&&(a("momentumBounce"),t.setTransition(r.speed),setTimeout((()=>{t.setTranslate(u),x(n,(()=>{t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(a("_freeModeNoMomentumRelease"),t.updateProgress(p),t.setTransition(e),t.setTranslate(p),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,x(n,(()=>{t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(p),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode&&a("_freeModeNoMomentumRelease")}(!r.freeMode.momentum||p>=r.longSwipesMs)&&(a("_freeModeStaticRelease"),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,s,a,i,{swiper:r,extendParams:n,on:l}=e;n({grid:{rows:1,fill:"column"}});const o=()=>{let e=r.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*r.size:"string"==typeof e&&(e=parseFloat(e)),e};l("init",(()=>{i=r.params.grid&&r.params.grid.rows>1})),l("update",(()=>{const{params:e,el:t}=r,s=e.grid&&e.grid.rows>1;i&&!s?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),a=1,r.emitContainerClasses()):!i&&s&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),r.emitContainerClasses()),i=s})),r.grid={initSlides:e=>{const{slidesPerView:i}=r.params,{rows:n,fill:l}=r.params.grid,o=r.virtual&&r.params.virtual.enabled?r.virtual.slides.length:e.length;a=Math.floor(o/n),t=Math.floor(o/n)===o/n?o:Math.ceil(o/n)*n,"auto"!==i&&"row"===l&&(t=Math.max(t,i*n)),s=t/n},unsetSlides:()=>{r.slides&&r.slides.forEach((e=>{e.swiperSlideGridSet&&(e.style.height="",e.style[r.getDirectionLabel("margin-top")]="")}))},updateSlide:(e,i,n)=>{const{slidesPerGroup:l}=r.params,d=o(),{rows:c,fill:p}=r.params.grid,u=r.virtual&&r.params.virtual.enabled?r.virtual.slides.length:n.length;let m,h,f;if("row"===p&&l>1){const s=Math.floor(e/(l*c)),a=e-c*l*s,r=0===s?l:Math.min(Math.ceil((u-s*c*l)/c),l);f=Math.floor(a/r),h=a-f*r+s*l,m=h+f*t/c,i.style.order=m}else"column"===p?(h=Math.floor(e/c),f=e-h*c,(h>a||h===a&&f===c-1)&&(f+=1,f>=c&&(f=0,h+=1))):(f=Math.floor(e/s),h=e-f*s);i.row=f,i.column=h,i.style.height=`calc((100% - ${(c-1)*d}px) / ${c})`,i.style[r.getDirectionLabel("margin-top")]=0!==f?d&&`${d}px`:"",i.swiperSlideGridSet=!0},updateWrapperSize:(e,s)=>{const{centeredSlides:a,roundLengths:i}=r.params,n=o(),{rows:l}=r.params.grid;if(r.virtualSize=(e+n)*t,r.virtualSize=Math.ceil(r.virtualSize/l)-n,r.params.cssMode||(r.wrapperEl.style[r.getDirectionLabel("width")]=`${r.virtualSize+n}px`),a){const e=[];for(let t=0;t{const{slides:e}=t;t.params.fadeEffect;for(let s=0;s{const s=t.slides.map((e=>h(e)));s.forEach((t=>{t.style.transitionDuration=`${e}ms`})),he({swiper:t,duration:e,transformElements:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,s)=>{let a=s?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=s?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=v("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"left":"top")).split(" ")),e.append(a)),i||(i=v("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"right":"bottom")).split(" ")),e.append(i)),a&&(a.style.opacity=Math.max(-t,0)),i&&(i.style.opacity=Math.max(t,0))};ue({effect:"cube",swiper:t,on:a,setTranslate:()=>{const{el:e,wrapperEl:s,slides:a,width:r,height:n,rtlTranslate:l,size:o,browser:d}=t,c=M(t),p=t.params.cubeEffect,u=t.isHorizontal(),m=t.virtual&&t.params.virtual.enabled;let h,f=0;p.shadow&&(u?(h=t.wrapperEl.querySelector(".swiper-cube-shadow"),h||(h=v("div","swiper-cube-shadow"),t.wrapperEl.append(h)),h.style.height=`${r}px`):(h=e.querySelector(".swiper-cube-shadow"),h||(h=v("div","swiper-cube-shadow"),e.append(h))));for(let e=0;e-1&&(f=90*s+90*d,l&&(f=90*-s-90*d)),t.style.transform=w,p.slideShadows&&i(t,d,u)}if(s.style.transformOrigin=`50% 50% -${o/2}px`,s.style["-webkit-transform-origin"]=`50% 50% -${o/2}px`,p.shadow)if(u)h.style.transform=`translate3d(0px, ${r/2+p.shadowOffset}px, ${-r/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${p.shadowScale})`;else{const e=Math.abs(f)-90*Math.floor(Math.abs(f)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=p.shadowScale,a=p.shadowScale/t,i=p.shadowOffset;h.style.transform=`scale3d(${s}, 1, ${a}) translate3d(0px, ${n/2+i}px, ${-n/2/a}px) rotateX(-89.99deg)`}const g=(d.isSafari||d.isWebView)&&d.needPerspectiveFix?-o/2:0;s.style.transform=`translate3d(0px,0,${g}px) rotateX(${c(t.isHorizontal()?0:f)}deg) rotateY(${c(t.isHorizontal()?-f:0)}deg)`,s.style.setProperty("--swiper-cube-translate-z",`${g}px`)},setTransition:e=>{const{el:s,slides:a}=t;if(a.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=s.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const s=Math.max(Math.min(t.progress,1),-1);i(t,s,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(e,s)=>{let a=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=fe("flip",e,t.isHorizontal()?"left":"top")),i||(i=fe("flip",e,t.isHorizontal()?"right":"bottom")),a&&(a.style.opacity=Math.max(-s,0)),i&&(i.style.opacity=Math.max(s,0))};ue({effect:"flip",swiper:t,on:a,setTranslate:()=>{const{slides:e,rtlTranslate:s}=t,a=t.params.flipEffect,r=M(t);for(let n=0;n{const s=t.slides.map((e=>h(e)));s.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),he({swiper:t,duration:e,transformElements:s})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let s=e.progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(e.progress,1),-1)),i(e,s)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),ue({effect:"coverflow",swiper:t,on:a,setTranslate:()=>{const{width:e,height:s,slides:a,slidesSizesGrid:i}=t,r=t.params.coverflowEffect,n=t.isHorizontal(),l=t.translate,o=n?e/2-l:s/2-l,d=n?r.rotate:-r.rotate,c=r.depth,p=M(t);for(let e=0,t=a.length;e0?u:0),s&&(s.style.opacity=-u>0?-u:0)}}},setTransition:e=>{t.slides.map((e=>h(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;ue({effect:"creative",swiper:t,on:a,setTranslate:()=>{const{slides:e,wrapperEl:s,slidesSizesGrid:a}=t,r=t.params.creativeEffect,{progressMultiplier:n}=r,l=t.params.centeredSlides,o=M(t);if(l){const e=a[0]/2-t.params.slidesOffsetBefore||0;s.style.transform=`translateX(calc(50% - ${e}px))`}for(let s=0;s0&&(g=r.prev,f=!0),m.forEach(((e,t)=>{m[t]=`calc(${e}px + (${i(g.translate[t])} * ${Math.abs(c*n)}))`})),h.forEach(((e,t)=>{let s=g.rotate[t]*Math.abs(c*n);h[t]=s})),a.style.zIndex=-Math.abs(Math.round(d))+e.length;const v=m.join(", "),w=`rotateX(${o(h[0])}deg) rotateY(${o(h[1])}deg) rotateZ(${o(h[2])}deg)`,b=p<0?`scale(${1+(1-g.scale)*p*n})`:`scale(${1-(1-g.scale)*p*n})`,y=p<0?1+(1-g.opacity)*p*n:1-(1-g.opacity)*p*n,E=`translate3d(${v}) ${w} ${b}`;if(f&&g.shadow||!f){let e=a.querySelector(".swiper-slide-shadow");if(!e&&g.shadow&&(e=fe("creative",a)),e){const t=r.shadowPerProgress?c*(1/r.limitProgress):c;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const x=me(0,a);x.style.transform=E,x.style.opacity=y,g.origin&&(x.style.transformOrigin=g.origin)}},setTransition:e=>{const s=t.slides.map((e=>h(e)));s.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),he({swiper:t,duration:e,transformElements:s,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),ue({effect:"cards",swiper:t,on:a,setTranslate:()=>{const{slides:e,activeIndex:s,rtlTranslate:a}=t,i=t.params.cardsEffect,{startTranslate:r,isTouched:n}=t.touchEventsData,l=a?-t.translate:t.translate;for(let o=0;o0&&p<1&&(n||t.params.cssMode)&&l-1&&(n||t.params.cssMode)&&l>r;if(y||E){const e=(1-Math.abs((Math.abs(p)-.5)/.5))**.5;v+=-28*p*e,g+=-.5*e,w+=96*e,h=-25*e*Math.abs(p)+"%"}if(m=p<0?`calc(${m}px ${a?"-":"+"} (${w*Math.abs(p)}%))`:p>0?`calc(${m}px ${a?"-":"+"} (-${w*Math.abs(p)}%))`:`${m}px`,!t.isHorizontal()){const e=h;h=m,m=e}const x=p<0?""+(1+(1-g)*p):""+(1-(1-g)*p),S=`\n translate3d(${m}, ${h}, ${f}px)\n rotateZ(${i.rotate?a?-v:v:0}deg)\n scale(${x})\n `;if(i.slideShadows){let e=d.querySelector(".swiper-slide-shadow");e||(e=fe("cards",d)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(p)-.5)/.5,0),1))}d.style.zIndex=-Math.abs(Math.round(c))+e.length;me(0,d).style.transform=S}},setTransition:e=>{const s=t.slides.map((e=>h(e)));s.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),he({swiper:t,duration:e,transformElements:s})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return ie.use(ge),ie}(); +//# sourceMappingURL=swiper-bundle.min.js.map \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/anchor/anchor.html b/public/static/plugs/ueditor/dialogs/anchor/anchor.html new file mode 100644 index 0000000..01fe929 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/anchor/anchor.html @@ -0,0 +1,40 @@ + + + + + + + + +
              + +
              + + + + diff --git a/public/static/plugs/ueditor/dialogs/attachment/attachment.css b/public/static/plugs/ueditor/dialogs/attachment/attachment.css new file mode 100644 index 0000000..9c61716 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/attachment/attachment.css @@ -0,0 +1,681 @@ +@charset "utf-8"; +/* dialog样式 */ +.wrapper { + zoom: 1; + width: 630px; + *width: 626px; + height: 380px; + margin: 0 auto; + padding: 10px; + position: relative; + font-family: sans-serif; +} + +/*tab样式框大小*/ +.tabhead { + float:left; +} +.tabbody { + width: 100%; + height: 346px; + position: relative; + clear: both; +} + +.tabbody .panel { + position: absolute; + width: 0; + height: 0; + background: #fff; + overflow: hidden; + display: none; +} + +.tabbody .panel.focus { + width: 100%; + height: 346px; + display: block; +} + +/* 上传附件 */ +.tabbody #upload.panel { + width: 0; + height: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); + background: #fff; + display: block; +} + +.tabbody #upload.panel.focus { + width: 100%; + height: 346px; + display: block; + clip: auto; +} + +#upload .queueList { + margin: 0; + width: 100%; + height: 100%; + position: absolute; + overflow: hidden; +} + +#upload p { + margin: 0; +} + +.element-invisible { + width: 0 !important; + height: 0 !important; + border: 0; + padding: 0; + margin: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); +} + +#upload .placeholder { + margin: 10px; + border: 2px dashed #e6e6e6; + *border: 0px dashed #e6e6e6; + height: 172px; + padding-top: 150px; + text-align: center; + background: url(./images/image.png) center 70px no-repeat; + color: #cccccc; + font-size: 18px; + position: relative; + top:0; + *top: 10px; +} + +#upload .placeholder .webuploader-pick { + font-size: 18px; + background: #00b7ee; + border-radius: 3px; + line-height: 44px; + padding: 0 30px; + *width: 120px; + color: #fff; + display: inline-block; + margin: 0 auto 20px auto; + cursor: pointer; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); +} + +#upload .placeholder .webuploader-pick-hover { + background: #00a2d4; +} + + +#filePickerContainer { + text-align: center; +} + +#upload .placeholder .flashTip { + color: #666666; + font-size: 12px; + position: absolute; + width: 100%; + text-align: center; + bottom: 20px; +} + +#upload .placeholder .flashTip a { + color: #0785d1; + text-decoration: none; +} + +#upload .placeholder .flashTip a:hover { + text-decoration: underline; +} + +#upload .placeholder.webuploader-dnd-over { + border-color: #999999; +} + +#upload .filelist { + list-style: none; + margin: 0; + padding: 0; + overflow-x: hidden; + overflow-y: auto; + position: relative; + height: 300px; +} + +#upload .filelist:after { + content: ''; + display: block; + width: 0; + height: 0; + overflow: hidden; + clear: both; +} + +#upload .filelist li { + width: 113px; + height: 113px; + background: url(./images/bg.png); + text-align: center; + margin: 9px 0 0 9px; + *margin: 6px 0 0 6px; + position: relative; + display: block; + float: left; + overflow: hidden; + font-size: 12px; +} + +#upload .filelist li p.log { + position: relative; + top: -45px; +} + +#upload .filelist li p.title { + position: absolute; + top: 0; + left: 0; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 5px; + text-indent: 5px; + text-align: left; +} + +#upload .filelist li p.progress { + position: absolute; + width: 100%; + bottom: 0; + left: 0; + height: 8px; + overflow: hidden; + z-index: 50; + margin: 0; + border-radius: 0; + background: none; + -webkit-box-shadow: 0 0 0; +} + +#upload .filelist li p.progress span { + display: none; + overflow: hidden; + width: 0; + height: 100%; + background: #1483d8 url(./images/progress.png) repeat-x; + + -webit-transition: width 200ms linear; + -moz-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; + transition: width 200ms linear; + + -webkit-animation: progressmove 2s linear infinite; + -moz-animation: progressmove 2s linear infinite; + -o-animation: progressmove 2s linear infinite; + -ms-animation: progressmove 2s linear infinite; + animation: progressmove 2s linear infinite; + + -webkit-transform: translateZ(0); +} + +@-webkit-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@-moz-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +#upload .filelist li p.imgWrap { + position: relative; + z-index: 2; + line-height: 113px; + vertical-align: middle; + overflow: hidden; + width: 113px; + height: 113px; + + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + + -webit-transition: 200ms ease-out; + -moz-transition: 200ms ease-out; + -o-transition: 200ms ease-out; + -ms-transition: 200ms ease-out; + transition: 200ms ease-out; +} +#upload .filelist li p.imgWrap.notimage { + margin-top: 0; + width: 111px; + height: 111px; + border: 1px #eeeeee solid; +} +#upload .filelist li p.imgWrap.notimage i.file-preview { + margin-top: 15px; +} + +#upload .filelist li img { + width: 100%; +} + +#upload .filelist li p.error { + background: #f43838; + color: #fff; + position: absolute; + bottom: 0; + left: 0; + height: 28px; + line-height: 28px; + width: 100%; + z-index: 100; + display:none; +} + +#upload .filelist li .success { + display: block; + position: absolute; + left: 0; + bottom: 0; + height: 40px; + width: 100%; + z-index: 200; + background: url(./images/success.png) no-repeat right bottom; + background-image: url(./images/success.gif) \9; +} + +#upload .filelist li.filePickerBlock { + width: 113px; + height: 113px; + background: url(./images/image.png) no-repeat center 12px; + border: 1px solid #eeeeee; + border-radius: 0; +} +#upload .filelist li.filePickerBlock div.webuploader-pick { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + opacity: 0; + background: none; + font-size: 0; +} + +#upload .filelist div.file-panel { + position: absolute; + height: 0; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; + background: rgba(0, 0, 0, 0.5); + width: 100%; + top: 0; + left: 0; + overflow: hidden; + z-index: 300; +} + +#upload .filelist div.file-panel span { + width: 24px; + height: 24px; + display: inline; + float: right; + text-indent: -9999px; + overflow: hidden; + background: url(./images/icons.png) no-repeat; + background: url(./images/icons.gif) no-repeat \9; + margin: 5px 1px 1px; + cursor: pointer; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#upload .filelist div.file-panel span.rotateLeft { + display:none; + background-position: 0 -24px; +} + +#upload .filelist div.file-panel span.rotateLeft:hover { + background-position: 0 0; +} + +#upload .filelist div.file-panel span.rotateRight { + display:none; + background-position: -24px -24px; +} + +#upload .filelist div.file-panel span.rotateRight:hover { + background-position: -24px 0; +} + +#upload .filelist div.file-panel span.cancel { + background-position: -48px -24px; +} + +#upload .filelist div.file-panel span.cancel:hover { + background-position: -48px 0; +} + +#upload .statusBar { + height: 45px; + border-bottom: 1px solid #dadada; + margin: 0 10px; + padding: 0; + line-height: 45px; + vertical-align: middle; + position: relative; +} + +#upload .statusBar .progress { + border: 1px solid #1483d8; + width: 198px; + background: #fff; + height: 18px; + position: absolute; + top: 12px; + display: none; + text-align: center; + line-height: 18px; + color: #6dbfff; + margin: 0 10px 0 0; +} +#upload .statusBar .progress span.percentage { + width: 0; + height: 100%; + left: 0; + top: 0; + background: #1483d8; + position: absolute; +} +#upload .statusBar .progress span.text { + position: relative; + z-index: 10; +} + +#upload .statusBar .info { + display: inline-block; + font-size: 14px; + color: #666666; +} + +#upload .statusBar .btns { + position: absolute; + top: 7px; + right: 0; + line-height: 30px; +} + +#filePickerBtn { + display: inline-block; + float: left; +} +#upload .statusBar .btns .webuploader-pick, +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-uploading, +#upload .statusBar .btns .uploadBtn.state-paused { + background: #ffffff; + border: 1px solid #cfcfcf; + color: #565656; + padding: 0 18px; + display: inline-block; + border-radius: 3px; + margin-left: 10px; + cursor: pointer; + font-size: 14px; + float: left; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#upload .statusBar .btns .webuploader-pick-hover, +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-uploading:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover { + background: #f0f0f0; +} + +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-paused{ + background: #00b7ee; + color: #fff; + border-color: transparent; +} +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover{ + background: #00a2d4; +} + +#upload .statusBar .btns .uploadBtn.disabled { + pointer-events: none; + filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; +} + + + +/* 图片管理样式 */ +#online { + width: 100%; + height: 336px; + padding: 10px 0 0 0; +} +#online #fileList{ + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + position: relative; +} +#online ul { + display: block; + list-style: none; + margin: 0; + padding: 0; +} +#online li { + float: left; + display: block; + list-style: none; + padding: 0; + width: 113px; + height: 113px; + margin: 0 0 9px 9px; + *margin: 0 0 6px 6px; + background-color: #eee; + overflow: hidden; + cursor: pointer; + position: relative; +} +#online li.clearFloat { + float: none; + clear: both; + display: block; + width:0; + height:0; + margin: 0; + padding: 0; +} +#online li img { + cursor: pointer; +} +#online li div.file-wrapper { + cursor: pointer; + position: absolute; + display: block; + width: 111px; + height: 111px; + border: 1px solid #eee; + background: url("./images/bg.png") repeat; +} +#online li div span.file-title{ + display: block; + padding: 0 3px; + margin: 3px 0 0 0; + font-size: 12px; + height: 15px; + color: #555555; + text-align: center; + width: 107px; + white-space: nowrap; + word-break: break-all; + overflow: hidden; + text-overflow: ellipsis; +} +#online li .icon { + cursor: pointer; + width: 113px; + height: 113px; + position: absolute; + top: 0; + left: 0; + z-index: 2; + border: 0; + background-repeat: no-repeat; +} +#online li .icon:hover { + width: 107px; + height: 107px; + border: 3px solid #1094fa; +} +#online li.selected .icon { + background-image: url(images/success.png); + background-image: url(images/success.gif) \9; + background-position: 75px 75px; +} +#online li.selected .icon:hover { + width: 107px; + height: 107px; + border: 3px solid #1094fa; + background-position: 72px 72px; +} + + +/* 在线文件的文件预览图标 */ +i.file-preview { + display: block; + margin: 10px auto; + width: 70px; + height: 70px; + background-image: url("./images/file-icons.png"); + background-image: url("./images/file-icons.gif") \9; + background-position: -140px center; + background-repeat: no-repeat; +} +i.file-preview.file-type-dir{ + background-position: 0 center; +} +i.file-preview.file-type-file{ + background-position: -140px center; +} +i.file-preview.file-type-filelist{ + background-position: -210px center; +} +i.file-preview.file-type-zip, +i.file-preview.file-type-rar, +i.file-preview.file-type-7z, +i.file-preview.file-type-tar, +i.file-preview.file-type-gz, +i.file-preview.file-type-bz2{ + background-position: -280px center; +} +i.file-preview.file-type-xls, +i.file-preview.file-type-xlsx{ + background-position: -350px center; +} +i.file-preview.file-type-doc, +i.file-preview.file-type-docx{ + background-position: -420px center; +} +i.file-preview.file-type-ppt, +i.file-preview.file-type-pptx{ + background-position: -490px center; +} +i.file-preview.file-type-vsd{ + background-position: -560px center; +} +i.file-preview.file-type-pdf{ + background-position: -630px center; +} +i.file-preview.file-type-txt, +i.file-preview.file-type-md, +i.file-preview.file-type-json, +i.file-preview.file-type-htm, +i.file-preview.file-type-xml, +i.file-preview.file-type-html, +i.file-preview.file-type-js, +i.file-preview.file-type-css, +i.file-preview.file-type-php, +i.file-preview.file-type-jsp, +i.file-preview.file-type-asp{ + background-position: -700px center; +} +i.file-preview.file-type-apk{ + background-position: -770px center; +} +i.file-preview.file-type-exe{ + background-position: -840px center; +} +i.file-preview.file-type-ipa{ + background-position: -910px center; +} +i.file-preview.file-type-mp4, +i.file-preview.file-type-swf, +i.file-preview.file-type-mkv, +i.file-preview.file-type-avi, +i.file-preview.file-type-flv, +i.file-preview.file-type-mov, +i.file-preview.file-type-mpg, +i.file-preview.file-type-mpeg, +i.file-preview.file-type-ogv, +i.file-preview.file-type-webm, +i.file-preview.file-type-rm, +i.file-preview.file-type-rmvb{ + background-position: -980px center; +} +i.file-preview.file-type-ogg, +i.file-preview.file-type-wav, +i.file-preview.file-type-wmv, +i.file-preview.file-type-mid, +i.file-preview.file-type-mp3{ + background-position: -1050px center; +} +i.file-preview.file-type-jpg, +i.file-preview.file-type-jpeg, +i.file-preview.file-type-gif, +i.file-preview.file-type-bmp, +i.file-preview.file-type-png, +i.file-preview.file-type-psd{ + background-position: -140px center; +} diff --git a/public/static/plugs/ueditor/dialogs/attachment/attachment.html b/public/static/plugs/ueditor/dialogs/attachment/attachment.html new file mode 100644 index 0000000..fa7a7a6 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/attachment/attachment.html @@ -0,0 +1,60 @@ + + + + + ueditor图片对话框 + + + + + + + + + + + + + + +
              +
              + + +
              +
              + +
              +
              +
              +
              + 0% + +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
                +
              • +
              +
              +
              + + +
              +
              +
              + +
              +
              + + + + diff --git a/public/static/plugs/ueditor/dialogs/attachment/attachment.js b/public/static/plugs/ueditor/dialogs/attachment/attachment.js new file mode 100644 index 0000000..23048e5 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/attachment/attachment.js @@ -0,0 +1,766 @@ +/** + * User: Jinqn + * Date: 14-04-08 + * Time: 下午16:34 + * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片 + */ + +(function () { + + var uploadFile, + onlineFile; + + window.onload = function () { + initTabs(); + initButtons(); + }; + + /* 初始化tab标签 */ + function initTabs() { + var tabs = $G('tabhead').children; + for (var i = 0; i < tabs.length; i++) { + domUtils.on(tabs[i], "click", function (e) { + var target = e.target || e.srcElement; + setTabFocus(target.getAttribute('data-content-id')); + }); + } + + setTabFocus('upload'); + } + + /* 初始化tabbody */ + function setTabFocus(id) { + if(!id) return; + var i, bodyId, tabs = $G('tabhead').children; + for (i = 0; i < tabs.length; i++) { + bodyId = tabs[i].getAttribute('data-content-id') + if (bodyId == id) { + domUtils.addClass(tabs[i], 'focus'); + domUtils.addClass($G(bodyId), 'focus'); + } else { + domUtils.removeClasses(tabs[i], 'focus'); + domUtils.removeClasses($G(bodyId), 'focus'); + } + } + switch (id) { + case 'upload': + uploadFile = uploadFile || new UploadFile('queueList'); + break; + case 'online': + onlineFile = onlineFile || new OnlineFile('fileList'); + break; + } + } + + /* 初始化onok事件 */ + function initButtons() { + + dialog.onok = function () { + var list = [], id, tabs = $G('tabhead').children; + for (var i = 0; i < tabs.length; i++) { + if (domUtils.hasClass(tabs[i], 'focus')) { + id = tabs[i].getAttribute('data-content-id'); + break; + } + } + + switch (id) { + case 'upload': + list = uploadFile.getInsertList(); + var count = uploadFile.getQueueCount(); + if (count) { + $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); + return false; + } + break; + case 'online': + list = onlineFile.getInsertList(); + break; + } + + editor.execCommand('insertfile', list); + }; + } + + + /* 上传附件 */ + function UploadFile(target) { + this.$wrap = target.constructor == String ? $('#' + target) : $(target); + this.init(); + } + UploadFile.prototype = { + init: function () { + this.fileList = []; + this.initContainer(); + this.initUploader(); + }, + initContainer: function () { + this.$queue = this.$wrap.find('.filelist'); + }, + /* 初始化容器 */ + initUploader: function () { + var _this = this, + $ = jQuery, // just in case. Make sure it's not an other libaray. + $wrap = _this.$wrap, + // 图片容器 + $queue = $wrap.find('.filelist'), + // 状态栏,包括进度和控制按钮 + $statusBar = $wrap.find('.statusBar'), + // 文件总体选择信息。 + $info = $statusBar.find('.info'), + // 上传按钮 + $upload = $wrap.find('.uploadBtn'), + // 上传按钮 + $filePickerBtn = $wrap.find('.filePickerBtn'), + // 上传按钮 + $filePickerBlock = $wrap.find('.filePickerBlock'), + // 没选择文件之前的内容。 + $placeHolder = $wrap.find('.placeholder'), + // 总体进度条 + $progress = $statusBar.find('.progress').hide(), + // 添加的文件数量 + fileCount = 0, + // 添加的文件总大小 + fileSize = 0, + // 优化retina, 在retina下这个值是2 + ratio = window.devicePixelRatio || 1, + // 缩略图大小 + thumbnailWidth = 113 * ratio, + thumbnailHeight = 113 * ratio, + // 可能有pedding, ready, uploading, confirm, done. + state = '', + // 所有文件的进度信息,key为file id + percentages = {}, + supportTransition = (function () { + var s = document.createElement('p').style, + r = 'transition' in s || + 'WebkitTransition' in s || + 'MozTransition' in s || + 'msTransition' in s || + 'OTransition' in s; + s = null; + return r; + })(), + // WebUploader实例 + uploader, + actionUrl = editor.getActionUrl(editor.getOpt('fileActionName')), + fileMaxSize = editor.getOpt('fileMaxSize'), + acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');; + + if (!WebUploader.Uploader.support()) { + $('#filePickerReady').after($('
              ').html(lang.errorNotSupport)).hide(); + return; + } else if (!editor.getOpt('fileActionName')) { + $('#filePickerReady').after($('
              ').html(lang.errorLoadConfig)).hide(); + return; + } + + uploader = _this.uploader = WebUploader.create({ + pick: { + id: '#filePickerReady', + label: lang.uploadSelectFile + }, + swf: '../../third-party/webuploader/Uploader.swf', + server: actionUrl, + fileVal: editor.getOpt('fileFieldName'), + duplicate: true, + fileSingleSizeLimit: fileMaxSize, + compress: false + }); + uploader.addButton({ + id: '#filePickerBlock' + }); + uploader.addButton({ + id: '#filePickerBtn', + label: lang.uploadAddFile + }); + + setState('pedding'); + + // 当有文件添加进来时执行,负责view的创建 + function addFile(file) { + var $li = $('
            • ' + + '

              ' + file.name + '

              ' + + '

              ' + + '

              ' + + '
            • '), + + $btns = $('
              ' + + '' + lang.uploadDelete + '' + + '' + lang.uploadTurnRight + '' + + '' + lang.uploadTurnLeft + '
              ').appendTo($li), + $prgress = $li.find('p.progress span'), + $wrap = $li.find('p.imgWrap'), + $info = $('

              ').hide().appendTo($li), + + showError = function (code) { + switch (code) { + case 'exceed_size': + text = lang.errorExceedSize; + break; + case 'interrupt': + text = lang.errorInterrupt; + break; + case 'http': + text = lang.errorHttp; + break; + case 'not_allow_type': + text = lang.errorFileType; + break; + default: + text = lang.errorUploadRetry; + break; + } + $info.text(text).show(); + }; + + if (file.getStatus() === 'invalid') { + showError(file.statusText); + } else { + $wrap.text(lang.uploadPreview); + if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) { + $wrap.empty().addClass('notimage').append('' + + '' + file.name + ''); + } else { + if (browser.ie && browser.version <= 7) { + $wrap.text(lang.uploadNoPreview); + } else { + uploader.makeThumb(file, function (error, src) { + if (error || !src) { + $wrap.text(lang.uploadNoPreview); + } else { + var $img = $(''); + $wrap.empty().append($img); + $img.on('error', function () { + $wrap.text(lang.uploadNoPreview); + }); + } + }, thumbnailWidth, thumbnailHeight); + } + } + percentages[ file.id ] = [ file.size, 0 ]; + file.rotation = 0; + + /* 检查文件格式 */ + if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { + showError('not_allow_type'); + uploader.removeFile(file); + } + } + + file.on('statuschange', function (cur, prev) { + if (prev === 'progress') { + $prgress.hide().width(0); + } else if (prev === 'queued') { + $li.off('mouseenter mouseleave'); + $btns.remove(); + } + // 成功 + if (cur === 'error' || cur === 'invalid') { + showError(file.statusText); + percentages[ file.id ][ 1 ] = 1; + } else if (cur === 'interrupt') { + showError('interrupt'); + } else if (cur === 'queued') { + percentages[ file.id ][ 1 ] = 0; + } else if (cur === 'progress') { + $info.hide(); + $prgress.css('display', 'block'); + } else if (cur === 'complete') { + } + + $li.removeClass('state-' + prev).addClass('state-' + cur); + }); + + $li.on('mouseenter', function () { + $btns.stop().animate({height: 30}); + }); + $li.on('mouseleave', function () { + $btns.stop().animate({height: 0}); + }); + + $btns.on('click', 'span', function () { + var index = $(this).index(), + deg; + + switch (index) { + case 0: + uploader.removeFile(file); + return; + case 1: + file.rotation += 90; + break; + case 2: + file.rotation -= 90; + break; + } + + if (supportTransition) { + deg = 'rotate(' + file.rotation + 'deg)'; + $wrap.css({ + '-webkit-transform': deg, + '-mos-transform': deg, + '-o-transform': deg, + 'transform': deg + }); + } else { + $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); + } + + }); + + $li.insertBefore($filePickerBlock); + } + + // 负责view的销毁 + function removeFile(file) { + var $li = $('#' + file.id); + delete percentages[ file.id ]; + updateTotalProgress(); + $li.off().find('.file-panel').off().end().remove(); + } + + function updateTotalProgress() { + var loaded = 0, + total = 0, + spans = $progress.children(), + percent; + + $.each(percentages, function (k, v) { + total += v[ 0 ]; + loaded += v[ 0 ] * v[ 1 ]; + }); + + percent = total ? loaded / total : 0; + + spans.eq(0).text(Math.round(percent * 100) + '%'); + spans.eq(1).css('width', Math.round(percent * 100) + '%'); + updateStatus(); + } + + function setState(val, files) { + + if (val != state) { + + var stats = uploader.getStats(); + + $upload.removeClass('state-' + state); + $upload.addClass('state-' + val); + + switch (val) { + + /* 未选择文件 */ + case 'pedding': + $queue.addClass('element-invisible'); + $statusBar.addClass('element-invisible'); + $placeHolder.removeClass('element-invisible'); + $progress.hide(); $info.hide(); + uploader.refresh(); + break; + + /* 可以开始上传 */ + case 'ready': + $placeHolder.addClass('element-invisible'); + $queue.removeClass('element-invisible'); + $statusBar.removeClass('element-invisible'); + $progress.hide(); $info.show(); + $upload.text(lang.uploadStart); + uploader.refresh(); + break; + + /* 上传中 */ + case 'uploading': + $progress.show(); $info.hide(); + $upload.text(lang.uploadPause); + break; + + /* 暂停上传 */ + case 'paused': + $progress.show(); $info.hide(); + $upload.text(lang.uploadContinue); + break; + + case 'confirm': + $progress.show(); $info.hide(); + $upload.text(lang.uploadStart); + + stats = uploader.getStats(); + if (stats.successNum && !stats.uploadFailNum) { + setState('finish'); + return; + } + break; + + case 'finish': + $progress.hide(); $info.show(); + if (stats.uploadFailNum) { + $upload.text(lang.uploadRetry); + } else { + $upload.text(lang.uploadStart); + } + break; + } + + state = val; + updateStatus(); + + } + + if (!_this.getQueueCount()) { + $upload.addClass('disabled') + } else { + $upload.removeClass('disabled') + } + + } + + function updateStatus() { + var text = '', stats; + + if (state === 'ready') { + text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); + } else if (state === 'confirm') { + stats = uploader.getStats(); + if (stats.uploadFailNum) { + text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); + } + } else { + stats = uploader.getStats(); + text = lang.updateStatusFinish.replace('_', fileCount). + replace('_KB', WebUploader.formatSize(fileSize)). + replace('_', stats.successNum); + + if (stats.uploadFailNum) { + text += lang.updateStatusError.replace('_', stats.uploadFailNum); + } + } + + $info.html(text); + } + + uploader.on('fileQueued', function (file) { + if (file.ext && acceptExtensions.indexOf(file.ext.toLowerCase()) != -1 && file.size <= fileMaxSize) { + fileCount++; + fileSize += file.size; + } + + if (fileCount === 1) { + $placeHolder.addClass('element-invisible'); + $statusBar.show(); + } + + addFile(file); + }); + + uploader.on('fileDequeued', function (file) { + if (file.ext && acceptExtensions.indexOf(file.ext.toLowerCase()) != -1 && file.size <= fileMaxSize) { + fileCount--; + fileSize -= file.size; + } + + removeFile(file); + updateTotalProgress(); + }); + + uploader.on('filesQueued', function (file) { + if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { + setState('ready'); + } + updateTotalProgress(); + }); + + uploader.on('all', function (type, files) { + switch (type) { + case 'uploadFinished': + setState('confirm', files); + break; + case 'startUpload': + /* 添加额外的GET参数 */ + var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', + url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params); + uploader.option('server', url); + setState('uploading', files); + break; + case 'stopUpload': + setState('paused', files); + break; + } + }); + + uploader.on('uploadBeforeSend', function (file, data, header) { + //这里可以通过data对象添加POST参数 + if (actionUrl.toLowerCase().indexOf('jsp') != -1) { + header['X_Requested_With'] = 'XMLHttpRequest'; + } + }); + + uploader.on('uploadProgress', function (file, percentage) { + var $li = $('#' + file.id), + $percent = $li.find('.progress span'); + + $percent.css('width', percentage * 100 + '%'); + percentages[ file.id ][ 1 ] = percentage; + updateTotalProgress(); + }); + + uploader.on('uploadSuccess', function (file, ret) { + var $file = $('#' + file.id); + try { + var responseText = (ret._raw || ret), + json = utils.str2json(responseText); + if (json.state == 'SUCCESS') { + _this.fileList.push(json); + $file.append(''); + // 触发上传附件事件 + editor.fireEvent("uploadsuccess", { + res: json, + type: 'file' + }); + } else { + $file.find('.error').text(json.state).show(); + } + } catch (e) { + $file.find('.error').text(lang.errorServerUpload).show(); + } + }); + + uploader.on('uploadError', function (file, code) { + }); + uploader.on('error', function (code, file) { + if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { + addFile(file); + } + }); + uploader.on('uploadComplete', function (file, ret) { + }); + + $upload.on('click', function () { + if ($(this).hasClass('disabled')) { + return false; + } + + if (state === 'ready') { + uploader.upload(); + } else if (state === 'paused') { + uploader.upload(); + } else if (state === 'uploading') { + uploader.stop(); + } + }); + + $upload.addClass('state-' + state); + updateTotalProgress(); + }, + getQueueCount: function () { + var file, i, status, readyFile = 0, files = this.uploader.getFiles(); + for (i = 0; file = files[i++]; ) { + status = file.getStatus(); + if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; + } + return readyFile; + }, + getInsertList: function () { + var i, link, data, list = [], + prefix = editor.getOpt('fileUrlPrefix'); + for (i = 0; i < this.fileList.length; i++) { + data = this.fileList[i]; + link = data.url; + list.push({ + title: data.original || link.substr(link.lastIndexOf('/') + 1), + url: prefix + link + }); + } + return list; + } + }; + + + /* 在线附件 */ + function OnlineFile(target) { + this.container = utils.isString(target) ? document.getElementById(target) : target; + this.init(); + } + OnlineFile.prototype = { + init: function () { + this.initContainer(); + this.initEvents(); + this.initData(); + }, + /* 初始化容器 */ + initContainer: function () { + this.container.innerHTML = ''; + this.list = document.createElement('ul'); + this.clearFloat = document.createElement('li'); + + domUtils.addClass(this.list, 'list'); + domUtils.addClass(this.clearFloat, 'clearFloat'); + + this.list.appendChild(this.clearFloat); + this.container.appendChild(this.list); + }, + /* 初始化滚动事件,滚动到地步自动拉取数据 */ + initEvents: function () { + var _this = this; + + /* 滚动拉取图片 */ + domUtils.on($G('fileList'), 'scroll', function(e){ + var panel = this; + if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) { + _this.getFileData(); + } + }); + /* 选中图片 */ + domUtils.on(this.list, 'click', function (e) { + var target = e.target || e.srcElement, + li = target.parentNode; + + if (li.tagName.toLowerCase() == 'li') { + if (domUtils.hasClass(li, 'selected')) { + domUtils.removeClasses(li, 'selected'); + } else { + domUtils.addClass(li, 'selected'); + } + } + }); + }, + /* 初始化第一次的数据 */ + initData: function () { + + /* 拉取数据需要使用的值 */ + this.state = 0; + this.listSize = editor.getOpt('fileManagerListSize'); + this.listIndex = 0; + this.listEnd = false; + + /* 第一次拉取数据 */ + this.getFileData(); + }, + /* 向后台拉取图片列表数据 */ + getFileData: function () { + var _this = this; + + if(!_this.listEnd && !this.isLoadingData) { + this.isLoadingData = true; + ajax.request(editor.getActionUrl(editor.getOpt('fileManagerActionName')), { + timeout: 100000, + data: utils.extend({ + start: this.listIndex, + size: this.listSize + }, editor.queryCommandValue('serverparam')), + headers: editor.options.serverHeaders || {}, + method: 'get', + onsuccess: function (r) { + try { + var json = eval('(' + r.responseText + ')'); + if (json.state == 'SUCCESS') { + _this.pushData(json.list); + _this.listIndex = parseInt(json.start) + parseInt(json.list.length); + if(_this.listIndex >= json.total) { + _this.listEnd = true; + } + _this.isLoadingData = false; + } + } catch (e) { + if(r.responseText.indexOf('ue_separate_ue') != -1) { + var list = r.responseText.split(r.responseText); + _this.pushData(list); + _this.listIndex = parseInt(list.length); + _this.listEnd = true; + _this.isLoadingData = false; + } + } + }, + onerror: function () { + _this.isLoadingData = false; + } + }); + } + }, + /* 添加图片到列表界面上 */ + pushData: function (list) { + var i, item, img, filetype, preview, icon, _this = this, + urlPrefix = editor.getOpt('fileManagerUrlPrefix'); + for (i = 0; i < list.length; i++) { + if(list[i] && list[i].url) { + item = document.createElement('li'); + icon = document.createElement('span'); + filetype = list[i].url.substr(list[i].url.lastIndexOf('.') + 1); + + if ( "png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1 ) { + preview = document.createElement('img'); + domUtils.on(preview, 'load', (function(image){ + return function(){ + _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight); + }; + })(preview)); + preview.width = 113; + preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); + } else { + var ic = document.createElement('i'), + textSpan = document.createElement('span'); + textSpan.innerHTML = list[i].original || list[i].url.substr(list[i].url.lastIndexOf('/') + 1); + preview = document.createElement('div'); + preview.appendChild(ic); + preview.appendChild(textSpan); + domUtils.addClass(preview, 'file-wrapper'); + domUtils.addClass(textSpan, 'file-title'); + domUtils.addClass(ic, 'file-type-' + filetype); + domUtils.addClass(ic, 'file-preview'); + } + domUtils.addClass(icon, 'icon'); + item.setAttribute('data-url', urlPrefix + list[i].url); + if (list[i].original) { + item.setAttribute('data-title', list[i].original); + } + + item.appendChild(preview); + item.appendChild(icon); + this.list.insertBefore(item, this.clearFloat); + } + } + }, + /* 改变图片大小 */ + scale: function (img, w, h, type) { + var ow = img.width, + oh = img.height; + + if (type == 'justify') { + if (ow >= oh) { + img.width = w; + img.height = h * oh / ow; + img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; + } else { + img.width = w * ow / oh; + img.height = h; + img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; + } + } else { + if (ow >= oh) { + img.width = w * ow / oh; + img.height = h; + img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; + } else { + img.width = w; + img.height = h * oh / ow; + img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; + } + } + }, + getInsertList: function () { + var i, lis = this.list.children, list = []; + for (i = 0; i < lis.length; i++) { + if (domUtils.hasClass(lis[i], 'selected')) { + var url = lis[i].getAttribute('data-url'); + var title = lis[i].getAttribute('data-title') || url.substr(url.lastIndexOf('/') + 1); + list.push({ + title: title, + url: url + }); + } + } + return list; + } + }; + + +})(); diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/alignicon.gif b/public/static/plugs/ueditor/dialogs/attachment/images/alignicon.gif new file mode 100644 index 0000000..005a5ac Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/alignicon.gif differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/alignicon.png b/public/static/plugs/ueditor/dialogs/attachment/images/alignicon.png new file mode 100644 index 0000000..4b6c444 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/alignicon.png differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/bg.png b/public/static/plugs/ueditor/dialogs/attachment/images/bg.png new file mode 100644 index 0000000..580be0a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/bg.png differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/file-icons.gif b/public/static/plugs/ueditor/dialogs/attachment/images/file-icons.gif new file mode 100644 index 0000000..d8c02c2 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/file-icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/file-icons.png b/public/static/plugs/ueditor/dialogs/attachment/images/file-icons.png new file mode 100644 index 0000000..3ff82c8 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/file-icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/icons.gif b/public/static/plugs/ueditor/dialogs/attachment/images/icons.gif new file mode 100644 index 0000000..78459de Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/icons.png b/public/static/plugs/ueditor/dialogs/attachment/images/icons.png new file mode 100644 index 0000000..12e4700 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/image.png b/public/static/plugs/ueditor/dialogs/attachment/images/image.png new file mode 100644 index 0000000..19699f6 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/image.png differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/progress.png b/public/static/plugs/ueditor/dialogs/attachment/images/progress.png new file mode 100644 index 0000000..717c486 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/progress.png differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/success.gif b/public/static/plugs/ueditor/dialogs/attachment/images/success.gif new file mode 100644 index 0000000..8d4f311 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/success.gif differ diff --git a/public/static/plugs/ueditor/dialogs/attachment/images/success.png b/public/static/plugs/ueditor/dialogs/attachment/images/success.png new file mode 100644 index 0000000..94f968d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/attachment/images/success.png differ diff --git a/public/static/plugs/ueditor/dialogs/audio/audio.css b/public/static/plugs/ueditor/dialogs/audio/audio.css new file mode 100644 index 0000000..eb0f251 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/audio/audio.css @@ -0,0 +1,650 @@ +@charset "utf-8"; +.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative} +.tabbody{height: 355px;} +.tabbody .panel { + position: absolute; + width: 0; + height: 0; + background: #fff; + overflow: hidden; + display: none; +} +.tabbody .panel.focus { + width: 100%; + height: 355px; + display: block; +} + +.tabbody .panel table td{vertical-align: middle;} +#audioUrl { + width: 380px; + height: 26px; + line-height: 26px; + margin: 8px 5px; + background: #FFF; + border: 1px solid #d7d7d7; + outline: none; + border-radius:3px; + padding:0 5px; +} +#audioSelect{ + width: 100px; + display: inline-block; + background: #FFF; + border: 1px solid #EEE; + line-height: 26px; + text-align: center; + color: #333; + text-decoration: none; + border-radius: 3px; + vertical-align: middle; +} +#audioSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;} +#searchList{width: 570px;overflow: auto;zoom:1;height: 270px;} +#searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;} +#searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/ +#searchList p{margin-left: 10px;} +#audioType{ + width: 65px; + height: 23px; + line-height: 22px; + border: 1px solid #d7d7d7; +} +#audioSearchBtn,#audioSearchReset{ + /*width: 80px;*/ + height: 25px; + line-height: 25px; + background: #eee; + border: 1px solid #d7d7d7; + cursor: pointer; + padding: 0 5px; +} + + + +#preview{position: relative;width: 420px;padding:0;overflow: hidden; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left} +#preview .previewMsg {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;background-color: #666;} +#preview .previewMsg span{display:block;margin: 125px auto 0 auto;text-align:center;font-size:18px;color:#fff;} +#preview .previewaudio {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;} +.edui-audio-wrapper fieldset{ + border: 1px solid #ddd; + padding-left: 5px; + margin-bottom: 20px; + padding-bottom: 5px; + width: 115px; +} + +#audioInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;} +fieldset{ + border: 1px solid #ddd; + padding-left: 5px; + margin-bottom: 20px; + padding-bottom: 5px; + width: 115px; +} +fieldset legend{font-weight: bold;} +fieldset p{line-height: 30px;} +fieldset input.txt{ + width: 65px; + height: 21px; + line-height: 21px; + margin: 8px 5px; + background: #FFF; + border: 1px solid #d7d7d7; +} +label.url{font-weight: bold;margin-left: 5px;} +#audioFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} +#audioFloat .focus{opacity: 1;filter: alpha(opacity = 100)} +span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue} + + + + +/* upload audio */ +.tabbody #upload.panel { + width: 0; + height: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); + background: #fff; + display: block; +} +.tabbody #upload.panel.focus { + width: 100%; + height: 335px; + display: block; + clip: auto; +} +#upload_alignment div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} +#upload_alignment .focus{opacity: 1;filter: alpha(opacity = 100)} +#upload_left { width:427px; float:left; } +#upload_left .controller { height: 30px; clear: both; } +#uploadaudioInfo{margin-top:10px;float:right;padding-right:8px;} + +#upload .queueList { + margin: 0; +} + +#upload p { + margin: 0; +} + +.element-invisible { + width: 0 !important; + height: 0 !important; + border: 0; + padding: 0; + margin: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); +} + +#upload .placeholder { + margin: 10px; + margin-right:0; + border: 2px dashed #e6e6e6; + *border: 0px dashed #e6e6e6; + height: 161px; + padding-top: 150px; + text-align: center; + width: 97%; + float: left; + background: url(./images/image.png) center 70px no-repeat; + color: #cccccc; + font-size: 18px; + position: relative; + top:0; + *margin-left: 0; + *left: 10px; +} + +#upload .placeholder .webuploader-pick { + font-size: 18px; + background: #00b7ee; + border-radius: 3px; + line-height: 44px; + padding: 0 30px; + *width: 120px; + color: #fff; + display: inline-block; + margin: 0 auto 20px auto; + cursor: pointer; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); +} + +#upload .placeholder .webuploader-pick-hover { + background: #00a2d4; +} + + +#filePickerContainer { + text-align: center; +} + +#upload .placeholder .flashTip { + color: #666666; + font-size: 12px; + position: absolute; + width: 100%; + text-align: center; + bottom: 20px; +} + +#upload .placeholder .flashTip a { + color: #0785d1; + text-decoration: none; +} + +#upload .placeholder .flashTip a:hover { + text-decoration: underline; +} + +#upload .placeholder.webuploader-dnd-over { + border-color: #999999; +} + +#upload .filelist { + list-style: none; + margin: 0; + padding: 0; + overflow-x: hidden; + overflow-y: auto; + position: relative; + height: 285px; +} + +#upload .filelist:after { + content: ''; + display: block; + width: 0; + height: 0; + overflow: hidden; + clear: both; +} + +#upload .filelist li { + width: 113px; + height: 113px; + background: url(./images/bg.png); + text-align: center; + margin: 15px 0 0 20px; + *margin: 15px 0 0 15px; + position: relative; + display: block; + float: left; + overflow: hidden; + font-size: 12px; +} + +#upload .filelist li p.log { + position: relative; + top: -45px; +} + +#upload .filelist li p.title { + position: absolute; + top: 0; + left: 0; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 5px; + text-indent: 5px; + text-align: left; +} + +#upload .filelist li p.progress { + position: absolute; + width: 100%; + bottom: 0; + left: 0; + height: 8px; + overflow: hidden; + z-index: 50; + margin: 0; + border-radius: 0; + background: none; + -webkit-box-shadow: 0 0 0; +} + +#upload .filelist li p.progress span { + display: none; + overflow: hidden; + width: 0; + height: 100%; + background: #1483d8 url(./images/progress.png) repeat-x; + + -webit-transition: width 200ms linear; + -moz-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; + transition: width 200ms linear; + + -webkit-animation: progressmove 2s linear infinite; + -moz-animation: progressmove 2s linear infinite; + -o-animation: progressmove 2s linear infinite; + -ms-animation: progressmove 2s linear infinite; + animation: progressmove 2s linear infinite; + + -webkit-transform: translateZ(0); +} + +@-webkit-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@-moz-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +#upload .filelist li p.imgWrap { + position: relative; + z-index: 2; + line-height: 113px; + vertical-align: middle; + overflow: hidden; + width: 113px; + height: 113px; + + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + + -webit-transition: 200ms ease-out; + -moz-transition: 200ms ease-out; + -o-transition: 200ms ease-out; + -ms-transition: 200ms ease-out; + transition: 200ms ease-out; +} +#upload .filelist li p.imgWrap.notimage { + margin-top: 0; + width: 111px; + height: 111px; + border: 1px #eeeeee solid; +} +#upload .filelist li p.imgWrap.notimage i.file-preview { + margin-top: 15px; +} + +#upload .filelist li img { + width: 100%; +} + +#upload .filelist li p.error { + background: #f43838; + color: #fff; + position: absolute; + bottom: 0; + left: 0; + height: 28px; + line-height: 28px; + width: 100%; + z-index: 100; + display:none; +} + +#upload .filelist li .success { + display: block; + position: absolute; + left: 0; + bottom: 0; + height: 40px; + width: 100%; + z-index: 200; + background: url(./images/success.png) no-repeat right bottom; + background-image: url(./images/success.gif) \9; +} + +#upload .filelist li.filePickerBlock { + width: 113px; + height: 113px; + background: url(./images/image.png) no-repeat center 12px; + border: 1px solid #eeeeee; + border-radius: 0; +} +#upload .filelist li.filePickerBlock div.webuploader-pick { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + opacity: 0; + background: none; + font-size: 0; +} + +#upload .filelist div.file-panel { + position: absolute; + height: 0; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; + background: rgba(0, 0, 0, 0.5); + width: 100%; + top: 0; + left: 0; + overflow: hidden; + z-index: 300; +} + +#upload .filelist div.file-panel span { + width: 24px; + height: 24px; + display: inline; + float: right; + text-indent: -9999px; + overflow: hidden; + background: url(./images/icons.png) no-repeat; + background: url(./images/icons.gif) no-repeat \9; + margin: 5px 1px 1px; + cursor: pointer; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#upload .filelist div.file-panel span.rotateLeft { + display:none; + background-position: 0 -24px; +} + +#upload .filelist div.file-panel span.rotateLeft:hover { + background-position: 0 0; +} + +#upload .filelist div.file-panel span.rotateRight { + display:none; + background-position: -24px -24px; +} + +#upload .filelist div.file-panel span.rotateRight:hover { + background-position: -24px 0; +} + +#upload .filelist div.file-panel span.cancel { + background-position: -48px -24px; +} + +#upload .filelist div.file-panel span.cancel:hover { + background-position: -48px 0; +} + +#upload .statusBar { + height: 45px; + border-bottom: 1px solid #dadada; + margin: 0 10px; + padding: 0; + line-height: 45px; + vertical-align: middle; + position: relative; +} + +#upload .statusBar .progress { + border: 1px solid #1483d8; + width: 198px; + background: #fff; + height: 18px; + position: absolute; + top: 12px; + display: none; + text-align: center; + line-height: 18px; + color: #6dbfff; + margin: 0 10px 0 0; +} +#upload .statusBar .progress span.percentage { + width: 0; + height: 100%; + left: 0; + top: 0; + background: #1483d8; + position: absolute; +} +#upload .statusBar .progress span.text { + position: relative; + z-index: 10; +} + +#upload .statusBar .info { + display: inline-block; + font-size: 14px; + color: #666666; +} + +#upload .statusBar .btns { + position: absolute; + top: 7px; + right: 0; + line-height: 30px; +} + +#filePickerBtn { + display: inline-block; + float: left; +} +#upload .statusBar .btns .webuploader-pick, +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-uploading, +#upload .statusBar .btns .uploadBtn.state-paused { + background: #ffffff; + border: 1px solid #cfcfcf; + color: #565656; + padding: 0 18px; + display: inline-block; + border-radius: 3px; + margin-left: 10px; + cursor: pointer; + font-size: 14px; + float: left; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#upload .statusBar .btns .webuploader-pick-hover, +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-uploading:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover { + background: #f0f0f0; +} + +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-paused{ + background: #00b7ee; + color: #fff; + border-color: transparent; +} +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover{ + background: #00a2d4; +} + +#upload .statusBar .btns .uploadBtn.disabled { + pointer-events: none; + filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; +} + + +/* 在线文件的文件预览图标 */ +i.file-preview { + display: block; + margin: 10px auto; + width: 70px; + height: 70px; + background-image: url("./images/file-icons.png"); + background-image: url("./images/file-icons.gif") \9; + background-position: -140px center; + background-repeat: no-repeat; +} +i.file-preview.file-type-dir{ + background-position: 0 center; +} +i.file-preview.file-type-file{ + background-position: -140px center; +} +i.file-preview.file-type-filelist{ + background-position: -210px center; +} +i.file-preview.file-type-zip, +i.file-preview.file-type-rar, +i.file-preview.file-type-7z, +i.file-preview.file-type-tar, +i.file-preview.file-type-gz, +i.file-preview.file-type-bz2{ + background-position: -280px center; +} +i.file-preview.file-type-xls, +i.file-preview.file-type-xlsx{ + background-position: -350px center; +} +i.file-preview.file-type-doc, +i.file-preview.file-type-docx{ + background-position: -420px center; +} +i.file-preview.file-type-ppt, +i.file-preview.file-type-pptx{ + background-position: -490px center; +} +i.file-preview.file-type-vsd{ + background-position: -560px center; +} +i.file-preview.file-type-pdf{ + background-position: -630px center; +} +i.file-preview.file-type-txt, +i.file-preview.file-type-md, +i.file-preview.file-type-json, +i.file-preview.file-type-htm, +i.file-preview.file-type-xml, +i.file-preview.file-type-html, +i.file-preview.file-type-js, +i.file-preview.file-type-css, +i.file-preview.file-type-php, +i.file-preview.file-type-jsp, +i.file-preview.file-type-asp{ + background-position: -700px center; +} +i.file-preview.file-type-apk{ + background-position: -770px center; +} +i.file-preview.file-type-exe{ + background-position: -840px center; +} +i.file-preview.file-type-ipa{ + background-position: -910px center; +} +i.file-preview.file-type-mp4, +i.file-preview.file-type-swf, +i.file-preview.file-type-mkv, +i.file-preview.file-type-avi, +i.file-preview.file-type-flv, +i.file-preview.file-type-mov, +i.file-preview.file-type-mpg, +i.file-preview.file-type-mpeg, +i.file-preview.file-type-ogv, +i.file-preview.file-type-webm, +i.file-preview.file-type-rm, +i.file-preview.file-type-rmvb{ + background-position: -980px center; +} +i.file-preview.file-type-ogg, +i.file-preview.file-type-wav, +i.file-preview.file-type-wmv, +i.file-preview.file-type-mid, +i.file-preview.file-type-mp3{ + background-position: -1050px center; +} +i.file-preview.file-type-jpg, +i.file-preview.file-type-jpeg, +i.file-preview.file-type-gif, +i.file-preview.file-type-bmp, +i.file-preview.file-type-png, +i.file-preview.file-type-psd{ + background-position: -140px center; +} diff --git a/public/static/plugs/ueditor/dialogs/audio/audio.html b/public/static/plugs/ueditor/dialogs/audio/audio.html new file mode 100644 index 0000000..1b67abd --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/audio/audio.html @@ -0,0 +1,75 @@ + + + + + + + + + +
              +
              +
              + + +
              +
              +
              +
              +
              + 外链音频支持MP3格式 +
              +
              +
              +
              + +
              +
              +
              +
              +
              +
              +
              +
              +
              + 0% + +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
                +
              • +
              +
              +
              +
              +
              + +
              +
              +
              +
              +
              +
              +
              + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/dialogs/audio/audio.js b/public/static/plugs/ueditor/dialogs/audio/audio.js new file mode 100644 index 0000000..372b9eb --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/audio/audio.js @@ -0,0 +1,781 @@ +/** + * Created by JetBrains PhpStorm. + * User: taoqili + * Date: 12-2-20 + * Time: 上午11:19 + * To change this template use File | Settings | File Templates. + */ + +(function () { + + var audio = {}, + uploadaudioList = [], + isModifyUploadaudio = false, + uploadFile; + var editorOpt = {}; + + window.onload = function () { + editorOpt = editor.getOpt('audioConfig'); + $focus($G("audioUrl")); + initTabs(); + initAudio(); + initUpload(); + }; + + /* 初始化tab标签 */ + function initTabs() { + var tabs = $G('tabHeads').children; + for (var i = 0; i < tabs.length; i++) { + domUtils.on(tabs[i], "click", function (e) { + var j, bodyId, target = e.target || e.srcElement; + for (j = 0; j < tabs.length; j++) { + bodyId = tabs[j].getAttribute('data-content-id'); + if (tabs[j] == target) { + domUtils.addClass(tabs[j], 'focus'); + domUtils.addClass($G(bodyId), 'focus'); + } else { + domUtils.removeClasses(tabs[j], 'focus'); + domUtils.removeClasses($G(bodyId), 'focus'); + } + } + }); + } + if (!editorOpt.disableUpload) { + $G('tabHeads').querySelector('[data-content-id="upload"]').style.display = 'inline-block'; + } + if (!!editorOpt.selectCallback) { + $G('audioSelect').style.display = 'inline-block'; + domUtils.on($G('audioSelect'), "click", function (e) { + editorOpt.selectCallback(editor, function (info) { + if (info) { + $G('audioUrl').value = info.path; + createPreview(info.path); + } + }); + }); + } + } + + function initAudio() { + createAlignButton(["audioFloat", "upload_alignment"]); + addUrlChangeListener($G("audioUrl")); + addOkListener(); + + //编辑视频时初始化相关信息 + (function () { + var img = editor.selection.getRange().getClosedNode(), url; + if (img && img.className) { + var hasFakedClass = (img.className == "edui-faked-audio"), + hasUploadClass = img.className.indexOf("edui-upload-audio") != -1; + if (hasFakedClass || hasUploadClass) { + $G("audioUrl").value = url = img.getAttribute("_url"); + var align = domUtils.getComputedStyle(img, "float"), + parentAlign = domUtils.getComputedStyle(img.parentNode, "text-align"); + updateAlignButton(parentAlign === "center" ? "center" : align); + } + if (hasUploadClass) { + isModifyUploadaudio = true; + } + } + createPreview(url); + })(); + } + + /** + * 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作 + */ + function addOkListener() { + dialog.onok = function () { + $G("preview").innerHTML = ""; + var currentTab = findFocus("tabHeads", "tabSrc"); + switch (currentTab) { + case "audio": + return insertSingle(); + break; + // case "audioSearch": + // return insertSearch("searchList"); + // break; + case "upload": + return insertUpload(); + break; + } + }; + dialog.oncancel = function () { + $G("preview").innerHTML = ""; + }; + } + + /** + * 依据传入的align值更新按钮信息 + * @param align + */ + function updateAlignButton(align) { + var aligns = $G("audioFloat").children; + for (var i = 0, ci; ci = aligns[i++];) { + if (ci.getAttribute("name") == align) { + if (ci.className != "focus") { + ci.className = "focus"; + } + } else { + if (ci.className == "focus") { + ci.className = ""; + } + } + } + } + + /** + * 将单个视频信息插入编辑器中 + */ + function insertSingle() { + var url = $G('audioUrl').value, + align = findFocus("audioFloat", "name"); + if (!url) return false; + editor.execCommand('insertaudio', { + url: url, + }, isModifyUploadaudio ? 'upload' : null); + } + + /** + * 将元素id下的所有代表视频的图片插入编辑器中 + * @param id + */ + function insertSearch(id) { + var imgs = domUtils.getElementsByTagName($G(id), "img"), + audioObjs = []; + for (var i = 0, img; img = imgs[i++];) { + if (img.getAttribute("selected")) { + audioObjs.push({ + url: img.getAttribute("ue_audio_url"), + width: 420, + height: 280, + align: "none" + }); + } + } + editor.execCommand('insertaudio', audioObjs); + } + + /** + * 找到id下具有focus类的节点并返回该节点下的某个属性 + * @param id + * @param returnProperty + */ + function findFocus(id, returnProperty) { + var tabs = $G(id).children, + property; + for (var i = 0, ci; ci = tabs[i++];) { + if (ci.className == "focus") { + property = ci.getAttribute(returnProperty); + break; + } + } + return property; + } + + /** + * 数字判断 + * @param value + */ + function isNumber(value) { + return /(0|^[1-9]\d*$)/.test(value); + } + + /** + * 创建图片浮动选择按钮 + * @param ids + */ + function createAlignButton(ids) { + for (var i = 0, ci; ci = ids[i++];) { + var floatContainer = $G(ci), + nameMaps = { + "none": lang['default'], + "left": lang.floatLeft, + "right": lang.floatRight, + "center": lang.block + }; + for (var j in nameMaps) { + var div = document.createElement("div"); + div.setAttribute("name", j); + if (j == "none") div.className = "focus"; + div.style.cssText = "background:url(images/" + j + "_focus.jpg);"; + div.setAttribute("title", nameMaps[j]); + floatContainer.appendChild(div); + } + switchSelect(ci); + } + } + + /** + * 选择切换 + * @param selectParentId + */ + function switchSelect(selectParentId) { + var selects = $G(selectParentId).children; + for (var i = 0, ci; ci = selects[i++];) { + domUtils.on(ci, "click", function () { + for (var j = 0, cj; cj = selects[j++];) { + cj.className = ""; + cj.removeAttribute && cj.removeAttribute("class"); + } + this.className = "focus"; + }) + } + } + + /** + * 监听url改变事件 + * @param url + */ + function addUrlChangeListener(url) { + if (browser.ie) { + url.onpropertychange = function () { + createPreview(this.value); + } + } else { + url.addEventListener("input", function () { + createPreview(this.value); + }, false); + } + } + + function createAudioHtml(url, param) { + param = param || {}; + var str = [ + "', + '', + '', + ]; + return str.join(''); + } + + /** + * 根据url生成视频预览 + * @param url + */ + function createPreview(url) { + if (!url) { + return; + } + + $G("preview").innerHTML = '
              ' + lang.urlError + '
              ' + + '
              ' + + '
              ' + createAudioHtml(url) + '
              ' + + '
              '; + } + + + /* 插入上传视频 */ + function insertUpload() { + var audioObjs = [], + uploadDir = editor.getOpt('audioUrlPrefix'), + align = findFocus("upload_alignment", "name") || 'none'; + for (var key in uploadaudioList) { + var file = uploadaudioList[key]; + audioObjs.push({ + url: uploadDir + file.url, + align: align + }); + } + + var count = uploadFile.getQueueCount(); + if (count) { + $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); + return false; + } else { + editor.execCommand('insertaudio', audioObjs, 'upload'); + } + } + + /*初始化上传标签*/ + function initUpload() { + uploadFile = new UploadFile('queueList'); + } + + + /* 上传附件 */ + function UploadFile(target) { + this.$wrap = target.constructor == String ? $('#' + target) : $(target); + this.init(); + } + + UploadFile.prototype = { + init: function () { + this.fileList = []; + this.initContainer(); + this.initUploader(); + }, + initContainer: function () { + this.$queue = this.$wrap.find('.filelist'); + }, + /* 初始化容器 */ + initUploader: function () { + var _this = this, + $ = jQuery, // just in case. Make sure it's not an other libaray. + $wrap = _this.$wrap, + // 图片容器 + $queue = $wrap.find('.filelist'), + // 状态栏,包括进度和控制按钮 + $statusBar = $wrap.find('.statusBar'), + // 文件总体选择信息。 + $info = $statusBar.find('.info'), + // 上传按钮 + $upload = $wrap.find('.uploadBtn'), + // 上传按钮 + $filePickerBtn = $wrap.find('.filePickerBtn'), + // 上传按钮 + $filePickerBlock = $wrap.find('.filePickerBlock'), + // 没选择文件之前的内容。 + $placeHolder = $wrap.find('.placeholder'), + // 总体进度条 + $progress = $statusBar.find('.progress').hide(), + // 添加的文件数量 + fileCount = 0, + // 添加的文件总大小 + fileSize = 0, + // 优化retina, 在retina下这个值是2 + ratio = window.devicePixelRatio || 1, + // 缩略图大小 + thumbnailWidth = 113 * ratio, + thumbnailHeight = 113 * ratio, + // 可能有pedding, ready, uploading, confirm, done. + state = '', + // 所有文件的进度信息,key为file id + percentages = {}, + supportTransition = (function () { + var s = document.createElement('p').style, + r = 'transition' in s || + 'WebkitTransition' in s || + 'MozTransition' in s || + 'msTransition' in s || + 'OTransition' in s; + s = null; + return r; + })(), + // WebUploader实例 + uploader, + actionUrl = editor.getActionUrl(editor.getOpt('audioActionName')), + fileMaxSize = editor.getOpt('audioMaxSize'), + acceptExtensions = (editor.getOpt('audioAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, ''); + ; + + if (!WebUploader.Uploader.support()) { + $('#filePickerReady').after($('
              ').html(lang.errorNotSupport)).hide(); + return; + } else if (!editor.getOpt('audioActionName')) { + $('#filePickerReady').after($('
              ').html(lang.errorLoadConfig)).hide(); + return; + } + + uploader = _this.uploader = WebUploader.create({ + pick: { + id: '#filePickerReady', + label: lang.uploadSelectFile + }, + swf: '../../third-party/webuploader/Uploader.swf', + server: actionUrl, + fileVal: editor.getOpt('audioFieldName'), + duplicate: true, + fileSingleSizeLimit: fileMaxSize, + compress: false + }); + uploader.addButton({ + id: '#filePickerBlock' + }); + uploader.addButton({ + id: '#filePickerBtn', + label: lang.uploadAddFile + }); + + setState('pedding'); + + // 当有文件添加进来时执行,负责view的创建 + function addFile(file) { + var $li = $('
            • ' + + '

              ' + file.name + '

              ' + + '

              ' + + '

              ' + + '
            • '), + + $btns = $('
              ' + + '' + lang.uploadDelete + '' + + '' + lang.uploadTurnRight + '' + + '' + lang.uploadTurnLeft + '
              ').appendTo($li), + $prgress = $li.find('p.progress span'), + $wrap = $li.find('p.imgWrap'), + $info = $('

              ').hide().appendTo($li), + + showError = function (code) { + switch (code) { + case 'exceed_size': + text = lang.errorExceedSize; + break; + case 'interrupt': + text = lang.errorInterrupt; + break; + case 'http': + text = lang.errorHttp; + break; + case 'not_allow_type': + text = lang.errorFileType; + break; + default: + text = lang.errorUploadRetry; + break; + } + $info.text(text).show(); + }; + + if (file.getStatus() === 'invalid') { + showError(file.statusText); + } else { + $wrap.text(lang.uploadPreview); + if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|' + file.ext.toLowerCase() + '|') == -1) { + $wrap.empty().addClass('notimage').append('' + + '' + file.name + ''); + } else { + if (browser.ie && browser.version <= 7) { + $wrap.text(lang.uploadNoPreview); + } else { + uploader.makeThumb(file, function (error, src) { + if (error || !src || (/^data:/.test(src) && browser.ie && browser.version <= 7)) { + $wrap.text(lang.uploadNoPreview); + } else { + var $img = $(''); + $wrap.empty().append($img); + $img.on('error', function () { + $wrap.text(lang.uploadNoPreview); + }); + } + }, thumbnailWidth, thumbnailHeight); + } + } + percentages[file.id] = [file.size, 0]; + file.rotation = 0; + + /* 检查文件格式 */ + if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { + showError('not_allow_type'); + uploader.removeFile(file); + } + } + + file.on('statuschange', function (cur, prev) { + if (prev === 'progress') { + $prgress.hide().width(0); + } else if (prev === 'queued') { + $li.off('mouseenter mouseleave'); + $btns.remove(); + } + // 成功 + if (cur === 'error' || cur === 'invalid') { + showError(file.statusText); + percentages[file.id][1] = 1; + } else if (cur === 'interrupt') { + showError('interrupt'); + } else if (cur === 'queued') { + percentages[file.id][1] = 0; + } else if (cur === 'progress') { + $info.hide(); + $prgress.css('display', 'block'); + } else if (cur === 'complete') { + } + + $li.removeClass('state-' + prev).addClass('state-' + cur); + }); + + $li.on('mouseenter', function () { + $btns.stop().animate({height: 30}); + }); + $li.on('mouseleave', function () { + $btns.stop().animate({height: 0}); + }); + + $btns.on('click', 'span', function () { + var index = $(this).index(), + deg; + + switch (index) { + case 0: + uploader.removeFile(file); + return; + case 1: + file.rotation += 90; + break; + case 2: + file.rotation -= 90; + break; + } + + if (supportTransition) { + deg = 'rotate(' + file.rotation + 'deg)'; + $wrap.css({ + '-webkit-transform': deg, + '-mos-transform': deg, + '-o-transform': deg, + 'transform': deg + }); + } else { + $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); + } + + }); + + $li.insertBefore($filePickerBlock); + } + + // 负责view的销毁 + function removeFile(file) { + var $li = $('#' + file.id); + delete percentages[file.id]; + updateTotalProgress(); + $li.off().find('.file-panel').off().end().remove(); + } + + function updateTotalProgress() { + var loaded = 0, + total = 0, + spans = $progress.children(), + percent; + + $.each(percentages, function (k, v) { + total += v[0]; + loaded += v[0] * v[1]; + }); + + percent = total ? loaded / total : 0; + + spans.eq(0).text(Math.round(percent * 100) + '%'); + spans.eq(1).css('width', Math.round(percent * 100) + '%'); + updateStatus(); + } + + function setState(val, files) { + + if (val != state) { + + var stats = uploader.getStats(); + + $upload.removeClass('state-' + state); + $upload.addClass('state-' + val); + + switch (val) { + + /* 未选择文件 */ + case 'pedding': + $queue.addClass('element-invisible'); + $statusBar.addClass('element-invisible'); + $placeHolder.removeClass('element-invisible'); + $progress.hide(); + $info.hide(); + uploader.refresh(); + break; + + /* 可以开始上传 */ + case 'ready': + $placeHolder.addClass('element-invisible'); + $queue.removeClass('element-invisible'); + $statusBar.removeClass('element-invisible'); + $progress.hide(); + $info.show(); + $upload.text(lang.uploadStart); + uploader.refresh(); + break; + + /* 上传中 */ + case 'uploading': + $progress.show(); + $info.hide(); + $upload.text(lang.uploadPause); + break; + + /* 暂停上传 */ + case 'paused': + $progress.show(); + $info.hide(); + $upload.text(lang.uploadContinue); + break; + + case 'confirm': + $progress.show(); + $info.hide(); + $upload.text(lang.uploadStart); + + stats = uploader.getStats(); + if (stats.successNum && !stats.uploadFailNum) { + setState('finish'); + return; + } + break; + + case 'finish': + $progress.hide(); + $info.show(); + if (stats.uploadFailNum) { + $upload.text(lang.uploadRetry); + } else { + $upload.text(lang.uploadStart); + } + break; + } + + state = val; + updateStatus(); + + } + + if (!_this.getQueueCount()) { + $upload.addClass('disabled') + } else { + $upload.removeClass('disabled') + } + + } + + function updateStatus() { + var text = '', stats; + + if (state === 'ready') { + text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); + } else if (state === 'confirm') { + stats = uploader.getStats(); + if (stats.uploadFailNum) { + text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); + } + } else { + stats = uploader.getStats(); + text = lang.updateStatusFinish.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)).replace('_', stats.successNum); + + if (stats.uploadFailNum) { + text += lang.updateStatusError.replace('_', stats.uploadFailNum); + } + } + + $info.html(text); + } + + uploader.on('fileQueued', function (file) { + fileCount++; + fileSize += file.size; + + if (fileCount === 1) { + $placeHolder.addClass('element-invisible'); + $statusBar.show(); + } + + addFile(file); + }); + + uploader.on('fileDequeued', function (file) { + fileCount--; + fileSize -= file.size; + + removeFile(file); + updateTotalProgress(); + }); + + uploader.on('filesQueued', function (file) { + if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { + setState('ready'); + } + updateTotalProgress(); + }); + + uploader.on('all', function (type, files) { + switch (type) { + case 'uploadFinished': + setState('confirm', files); + break; + case 'startUpload': + /* 添加额外的GET参数 */ + var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', + url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?' : '&') + 'encode=utf-8&' + params); + uploader.option('server', url); + setState('uploading', files); + break; + case 'stopUpload': + setState('paused', files); + break; + } + }); + + uploader.on('uploadBeforeSend', function (file, data, header) { + //这里可以通过data对象添加POST参数 + if (actionUrl.toLowerCase().indexOf('jsp') != -1) { + header['X_Requested_With'] = 'XMLHttpRequest'; + } + }); + + uploader.on('uploadProgress', function (file, percentage) { + var $li = $('#' + file.id), + $percent = $li.find('.progress span'); + + $percent.css('width', percentage * 100 + '%'); + percentages[file.id][1] = percentage; + updateTotalProgress(); + }); + + uploader.on('uploadSuccess', function (file, ret) { + var $file = $('#' + file.id); + try { + var responseText = (ret._raw || ret), + json = utils.str2json(responseText); + if (json.state == 'SUCCESS') { + uploadaudioList.push({ + 'url': json.url, + 'type': json.type, + 'original': json.original + }); + $file.append(''); + } else { + $file.find('.error').text(json.state).show(); + } + } catch (e) { + $file.find('.error').text(lang.errorServerUpload).show(); + } + }); + + uploader.on('uploadError', function (file, code) { + }); + uploader.on('error', function (code, file) { + if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { + addFile(file); + } + }); + uploader.on('uploadComplete', function (file, ret) { + }); + + $upload.on('click', function () { + if ($(this).hasClass('disabled')) { + return false; + } + + if (state === 'ready') { + uploader.upload(); + } else if (state === 'paused') { + uploader.upload(); + } else if (state === 'uploading') { + uploader.stop(); + } + }); + + $upload.addClass('state-' + state); + updateTotalProgress(); + }, + getQueueCount: function () { + var file, i, status, readyFile = 0, files = this.uploader.getFiles(); + for (i = 0; file = files[i++];) { + status = file.getStatus(); + if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; + } + return readyFile; + }, + refresh: function () { + this.uploader.refresh(); + } + }; + +})(); diff --git a/public/static/plugs/ueditor/dialogs/audio/images/bg.png b/public/static/plugs/ueditor/dialogs/audio/images/bg.png new file mode 100644 index 0000000..580be0a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/bg.png differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/center_focus.jpg b/public/static/plugs/ueditor/dialogs/audio/images/center_focus.jpg new file mode 100644 index 0000000..262b029 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/center_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/file-icons.gif b/public/static/plugs/ueditor/dialogs/audio/images/file-icons.gif new file mode 100644 index 0000000..d8c02c2 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/file-icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/file-icons.png b/public/static/plugs/ueditor/dialogs/audio/images/file-icons.png new file mode 100644 index 0000000..3ff82c8 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/file-icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/icons.gif b/public/static/plugs/ueditor/dialogs/audio/images/icons.gif new file mode 100644 index 0000000..78459de Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/icons.png b/public/static/plugs/ueditor/dialogs/audio/images/icons.png new file mode 100644 index 0000000..12e4700 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/image.png b/public/static/plugs/ueditor/dialogs/audio/images/image.png new file mode 100644 index 0000000..19699f6 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/image.png differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/left_focus.jpg b/public/static/plugs/ueditor/dialogs/audio/images/left_focus.jpg new file mode 100644 index 0000000..7886d27 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/left_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/none_focus.jpg b/public/static/plugs/ueditor/dialogs/audio/images/none_focus.jpg new file mode 100644 index 0000000..7c768dc Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/none_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/progress.png b/public/static/plugs/ueditor/dialogs/audio/images/progress.png new file mode 100644 index 0000000..717c486 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/progress.png differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/right_focus.jpg b/public/static/plugs/ueditor/dialogs/audio/images/right_focus.jpg new file mode 100644 index 0000000..173e10d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/right_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/success.gif b/public/static/plugs/ueditor/dialogs/audio/images/success.gif new file mode 100644 index 0000000..8d4f311 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/success.gif differ diff --git a/public/static/plugs/ueditor/dialogs/audio/images/success.png b/public/static/plugs/ueditor/dialogs/audio/images/success.png new file mode 100644 index 0000000..94f968d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/audio/images/success.png differ diff --git a/public/static/plugs/ueditor/dialogs/background/background.css b/public/static/plugs/ueditor/dialogs/background/background.css new file mode 100644 index 0000000..5c41fe9 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/background/background.css @@ -0,0 +1,94 @@ +.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative} +.tabbody{height:225px;} +.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;} +.tabbody .focus { display: block;} + +body{font-size: 12px;color: #888;overflow: hidden;} +input,label{vertical-align:middle} +.clear{clear: both;} +.pl{padding-left: 18px;padding-left: 23px\9;} + +#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;} +#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;} +#imageList img {cursor: pointer;border: 2px solid white;} + +.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;} +.content div{margin: 10px 0 10px 5px;} +.content .iptradio{margin: 0px 5px 5px 0px;} +.txt{width:280px;} + +.wrapcolor{height: 19px;} +div.color{float: left;margin: 0;} +#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;} +div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;} +#custom input{height: 15px;min-height: 15px;width:20px;} +#repeatType{width:100px;} + + +/* 图片管理样式 */ +#imgManager { + width: 100%; + height: 225px; +} +#imgManager #imageList{ + width: 100%; + overflow-x: hidden; + overflow-y: auto; +} +#imgManager ul { + display: block; + list-style: none; + margin: 0; + padding: 0; +} +#imgManager li { + float: left; + display: block; + list-style: none; + padding: 0; + width: 113px; + height: 113px; + margin: 9px 0 0 19px; + background-color: #eee; + overflow: hidden; + cursor: pointer; + position: relative; +} +#imgManager li.clearFloat { + float: none; + clear: both; + display: block; + width:0; + height:0; + margin: 0; + padding: 0; +} +#imgManager li img { + cursor: pointer; +} +#imgManager li .icon { + cursor: pointer; + width: 113px; + height: 113px; + position: absolute; + top: 0; + left: 0; + z-index: 2; + border: 0; + background-repeat: no-repeat; +} +#imgManager li .icon:hover { + width: 107px; + height: 107px; + border: 3px solid #1094fa; +} +#imgManager li.selected .icon { + background-image: url(images/success.png); + background-position: 75px 75px; +} +#imgManager li.selected .icon:hover { + width: 107px; + height: 107px; + border: 3px solid #1094fa; + background-position: 72px 72px; +} \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/background/background.html b/public/static/plugs/ueditor/dialogs/background/background.html new file mode 100644 index 0000000..e31e4d6 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/background/background.html @@ -0,0 +1,52 @@ + + + + + + + + +
              +
              + +
              +
              +
              +
              + +
              +
              + + +
              +
              +
              + : +
              +
              +
              +
              +
              + +
              +
              + : +
              +
              + :x:px  y:px +
              +
              +
              + +
              +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/background/background.js b/public/static/plugs/ueditor/dialogs/background/background.js new file mode 100644 index 0000000..4914158 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/background/background.js @@ -0,0 +1,369 @@ +(function () { + + var onlineImage, + backupStyle = editor.queryCommandValue('background'); + + window.onload = function () { + initTabs(); + initColorSelector(); + }; + + /* 初始化tab标签 */ + function initTabs(){ + var tabs = $G('tabHeads').children; + for (var i = 0; i < tabs.length; i++) { + domUtils.on(tabs[i], "click", function (e) { + var target = e.target || e.srcElement; + for (var j = 0; j < tabs.length; j++) { + if(tabs[j] == target){ + tabs[j].className = "focus"; + var contentId = tabs[j].getAttribute('data-content-id'); + $G(contentId).style.display = "block"; + }else { + tabs[j].className = ""; + $G(tabs[j].getAttribute('data-content-id')).style.display = "none"; + } + } + }); + } + } + + /* 初始化颜色设置 */ + function initColorSelector () { + var obj = editor.queryCommandValue('background'); + if (obj) { + var color = obj['background-color'], + repeat = obj['background-repeat'] || 'repeat', + image = obj['background-image'] || '', + position = obj['background-position'] || 'center center', + pos = position.split(' '), + x = parseInt(pos[0]) || 0, + y = parseInt(pos[1]) || 0; + + if(repeat == 'no-repeat' && (x || y)) repeat = 'self'; + + image = image.match(/url[\s]*\(([^\)]*)\)/); + image = image ? image[1]:''; + updateFormState('colored', color, image, repeat, x, y); + } else { + updateFormState(); + } + + var updateHandler = function () { + updateFormState(); + updateBackground(); + } + domUtils.on($G('nocolorRadio'), 'click', updateBackground); + domUtils.on($G('coloredRadio'), 'click', updateHandler); + domUtils.on($G('url'), 'keyup', function(){ + if($G('url').value && $G('alignment').style.display == "none") { + utils.each($G('repeatType').children, function(item){ + item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false); + }); + } + updateHandler(); + }); + domUtils.on($G('repeatType'), 'change', updateHandler); + domUtils.on($G('x'), 'keyup', updateBackground); + domUtils.on($G('y'), 'keyup', updateBackground); + + initColorPicker(); + } + + /* 初始化颜色选择器 */ + function initColorPicker() { + var me = editor, + cp = $G("colorPicker"); + + /* 生成颜色选择器ui对象 */ + var popup = new UE.ui.Popup({ + content: new UE.ui.ColorPicker({ + noColorText: me.getLang("clearColor"), + editor: me, + onpickcolor: function (t, color) { + updateFormState('colored', color); + updateBackground(); + UE.ui.Popup.postHide(); + }, + onpicknocolor: function (t, color) { + updateFormState('colored', 'transparent'); + updateBackground(); + UE.ui.Popup.postHide(); + } + }), + editor: me, + onhide: function () { + } + }); + + /* 设置颜色选择器 */ + domUtils.on(cp, "click", function () { + popup.showAnchor(this); + }); + domUtils.on(document, 'mousedown', function (evt) { + var el = evt.target || evt.srcElement; + UE.ui.Popup.postHide(el); + }); + domUtils.on(window, 'scroll', function () { + UE.ui.Popup.postHide(); + }); + } + + /* 更新背景色设置面板 */ + function updateFormState (radio, color, url, align, x, y) { + var nocolorRadio = $G('nocolorRadio'), + coloredRadio = $G('coloredRadio'); + + if(radio) { + nocolorRadio.checked = (radio == 'colored' ? false:'checked'); + coloredRadio.checked = (radio == 'colored' ? 'checked':false); + } + if(color) { + domUtils.setStyle($G("colorPicker"), "background-color", color); + } + + if(url && /^\//.test(url)) { + var a = document.createElement('a'); + a.href = url; + browser.ie && (a.href = a.href); + url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash); + } + + if(url || url === '') { + $G('url').value = url; + } + if(align) { + utils.each($G('repeatType').children, function(item){ + item.selected = (align == item.getAttribute('value') ? 'selected':false); + }); + } + if(x || y) { + $G('x').value = parseInt(x) || 0; + $G('y').value = parseInt(y) || 0; + } + + $G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none'; + $G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none'; + } + + /* 更新背景颜色 */ + function updateBackground () { + if ($G('coloredRadio').checked) { + var color = domUtils.getStyle($G("colorPicker"), "background-color"), + bgimg = $G("url").value, + align = $G("repeatType").value, + backgroundObj = { + "background-repeat": "no-repeat", + "background-position": "center center" + }; + + if (color) backgroundObj["background-color"] = color; + if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')'; + if (align == 'self') { + backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px"; + } else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') { + backgroundObj["background-repeat"] = align; + } + + editor.execCommand('background', backgroundObj); + } else { + editor.execCommand('background', null); + } + } + + + /* 在线图片 */ + function OnlineImage(target) { + this.container = utils.isString(target) ? document.getElementById(target) : target; + this.init(); + } + OnlineImage.prototype = { + init: function () { + this.reset(); + this.initEvents(); + }, + /* 初始化容器 */ + initContainer: function () { + this.container.innerHTML = ''; + this.list = document.createElement('ul'); + this.clearFloat = document.createElement('li'); + + domUtils.addClass(this.list, 'list'); + domUtils.addClass(this.clearFloat, 'clearFloat'); + + this.list.id = 'imageListUl'; + this.list.appendChild(this.clearFloat); + this.container.appendChild(this.list); + }, + /* 初始化滚动事件,滚动到地步自动拉取数据 */ + initEvents: function () { + var _this = this; + + /* 滚动拉取图片 */ + domUtils.on($G('imageList'), 'scroll', function(e){ + var panel = this; + if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) { + _this.getImageData(); + } + }); + /* 选中图片 */ + domUtils.on(this.container, 'click', function (e) { + var target = e.target || e.srcElement, + li = target.parentNode, + nodes = $G('imageListUl').childNodes; + + if (li.tagName.toLowerCase() == 'li') { + updateFormState('nocolor', null, ''); + for (var i = 0, node; node = nodes[i++];) { + if (node == li && !domUtils.hasClass(node, 'selected')) { + domUtils.addClass(node, 'selected'); + updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat'); + } else { + domUtils.removeClasses(node, 'selected'); + } + } + updateBackground(); + } + }); + }, + /* 初始化第一次的数据 */ + initData: function () { + + /* 拉取数据需要使用的值 */ + this.state = 0; + this.listSize = editor.getOpt('imageManagerListSize'); + this.listIndex = 0; + this.listEnd = false; + + /* 第一次拉取数据 */ + this.getImageData(); + }, + /* 重置界面 */ + reset: function() { + this.initContainer(); + this.initData(); + }, + /* 向后台拉取图片列表数据 */ + getImageData: function () { + var _this = this; + + if(!_this.listEnd && !this.isLoadingData) { + this.isLoadingData = true; + var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')), + isJsonp = utils.isCrossDomainUrl(url); + ajax.request(url, { + 'timeout': 100000, + 'dataType': isJsonp ? 'jsonp':'', + 'data': utils.extend({ + start: this.listIndex, + size: this.listSize + }, editor.queryCommandValue('serverparam')), + 'headers': editor.options.serverHeaders || {}, + 'method': 'get', + 'onsuccess': function (r) { + try { + var json = isJsonp ? r:eval('(' + r.responseText + ')'); + if (json.state == 'SUCCESS') { + _this.pushData(json.list); + _this.listIndex = parseInt(json.start) + parseInt(json.list.length); + if(_this.listIndex >= json.total) { + _this.listEnd = true; + } + _this.isLoadingData = false; + } + } catch (e) { + if(r.responseText.indexOf('ue_separate_ue') != -1) { + var list = r.responseText.split(r.responseText); + _this.pushData(list); + _this.listIndex = parseInt(list.length); + _this.listEnd = true; + _this.isLoadingData = false; + } + } + }, + 'onerror': function () { + _this.isLoadingData = false; + } + }); + } + }, + /* 添加图片到列表界面上 */ + pushData: function (list) { + var i, item, img, icon, _this = this, + urlPrefix = editor.getOpt('imageManagerUrlPrefix'); + for (i = 0; i < list.length; i++) { + if(list[i] && list[i].url) { + item = document.createElement('li'); + img = document.createElement('img'); + icon = document.createElement('span'); + + domUtils.on(img, 'load', (function(image){ + return function(){ + _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight); + } + })(img)); + img.width = 113; + img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); + img.setAttribute('_src', urlPrefix + list[i].url); + domUtils.addClass(icon, 'icon'); + + item.appendChild(img); + item.appendChild(icon); + this.list.insertBefore(item, this.clearFloat); + } + } + }, + /* 改变图片大小 */ + scale: function (img, w, h, type) { + var ow = img.width, + oh = img.height; + + if (type == 'justify') { + if (ow >= oh) { + img.width = w; + img.height = h * oh / ow; + img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; + } else { + img.width = w * ow / oh; + img.height = h; + img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; + } + } else { + if (ow >= oh) { + img.width = w * ow / oh; + img.height = h; + img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; + } else { + img.width = w; + img.height = h * oh / ow; + img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; + } + } + }, + getInsertList: function () { + var i, lis = this.list.children, list = [], align = getAlign(); + for (i = 0; i < lis.length; i++) { + if (domUtils.hasClass(lis[i], 'selected')) { + var img = lis[i].firstChild, + src = img.getAttribute('_src'); + list.push({ + src: src, + _src: src, + floatStyle: align + }); + } + + } + return list; + } + }; + + dialog.onok = function () { + updateBackground(); + editor.fireEvent('saveScene'); + }; + dialog.oncancel = function () { + editor.execCommand('background', backupStyle); + }; + +})(); diff --git a/public/static/plugs/ueditor/dialogs/background/images/bg.png b/public/static/plugs/ueditor/dialogs/background/images/bg.png new file mode 100644 index 0000000..580be0a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/background/images/bg.png differ diff --git a/public/static/plugs/ueditor/dialogs/background/images/success.png b/public/static/plugs/ueditor/dialogs/background/images/success.png new file mode 100644 index 0000000..94f968d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/background/images/success.png differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/emotion.css b/public/static/plugs/ueditor/dialogs/emotion/emotion.css new file mode 100644 index 0000000..f801105 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/emotion/emotion.css @@ -0,0 +1,43 @@ +.jd img{ + background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:35px;height:35px;display:block; +} +.pp img{ + background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:25px;height:25px;display:block; +} +.ldw img{ + background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:35px;height:35px;display:block; +} +.tsj img{ + background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:35px;height:35px;display:block; +} +.cat img{ + background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:35px;height:35px;display:block; +} +.bb img{ + background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:35px;height:35px;display:block; +} +.youa img{ + background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top; + cursor:pointer;width:35px;height:35px;display:block; +} + +.smileytable td {height: 37px;} +#tabPanel{margin-left:5px;overflow: hidden;} +#tabContent {float:left;background:#FFFFFF;} +#tabContent div{display: none;width:480px;overflow:hidden;} +#tabIconReview.show{left:17px;display:block;} +.menuFocus{background:#ACCD3C;} +.menuDefault{background:#FFFFFF;} +#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;} +img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;} + +.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;} +.tabbody table{width: 100%;} +.tabbody td{border:1px solid #BAC498;} +.tabbody td span{display: block;zoom:1;padding:0 4px;} \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/emotion/emotion.html b/public/static/plugs/ueditor/dialogs/emotion/emotion.html new file mode 100644 index 0000000..a33b8f3 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/emotion/emotion.html @@ -0,0 +1,54 @@ + + + + + + + + + + +
              +
              + + + + + + + +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              + +
              + + + + diff --git a/public/static/plugs/ueditor/dialogs/emotion/emotion.js b/public/static/plugs/ueditor/dialogs/emotion/emotion.js new file mode 100644 index 0000000..6e158a9 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/emotion/emotion.js @@ -0,0 +1,186 @@ +window.onload = function () { + editor.setOpt({ + emotionLocalization:false + }); + + emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/"; + emotion.SmileyBox = createTabList( emotion.tabNum ); + emotion.tabExist = createArr( emotion.tabNum ); + + initImgName(); + initEvtHandler( "tabHeads" ); +}; + +function initImgName() { + for ( var pro in emotion.SmilmgName ) { + var tempName = emotion.SmilmgName[pro], + tempBox = emotion.SmileyBox[pro], + tempStr = ""; + + if ( tempBox.length ) return; + for ( var i = 1; i <= tempName[1]; i++ ) { + tempStr = tempName[0]; + if ( i < 10 ) tempStr = tempStr + '0'; + tempStr = tempStr + i + '.gif'; + tempBox.push( tempStr ); + } + } +} + +function initEvtHandler( conId ) { + var tabHeads = $G( conId ); + for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) { + var tabObj = tabHeads.childNodes[i]; + if ( tabObj.nodeType == 1 ) { + domUtils.on( tabObj, "click", (function ( index ) { + return function () { + switchTab( index ); + }; + })( j ) ); + j++; + } + } + switchTab( 0 ); + $G( "tabIconReview" ).style.display = 'none'; +} + +function InsertSmiley( url, evt ) { + var obj = { + src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url + }; + obj._src = obj.src; + editor.execCommand( 'insertimage', obj ); + if ( !evt.ctrlKey ) { + dialog.popup.hide(); + } +} + +function switchTab( index ) { + + autoHeight( index ); + if ( emotion.tabExist[index] == 0 ) { + emotion.tabExist[index] = 1; + createTab( 'tab' + index ); + } + //获取呈现元素句柄数组 + var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ), + tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ), + i = 0, L = tabHeads.length; + //隐藏所有呈现元素 + for ( ; i < L; i++ ) { + tabHeads[i].className = ""; + tabBodys[i].style.display = "none"; + } + //显示对应呈现元素 + tabHeads[index].className = "focus"; + tabBodys[index].style.display = "block"; +} + +function autoHeight( index ) { + var iframe = dialog.getDom( "iframe" ), + parent = iframe.parentNode.parentNode; + switch ( index ) { + case 0: + iframe.style.height = "380px"; + parent.style.height = "392px"; + break; + case 1: + iframe.style.height = "220px"; + parent.style.height = "232px"; + break; + case 2: + iframe.style.height = "260px"; + parent.style.height = "272px"; + break; + case 3: + iframe.style.height = "300px"; + parent.style.height = "312px"; + break; + case 4: + iframe.style.height = "140px"; + parent.style.height = "152px"; + break; + case 5: + iframe.style.height = "260px"; + parent.style.height = "272px"; + break; + case 6: + iframe.style.height = "230px"; + parent.style.height = "242px"; + break; + default: + + } +} + + +function createTab( tabName ) { + var faceVersion = "?v=1.1", //版本号 + tab = $G( tabName ), //获取将要生成的Div句柄 + imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径 + positionLine = 11 / 2, //中间数 + iWidth = iHeight = 35, //图片长宽 + iColWidth = 3, //表格剩余空间的显示比例 + tableCss = emotion.imageCss[tabName], + cssOffset = emotion.imageCssOffset[tabName], + textHTML = [''], + i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage, + sUrl, realUrl, posflag, offset, infor; + + for ( ; i < imgNum; ) { + textHTML.push( '' ); + for ( var j = 0; j < imgColNum; j++, i++ ) { + faceImage = emotion.SmileyBox[tabName][i]; + if ( faceImage ) { + sUrl = imagePath + faceImage + faceVersion; + realUrl = imagePath + faceImage; + posflag = j < positionLine ? 0 : 1; + offset = cssOffset * i * (-1) - 1; + infor = emotion.SmileyInfor[tabName][i]; + + textHTML.push( '' ); + } + textHTML.push( '' ); + } + textHTML.push( '
              ' ); + textHTML.push( '' ); + textHTML.push( '' ); + textHTML.push( '' ); + } else { + textHTML.push( '' ); + } + textHTML.push( '
              ' ); + textHTML = textHTML.join( "" ); + tab.innerHTML = textHTML; +} + +function over( td, srcPath, posFlag ) { + td.style.backgroundColor = "#ACCD3C"; + $G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")"; + if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show"; + $G( "tabIconReview" ).style.display = 'block'; +} + +function out( td ) { + td.style.backgroundColor = "transparent"; + var tabIconRevew = $G( "tabIconReview" ); + tabIconRevew.className = ""; + tabIconRevew.style.display = 'none'; +} + +function createTabList( tabNum ) { + var obj = {}; + for ( var i = 0; i < tabNum; i++ ) { + obj["tab" + i] = []; + } + return obj; +} + +function createArr( tabNum ) { + var arr = []; + for ( var i = 0; i < tabNum; i++ ) { + arr[i] = 0; + } + return arr; +} + diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/0.gif b/public/static/plugs/ueditor/dialogs/emotion/images/0.gif new file mode 100644 index 0000000..6964168 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/0.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/bface.gif b/public/static/plugs/ueditor/dialogs/emotion/images/bface.gif new file mode 100644 index 0000000..14fe618 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/bface.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/cface.gif b/public/static/plugs/ueditor/dialogs/emotion/images/cface.gif new file mode 100644 index 0000000..bff947f Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/cface.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/fface.gif b/public/static/plugs/ueditor/dialogs/emotion/images/fface.gif new file mode 100644 index 0000000..0d8a6af Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/fface.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/jxface2.gif b/public/static/plugs/ueditor/dialogs/emotion/images/jxface2.gif new file mode 100644 index 0000000..a959c90 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/jxface2.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/neweditor-tab-bg.png b/public/static/plugs/ueditor/dialogs/emotion/images/neweditor-tab-bg.png new file mode 100644 index 0000000..8f398b0 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/neweditor-tab-bg.png differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/tface.gif b/public/static/plugs/ueditor/dialogs/emotion/images/tface.gif new file mode 100644 index 0000000..1354f54 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/tface.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/wface.gif b/public/static/plugs/ueditor/dialogs/emotion/images/wface.gif new file mode 100644 index 0000000..5667160 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/wface.gif differ diff --git a/public/static/plugs/ueditor/dialogs/emotion/images/yface.gif b/public/static/plugs/ueditor/dialogs/emotion/images/yface.gif new file mode 100644 index 0000000..51608be Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/emotion/images/yface.gif differ diff --git a/public/static/plugs/ueditor/dialogs/formula/formula.html b/public/static/plugs/ueditor/dialogs/formula/formula.html new file mode 100644 index 0000000..8eeff98 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/formula/formula.html @@ -0,0 +1,98 @@ + + + + + + + + + +
              + + + + + +
              + + + + + + diff --git a/public/static/plugs/ueditor/dialogs/formula/formula.js b/public/static/plugs/ueditor/dialogs/formula/formula.js new file mode 100644 index 0000000..6a2b40b --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/formula/formula.js @@ -0,0 +1,147 @@ +function preg_quote(str, delimiter) { + // Quote regular expression characters plus an optional character + // + // version: 1107.2516 + // discuss at: http://phpjs.org/functions/preg_quote + // + original by: booeyOH + // + improved by: Ates Goral (http://magnetiq.com) + // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // + bugfixed by: Onno Marsman + // + improved by: Brett Zamir (http://brett-zamir.me) + // * example 1: preg_quote("$40"); + // * returns 1: '\$40' + // * example 2: preg_quote("*RRRING* Hello?"); + // * returns 2: '\*RRRING\* Hello\?' + // * example 3: preg_quote("\\.+*?[^]$(){}=!<>|:"); + // * returns 3: '\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:' + return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&'); +} + +function loadScript(url, cb) { + var script; + script = document.createElement('script'); + script.src = url; + script.onload = function(){ + cb && cb({isNew: true}) + }; + document.getElementsByTagName('head')[0].appendChild(script); +} + +var Formula = { + mode: 'plain', + latexeasy: null, + init: function () { + // console.log('Formula.init') + Formula.initMode(); + Formula.initEvent(); + Formula.initSubmit(); + }, + renderPlain: function () { + var $preview = $('#preview'); + var value = $('#editor').val(); + if (!value) { + $preview.hide(); + return; + } + value = encodeURIComponent(value); + var formulaConfig = editor.getOpt('formulaConfig'); + var src = formulaConfig.imageUrlTemplate.replace(/\{\}/, value); + $('#previewImage').attr('src', src); + $preview.show(); + }, + setValuePlain: function (value) { + $('#editor').val(value); + Formula.renderPlain(); + }, + setValueLive: function (value) { + if (!Formula.latexeasy) { + setTimeout(function () { + Formula.setValueLive(value); + }, 100); + return; + } + Formula.latexeasy.call('set.latex', {latex: value}); + }, + initMode: function () { + var formulaConfig = editor.getOpt('formulaConfig'); + if ('live' === formulaConfig.editorMode) { + $('#liveEditor').attr('src', formulaConfig.editorLiveServer+'/editor'); + $('#modeLive').show(); + Formula.mode = 'live'; + } else { + $('#modePlain').show(); + Formula.mode = 'plain'; + } + var img = editor.selection.getRange().getClosedNode(); + if (img && img.getAttribute('data-formula-image') !== null) { + var value = img.getAttribute('data-formula-image'); + if (value) { + Formula.setValue(decodeURIComponent(value)); + } + } + }, + setValue: function (value) { + switch (Formula.mode) { + case 'plain': + Formula.setValuePlain(value); + break; + case 'live': + Formula.setValueLive(value); + break; + } + }, + getValue: function (cb) { + switch (Formula.mode) { + case 'plain': + cb($.trim($('#editor').val())); + break; + case 'live': + Formula.latexeasy.call('get.latex', {}, function (data) { + cb(data.latex); + }); + break; + } + }, + initEvent: function () { + var changeTimer = null, le; + switch (Formula.mode) { + case 'plain': + // console.log('Formula.initEvent'); + $('#editor').on('change keypress', function () { + changeTimer && clearTimeout(changeTimer); + changeTimer = setTimeout(function () { + Formula.renderPlain(); + }, 1000); + }); + $('#inputDemo').on('click', function () { + $('#editor').val('f(a) = \\frac{1}{2\\pi i} \\oint\\frac{f(z)}{z-a}dz'); + Formula.renderPlain(); + }); + break; + case 'live': + var formulaConfig = editor.getOpt('formulaConfig'); + loadScript(formulaConfig.editorLiveServer+'/vendor/LatexEasyEditor/editor/sdk.js',function(){ + le = new window.LatexEasy(document.getElementById('liveEditor')); + le.on('ready', function () { + Formula.latexeasy = le; + }); + le.init(); + }); + break; + } + }, + initSubmit: function () { + dialog.onclose = function (t, ok) { + if (!ok) { + return true; + } + // console.log('onclose', t, ok); + Formula.getValue(function (value) { + editor.execCommand('formula', value); + editor.fireEvent('saveScene'); + dialog.close(false); + }); + return false; + }; + } +}; diff --git a/public/static/plugs/ueditor/dialogs/help/help.css b/public/static/plugs/ueditor/dialogs/help/help.css new file mode 100644 index 0000000..4478475 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/help/help.css @@ -0,0 +1,7 @@ +.wrapper{width: 370px;margin: 10px auto;zoom: 1;} +.tabbody{height: 360px;} +.tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;} +.tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;} +.tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;} +.tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;} +.tabbody table thead{font-weight: bold;line-height: 25px;} \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/help/help.html b/public/static/plugs/ueditor/dialogs/help/help.html new file mode 100644 index 0000000..2fffafd --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/help/help.html @@ -0,0 +1,82 @@ + + + + 帮助 + + + + + +
              +
              + + +
              +
              +
              +

              UEditor Plus

              +

              +

              +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              ctrl+b
              ctrl+c
              ctrl+x
              ctrl+v
              ctrl+y
              ctrl+z
              ctrl+i
              ctrl+u
              ctrl+a
              shift+enter
              alt+z
              +
              +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/help/help.js b/public/static/plugs/ueditor/dialogs/help/help.js new file mode 100644 index 0000000..9a2272e --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/help/help.js @@ -0,0 +1,56 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-9-26 + * Time: 下午1:06 + * To change this template use File | Settings | File Templates. + */ +/** + * tab点击处理事件 + * @param tabHeads + * @param tabBodys + * @param obj + */ +function clickHandler( tabHeads,tabBodys,obj ) { + //head样式更改 + for ( var k = 0, len = tabHeads.length; k < len; k++ ) { + tabHeads[k].className = ""; + } + obj.className = "focus"; + //body显隐 + var tabSrc = obj.getAttribute( "tabSrc" ); + for ( var j = 0, length = tabBodys.length; j < length; j++ ) { + var body = tabBodys[j], + id = body.getAttribute( "id" ); + body.onclick = function(){ + this.style.zoom = 1; + }; + if ( id != tabSrc ) { + body.style.zIndex = 1; + } else { + body.style.zIndex = 200; + } + } + +} + +/** + * TAB切换 + * @param tabParentId tab的父节点ID或者对象本身 + */ +function switchTab( tabParentId ) { + var tabElements = $G( tabParentId ).children, + tabHeads = tabElements[0].children, + tabBodys = tabElements[1].children; + + for ( var i = 0, length = tabHeads.length; i < length; i++ ) { + var head = tabHeads[i]; + if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head ); + head.onclick = function () { + clickHandler(tabHeads,tabBodys,this); + } + } +} +switchTab("helptab"); + +document.getElementById('version').innerHTML = parent.UE.version; \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/image/image.css b/public/static/plugs/ueditor/dialogs/image/image.css new file mode 100644 index 0000000..d494fec --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/image/image.css @@ -0,0 +1,718 @@ +@charset "utf-8"; +/* dialog样式 */ +.wrapper { + zoom: 1; + width: 630px; + *width: 626px; + height: 380px; + margin: 0 auto; + padding: 10px; + position: relative; + font-family: sans-serif; +} + +/*tab样式框大小*/ +.tabhead { + float:left; +} +.tabbody { + width: 100%; + height: 346px; + position: relative; + clear: both; +} + +.tabbody .panel { + position: absolute; + width: 0; + height: 0; + background: #fff; + overflow: hidden; + display: none; +} + +.tabbody .panel.focus { + width: 100%; + height: 346px; + display: block; +} + +/* 图片对齐方式 */ +.alignBar{ + float:right; + margin-top: 5px; + position: relative; +} + +.alignBar .algnLabel{ + float:left; + height: 20px; + line-height: 20px; +} + +.alignBar #alignIcon{ + zoom:1; + _display: inline; + display: inline-block; + position: relative; +} +.alignBar #alignIcon span{ + float: left; + cursor: pointer; + display: block; + width: 19px; + height: 17px; + margin-right: 3px; + margin-left: 3px; + background-image: url(./images/alignicon.jpg); +} +.alignBar #alignIcon .none-align{ + background-position: 0 -18px; +} +.alignBar #alignIcon .left-align{ + background-position: -20px -18px; +} +.alignBar #alignIcon .right-align{ + background-position: -40px -18px; +} +.alignBar #alignIcon .center-align{ + background-position: -60px -18px; +} +.alignBar #alignIcon .none-align.focus{ + background-position: 0 0; +} +.alignBar #alignIcon .left-align.focus{ + background-position: -20px 0; +} +.alignBar #alignIcon .right-align.focus{ + background-position: -40px 0; +} +.alignBar #alignIcon .center-align.focus{ + background-position: -60px 0; +} + + + + +/* 远程图片样式 */ +#remote { + z-index: 200; +} + +#remote .top{ + width: 100%; + margin-top: 25px; +} +#remote .left{ + display: block; + float: left; + width: 300px; + height:10px; +} +#remote .right{ + display: block; + float: right; + width: 300px; + height:10px; +} +#remote .row{ + margin-left: 20px; + clear: both; + height: 40px; +} + +#remote .row label{ + text-align: center; + width: 50px; + zoom:1; + _display: inline; + display:inline-block; + vertical-align: middle; +} +#remote .row label.algnLabel{ + float: left; + +} + +#remote input.text{ + width: 150px; + padding: 3px 6px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +#remote input.text:focus { + outline: 0; +} +#remote #url{ + width: 400px; + margin-bottom: 2px; +} +#remote #imageSelect{ + width: 100px; + display: inline-block; + background: #FFF; + border: 1px solid #EEE; + line-height: 26px; + text-align: center; + color: #333; + text-decoration: none; + border-radius: 3px; + vertical-align: top; +} +#remote #width, +#remote #height{ + width: 30px; + margin-left: 2px; + margin-right: 2px; + text-align:center; +} +#remote #border, +#remote #vhSpace, +#remote #title{ + width: 180px; + margin-right: 5px; +} +#remote #lock{ + display:inline-block; + vertical-align: middle; +} +#remote #lockicon{ + zoom: 1; + _display:inline; + display: inline-block; + width: 20px; + height: 20px; + background: url("../../themes/default/images/lock.gif") -13px -13px no-repeat; + vertical-align: middle; +} +#remote #preview{ + clear: both; + width: 260px; + height: 240px; + z-index: 9999; + margin-top: 10px; + background-color: #eee; + overflow: hidden; +} + +/* 上传图片 */ +.tabbody #upload.panel { + width: 0; + height: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); + background: #fff; + display: block; +} + +.tabbody #upload.panel.focus { + width: 100%; + height: 346px; + display: block; + clip: auto; +} + +#upload .queueList { + margin: 0; + width: 100%; + height: 100%; + position: absolute; + overflow: hidden; +} + +#upload p { + margin: 0; +} + +.element-invisible { + width: 0 !important; + height: 0 !important; + border: 0; + padding: 0; + margin: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); +} + +#upload .placeholder { + margin: 10px; + border: 2px dashed #e6e6e6; + *border: 0px dashed #e6e6e6; + height: 172px; + padding-top: 150px; + text-align: center; + background: url(./images/image.png) center 70px no-repeat; + color: #cccccc; + font-size: 18px; + position: relative; + top:0; + *top: 10px; +} + +#upload .placeholder .webuploader-pick { + font-size: 18px; + background: #00b7ee; + border-radius: 3px; + line-height: 44px; + padding: 0 30px; + *width: 120px; + color: #fff; + display: inline-block; + margin: 0 auto 20px auto; + cursor: pointer; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); +} + +#upload .placeholder .webuploader-pick-hover { + background: #00a2d4; +} + + +#filePickerContainer { + text-align: center; +} + +#upload .placeholder .flashTip { + color: #666666; + font-size: 12px; + position: absolute; + width: 100%; + text-align: center; + bottom: 20px; +} + +#upload .placeholder .flashTip a { + color: #0785d1; + text-decoration: none; +} + +#upload .placeholder .flashTip a:hover { + text-decoration: underline; +} + +#upload .placeholder.webuploader-dnd-over { + border-color: #999999; +} + +#upload .filelist { + list-style: none; + margin: 0; + padding: 0; + overflow-x: hidden; + overflow-y: auto; + position: relative; + height: 300px; +} + +#upload .filelist:after { + content: ''; + display: block; + width: 0; + height: 0; + overflow: hidden; + clear: both; + position: relative; +} + +#upload .filelist li { + width: 113px; + height: 113px; + background: url(./images/bg.png); + text-align: center; + margin: 9px 0 0 9px; + *margin: 6px 0 0 6px; + position: relative; + display: block; + float: left; + overflow: hidden; + font-size: 12px; +} + +#upload .filelist li p.log { + position: relative; + top: -45px; +} + +#upload .filelist li p.title { + position: absolute; + top: 0; + left: 0; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 5px; + text-indent: 5px; + text-align: left; +} + +#upload .filelist li p.progress { + position: absolute; + width: 100%; + bottom: 0; + left: 0; + height: 8px; + overflow: hidden; + z-index: 50; + margin: 0; + border-radius: 0; + background: none; + -webkit-box-shadow: 0 0 0; +} + +#upload .filelist li p.progress span { + display: none; + overflow: hidden; + width: 0; + height: 100%; + background: #1483d8 url(./images/progress.png) repeat-x; + + -webit-transition: width 200ms linear; + -moz-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; + transition: width 200ms linear; + + -webkit-animation: progressmove 2s linear infinite; + -moz-animation: progressmove 2s linear infinite; + -o-animation: progressmove 2s linear infinite; + -ms-animation: progressmove 2s linear infinite; + animation: progressmove 2s linear infinite; + + -webkit-transform: translateZ(0); +} + +@-webkit-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@-moz-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +#upload .filelist li p.imgWrap { + position: relative; + z-index: 2; + line-height: 113px; + vertical-align: middle; + overflow: hidden; + width: 113px; + height: 113px; + + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + + -webit-transition: 200ms ease-out; + -moz-transition: 200ms ease-out; + -o-transition: 200ms ease-out; + -ms-transition: 200ms ease-out; + transition: 200ms ease-out; +} + +#upload .filelist li img { + width: 100%; +} + +#upload .filelist li p.error { + background: #f43838; + color: #fff; + position: absolute; + bottom: 0; + left: 0; + height: 28px; + line-height: 28px; + width: 100%; + z-index: 100; + display:none; +} + +#upload .filelist li .success { + display: block; + position: absolute; + left: 0; + bottom: 0; + height: 40px; + width: 100%; + z-index: 200; + background: url(./images/success.png) no-repeat right bottom; + background: url(./images/success.gif) no-repeat right bottom \9; +} + +#upload .filelist li.filePickerBlock { + width: 113px; + height: 113px; + background: url(./images/image.png) no-repeat center 12px; + border: 1px solid #eeeeee; + border-radius: 0; +} +#upload .filelist li.filePickerBlock div.webuploader-pick { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + opacity: 0; + background: none; + font-size: 0; +} + +#upload .filelist div.file-panel { + position: absolute; + height: 0; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; + background: rgba(0, 0, 0, 0.5); + width: 100%; + top: 0; + left: 0; + overflow: hidden; + z-index: 300; +} + +#upload .filelist div.file-panel span { + width: 24px; + height: 24px; + display: inline; + float: right; + text-indent: -9999px; + overflow: hidden; + background: url(./images/icons.png) no-repeat; + background: url(./images/icons.gif) no-repeat \9; + margin: 5px 1px 1px; + cursor: pointer; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#upload .filelist div.file-panel span.rotateLeft { + display:none; + background-position: 0 -24px; +} + +#upload .filelist div.file-panel span.rotateLeft:hover { + background-position: 0 0; +} + +#upload .filelist div.file-panel span.rotateRight { + display:none; + background-position: -24px -24px; +} + +#upload .filelist div.file-panel span.rotateRight:hover { + background-position: -24px 0; +} + +#upload .filelist div.file-panel span.cancel { + background-position: -48px -24px; +} + +#upload .filelist div.file-panel span.cancel:hover { + background-position: -48px 0; +} + +#upload .statusBar { + height: 45px; + border-bottom: 1px solid #dadada; + margin: 0 10px; + padding: 0; + line-height: 45px; + vertical-align: middle; + position: relative; +} + +#upload .statusBar .progress { + border: 1px solid #1483d8; + width: 198px; + background: #fff; + height: 18px; + position: absolute; + top: 12px; + display: none; + text-align: center; + line-height: 18px; + color: #6dbfff; + margin: 0 10px 0 0; +} +#upload .statusBar .progress span.percentage { + width: 0; + height: 100%; + left: 0; + top: 0; + background: #1483d8; + position: absolute; +} +#upload .statusBar .progress span.text { + position: relative; + z-index: 10; +} + +#upload .statusBar .info { + display: inline-block; + font-size: 14px; + color: #666666; +} + +#upload .statusBar .btns { + position: absolute; + top: 7px; + right: 0; + line-height: 30px; +} + +#filePickerBtn { + display: inline-block; + float: left; +} +#upload .statusBar .btns .webuploader-pick, +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-uploading, +#upload .statusBar .btns .uploadBtn.state-paused { + background: #ffffff; + border: 1px solid #cfcfcf; + color: #565656; + padding: 0 18px; + display: inline-block; + border-radius: 3px; + margin-left: 10px; + cursor: pointer; + font-size: 14px; + float: left; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#upload .statusBar .btns .webuploader-pick-hover, +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-uploading:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover { + background: #f0f0f0; +} + +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-paused{ + background: #00b7ee; + color: #fff; + border-color: transparent; +} +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover{ + background: #00a2d4; +} + +#upload .statusBar .btns .uploadBtn.disabled { + pointer-events: none; + filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; +} + + + +/* 图片管理样式 */ +#online { + width: 100%; + height: 336px; + padding: 10px 0 0 0; +} +#online #imageList{ + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + position: relative; +} +#online ul { + display: block; + list-style: none; + margin: 0; + padding: 0; +} +#online li { + float: left; + display: block; + list-style: none; + padding: 0; + width: 113px; + height: 113px; + margin: 0 0 9px 9px; + *margin: 0 0 6px 6px; + background-color: #eee; + overflow: hidden; + cursor: pointer; + position: relative; +} +#online li.clearFloat { + float: none; + clear: both; + display: block; + width:0; + height:0; + margin: 0; + padding: 0; +} +#online li img { + cursor: pointer; +} +#online li .icon { + cursor: pointer; + width: 113px; + height: 113px; + position: absolute; + top: 0; + left: 0; + z-index: 2; + border: 0; + background-repeat: no-repeat; +} +#online li .icon:hover { + width: 107px; + height: 107px; + border: 3px solid #1094fa; +} +#online li.selected .icon { + background-image: url(images/success.png); + background-image: url(images/success.gif)\9; + background-position: 75px 75px; +} +#online li.selected .icon:hover { + width: 107px; + height: 107px; + border: 3px solid #1094fa; + background-position: 72px 72px; +} diff --git a/public/static/plugs/ueditor/dialogs/image/image.html b/public/static/plugs/ueditor/dialogs/image/image.html new file mode 100644 index 0000000..0492e58 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/image/image.html @@ -0,0 +1,119 @@ + + + + + ueditor图片对话框 + + + + + + + + + + + + + + +
              +
              + + + +
              +
              + + + + + + + + +
              +
              + + +
              +
              +
              + + + +
              +
              +
              +
              + +   px +   px + +
              +
              + + px +
              +
              + + px +
              +
              + + +
              +
              +
              +
              + + +
              +
              +
              +
              + 0% + +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
                +
              • +
              +
              +
              + + +
              +
              +
              + + + + +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/image/image.js b/public/static/plugs/ueditor/dialogs/image/image.js new file mode 100644 index 0000000..1119171 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/image/image.js @@ -0,0 +1,1021 @@ +/** + * User: Jinqn + * Date: 14-04-08 + * Time: 下午16:34 + * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片 + */ +(function () { + + var remoteImage, + uploadImage, + onlineImage; + var editorOpt = {}; + + window.onload = function () { + editorOpt = editor.getOpt('imageConfig'); + initTabs(); + initAlign(); + initButtons(); + }; + + /* 初始化tab标签 */ + function initTabs() { + var tabs = $G('tabhead').children; + for (var i = 0; i < tabs.length; i++) { + domUtils.on(tabs[i], "click", function (e) { + var target = e.target || e.srcElement; + setTabFocus(target.getAttribute('data-content-id')); + }); + } + if(!editorOpt.disableUpload){ + $G('tabhead').querySelector('[data-content-id="upload"]').style.display = 'inline-block'; + } + if(!editorOpt.disableOnline){ + $G('tabhead').querySelector('[data-content-id="online"]').style.display = 'inline-block'; + } + if(!!editorOpt.selectCallback){ + $G('imageSelect').style.display = 'inline-block'; + domUtils.on($G('imageSelect'), "click", function (e) { + editorOpt.selectCallback(editor,function(info){ + if(info){ + $G('url').value = info.path; + $G('title').value = info.name; + var img = new Image(); + img.onload = function(){ + $G('width').value = img.width; + $G('height').value = img.height; + remoteImage.setPreview(); + }; + img.onerror = function(){ + remoteImage.setPreview(); + }; + img.src = info.path; + } + }); + }); + } + var img = editor.selection.getRange().getClosedNode(); + if (img && img.tagName && img.tagName.toLowerCase() == 'img') { + setTabFocus('remote'); + } else { + setTabFocus('remote'); + } + } + + /* 初始化tabbody */ + function setTabFocus(id) { + if(!id) return; + var i, bodyId, tabs = $G('tabhead').children; + for (i = 0; i < tabs.length; i++) { + bodyId = tabs[i].getAttribute('data-content-id'); + if (bodyId == id) { + domUtils.addClass(tabs[i], 'focus'); + domUtils.addClass($G(bodyId), 'focus'); + } else { + domUtils.removeClasses(tabs[i], 'focus'); + domUtils.removeClasses($G(bodyId), 'focus'); + } + } + switch (id) { + case 'remote': + remoteImage = remoteImage || new RemoteImage(); + break; + case 'upload': + setAlign(editor.getOpt('imageInsertAlign')); + uploadImage = uploadImage || new UploadImage('queueList'); + break; + case 'online': + setAlign(editor.getOpt('imageManagerInsertAlign')); + onlineImage = onlineImage || new OnlineImage('imageList'); + onlineImage.reset(); + break; + } + } + + /* 初始化onok事件 */ + function initButtons() { + + dialog.onok = function () { + var remote = false, list = [], id, tabs = $G('tabhead').children; + for (var i = 0; i < tabs.length; i++) { + if (domUtils.hasClass(tabs[i], 'focus')) { + id = tabs[i].getAttribute('data-content-id'); + break; + } + } + + switch (id) { + case 'remote': + list = remoteImage.getInsertList(); + break; + case 'upload': + list = uploadImage.getInsertList(); + var count = uploadImage.getQueueCount(); + if (count) { + $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); + return false; + } + break; + case 'online': + list = onlineImage.getInsertList(); + break; + } + + if(list) { + editor.execCommand('insertimage', list); + remote && editor.fireEvent("catchRemoteImage"); + } + }; + } + + + /* 初始化对其方式的点击事件 */ + function initAlign(){ + /* 点击align图标 */ + domUtils.on($G("alignIcon"), 'click', function(e){ + var target = e.target || e.srcElement; + if(target.className && target.className.indexOf('-align') != -1) { + setAlign(target.getAttribute('data-align')); + } + }); + } + + /* 设置对齐方式 */ + function setAlign(align){ + align = align || 'none'; + var aligns = $G("alignIcon").children; + for(i = 0; i < aligns.length; i++){ + if(aligns[i].getAttribute('data-align') == align) { + domUtils.addClass(aligns[i], 'focus'); + $G("align").value = aligns[i].getAttribute('data-align'); + } else { + domUtils.removeClasses(aligns[i], 'focus'); + } + } + } + /* 获取对齐方式 */ + function getAlign(){ + var align = $G("align").value || 'none'; + return align == 'none' ? '':align; + } + + + /* 在线图片 */ + function RemoteImage(target) { + this.container = utils.isString(target) ? document.getElementById(target) : target; + this.init(); + } + RemoteImage.prototype = { + init: function () { + this.initContainer(); + this.initEvents(); + }, + initContainer: function () { + this.dom = { + 'url': $G('url'), + 'width': $G('width'), + 'height': $G('height'), + 'border': $G('border'), + 'vhSpace': $G('vhSpace'), + 'title': $G('title'), + 'align': $G('align') + }; + var img = editor.selection.getRange().getClosedNode(); + if (img) { + this.setImage(img); + } + }, + initEvents: function () { + var _this = this, + locker = $G('lock'); + + /* 改变url */ + domUtils.on($G("url"), 'keyup', updatePreview); + domUtils.on($G("border"), 'keyup', updatePreview); + domUtils.on($G("title"), 'keyup', updatePreview); + + domUtils.on($G("width"), 'keyup', function(){ + if(locker.checked) { + var proportion =locker.getAttribute('data-proportion'); + $G('height').value = Math.round(this.value / proportion); + } else { + _this.updateLocker(); + } + updatePreview(); + }); + domUtils.on($G("height"), 'keyup', function(){ + if(locker.checked) { + var proportion =locker.getAttribute('data-proportion'); + $G('width').value = Math.round(this.value * proportion); + } else { + _this.updateLocker(); + } + updatePreview(); + }); + domUtils.on($G("lock"), 'change', function(){ + var proportion = parseInt($G("width").value) /parseInt($G("height").value); + locker.setAttribute('data-proportion', proportion); + }); + + function updatePreview(){ + _this.setPreview(); + } + }, + updateLocker: function(){ + var width = $G('width').value, + height = $G('height').value, + locker = $G('lock'); + if(width && height && width == parseInt(width) && height == parseInt(height)) { + locker.disabled = false; + locker.title = ''; + } else { + locker.checked = false; + locker.disabled = 'disabled'; + locker.title = lang.remoteLockError; + } + }, + setImage: function(img){ + /* 不是正常的图片 */ + if (!img.tagName || img.tagName.toLowerCase() != 'img' && !img.getAttribute("src") || !img.src) return; + + var wordImgFlag = img.getAttribute("data-word-image"), + src = wordImgFlag ? wordImgFlag.replace("&", "&") : (img.getAttribute('_src') || img.getAttribute("src", 2).replace("&", "&")), + align = editor.queryCommandValue("imageFloat"); + + /* 防止onchange事件循环调用 */ + if (src !== $G("url").value) $G("url").value = src; + if(src) { + /* 设置表单内容 */ + $G("width").value = img.width || ''; + $G("height").value = img.height || ''; + $G("border").value = img.getAttribute("border") || '0'; + $G("vhSpace").value = img.getAttribute("vspace") || '0'; + $G("title").value = img.title || img.alt || ''; + setAlign(align); + this.setPreview(); + this.updateLocker(); + } + }, + getData: function(){ + var data = {}; + for(var k in this.dom){ + data[k] = this.dom[k].value; + } + return data; + }, + setPreview: function(){ + var url = $G('url').value, + ow = $G('width').value, + oh = $G('height').value, + border = $G('border').value, + title = $G('title').value, + preview = $G('preview'), + width, + height; + + width = ((!ow || !oh) ? preview.offsetWidth:Math.min(ow, preview.offsetWidth)); + width = width+(border*2) > preview.offsetWidth ? width:(preview.offsetWidth - (border*2)); + height = (!ow || !oh) ? '':width*oh/ow; + + if(url) { + preview.innerHTML = ''; + } + }, + getInsertList: function () { + var data = this.getData(); + if(data['url']) { + var img = { + src: data['url'], + _src: data['url'], + } + img._propertyDelete = [] + img.style = [] + if(data['width']){ + img.width = data['width']; + img.style.push('width:'+data['width']+'px'); + }else{ + img._propertyDelete.push('width'); + } + if(data['height']){ + img.height = data['height']; + img.style.push('height:'+data['height']+'px'); + }else{ + img._propertyDelete.push('height'); + } + if(data['border']){ + img.border = data['border']; + }else{ + img._propertyDelete.push('border'); + } + if(data['align']){ + img.floatStyle = data['align']; + }else{ + img._propertyDelete.push('floatStyle'); + } + if(data['vhSpace']){ + img.vspace = data['vhSpace']; + }else{ + img._propertyDelete.push('vspace'); + } + if(data['title']){ + img.alt = data['title']; + }else{ + img._propertyDelete.push('alt'); + } + if(img.style.length> 0){ + img.style = img.style.join(';'); + }else{ + img._propertyDelete.push('style'); + } + return [img]; + } else { + return []; + } + } + }; + + + + /* 上传图片 */ + function UploadImage(target) { + this.$wrap = target.constructor == String ? $('#' + target) : $(target); + this.init(); + } + UploadImage.prototype = { + init: function () { + this.imageList = []; + this.initContainer(); + this.initUploader(); + }, + initContainer: function () { + this.$queue = this.$wrap.find('.filelist'); + }, + /* 初始化容器 */ + initUploader: function () { + var _this = this, + $ = jQuery, // just in case. Make sure it's not an other libaray. + $wrap = _this.$wrap, + // 图片容器 + $queue = $wrap.find('.filelist'), + // 状态栏,包括进度和控制按钮 + $statusBar = $wrap.find('.statusBar'), + // 文件总体选择信息。 + $info = $statusBar.find('.info'), + // 上传按钮 + $upload = $wrap.find('.uploadBtn'), + // 上传按钮 + $filePickerBtn = $wrap.find('.filePickerBtn'), + // 上传按钮 + $filePickerBlock = $wrap.find('.filePickerBlock'), + // 没选择文件之前的内容。 + $placeHolder = $wrap.find('.placeholder'), + // 总体进度条 + $progress = $statusBar.find('.progress').hide(), + // 添加的文件数量 + fileCount = 0, + // 添加的文件总大小 + fileSize = 0, + // 优化retina, 在retina下这个值是2 + ratio = window.devicePixelRatio || 1, + // 缩略图大小 + thumbnailWidth = 113 * ratio, + thumbnailHeight = 113 * ratio, + // 可能有pedding, ready, uploading, confirm, done. + state = '', + // 所有文件的进度信息,key为file id + percentages = {}, + supportTransition = (function () { + var s = document.createElement('p').style, + r = 'transition' in s || + 'WebkitTransition' in s || + 'MozTransition' in s || + 'msTransition' in s || + 'OTransition' in s; + s = null; + return r; + })(), + // WebUploader实例 + uploader, + actionUrl = editor.getActionUrl(editor.getOpt('imageActionName')), + acceptExtensions = (editor.getOpt('imageAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, ''), + imageMaxSize = editor.getOpt('imageMaxSize'), + imageCompressBorder = editor.getOpt('imageCompressBorder'); + + if (!WebUploader.Uploader.support()) { + $('#filePickerReady').after($('
              ').html(lang.errorNotSupport)).hide(); + return; + } else if (!editor.getOpt('imageActionName')) { + $('#filePickerReady').after($('
              ').html(lang.errorLoadConfig)).hide(); + return; + } + + uploader = _this.uploader = WebUploader.create({ + pick: { + id: '#filePickerReady', + label: lang.uploadSelectFile + }, + accept: { + title: 'Images', + extensions: acceptExtensions, + mimeTypes: 'image/*' + }, + swf: '../../third-party/webuploader/Uploader.swf', + server: actionUrl, + fileVal: editor.getOpt('imageFieldName'), + duplicate: true, + fileSingleSizeLimit: imageMaxSize, // 默认 2 M + threads: 1, + headers: editor.getOpt('serverHeaders') || {}, + compress: editor.getOpt('imageCompressEnable') ? { + enable:editor.getOpt('imageCompressEnable'), + maxWidthOrHeight: imageCompressBorder, + maxSize: imageMaxSize, + }:false + }); + uploader.addButton({ + id: '#filePickerBlock' + }); + uploader.addButton({ + id: '#filePickerBtn', + label: lang.uploadAddFile + }); + + setState('pedding'); + + // 当有文件添加进来时执行,负责view的创建 + function addFile(file) { + var $li = $('
            • ' + + '

              ' + file.name + '

              ' + + '

              ' + + '

              ' + + '
            • '), + + $btns = $('
              ' + + '' + lang.uploadDelete + '' + + '' + lang.uploadTurnRight + '' + + '' + lang.uploadTurnLeft + '
              ').appendTo($li), + $prgress = $li.find('p.progress span'), + $wrap = $li.find('p.imgWrap'), + $info = $('

              ').hide().appendTo($li), + + showError = function (code) { + switch (code) { + case 'exceed_size': + text = lang.errorExceedSize; + break; + case 'interrupt': + text = lang.errorInterrupt; + break; + case 'http': + text = lang.errorHttp; + break; + case 'not_allow_type': + text = lang.errorFileType; + break; + default: + text = lang.errorUploadRetry; + break; + } + $info.text(text).show(); + }; + + if (file.getStatus() === 'invalid') { + showError(file.statusText); + } else { + $wrap.text(lang.uploadPreview); + if (browser.ie && browser.version <= 7) { + $wrap.text(lang.uploadNoPreview); + } else { + uploader.makeThumb(file, function (error, src) { + if (error || !src) { + $wrap.text(lang.uploadNoPreview); + } else { + var $img = $(''); + $wrap.empty().append($img); + $img.on('error', function () { + $wrap.text(lang.uploadNoPreview); + }); + } + }, thumbnailWidth, thumbnailHeight); + } + percentages[ file.id ] = [ file.size, 0 ]; + file.rotation = 0; + + /* 检查文件格式 */ + if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { + showError('not_allow_type'); + uploader.removeFile(file); + } + } + + file.on('statuschange', function (cur, prev) { + if (prev === 'progress') { + $prgress.hide().width(0); + } else if (prev === 'queued') { + $li.off('mouseenter mouseleave'); + $btns.remove(); + } + // 成功 + if (cur === 'error' || cur === 'invalid') { + showError(file.statusText); + percentages[ file.id ][ 1 ] = 1; + } else if (cur === 'interrupt') { + showError('interrupt'); + } else if (cur === 'queued') { + percentages[ file.id ][ 1 ] = 0; + } else if (cur === 'progress') { + $info.hide(); + $prgress.css('display', 'block'); + } else if (cur === 'complete') { + } + + $li.removeClass('state-' + prev).addClass('state-' + cur); + }); + + $li.on('mouseenter', function () { + $btns.stop().animate({height: 30}); + }); + $li.on('mouseleave', function () { + $btns.stop().animate({height: 0}); + }); + + $btns.on('click', 'span', function () { + var index = $(this).index(), + deg; + + switch (index) { + case 0: + uploader.removeFile(file); + return; + case 1: + file.rotation += 90; + break; + case 2: + file.rotation -= 90; + break; + } + + if (supportTransition) { + deg = 'rotate(' + file.rotation + 'deg)'; + $wrap.css({ + '-webkit-transform': deg, + '-mos-transform': deg, + '-o-transform': deg, + 'transform': deg + }); + } else { + $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); + } + + }); + + $li.insertBefore($filePickerBlock); + } + + // 负责view的销毁 + function removeFile(file) { + var $li = $('#' + file.id); + delete percentages[ file.id ]; + updateTotalProgress(); + $li.off().find('.file-panel').off().end().remove(); + } + + function updateTotalProgress() { + var loaded = 0, + total = 0, + spans = $progress.children(), + percent; + + $.each(percentages, function (k, v) { + total += v[ 0 ]; + loaded += v[ 0 ] * v[ 1 ]; + }); + + percent = total ? loaded / total : 0; + + spans.eq(0).text(Math.round(percent * 100) + '%'); + spans.eq(1).css('width', Math.round(percent * 100) + '%'); + updateStatus(); + } + + function setState(val, files) { + + if (val !== state) { + + var stats = uploader.getStats(); + + $upload.removeClass('state-' + state); + $upload.addClass('state-' + val); + + switch (val) { + + /* 未选择文件 */ + case 'pedding': + $queue.addClass('element-invisible'); + $statusBar.addClass('element-invisible'); + $placeHolder.removeClass('element-invisible'); + $progress.hide(); $info.hide(); + uploader.refresh(); + break; + + /* 可以开始上传 */ + case 'ready': + $placeHolder.addClass('element-invisible'); + $queue.removeClass('element-invisible'); + $statusBar.removeClass('element-invisible'); + $progress.hide(); $info.show(); + $upload.text(lang.uploadStart); + uploader.refresh(); + break; + + /* 上传中 */ + case 'uploading': + $progress.show(); $info.hide(); + $upload.text(lang.uploadPause); + break; + + /* 暂停上传 */ + case 'paused': + $progress.show(); $info.hide(); + $upload.text(lang.uploadContinue); + break; + + case 'confirm': + $progress.show(); $info.hide(); + $upload.text(lang.uploadStart); + + stats = uploader.getStats(); + if (stats.successNum && !stats.uploadFailNum) { + setState('finish'); + return; + } + break; + + case 'finish': + $progress.hide(); $info.show(); + if (stats.uploadFailNum) { + $upload.text(lang.uploadRetry); + } else { + $upload.text(lang.uploadStart); + } + break; + } + + state = val; + updateStatus(); + + } + + if (!_this.getQueueCount()) { + $upload.addClass('disabled') + } else { + $upload.removeClass('disabled') + } + + } + + function updateStatus() { + var text = '', stats; + + if (state === 'ready') { + text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); + } else if (state === 'confirm') { + stats = uploader.getStats(); + if (stats.uploadFailNum) { + text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); + } + } else { + stats = uploader.getStats(); + text = lang.updateStatusFinish.replace('_', fileCount). + replace('_KB', WebUploader.formatSize(fileSize)). + replace('_', stats.successNum); + + if (stats.uploadFailNum) { + text += lang.updateStatusError.replace('_', stats.uploadFailNum); + } + } + + $info.html(text); + } + + uploader.on('fileQueued', function (file) { + fileCount++; + fileSize += file.size; + + if (fileCount === 1) { + $placeHolder.addClass('element-invisible'); + $statusBar.show(); + } + + addFile(file); + }); + + uploader.on('fileDequeued', function (file) { + if (file.ext && acceptExtensions.indexOf(file.ext.toLowerCase()) != -1 && file.size <= imageMaxSize) { + fileCount--; + fileSize -= file.size; + } + + removeFile(file); + updateTotalProgress(); + }); + + uploader.on('filesQueued', function (file) { + if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { + setState('ready'); + } + updateTotalProgress(); + }); + + uploader.on('all', function (type, files) { + switch (type) { + case 'uploadFinished': + setState('confirm', files); + break; + case 'startUpload': + /* 添加额外的GET参数 */ + var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', + url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params); + uploader.option('server', url); + setState('uploading', files); + break; + case 'stopUpload': + setState('paused', files); + break; + } + }); + + uploader.on('uploadBeforeSend', function (file, data, header) { + //这里可以通过data对象添加POST参数 + if (actionUrl.toLowerCase().indexOf('jsp') != -1) { + header['X-Requested-With'] = 'XMLHttpRequest'; + } + }); + + uploader.on('uploadProgress', function (file, percentage) { + var $li = $('#' + file.id), + $percent = $li.find('.progress span'); + + $percent.css('width', percentage * 100 + '%'); + percentages[ file.id ][ 1 ] = percentage; + updateTotalProgress(); + }); + + uploader.on('uploadSuccess', function (file, ret) { + var $file = $('#' + file.id); + try { + var responseText = (ret._raw || ret), + json = utils.str2json(responseText); + if (json.state == 'SUCCESS') { + _this.imageList.push(json); + $file.append(''); + // 触发上传图片事件 + editor.fireEvent("uploadsuccess", { + res: json, + type: 'image' + }); + } else { + $file.find('.error').text(json.state).show(); + } + } catch (e) { + $file.find('.error').text(lang.errorServerUpload).show(); + } + }); + + uploader.on('uploadError', function (file, code) { + }); + uploader.on('error', function (code, file) { + if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { + addFile(file); + } + }); + uploader.on('uploadComplete', function (file, ret) { + }); + + $upload.on('click', function () { + if ($(this).hasClass('disabled')) { + return false; + } + + if (state === 'ready') { + uploader.upload(); + } else if (state === 'paused') { + uploader.upload(); + } else if (state === 'uploading') { + uploader.stop(); + } + }); + + $upload.addClass('state-' + state); + updateTotalProgress(); + }, + getQueueCount: function () { + var file, i, status, readyFile = 0, files = this.uploader.getFiles(); + for (i = 0; file = files[i++]; ) { + status = file.getStatus(); + if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; + } + return readyFile; + }, + destroy: function () { + this.$wrap.remove(); + }, + getInsertList: function () { + var i, data, list = [], + align = getAlign(), + prefix = editor.getOpt('imageUrlPrefix'); + for (i = 0; i < this.imageList.length; i++) { + data = this.imageList[i]; + list.push({ + src: prefix + data.url, + _src: prefix + data.url, + alt: data.original, + floatStyle: align + }); + } + return list; + } + }; + + + /* 在线图片 */ + function OnlineImage(target) { + this.container = utils.isString(target) ? document.getElementById(target) : target; + this.init(); + } + OnlineImage.prototype = { + init: function () { + this.reset(); + this.initEvents(); + }, + /* 初始化容器 */ + initContainer: function () { + this.container.innerHTML = ''; + this.list = document.createElement('ul'); + this.clearFloat = document.createElement('li'); + + domUtils.addClass(this.list, 'list'); + domUtils.addClass(this.clearFloat, 'clearFloat'); + + this.list.appendChild(this.clearFloat); + this.container.appendChild(this.list); + }, + /* 初始化滚动事件,滚动到地步自动拉取数据 */ + initEvents: function () { + var _this = this; + + /* 滚动拉取图片 */ + domUtils.on($G('imageList'), 'scroll', function(e){ + var panel = this; + if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) { + _this.getImageData(); + } + }); + /* 选中图片 */ + domUtils.on(this.container, 'click', function (e) { + var target = e.target || e.srcElement, + li = target.parentNode; + + if (li.tagName.toLowerCase() == 'li') { + if (domUtils.hasClass(li, 'selected')) { + domUtils.removeClasses(li, 'selected'); + } else { + domUtils.addClass(li, 'selected'); + } + } + }); + }, + /* 初始化第一次的数据 */ + initData: function () { + + /* 拉取数据需要使用的值 */ + this.state = 0; + this.listSize = editor.getOpt('imageManagerListSize'); + this.listIndex = 0; + this.listEnd = false; + + /* 第一次拉取数据 */ + this.getImageData(); + }, + /* 重置界面 */ + reset: function() { + this.initContainer(); + this.initData(); + }, + /* 向后台拉取图片列表数据 */ + getImageData: function () { + var _this = this; + + if(!_this.listEnd && !this.isLoadingData) { + this.isLoadingData = true; + var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')), + isJsonp = utils.isCrossDomainUrl(url); + ajax.request(url, { + 'timeout': 100000, + 'dataType': isJsonp ? 'jsonp':'', + 'headers': editor.options.serverHeaders || {}, + 'data': utils.extend({ + start: this.listIndex, + size: this.listSize + }, editor.queryCommandValue('serverparam')), + 'method': 'get', + 'onsuccess': function (r) { + try { + var json = isJsonp ? r:eval('(' + r.responseText + ')'); + if (json.state === 'SUCCESS') { + _this.pushData(json.list); + _this.listIndex = parseInt(json.start) + parseInt(json.list.length); + if(_this.listIndex >= json.total) { + _this.listEnd = true; + } + _this.isLoadingData = false; + } + } catch (e) { + if(r.responseText.indexOf('ue_separate_ue') != -1) { + var list = r.responseText.split(r.responseText); + _this.pushData(list); + _this.listIndex = parseInt(list.length); + _this.listEnd = true; + _this.isLoadingData = false; + } + } + }, + 'onerror': function () { + _this.isLoadingData = false; + } + }); + } + }, + /* 添加图片到列表界面上 */ + pushData: function (list) { + var i, item, img, icon, _this = this, + urlPrefix = editor.getOpt('imageManagerUrlPrefix'); + for (i = 0; i < list.length; i++) { + if(list[i] && list[i].url) { + item = document.createElement('li'); + img = document.createElement('img'); + icon = document.createElement('span'); + + domUtils.on(img, 'load', (function(image){ + return function(){ + _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight); + } + })(img)); + img.width = 113; + img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); + img.setAttribute('_src', urlPrefix + list[i].url); + domUtils.addClass(icon, 'icon'); + + item.appendChild(img); + item.appendChild(icon); + this.list.insertBefore(item, this.clearFloat); + } + } + }, + /* 改变图片大小 */ + scale: function (img, w, h, type) { + var ow = img.width, + oh = img.height; + + if (type == 'justify') { + if (ow >= oh) { + img.width = w; + img.height = h * oh / ow; + img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; + } else { + img.width = w * ow / oh; + img.height = h; + img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; + } + } else { + if (ow >= oh) { + img.width = w * ow / oh; + img.height = h; + img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; + } else { + img.width = w; + img.height = h * oh / ow; + img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; + } + } + }, + getInsertList: function () { + var i, lis = this.list.children, list = [], align = getAlign(); + for (i = 0; i < lis.length; i++) { + if (domUtils.hasClass(lis[i], 'selected')) { + var img = lis[i].firstChild, + src = img.getAttribute('_src'); + list.push({ + src: src, + _src: src, + alt: src.substr(src.lastIndexOf('/') + 1), + floatStyle: align + }); + } + + } + return list; + } + }; + +})(); diff --git a/public/static/plugs/ueditor/dialogs/image/images/alignicon.jpg b/public/static/plugs/ueditor/dialogs/image/images/alignicon.jpg new file mode 100644 index 0000000..754755b Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/alignicon.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/bg.png b/public/static/plugs/ueditor/dialogs/image/images/bg.png new file mode 100644 index 0000000..580be0a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/bg.png differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/icons.gif b/public/static/plugs/ueditor/dialogs/image/images/icons.gif new file mode 100644 index 0000000..78459de Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/icons.png b/public/static/plugs/ueditor/dialogs/image/images/icons.png new file mode 100644 index 0000000..12e4700 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/image.png b/public/static/plugs/ueditor/dialogs/image/images/image.png new file mode 100644 index 0000000..19699f6 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/image.png differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/progress.png b/public/static/plugs/ueditor/dialogs/image/images/progress.png new file mode 100644 index 0000000..717c486 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/progress.png differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/success.gif b/public/static/plugs/ueditor/dialogs/image/images/success.gif new file mode 100644 index 0000000..8d4f311 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/success.gif differ diff --git a/public/static/plugs/ueditor/dialogs/image/images/success.png b/public/static/plugs/ueditor/dialogs/image/images/success.png new file mode 100644 index 0000000..94f968d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/image/images/success.png differ diff --git a/public/static/plugs/ueditor/dialogs/insertframe/insertframe.html b/public/static/plugs/ueditor/dialogs/insertframe/insertframe.html new file mode 100644 index 0000000..ebd1255 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/insertframe/insertframe.html @@ -0,0 +1,135 @@ + + + + + + + + + + +
              + + + + + + + + + + + + + + + + + + + +
              + + +
              + px +
              px +
              + +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/internal.js b/public/static/plugs/ueditor/dialogs/internal.js new file mode 100644 index 0000000..44dc17f --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/internal.js @@ -0,0 +1,81 @@ +(function () { + var parent = window.parent; + //dialog对象 + dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )]; + //当前打开dialog的编辑器实例 + editor = dialog.editor; + + UE = parent.UE; + + domUtils = UE.dom.domUtils; + + utils = UE.utils; + + browser = UE.browser; + + ajax = UE.ajax; + + $G = function ( id ) { + return document.getElementById( id ) + }; + //focus元素 + $focus = function ( node ) { + setTimeout( function () { + if ( browser.ie ) { + var r = node.createTextRange(); + r.collapse( false ); + r.select(); + } else { + node.focus() + } + }, 0 ) + }; + utils.loadFile(document,{ + href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(), + tag:"link", + type:"text/css", + rel:"stylesheet" + }); + lang = editor.getLang(dialog.className.split( "-" )[2]); + if(lang){ + domUtils.on(window,'load',function () { + + var langImgPath = editor.options.langPath + editor.options.lang + "/images/"; + //针对静态资源 + for ( var i in lang["static"] ) { + var dom = $G( i ); + if(!dom) continue; + var tagName = dom.tagName, + content = lang["static"][i]; + if(content.src){ + //clone + content = utils.extend({},content,false); + content.src = langImgPath + content.src; + } + if(content.style){ + content = utils.extend({},content,false); + content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath) + } + switch ( tagName.toLowerCase() ) { + case "var": + dom.parentNode.replaceChild( document.createTextNode( content ), dom ); + break; + case "select": + var ops = dom.options; + for ( var j = 0, oj; oj = ops[j]; ) { + oj.innerHTML = content.options[j++]; + } + for ( var p in content ) { + p != "options" && dom.setAttribute( p, content[p] ); + } + break; + default : + domUtils.setAttributes( dom, content); + } + } + } ); + } + + +})(); + diff --git a/public/static/plugs/ueditor/dialogs/link/link.html b/public/static/plugs/ueditor/dialogs/link/link.html new file mode 100644 index 0000000..9c0a3d6 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/link/link.html @@ -0,0 +1,134 @@ + + + + + + + + + +
              + + + + + + + + + + + + + + + + + + + +
              + + +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/preview/preview.html b/public/static/plugs/ueditor/dialogs/preview/preview.html new file mode 100644 index 0000000..69d9a32 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/preview/preview.html @@ -0,0 +1,40 @@ + + + + + + + + + + +
              + +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/addimg.png b/public/static/plugs/ueditor/dialogs/scrawl/images/addimg.png new file mode 100644 index 0000000..03a8713 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/addimg.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/brush.png b/public/static/plugs/ueditor/dialogs/scrawl/images/brush.png new file mode 100644 index 0000000..efa6fdb Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/brush.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/delimg.png b/public/static/plugs/ueditor/dialogs/scrawl/images/delimg.png new file mode 100644 index 0000000..5a892e4 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/delimg.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/delimgH.png b/public/static/plugs/ueditor/dialogs/scrawl/images/delimgH.png new file mode 100644 index 0000000..2f0c5c9 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/delimgH.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/empty.png b/public/static/plugs/ueditor/dialogs/scrawl/images/empty.png new file mode 100644 index 0000000..0375196 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/empty.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/emptyH.png b/public/static/plugs/ueditor/dialogs/scrawl/images/emptyH.png new file mode 100644 index 0000000..838ca72 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/emptyH.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/eraser.png b/public/static/plugs/ueditor/dialogs/scrawl/images/eraser.png new file mode 100644 index 0000000..63e87ce Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/eraser.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/redo.png b/public/static/plugs/ueditor/dialogs/scrawl/images/redo.png new file mode 100644 index 0000000..12cd9bb Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/redo.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/redoH.png b/public/static/plugs/ueditor/dialogs/scrawl/images/redoH.png new file mode 100644 index 0000000..d9f33d3 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/redoH.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/scale.png b/public/static/plugs/ueditor/dialogs/scrawl/images/scale.png new file mode 100644 index 0000000..935a3f3 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/scale.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/scaleH.png b/public/static/plugs/ueditor/dialogs/scrawl/images/scaleH.png new file mode 100644 index 0000000..72e64a9 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/scaleH.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/size.png b/public/static/plugs/ueditor/dialogs/scrawl/images/size.png new file mode 100644 index 0000000..8366845 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/size.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/undo.png b/public/static/plugs/ueditor/dialogs/scrawl/images/undo.png new file mode 100644 index 0000000..084c7cc Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/undo.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/images/undoH.png b/public/static/plugs/ueditor/dialogs/scrawl/images/undoH.png new file mode 100644 index 0000000..fde7eb3 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/scrawl/images/undoH.png differ diff --git a/public/static/plugs/ueditor/dialogs/scrawl/scrawl.css b/public/static/plugs/ueditor/dialogs/scrawl/scrawl.css new file mode 100644 index 0000000..b18430d --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/scrawl/scrawl.css @@ -0,0 +1,72 @@ +/*common +*/ +body{margin: 0;} +table{width:100%;} +table td{padding:2px 4px;vertical-align: middle;} +a{text-decoration: none;} +em{font-style: normal;} +.border_style1{border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;} +/*module +*/ +.main{margin: 8px;overflow: hidden;} + +.hot{float:left;height:335px;} +.drawBoard{position: relative; cursor: crosshair;} +.brushBorad{position: absolute;left:0;top:0;z-index: 998;} +.picBoard{border: none;text-align: center;line-height: 300px;cursor: default;} +.operateBar{margin-top:10px;font-size:12px;text-align: center;} +.operateBar span{margin-left: 10px;} + +.drawToolbar{float:right;width:110px;height:300px;overflow: hidden;} +.colorBar{margin-top:10px;font-size: 12px;text-align: center;} +.colorBar a{display:block;width: 10px;height: 10px;border:1px solid #1006F1;border-radius: 3px; box-shadow:2px 2px 5px #d3d6da;opacity: 0.3} +.sectionBar{margin-top:15px;font-size: 12px;text-align: center;} +.sectionBar a{display:inline-block;width:10px;height:12px;color: #888;text-indent: -999px;opacity: 0.3} +.size1{background: url('images/size.png') 1px center no-repeat ;} +.size2{background: url('images/size.png') -10px center no-repeat;} +.size3{background: url('images/size.png') -22px center no-repeat;} +.size4{background: url('images/size.png') -35px center no-repeat;} + +.addImgH{position: relative;} +.addImgH_form{position: absolute;left: 18px;top: -1px;width: 75px;height: 21px;opacity: 0;cursor: pointer;} +.addImgH_form input{width: 100%;} +/*scrawl遮罩层 +*/ +.maskLayerNull{display: none;} +.maskLayer{position: absolute;top:0;left:0;width: 100%; height: 100%;opacity: 0.7; + background-color: #fff;text-align:center;font-weight:bold;line-height:300px;z-index: 1000;} +/*btn state +*/ +.previousStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undoH.png');cursor: pointer;} +.previousStepH .text{color:#888;cursor:pointer;} +.previousStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undo.png');cursor:default;} +.previousStep .text{color:#ccc;cursor:default;} + +.nextStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redoH.png');cursor: pointer;} +.nextStepH .text{color:#888;cursor:pointer;} +.nextStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redo.png');cursor:default;} +.nextStep .text{color:#ccc;cursor:default;} + +.clearBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/emptyH.png');cursor: pointer;} +.clearBoardH .text{color:#888;cursor:pointer;} +.clearBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/empty.png');cursor:default;} +.clearBoard .text{color:#ccc;cursor:default;} + +.scaleBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scaleH.png');cursor: pointer;} +.scaleBoardH .text{color:#888;cursor:pointer;} +.scaleBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scale.png');cursor:default;} +.scaleBoard .text{color:#ccc;cursor:default;} + +.removeImgH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimgH.png');cursor: pointer;} +.removeImgH .text{color:#888;cursor:pointer;} +.removeImg .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimg.png');cursor:default;} +.removeImg .text{color:#ccc;cursor:default;} + +.addImgH .icon{vertical-align:top;display: inline-block;width:16px;height:16px;background-image: url('images/addimg.png')} +.addImgH .text{color:#888;cursor:pointer;} +/*icon +*/ +.brushIcon{display: inline-block;width:16px;height:16px;background-image: url('images/brush.png')} +.eraserIcon{display: inline-block;width:16px;height:16px;background-image: url('images/eraser.png')} + + diff --git a/public/static/plugs/ueditor/dialogs/scrawl/scrawl.html b/public/static/plugs/ueditor/dialogs/scrawl/scrawl.html new file mode 100644 index 0000000..4f2551a --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/scrawl/scrawl.html @@ -0,0 +1,95 @@ + + + + + + + + + + +
              +
              +
              + +
              +
              +
              + + + + + + + + + + + + + + + + +
              +
              +
              +
              +
              + + 1 + 3 + 5 + 7 +
              +
              + + 1 + 3 + 5 + 7 +
              +
              +
              + + +
              + +
              + +
              +
              +
              + + + + +
              +
              +
              +
              + + + + + diff --git a/public/static/plugs/ueditor/dialogs/scrawl/scrawl.js b/public/static/plugs/ueditor/dialogs/scrawl/scrawl.js new file mode 100644 index 0000000..655ceb4 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/scrawl/scrawl.js @@ -0,0 +1,676 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-5-22 + * Time: 上午11:38 + * To change this template use File | Settings | File Templates. + */ +var scrawl = function (options) { + options && this.initOptions(options); +}; +(function () { + var canvas = $G("J_brushBoard"), + context = canvas.getContext('2d'), + drawStep = [], //undo redo存储 + drawStepIndex = 0; //undo redo指针 + + scrawl.prototype = { + isScrawl:false, //是否涂鸦 + brushWidth:-1, //画笔粗细 + brushColor:"", //画笔颜色 + + initOptions:function (options) { + var me = this; + me.originalState(options);//初始页面状态 + me._buildToolbarColor(options.colorList);//动态生成颜色选择集合 + + me._addBoardListener(options.saveNum);//添加画板处理 + me._addOPerateListener(options.saveNum);//添加undo redo clearBoard处理 + me._addColorBarListener();//添加颜色选择处理 + me._addBrushBarListener();//添加画笔大小处理 + me._addEraserBarListener();//添加橡皮大小处理 + me._addAddImgListener();//添加增添背景图片处理 + me._addRemoveImgListenter();//删除背景图片处理 + me._addScalePicListenter();//添加缩放处理 + me._addClearSelectionListenter();//添加清楚选中状态处理 + + me._originalColorSelect(options.drawBrushColor);//初始化颜色选中 + me._originalBrushSelect(options.drawBrushSize);//初始化画笔选中 + me._clearSelection();//清楚选中状态 + }, + + originalState:function (options) { + var me = this; + + me.brushWidth = options.drawBrushSize;//同步画笔粗细 + me.brushColor = options.drawBrushColor;//同步画笔颜色 + + context.lineWidth = me.brushWidth;//初始画笔大小 + context.strokeStyle = me.brushColor;//初始画笔颜色 + context.fillStyle = "transparent";//初始画布背景颜色 + context.lineCap = "round";//去除锯齿 + context.fill(); + }, + _buildToolbarColor:function (colorList) { + var tmp = null, arr = []; + arr.push(""); + for (var i = 0, color; color = colorList[i++];) { + if ((i - 1) % 5 == 0) { + if (i != 1) { + arr.push(""); + } + arr.push(""); + } + tmp = '#' + color; + arr.push(""); + } + arr.push("
              "); + $G("J_colorBar").innerHTML = arr.join(""); + }, + + _addBoardListener:function (saveNum) { + var me = this, + margin = 0, + startX = -1, + startY = -1, + isMouseDown = false, + isMouseMove = false, + isMouseUp = false, + buttonPress = 0, button, flag = ''; + + margin = parseInt(domUtils.getComputedStyle($G("J_wrap"), "margin-left")); + drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height)); + drawStepIndex += 1; + + domUtils.on(canvas, ["mousedown", "mousemove", "mouseup", "mouseout"], function (e) { + button = browser.webkit ? e.which : buttonPress; + switch (e.type) { + case 'mousedown': + buttonPress = 1; + flag = 1; + isMouseDown = true; + isMouseUp = false; + isMouseMove = false; + me.isScrawl = true; + startX = e.clientX - margin;//10为外边距总和 + startY = e.clientY - margin; + context.beginPath(); + break; + case 'mousemove' : + if (!flag && button == 0) { + return; + } + if (!flag && button) { + startX = e.clientX - margin;//10为外边距总和 + startY = e.clientY - margin; + context.beginPath(); + flag = 1; + } + if (isMouseUp || !isMouseDown) { + return; + } + var endX = e.clientX - margin, + endY = e.clientY - margin; + + context.moveTo(startX, startY); + context.lineTo(endX, endY); + context.stroke(); + startX = endX; + startY = endY; + isMouseMove = true; + break; + case 'mouseup': + buttonPress = 0; + if (!isMouseDown)return; + if (!isMouseMove) { + context.arc(startX, startY, context.lineWidth, 0, Math.PI * 2, false); + context.fillStyle = context.strokeStyle; + context.fill(); + } + context.closePath(); + me._saveOPerate(saveNum); + isMouseDown = false; + isMouseMove = false; + isMouseUp = true; + startX = -1; + startY = -1; + break; + case 'mouseout': + flag = ''; + buttonPress = 0; + if (button == 1) return; + context.closePath(); + break; + } + }); + }, + _addOPerateListener:function (saveNum) { + var me = this; + domUtils.on($G("J_previousStep"), "click", function () { + if (drawStepIndex > 1) { + drawStepIndex -= 1; + context.clearRect(0, 0, context.canvas.width, context.canvas.height); + context.putImageData(drawStep[drawStepIndex - 1], 0, 0); + me.btn2Highlight("J_nextStep"); + drawStepIndex == 1 && me.btn2disable("J_previousStep"); + } + }); + domUtils.on($G("J_nextStep"), "click", function () { + if (drawStepIndex > 0 && drawStepIndex < drawStep.length) { + context.clearRect(0, 0, context.canvas.width, context.canvas.height); + context.putImageData(drawStep[drawStepIndex], 0, 0); + drawStepIndex += 1; + me.btn2Highlight("J_previousStep"); + drawStepIndex == drawStep.length && me.btn2disable("J_nextStep"); + } + }); + domUtils.on($G("J_clearBoard"), "click", function () { + context.clearRect(0, 0, context.canvas.width, context.canvas.height); + drawStep = []; + me._saveOPerate(saveNum); + drawStepIndex = 1; + me.isScrawl = false; + me.btn2disable("J_previousStep"); + me.btn2disable("J_nextStep"); + me.btn2disable("J_clearBoard"); + }); + }, + _addColorBarListener:function () { + var me = this; + domUtils.on($G("J_colorBar"), "click", function (e) { + var target = me.getTarget(e), + color = target.title; + if (!!color) { + me._addColorSelect(target); + + me.brushColor = color; + context.globalCompositeOperation = "source-over"; + context.lineWidth = me.brushWidth; + context.strokeStyle = color; + } + }); + }, + _addBrushBarListener:function () { + var me = this; + domUtils.on($G("J_brushBar"), "click", function (e) { + var target = me.getTarget(e), + size = browser.ie ? target.innerText : target.text; + if (!!size) { + me._addBESelect(target); + + context.globalCompositeOperation = "source-over"; + context.lineWidth = parseInt(size); + context.strokeStyle = me.brushColor; + me.brushWidth = context.lineWidth; + } + }); + }, + _addEraserBarListener:function () { + var me = this; + domUtils.on($G("J_eraserBar"), "click", function (e) { + var target = me.getTarget(e), + size = browser.ie ? target.innerText : target.text; + if (!!size) { + me._addBESelect(target); + + context.lineWidth = parseInt(size); + context.globalCompositeOperation = "destination-out"; + context.strokeStyle = "#FFF"; + } + }); + }, + _addAddImgListener:function () { + var file = $G("J_imgTxt"); + if (!window.FileReader) { + $G("J_addImg").style.display = 'none'; + $G("J_removeImg").style.display = 'none'; + $G("J_sacleBoard").style.display = 'none'; + } + domUtils.on(file, "change", function (e) { + var frm = file.parentNode; + addMaskLayer(lang.backgroundUploading); + + var target = e.target || e.srcElement, + reader = new FileReader(); + reader.onload = function(evt){ + var target = evt.target || evt.srcElement; + ue_callback(target.result, 'SUCCESS'); + }; + reader.readAsDataURL(target.files[0]); + frm.reset(); + }); + }, + _addRemoveImgListenter:function () { + var me = this; + domUtils.on($G("J_removeImg"), "click", function () { + $G("J_picBoard").innerHTML = ""; + me.btn2disable("J_removeImg"); + me.btn2disable("J_sacleBoard"); + }); + }, + _addScalePicListenter:function () { + domUtils.on($G("J_sacleBoard"), "click", function () { + var picBoard = $G("J_picBoard"), + scaleCon = $G("J_scaleCon"), + img = picBoard.children[0]; + + if (img) { + if (!scaleCon) { + picBoard.style.cssText = "position:relative;z-index:999;"+picBoard.style.cssText; + img.style.cssText = "position: absolute;top:" + (canvas.height - img.height) / 2 + "px;left:" + (canvas.width - img.width) / 2 + "px;"; + var scale = new ScaleBoy(); + picBoard.appendChild(scale.init()); + scale.startScale(img); + } else { + if (scaleCon.style.visibility == "visible") { + scaleCon.style.visibility = "hidden"; + picBoard.style.position = ""; + picBoard.style.zIndex = ""; + } else { + scaleCon.style.visibility = "visible"; + picBoard.style.cssText += "position:relative;z-index:999"; + } + } + } + }); + }, + _addClearSelectionListenter:function () { + var doc = document; + domUtils.on(doc, 'mousemove', function (e) { + if (browser.ie && browser.version < 11) + doc.selection.clear(); + else + window.getSelection().removeAllRanges(); + }); + }, + _clearSelection:function () { + var list = ["J_operateBar", "J_colorBar", "J_brushBar", "J_eraserBar", "J_picBoard"]; + for (var i = 0, group; group = list[i++];) { + domUtils.unSelectable($G(group)); + } + }, + + _saveOPerate:function (saveNum) { + var me = this; + if (drawStep.length <= saveNum) { + if(drawStepIndex"); + } + scale.innerHTML = arr.join(""); + return scale; + } + + var rect = [ + //[left, top, width, height] + [1, 1, -1, -1], + [0, 1, 0, -1], + [0, 1, 1, -1], + [1, 0, -1, 0], + [0, 0, 1, 0], + [1, 0, -1, 1], + [0, 0, 0, 1], + [0, 0, 1, 1] + ]; + ScaleBoy.prototype = { + init:function () { + _appendStyle(); + var me = this, + scale = me.dom = _getDom(); + + me.scaleMousemove.fp = me; + domUtils.on(scale, 'mousedown', function (e) { + var target = e.target || e.srcElement; + me.start = {x:e.clientX, y:e.clientY}; + if (target.className.indexOf('hand') != -1) { + me.dir = target.className.replace('hand', ''); + } + domUtils.on(document.body, 'mousemove', me.scaleMousemove); + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; + }); + domUtils.on(document.body, 'mouseup', function (e) { + if (me.start) { + domUtils.un(document.body, 'mousemove', me.scaleMousemove); + if (me.moved) { + me.updateScaledElement({position:{x:scale.style.left, y:scale.style.top}, size:{w:scale.style.width, h:scale.style.height}}); + } + delete me.start; + delete me.moved; + delete me.dir; + } + }); + return scale; + }, + startScale:function (objElement) { + var me = this, Idom = me.dom; + + Idom.style.cssText = 'visibility:visible;top:' + objElement.style.top + ';left:' + objElement.style.left + ';width:' + objElement.offsetWidth + 'px;height:' + objElement.offsetHeight + 'px;'; + me.scalingElement = objElement; + }, + updateScaledElement:function (objStyle) { + var cur = this.scalingElement, + pos = objStyle.position, + size = objStyle.size; + if (pos) { + typeof pos.x != 'undefined' && (cur.style.left = pos.x); + typeof pos.y != 'undefined' && (cur.style.top = pos.y); + } + if (size) { + size.w && (cur.style.width = size.w); + size.h && (cur.style.height = size.h); + } + }, + updateStyleByDir:function (dir, offset) { + var me = this, + dom = me.dom, tmp; + + rect['def'] = [1, 1, 0, 0]; + if (rect[dir][0] != 0) { + tmp = parseInt(dom.style.left) + offset.x; + dom.style.left = me._validScaledProp('left', tmp) + 'px'; + } + if (rect[dir][1] != 0) { + tmp = parseInt(dom.style.top) + offset.y; + dom.style.top = me._validScaledProp('top', tmp) + 'px'; + } + if (rect[dir][2] != 0) { + tmp = dom.clientWidth + rect[dir][2] * offset.x; + dom.style.width = me._validScaledProp('width', tmp) + 'px'; + } + if (rect[dir][3] != 0) { + tmp = dom.clientHeight + rect[dir][3] * offset.y; + dom.style.height = me._validScaledProp('height', tmp) + 'px'; + } + if (dir === 'def') { + me.updateScaledElement({position:{x:dom.style.left, y:dom.style.top}}); + } + }, + scaleMousemove:function (e) { + var me = arguments.callee.fp, + start = me.start, + dir = me.dir || 'def', + offset = {x:e.clientX - start.x, y:e.clientY - start.y}; + + me.updateStyleByDir(dir, offset); + arguments.callee.fp.start = {x:e.clientX, y:e.clientY}; + arguments.callee.fp.moved = 1; + }, + _validScaledProp:function (prop, value) { + var ele = this.dom, + wrap = $G("J_picBoard"); + + value = isNaN(value) ? 0 : value; + switch (prop) { + case 'left': + return value < 0 ? 0 : (value + ele.clientWidth) > wrap.clientWidth ? wrap.clientWidth - ele.clientWidth : value; + case 'top': + return value < 0 ? 0 : (value + ele.clientHeight) > wrap.clientHeight ? wrap.clientHeight - ele.clientHeight : value; + case 'width': + return value <= 0 ? 1 : (value + ele.offsetLeft) > wrap.clientWidth ? wrap.clientWidth - ele.offsetLeft : value; + case 'height': + return value <= 0 ? 1 : (value + ele.offsetTop) > wrap.clientHeight ? wrap.clientHeight - ele.offsetTop : value; + } + } + }; +})(); + +//后台回调 +function ue_callback(url, state) { + var doc = document, + picBorard = $G("J_picBoard"), + img = doc.createElement("img"); + + //图片缩放 + function scale(img, max, oWidth, oHeight) { + var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight; + if (ow > max || oh > max) { + if (ow >= oh) { + if (width = ow - max) { + percent = (width / ow).toFixed(2); + img.height = oh - oh * percent; + img.width = max; + } + } else { + if (height = oh - max) { + percent = (height / oh).toFixed(2); + img.width = ow - ow * percent; + img.height = max; + } + } + } + } + + //移除遮罩层 + removeMaskLayer(); + //状态响应 + if (state == "SUCCESS") { + picBorard.innerHTML = ""; + img.onload = function () { + scale(this, 300); + picBorard.appendChild(img); + + var obj = new scrawl(); + obj.btn2Highlight("J_removeImg"); + //trace 2457 + obj.btn2Highlight("J_sacleBoard"); + }; + img.src = url; + } else { + alert(state); + } +} +//去掉遮罩层 +function removeMaskLayer() { + var maskLayer = $G("J_maskLayer"); + maskLayer.className = "maskLayerNull"; + maskLayer.innerHTML = ""; + dialog.buttons[0].setDisabled(false); +} +//添加遮罩层 +function addMaskLayer(html) { + var maskLayer = $G("J_maskLayer"); + dialog.buttons[0].setDisabled(true); + maskLayer.className = "maskLayer"; + maskLayer.innerHTML = html; +} +//执行确认按钮方法 +function exec(scrawlObj) { + if (scrawlObj.isScrawl) { + addMaskLayer(lang.scrawlUpLoading); + var base64 = scrawlObj.getCanvasData(); + if (!!base64) { + var options = { + timeout:100000, + headers: editor.options.serverHeaders || {}, + onsuccess:function (xhr) { + if (!scrawlObj.isCancelScrawl) { + var responseObj; + responseObj = eval("(" + xhr.responseText + ")"); + if (responseObj.state === "SUCCESS") { + var imgObj = {}, + url = editor.options.scrawlUrlPrefix + responseObj.url; + imgObj.src = url; + imgObj._src = url; + imgObj.alt = responseObj.original || ''; + editor.execCommand("insertImage", imgObj); + dialog.close(); + // 触发上传涂鸦事件 + editor.fireEvent("uploadsuccess", { + res: responseObj, + type: 'scrawl' + }); + } else { + alert(responseObj.state); + } + + } + }, + onerror:function () { + alert(lang.imageError); + dialog.close(); + } + }; + options[editor.getOpt('scrawlFieldName')] = base64; + + var actionUrl = editor.getActionUrl(editor.getOpt('scrawlActionName')), + params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', + url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params); + ajax.request(url, options); + } + } else { + addMaskLayer(lang.noScarwl + "   "); + } +} + diff --git a/public/static/plugs/ueditor/dialogs/searchreplace/searchreplace.html b/public/static/plugs/ueditor/dialogs/searchreplace/searchreplace.html new file mode 100644 index 0000000..8efae07 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/searchreplace/searchreplace.html @@ -0,0 +1,117 @@ + + + + + + + + + +
              + +
              +
              + + + + + + + + + + + + + + + + + + + + + + +
              :
              + +
              + + +
              +   +
              + +
              +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + +
              :
              :
              + +
              + + + + +
              +   +
              + +
              +
              +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/searchreplace/searchreplace.js b/public/static/plugs/ueditor/dialogs/searchreplace/searchreplace.js new file mode 100644 index 0000000..02fa46c --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/searchreplace/searchreplace.js @@ -0,0 +1,170 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-9-26 + * Time: 下午12:29 + * To change this template use File | Settings | File Templates. + */ + +//清空上次查选的痕迹 +editor.firstForSR = 0; +editor.currentRangeForSR = null; +//给tab注册切换事件 +/** + * tab点击处理事件 + * @param tabHeads + * @param tabBodys + * @param obj + */ +function clickHandler( tabHeads,tabBodys,obj ) { + //head样式更改 + for ( var k = 0, len = tabHeads.length; k < len; k++ ) { + tabHeads[k].className = ""; + } + obj.className = "focus"; + //body显隐 + var tabSrc = obj.getAttribute( "tabSrc" ); + for ( var j = 0, length = tabBodys.length; j < length; j++ ) { + var body = tabBodys[j], + id = body.getAttribute( "id" ); + if ( id != tabSrc ) { + body.style.zIndex = 1; + } else { + body.style.zIndex = 200; + } + } + +} + +/** + * TAB切换 + * @param tabParentId tab的父节点ID或者对象本身 + */ +function switchTab( tabParentId ) { + var tabElements = $G( tabParentId ).children, + tabHeads = tabElements[0].children, + tabBodys = tabElements[1].children; + + for ( var i = 0, length = tabHeads.length; i < length; i++ ) { + var head = tabHeads[i]; + if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head ); + head.onclick = function () { + clickHandler(tabHeads,tabBodys,this); + } + } +} +$G('searchtab').onmousedown = function(){ + $G('search-msg').innerHTML = ''; + $G('replace-msg').innerHTML = '' +} +//是否区分大小写 +function getMatchCase(id) { + return $G(id).checked ? true : false; +} +//查找 +$G("nextFindBtn").onclick = function (txt, dir, mcase) { + var findtxt = $G("findtxt").value, obj; + if (!findtxt) { + return false; + } + obj = { + searchStr:findtxt, + dir:1, + casesensitive:getMatchCase("matchCase") + }; + if (!frCommond(obj)) { + var bk = editor.selection.getRange().createBookmark(); + $G('search-msg').innerHTML = lang.getEnd; + editor.selection.getRange().moveToBookmark(bk).select(); + + + } +}; +$G("nextReplaceBtn").onclick = function (txt, dir, mcase) { + var findtxt = $G("findtxt1").value, obj; + if (!findtxt) { + return false; + } + obj = { + searchStr:findtxt, + dir:1, + casesensitive:getMatchCase("matchCase1") + }; + frCommond(obj); +}; +$G("preFindBtn").onclick = function (txt, dir, mcase) { + var findtxt = $G("findtxt").value, obj; + if (!findtxt) { + return false; + } + obj = { + searchStr:findtxt, + dir:-1, + casesensitive:getMatchCase("matchCase") + }; + if (!frCommond(obj)) { + $G('search-msg').innerHTML = lang.getStart; + } +}; +$G("preReplaceBtn").onclick = function (txt, dir, mcase) { + var findtxt = $G("findtxt1").value, obj; + if (!findtxt) { + return false; + } + obj = { + searchStr:findtxt, + dir:-1, + casesensitive:getMatchCase("matchCase1") + }; + frCommond(obj); +}; +//替换 +$G("repalceBtn").onclick = function () { + editor.trigger('clearLastSearchResult'); + var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj, + replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, ""); + if (!findtxt) { + return false; + } + if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) { + return false; + } + obj = { + searchStr:findtxt, + dir:1, + casesensitive:getMatchCase("matchCase1"), + replaceStr:replacetxt + }; + frCommond(obj); +}; +//全部替换 +$G("repalceAllBtn").onclick = function () { + var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj, + replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, ""); + if (!findtxt) { + return false; + } + if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) { + return false; + } + obj = { + searchStr:findtxt, + casesensitive:getMatchCase("matchCase1"), + replaceStr:replacetxt, + all:true + }; + var num = frCommond(obj); + if (num) { + $G('replace-msg').innerHTML = lang.countMsg.replace("{#count}", num); + } +}; +//执行 +var frCommond = function (obj) { + return editor.execCommand("searchreplace", obj); +}; +switchTab("searchtab"); + + +dialog.onclose = function(){ + editor.trigger('clearLastSearchResult') +}; \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/spechars/spechars.html b/public/static/plugs/ueditor/dialogs/spechars/spechars.html new file mode 100644 index 0000000..9eb952d --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/spechars/spechars.html @@ -0,0 +1,21 @@ + + + + + + + + + +
              +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/spechars/spechars.js b/public/static/plugs/ueditor/dialogs/spechars/spechars.js new file mode 100644 index 0000000..f4c155e --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/spechars/spechars.js @@ -0,0 +1,57 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-9-26 + * Time: 下午1:09 + * To change this template use File | Settings | File Templates. + */ +var charsContent = [ + { name:"tsfh", title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")}, + { name:"lmsz", title:lang.lmsz, content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")}, + { name:"szfh", title:lang.szfh, content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")}, + { name:"rwfh", title:lang.rwfh, content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")}, + { name:"xlzm", title:lang.xlzm, content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")}, + { name:"ewzm", title:lang.ewzm, content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")}, + { name:"pyzm", title:lang.pyzm, content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")}, + { name:"yyyb", title:lang.yyyb, content:toArray("i:,i,e,æ,ʌ,ə:,ə,u:,u,ɔ:,ɔ,a:,ei,ai,ɔi,əu,au,iə,εə,uə,p,t,k,b,d,g,f,s,ʃ,θ,h,v,z,ʒ,ð,tʃ,tr,ts,dʒ,dr,dz,m,n,ŋ,l,r,w,j,")}, + { name:"zyzf", title:lang.zyzf, content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")} +]; +(function createTab(content) { + for (var i = 0, ci; ci = content[i++];) { + var span = document.createElement("span"); + span.setAttribute("tabSrc", ci.name); + span.innerHTML = ci.title; + if (i == 1)span.className = "focus"; + domUtils.on(span, "click", function () { + var tmps = $G("tabHeads").children; + for (var k = 0, sk; sk = tmps[k++];) { + sk.className = ""; + } + tmps = $G("tabBodys").children; + for (var k = 0, sk; sk = tmps[k++];) { + sk.style.display = "none"; + } + this.className = "focus"; + $G(this.getAttribute("tabSrc")).style.display = ""; + }); + $G("tabHeads").appendChild(span); + domUtils.insertAfter(span, document.createTextNode("\n")); + var div = document.createElement("div"); + div.id = ci.name; + div.style.display = (i == 1) ? "" : "none"; + var cons = ci.content; + for (var j = 0, con; con = cons[j++];) { + var charSpan = document.createElement("span"); + charSpan.innerHTML = con; + domUtils.on(charSpan, "click", function () { + editor.execCommand("insertHTML", this.innerHTML); + dialog.close(); + }); + div.appendChild(charSpan); + } + $G("tabBodys").appendChild(div); + } +})(charsContent); +function toArray(str) { + return str.split(","); +} diff --git a/public/static/plugs/ueditor/dialogs/table/dragicon.png b/public/static/plugs/ueditor/dialogs/table/dragicon.png new file mode 100644 index 0000000..f26203b Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/table/dragicon.png differ diff --git a/public/static/plugs/ueditor/dialogs/table/edittable.css b/public/static/plugs/ueditor/dialogs/table/edittable.css new file mode 100644 index 0000000..c6f9396 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/table/edittable.css @@ -0,0 +1,84 @@ +body{ + overflow: hidden; + width: 540px; +} +.wrapper { + margin: 10px auto 0; + font-size: 12px; + overflow: hidden; + width: 520px; + height: 315px; +} + +.clear { + clear: both; +} + +.wrapper .left { + float: left; + margin-left: 10px;; +} + +.wrapper .right { + float: right; + border-left: 2px dotted #EDEDED; + padding-left: 15px; +} + +.section { + margin-bottom: 15px; + width: 240px; + overflow: hidden; +} + +.section h3 { + font-weight: bold; + padding: 5px 0; + margin-bottom: 10px; + border-bottom: 1px solid #EDEDED; + font-size: 12px; +} + +.section ul { + list-style: none; + overflow: hidden; + clear: both; + +} + +.section li { + float: left; + width: 120px;; +} + +.section .tone { + width: 80px;; +} + +.section .preview { + width: 220px; +} + +.section .preview table { + text-align: center; + vertical-align: middle; + color: #666; +} + +.section .preview caption { + font-weight: bold; +} + +.section .preview td { + border-width: 1px; + border-style: solid; + height: 22px; +} + +.section .preview th { + border-style: solid; + border-color: #DDD; + border-width: 2px 1px 1px 1px; + height: 22px; + background-color: #F7F7F7; +} \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/table/edittable.html b/public/static/plugs/ueditor/dialogs/table/edittable.html new file mode 100644 index 0000000..6e596ce --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/table/edittable.html @@ -0,0 +1,64 @@ + + + + + + + + +
              +
              +
              +

              +
                +
              • + +
              • +
              • + +
              • +
              +
                +
              • + +
              • +
              • + +
              • +
              +
              +
              +
              +

              +
                +
              • + +
              • +
              • + +
              • +
              +
              +
              +
              +

              +
                +
              • + + +
              • +
              +
              +
              +
              +
              +
              +

              +
              +
              +
              +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/table/edittable.js b/public/static/plugs/ueditor/dialogs/table/edittable.js new file mode 100644 index 0000000..11dbee7 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/table/edittable.js @@ -0,0 +1,237 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-12-19 + * Time: 下午4:55 + * To change this template use File | Settings | File Templates. + */ +(function () { + var title = $G("J_title"), + titleCol = $G("J_titleCol"), + caption = $G("J_caption"), + sorttable = $G("J_sorttable"), + autoSizeContent = $G("J_autoSizeContent"), + autoSizePage = $G("J_autoSizePage"), + tone = $G("J_tone"), + me, + preview = $G("J_preview"); + + var editTable = function () { + me = this; + me.init(); + }; + editTable.prototype = { + init:function () { + var colorPiker = new UE.ui.ColorPicker({ + editor:editor + }), + colorPop = new UE.ui.Popup({ + editor:editor, + content:colorPiker + }); + + title.checked = editor.queryCommandState("inserttitle") == -1; + titleCol.checked = editor.queryCommandState("inserttitlecol") == -1; + caption.checked = editor.queryCommandState("insertcaption") == -1; + sorttable.checked = editor.queryCommandState("enablesort") == 1; + + var enablesortState = editor.queryCommandState("enablesort"), + disablesortState = editor.queryCommandState("disablesort"); + + sorttable.checked = !!(enablesortState < 0 && disablesortState >=0); + sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0); + sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:''; + + me.createTable(title.checked, titleCol.checked, caption.checked); + me.setAutoSize(); + me.setColor(me.getColor()); + + domUtils.on(title, "click", me.titleHanler); + domUtils.on(titleCol, "click", me.titleColHanler); + domUtils.on(caption, "click", me.captionHanler); + domUtils.on(sorttable, "click", me.sorttableHanler); + domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler); + domUtils.on(autoSizePage, "click", me.autoSizePageHanler); + + domUtils.on(tone, "click", function () { + colorPop.showAnchor(tone); + }); + domUtils.on(document, 'mousedown', function () { + colorPop.hide(); + }); + colorPiker.addListener("pickcolor", function () { + me.setColor(arguments[1]); + colorPop.hide(); + }); + colorPiker.addListener("picknocolor", function () { + me.setColor(""); + colorPop.hide(); + }); + }, + + createTable:function (hasTitle, hasTitleCol, hasCaption) { + var arr = [], + sortSpan = '^'; + arr.push(""); + if (hasCaption) { + arr.push("") + } + if (hasTitle) { + arr.push(""); + if(hasTitleCol) { arr.push(""); } + for (var j = 0; j < 5; j++) { + arr.push(""); + } + arr.push(""); + } + for (var i = 0; i < 6; i++) { + arr.push(""); + if(hasTitleCol) { arr.push("") } + for (var k = 0; k < 5; k++) { + arr.push("") + } + arr.push(""); + } + arr.push("
              " + lang.captionName + "
              " + lang.titleName + "" + lang.titleName + "
              " + lang.titleName + "" + lang.cellsName + "
              "); + preview.innerHTML = arr.join(""); + this.updateSortSpan(); + }, + titleHanler:function () { + var example = $G("J_example"), + frg=document.createDocumentFragment(), + color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"), + colCount = example.rows[0].children.length; + + if (title.checked) { + example.insertRow(0); + for (var i = 0, node; i < colCount; i++) { + node = document.createElement("th"); + node.innerHTML = lang.titleName; + frg.appendChild(node); + } + example.rows[0].appendChild(frg); + + } else { + domUtils.remove(example.rows[0]); + } + me.setColor(color); + me.updateSortSpan(); + }, + titleColHanler:function () { + var example = $G("J_example"), + color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"), + colArr = example.rows, + colCount = colArr.length; + + if (titleCol.checked) { + for (var i = 0, node; i < colCount; i++) { + node = document.createElement("th"); + node.innerHTML = lang.titleName; + colArr[i].insertBefore(node, colArr[i].children[0]); + } + } else { + for (var i = 0; i < colCount; i++) { + domUtils.remove(colArr[i].children[0]); + } + } + me.setColor(color); + me.updateSortSpan(); + }, + captionHanler:function () { + var example = $G("J_example"); + if (caption.checked) { + var row = document.createElement('caption'); + row.innerHTML = lang.captionName; + example.insertBefore(row, example.firstChild); + } else { + domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]); + } + }, + sorttableHanler:function(){ + me.updateSortSpan(); + }, + autoSizeContentHanler:function () { + var example = $G("J_example"); + example.removeAttribute("width"); + }, + autoSizePageHanler:function () { + var example = $G("J_example"); + var tds = example.getElementsByTagName(example, "td"); + utils.each(tds, function (td) { + td.removeAttribute("width"); + }); + example.setAttribute('width', '100%'); + }, + updateSortSpan: function(){ + var example = $G("J_example"), + row = example.rows[0]; + + var spans = domUtils.getElementsByTagName(example,"span"); + utils.each(spans,function(span){ + span.parentNode.removeChild(span); + }); + if (sorttable.checked) { + utils.each(row.cells, function(cell, i){ + var span = document.createElement("span"); + span.innerHTML = "^"; + cell.appendChild(span); + }); + } + }, + getColor:function () { + var start = editor.selection.getStart(), color, + cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true); + color = cell && domUtils.getComputedStyle(cell, "border-color"); + if (!color) color = "#DDDDDD"; + return color; + }, + setColor:function (color) { + var example = $G("J_example"), + arr = domUtils.getElementsByTagName(example, "td").concat( + domUtils.getElementsByTagName(example, "th"), + domUtils.getElementsByTagName(example, "caption") + ); + + tone.value = color; + utils.each(arr, function (node) { + node.style.borderColor = color; + }); + + }, + setAutoSize:function () { + var me = this; + autoSizePage.checked = true; + me.autoSizePageHanler(); + } + }; + + new editTable; + + dialog.onok = function () { + editor.__hasEnterExecCommand = true; + + var checks = { + title:"inserttitle deletetitle", + titleCol:"inserttitlecol deletetitlecol", + caption:"insertcaption deletecaption", + sorttable:"enablesort disablesort" + }; + editor.fireEvent('saveScene'); + for(var i in checks){ + var cmds = checks[i].split(" "), + input = $G("J_" + i); + if(input["checked"]){ + editor.queryCommandState(cmds[0])!=-1 &&editor.execCommand(cmds[0]); + }else{ + editor.queryCommandState(cmds[1])!=-1 &&editor.execCommand(cmds[1]); + } + } + + editor.execCommand("edittable", tone.value); + autoSizeContent.checked ?editor.execCommand('adaptbytext') : ""; + autoSizePage.checked ? editor.execCommand("adaptbywindow") : ""; + editor.fireEvent('saveScene'); + + editor.__hasEnterExecCommand = false; + }; +})(); \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/table/edittd.html b/public/static/plugs/ueditor/dialogs/table/edittd.html new file mode 100644 index 0000000..70a3807 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/table/edittd.html @@ -0,0 +1,61 @@ + + + + + + + + +
              + + +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/table/edittip.html b/public/static/plugs/ueditor/dialogs/table/edittip.html new file mode 100644 index 0000000..f9080bd --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/table/edittip.html @@ -0,0 +1,33 @@ + + + + 表格删除提示 + + + + +
              +
              + +
              +
              + +
              +
              + + + diff --git a/public/static/plugs/ueditor/dialogs/template/config.js b/public/static/plugs/ueditor/dialogs/template/config.js new file mode 100644 index 0000000..417b8f7 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/template/config.js @@ -0,0 +1,42 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-8-8 + * Time: 下午2:00 + * To change this template use File | Settings | File Templates. + */ +var templates = [ + { + "pre":"pre0.png", + 'title':lang.blank, + 'preHtml':'

               欢迎使用UEditor!

              ', + "html":'

              欢迎使用UEditor!

              ' + + }, + { + "pre":"pre1.png", + 'title':lang.blog, + 'preHtml':'

              深入理解Range

              UEditor二次开发

              什么是Range

              对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。


              Range能干什么

              在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。

              ', + "html":'

              [键入文档标题]

              [键入文档副标题]

              [标题 1]

              对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。

              [标题 2]

              在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。 您还可以使用“开始”选项卡上的其他控件来直接设置文本格式。大多数控件都允许您选择是使用当前主题外观,还是使用某种直接指定的格式。

              [标题 3]

              对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。


              ' + + }, + { + "pre":"pre2.png", + 'title':lang.resume, + 'preHtml':'

              WEB前端开发简历


              联系电话:[键入您的电话]

              电子邮件:[键入您的电子邮件地址]

              家庭住址:[键入您的地址]

              目标职位

              WEB前端研发工程师

              学历

              1. [起止时间] [学校名称] [所学专业] [所获学位]

              工作经验


              ', + "html":'

              [此处键入简历标题]


              【此处插入照片】


              联系电话:[键入您的电话]


              电子邮件:[键入您的电子邮件地址]


              家庭住址:[键入您的地址]


              目标职位

              [此处键入您的期望职位]

              学历

              1. [键入起止时间] [键入学校名称] [键入所学专业] [键入所获学位]

              2. [键入起止时间] [键入学校名称] [键入所学专业] [键入所获学位]

              工作经验

              1. [键入起止时间] [键入公司名称] [键入职位名称]

                1. [键入负责项目] [键入项目简介]

                2. [键入负责项目] [键入项目简介]

              2. [键入起止时间] [键入公司名称] [键入职位名称]

                1. [键入负责项目] [键入项目简介]

              掌握技能

               [这里可以键入您所掌握的技能]

              ' + + }, + { + "pre":"pre3.png", + 'title':lang.richText, + 'preHtml':'

              [此处键入文章标题]

              图文混排方法

              图片居左,文字围绕图片排版

              方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文


              还有没有什么其他的环绕方式呢?这里是居右环绕


              欢迎大家多多尝试,为UEditor提供更多高质量模板!

              ', + "html":'


              [此处键入文章标题]

              图文混排方法

              1. 图片居左,文字围绕图片排版

              方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本


              2. 图片居右,文字围绕图片排版

              方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本


              3. 图片居中环绕排版

              方法:亲,这个真心没有办法。。。



              还有没有什么其他的环绕方式呢?这里是居右环绕


              欢迎大家多多尝试,为UEditor提供更多高质量模板!


              占位


              占位


              占位


              占位


              占位



              ' + }, + { + "pre":"pre4.png", + 'title':lang.sciPapers, + 'preHtml':'

              [键入文章标题]

              摘要:这里可以输入很长很长很长很长很长很长很长很长很差的摘要

              标题 1

              这里可以输入很多内容,可以图文混排,可以有列表等。

              标题 2

              1. 列表 1

              2. 列表 2

                1. 多级列表 1

                2. 多级列表 2

              3. 列表 3

              标题 3

              来个文字图文混排的


              ', + 'html':'

              [键入文章标题]

              摘要:这里可以输入很长很长很长很长很长很长很长很长很差的摘要

              标题 1

              这里可以输入很多内容,可以图文混排,可以有列表等。

              标题 2

              来个列表瞅瞅:

              1. 列表 1

              2. 列表 2

                1. 多级列表 1

                2. 多级列表 2

              3. 列表 3

              标题 3

              来个文字图文混排的

              这里可以多行

              右边是图片

              绝对没有问题的,不信你也可以试试看


              ' + } +]; \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/template/images/bg.gif b/public/static/plugs/ueditor/dialogs/template/images/bg.gif new file mode 100644 index 0000000..8c1d10a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/template/images/bg.gif differ diff --git a/public/static/plugs/ueditor/dialogs/template/images/pre0.png b/public/static/plugs/ueditor/dialogs/template/images/pre0.png new file mode 100644 index 0000000..8f3c16a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/template/images/pre0.png differ diff --git a/public/static/plugs/ueditor/dialogs/template/images/pre1.png b/public/static/plugs/ueditor/dialogs/template/images/pre1.png new file mode 100644 index 0000000..5a03f96 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/template/images/pre1.png differ diff --git a/public/static/plugs/ueditor/dialogs/template/images/pre2.png b/public/static/plugs/ueditor/dialogs/template/images/pre2.png new file mode 100644 index 0000000..5a55672 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/template/images/pre2.png differ diff --git a/public/static/plugs/ueditor/dialogs/template/images/pre3.png b/public/static/plugs/ueditor/dialogs/template/images/pre3.png new file mode 100644 index 0000000..d852d29 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/template/images/pre3.png differ diff --git a/public/static/plugs/ueditor/dialogs/template/images/pre4.png b/public/static/plugs/ueditor/dialogs/template/images/pre4.png new file mode 100644 index 0000000..0d7bc72 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/template/images/pre4.png differ diff --git a/public/static/plugs/ueditor/dialogs/template/template.css b/public/static/plugs/ueditor/dialogs/template/template.css new file mode 100644 index 0000000..6c1608d --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/template/template.css @@ -0,0 +1,18 @@ +.wrap{ padding: 5px;font-size: 14px;} +.left{width:425px;float: left;} +.right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;} +.right .pre{height: 332px;overflow-y: auto;} +.right .preitem{border: white 1px solid;margin: 5px 0;padding: 2px 0;} +.right .preitem:hover{background-color: lemonChiffon;cursor: pointer;border: #ccc 1px solid;} +.right .preitem img{display: block;margin: 0 auto;width:100px;} +.clear{clear: both;} +.top{height:26px;line-height: 26px;padding: 5px;} +.bottom{height:320px;width:100%;margin: 0 auto;} +.transparent{ background: url("images/bg.gif") repeat;} +.bottom table tr td{border:1px dashed #ccc;} +#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;} +.border_style1{padding:2px;border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;} +p{margin: 5px 0} +table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;} +li{clear:both} +ol{padding-left:40px; } \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/template/template.html b/public/static/plugs/ueditor/dialogs/template/template.html new file mode 100644 index 0000000..9684419 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/template/template.html @@ -0,0 +1,26 @@ + + + + + + + + + +
              +
              +
              + +
              +
              +
              +
              + +
              +
              +
              +
              + + + + diff --git a/public/static/plugs/ueditor/dialogs/template/template.js b/public/static/plugs/ueditor/dialogs/template/template.js new file mode 100644 index 0000000..80a334b --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/template/template.js @@ -0,0 +1,53 @@ +/** + * Created with JetBrains PhpStorm. + * User: xuheng + * Date: 12-8-8 + * Time: 下午2:09 + * To change this template use File | Settings | File Templates. + */ +(function () { + var me = editor, + preview = $G( "preview" ), + preitem = $G( "preitem" ), + tmps = templates, + currentTmp; + var initPre = function () { + var str = ""; + for ( var i = 0, tmp; tmp = tmps[i++]; ) { + str += '
              '; + } + preitem.innerHTML = str; + }; + var pre = function ( n ) { + var tmp = tmps[n - 1]; + currentTmp = tmp; + clearItem(); + domUtils.setStyles( preitem.childNodes[n - 1], { + "background-color":"lemonChiffon", + "border":"#ccc 1px solid" + } ); + preview.innerHTML = tmp.preHtml ? tmp.preHtml : ""; + }; + var clearItem = function () { + var items = preitem.children; + for ( var i = 0, item; item = items[i++]; ) { + domUtils.setStyles( item, { + "background-color":"", + "border":"white 1px solid" + } ); + } + }; + dialog.onok = function () { + if ( !$G( "issave" ).checked ){ + me.execCommand( "cleardoc" ); + } + var obj = { + html:currentTmp && currentTmp.html + }; + me.execCommand( "template", obj ); + }; + initPre(); + window.pre = pre; + pre(2) + +})(); \ No newline at end of file diff --git a/public/static/plugs/ueditor/dialogs/video/images/bg.png b/public/static/plugs/ueditor/dialogs/video/images/bg.png new file mode 100644 index 0000000..580be0a Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/bg.png differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/center_focus.jpg b/public/static/plugs/ueditor/dialogs/video/images/center_focus.jpg new file mode 100644 index 0000000..262b029 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/center_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/file-icons.gif b/public/static/plugs/ueditor/dialogs/video/images/file-icons.gif new file mode 100644 index 0000000..d8c02c2 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/file-icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/file-icons.png b/public/static/plugs/ueditor/dialogs/video/images/file-icons.png new file mode 100644 index 0000000..3ff82c8 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/file-icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/icons.gif b/public/static/plugs/ueditor/dialogs/video/images/icons.gif new file mode 100644 index 0000000..78459de Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/icons.gif differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/icons.png b/public/static/plugs/ueditor/dialogs/video/images/icons.png new file mode 100644 index 0000000..12e4700 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/icons.png differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/image.png b/public/static/plugs/ueditor/dialogs/video/images/image.png new file mode 100644 index 0000000..19699f6 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/image.png differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/left_focus.jpg b/public/static/plugs/ueditor/dialogs/video/images/left_focus.jpg new file mode 100644 index 0000000..7886d27 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/left_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/none_focus.jpg b/public/static/plugs/ueditor/dialogs/video/images/none_focus.jpg new file mode 100644 index 0000000..7c768dc Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/none_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/progress.png b/public/static/plugs/ueditor/dialogs/video/images/progress.png new file mode 100644 index 0000000..717c486 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/progress.png differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/right_focus.jpg b/public/static/plugs/ueditor/dialogs/video/images/right_focus.jpg new file mode 100644 index 0000000..173e10d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/right_focus.jpg differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/success.gif b/public/static/plugs/ueditor/dialogs/video/images/success.gif new file mode 100644 index 0000000..8d4f311 Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/success.gif differ diff --git a/public/static/plugs/ueditor/dialogs/video/images/success.png b/public/static/plugs/ueditor/dialogs/video/images/success.png new file mode 100644 index 0000000..94f968d Binary files /dev/null and b/public/static/plugs/ueditor/dialogs/video/images/success.png differ diff --git a/public/static/plugs/ueditor/dialogs/video/video.css b/public/static/plugs/ueditor/dialogs/video/video.css new file mode 100644 index 0000000..e61ee80 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/video/video.css @@ -0,0 +1,650 @@ +@charset "utf-8"; +.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative} +.tabbody{height: 355px;} +.tabbody .panel { + position: absolute; + width: 0; + height: 0; + background: #fff; + overflow: hidden; + display: none; +} +.tabbody .panel.focus { + width: 100%; + height: 355px; + display: block; +} + +.tabbody .panel table td{vertical-align: middle;} +#videoUrl { + width: 380px; + height: 26px; + line-height: 26px; + margin: 8px 5px; + background: #FFF; + border: 1px solid #d7d7d7; + outline: none; + border-radius:3px; + padding:0 5px; +} +#videoSelect{ + width: 100px; + display: inline-block; + background: #FFF; + border: 1px solid #EEE; + line-height: 26px; + text-align: center; + color: #333; + text-decoration: none; + border-radius: 3px; + vertical-align: middle; +} +#videoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;} +#searchList{width: 570px;overflow: auto;zoom:1;height: 270px;} +#searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;} +#searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/ +#searchList p{margin-left: 10px;} +#videoType{ + width: 65px; + height: 23px; + line-height: 22px; + border: 1px solid #d7d7d7; +} +#videoSearchBtn,#videoSearchReset{ + /*width: 80px;*/ + height: 25px; + line-height: 25px; + background: #eee; + border: 1px solid #d7d7d7; + cursor: pointer; + padding: 0 5px; +} + + + +#preview{position: relative;width: 420px;padding:0;overflow: hidden; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left} +#preview .previewMsg {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;background-color: #666;} +#preview .previewMsg span{display:block;margin: 125px auto 0 auto;text-align:center;font-size:18px;color:#fff;} +#preview .previewVideo {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;} +.edui-video-wrapper fieldset{ + border: 1px solid #ddd; + padding-left: 5px; + margin-bottom: 20px; + padding-bottom: 5px; + width: 115px; +} + +#videoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;} +fieldset{ + border: 1px solid #ddd; + padding-left: 5px; + margin-bottom: 20px; + padding-bottom: 5px; + width: 115px; +} +fieldset legend{font-weight: bold;} +fieldset p{line-height: 30px;} +fieldset input.txt{ + width: 65px; + height: 21px; + line-height: 21px; + margin: 8px 5px; + background: #FFF; + border: 1px solid #d7d7d7; +} +label.url{font-weight: bold;margin-left: 5px;} +#videoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} +#videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)} +span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue} + + + + +/* upload video */ +.tabbody #upload.panel { + width: 0; + height: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); + background: #fff; + display: block; +} +.tabbody #upload.panel.focus { + width: 100%; + height: 335px; + display: block; + clip: auto; +} +#upload_alignment div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} +#upload_alignment .focus{opacity: 1;filter: alpha(opacity = 100)} +#upload_left { width:427px; float:left; } +#upload_left .controller { height: 30px; clear: both; } +#uploadVideoInfo{margin-top:10px;float:right;padding-right:8px;} + +#upload .queueList { + margin: 0; +} + +#upload p { + margin: 0; +} + +.element-invisible { + width: 0 !important; + height: 0 !important; + border: 0; + padding: 0; + margin: 0; + overflow: hidden; + position: absolute !important; + clip: rect(1px, 1px, 1px, 1px); +} + +#upload .placeholder { + margin: 10px; + margin-right:0; + border: 2px dashed #e6e6e6; + *border: 0px dashed #e6e6e6; + height: 161px; + padding-top: 150px; + text-align: center; + width: 97%; + float: left; + background: url(./images/image.png) center 70px no-repeat; + color: #cccccc; + font-size: 18px; + position: relative; + top:0; + *margin-left: 0; + *left: 10px; +} + +#upload .placeholder .webuploader-pick { + font-size: 18px; + background: #00b7ee; + border-radius: 3px; + line-height: 44px; + padding: 0 30px; + *width: 120px; + color: #fff; + display: inline-block; + margin: 0 auto 20px auto; + cursor: pointer; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); +} + +#upload .placeholder .webuploader-pick-hover { + background: #00a2d4; +} + + +#filePickerContainer { + text-align: center; +} + +#upload .placeholder .flashTip { + color: #666666; + font-size: 12px; + position: absolute; + width: 100%; + text-align: center; + bottom: 20px; +} + +#upload .placeholder .flashTip a { + color: #0785d1; + text-decoration: none; +} + +#upload .placeholder .flashTip a:hover { + text-decoration: underline; +} + +#upload .placeholder.webuploader-dnd-over { + border-color: #999999; +} + +#upload .filelist { + list-style: none; + margin: 0; + padding: 0; + overflow-x: hidden; + overflow-y: auto; + position: relative; + height: 285px; +} + +#upload .filelist:after { + content: ''; + display: block; + width: 0; + height: 0; + overflow: hidden; + clear: both; +} + +#upload .filelist li { + width: 113px; + height: 113px; + background: url(./images/bg.png); + text-align: center; + margin: 15px 0 0 20px; + *margin: 15px 0 0 15px; + position: relative; + display: block; + float: left; + overflow: hidden; + font-size: 12px; +} + +#upload .filelist li p.log { + position: relative; + top: -45px; +} + +#upload .filelist li p.title { + position: absolute; + top: 0; + left: 0; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 5px; + text-indent: 5px; + text-align: left; +} + +#upload .filelist li p.progress { + position: absolute; + width: 100%; + bottom: 0; + left: 0; + height: 8px; + overflow: hidden; + z-index: 50; + margin: 0; + border-radius: 0; + background: none; + -webkit-box-shadow: 0 0 0; +} + +#upload .filelist li p.progress span { + display: none; + overflow: hidden; + width: 0; + height: 100%; + background: #1483d8 url(./images/progress.png) repeat-x; + + -webit-transition: width 200ms linear; + -moz-transition: width 200ms linear; + -o-transition: width 200ms linear; + -ms-transition: width 200ms linear; + transition: width 200ms linear; + + -webkit-animation: progressmove 2s linear infinite; + -moz-animation: progressmove 2s linear infinite; + -o-animation: progressmove 2s linear infinite; + -ms-animation: progressmove 2s linear infinite; + animation: progressmove 2s linear infinite; + + -webkit-transform: translateZ(0); +} + +@-webkit-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@-moz-keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +@keyframes progressmove { + 0% { + background-position: 0 0; + } + 100% { + background-position: 17px 0; + } +} + +#upload .filelist li p.imgWrap { + position: relative; + z-index: 2; + line-height: 113px; + vertical-align: middle; + overflow: hidden; + width: 113px; + height: 113px; + + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + + -webit-transition: 200ms ease-out; + -moz-transition: 200ms ease-out; + -o-transition: 200ms ease-out; + -ms-transition: 200ms ease-out; + transition: 200ms ease-out; +} +#upload .filelist li p.imgWrap.notimage { + margin-top: 0; + width: 111px; + height: 111px; + border: 1px #eeeeee solid; +} +#upload .filelist li p.imgWrap.notimage i.file-preview { + margin-top: 15px; +} + +#upload .filelist li img { + width: 100%; +} + +#upload .filelist li p.error { + background: #f43838; + color: #fff; + position: absolute; + bottom: 0; + left: 0; + height: 28px; + line-height: 28px; + width: 100%; + z-index: 100; + display:none; +} + +#upload .filelist li .success { + display: block; + position: absolute; + left: 0; + bottom: 0; + height: 40px; + width: 100%; + z-index: 200; + background: url(./images/success.png) no-repeat right bottom; + background-image: url(./images/success.gif) \9; +} + +#upload .filelist li.filePickerBlock { + width: 113px; + height: 113px; + background: url(./images/image.png) no-repeat center 12px; + border: 1px solid #eeeeee; + border-radius: 0; +} +#upload .filelist li.filePickerBlock div.webuploader-pick { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + opacity: 0; + background: none; + font-size: 0; +} + +#upload .filelist div.file-panel { + position: absolute; + height: 0; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; + background: rgba(0, 0, 0, 0.5); + width: 100%; + top: 0; + left: 0; + overflow: hidden; + z-index: 300; +} + +#upload .filelist div.file-panel span { + width: 24px; + height: 24px; + display: inline; + float: right; + text-indent: -9999px; + overflow: hidden; + background: url(./images/icons.png) no-repeat; + background: url(./images/icons.gif) no-repeat \9; + margin: 5px 1px 1px; + cursor: pointer; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#upload .filelist div.file-panel span.rotateLeft { + display:none; + background-position: 0 -24px; +} + +#upload .filelist div.file-panel span.rotateLeft:hover { + background-position: 0 0; +} + +#upload .filelist div.file-panel span.rotateRight { + display:none; + background-position: -24px -24px; +} + +#upload .filelist div.file-panel span.rotateRight:hover { + background-position: -24px 0; +} + +#upload .filelist div.file-panel span.cancel { + background-position: -48px -24px; +} + +#upload .filelist div.file-panel span.cancel:hover { + background-position: -48px 0; +} + +#upload .statusBar { + height: 45px; + border-bottom: 1px solid #dadada; + margin: 0 10px; + padding: 0; + line-height: 45px; + vertical-align: middle; + position: relative; +} + +#upload .statusBar .progress { + border: 1px solid #1483d8; + width: 198px; + background: #fff; + height: 18px; + position: absolute; + top: 12px; + display: none; + text-align: center; + line-height: 18px; + color: #6dbfff; + margin: 0 10px 0 0; +} +#upload .statusBar .progress span.percentage { + width: 0; + height: 100%; + left: 0; + top: 0; + background: #1483d8; + position: absolute; +} +#upload .statusBar .progress span.text { + position: relative; + z-index: 10; +} + +#upload .statusBar .info { + display: inline-block; + font-size: 14px; + color: #666666; +} + +#upload .statusBar .btns { + position: absolute; + top: 7px; + right: 0; + line-height: 30px; +} + +#filePickerBtn { + display: inline-block; + float: left; +} +#upload .statusBar .btns .webuploader-pick, +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-uploading, +#upload .statusBar .btns .uploadBtn.state-paused { + background: #ffffff; + border: 1px solid #cfcfcf; + color: #565656; + padding: 0 18px; + display: inline-block; + border-radius: 3px; + margin-left: 10px; + cursor: pointer; + font-size: 14px; + float: left; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#upload .statusBar .btns .webuploader-pick-hover, +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-uploading:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover { + background: #f0f0f0; +} + +#upload .statusBar .btns .uploadBtn, +#upload .statusBar .btns .uploadBtn.state-paused{ + background: #00b7ee; + color: #fff; + border-color: transparent; +} +#upload .statusBar .btns .uploadBtn:hover, +#upload .statusBar .btns .uploadBtn.state-paused:hover{ + background: #00a2d4; +} + +#upload .statusBar .btns .uploadBtn.disabled { + pointer-events: none; + filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; +} + + +/* 在线文件的文件预览图标 */ +i.file-preview { + display: block; + margin: 10px auto; + width: 70px; + height: 70px; + background-image: url("./images/file-icons.png"); + background-image: url("./images/file-icons.gif") \9; + background-position: -140px center; + background-repeat: no-repeat; +} +i.file-preview.file-type-dir{ + background-position: 0 center; +} +i.file-preview.file-type-file{ + background-position: -140px center; +} +i.file-preview.file-type-filelist{ + background-position: -210px center; +} +i.file-preview.file-type-zip, +i.file-preview.file-type-rar, +i.file-preview.file-type-7z, +i.file-preview.file-type-tar, +i.file-preview.file-type-gz, +i.file-preview.file-type-bz2{ + background-position: -280px center; +} +i.file-preview.file-type-xls, +i.file-preview.file-type-xlsx{ + background-position: -350px center; +} +i.file-preview.file-type-doc, +i.file-preview.file-type-docx{ + background-position: -420px center; +} +i.file-preview.file-type-ppt, +i.file-preview.file-type-pptx{ + background-position: -490px center; +} +i.file-preview.file-type-vsd{ + background-position: -560px center; +} +i.file-preview.file-type-pdf{ + background-position: -630px center; +} +i.file-preview.file-type-txt, +i.file-preview.file-type-md, +i.file-preview.file-type-json, +i.file-preview.file-type-htm, +i.file-preview.file-type-xml, +i.file-preview.file-type-html, +i.file-preview.file-type-js, +i.file-preview.file-type-css, +i.file-preview.file-type-php, +i.file-preview.file-type-jsp, +i.file-preview.file-type-asp{ + background-position: -700px center; +} +i.file-preview.file-type-apk{ + background-position: -770px center; +} +i.file-preview.file-type-exe{ + background-position: -840px center; +} +i.file-preview.file-type-ipa{ + background-position: -910px center; +} +i.file-preview.file-type-mp4, +i.file-preview.file-type-swf, +i.file-preview.file-type-mkv, +i.file-preview.file-type-avi, +i.file-preview.file-type-flv, +i.file-preview.file-type-mov, +i.file-preview.file-type-mpg, +i.file-preview.file-type-mpeg, +i.file-preview.file-type-ogv, +i.file-preview.file-type-webm, +i.file-preview.file-type-rm, +i.file-preview.file-type-rmvb{ + background-position: -980px center; +} +i.file-preview.file-type-ogg, +i.file-preview.file-type-wav, +i.file-preview.file-type-wmv, +i.file-preview.file-type-mid, +i.file-preview.file-type-mp3{ + background-position: -1050px center; +} +i.file-preview.file-type-jpg, +i.file-preview.file-type-jpeg, +i.file-preview.file-type-gif, +i.file-preview.file-type-bmp, +i.file-preview.file-type-png, +i.file-preview.file-type-psd{ + background-position: -140px center; +} diff --git a/public/static/plugs/ueditor/dialogs/video/video.html b/public/static/plugs/ueditor/dialogs/video/video.html new file mode 100644 index 0000000..c9f0290 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/video/video.html @@ -0,0 +1,89 @@ + + + + + + + + + +
              +
              +
              + + +
              +
              +
              +
              +
              + 外链视频支持:优酷、腾讯视频、哔哩哔哩 +
              +
              +
              +
              + + + + +
              +
              +
              + +
              +
              +
              +
              +
              +
              +
              +
              +
              + 0% + +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
                +
              • +
              +
              +
              +
              +
              + + + + +
              +
              +
              + +
              +
              +
              +
              +
              +
              +
              + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/dialogs/video/video.js b/public/static/plugs/ueditor/dialogs/video/video.js new file mode 100644 index 0000000..4b1b9f7 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/video/video.js @@ -0,0 +1,828 @@ +/** + * Created by JetBrains PhpStorm. + * User: taoqili + * Date: 12-2-20 + * Time: 上午11:19 + * To change this template use File | Settings | File Templates. + */ + +(function(){ + + var video = {}, + uploadVideoList = [], + isModifyUploadVideo = false, + uploadFile; + var editorOpt = {}; + + window.onload = function(){ + editorOpt = editor.getOpt('videoConfig'); + $focus($G("videoUrl")); + initTabs(); + initVideo(); + initUpload(); + }; + + /* 初始化tab标签 */ + function initTabs(){ + var tabs = $G('tabHeads').children; + for (var i = 0; i < tabs.length; i++) { + domUtils.on(tabs[i], "click", function (e) { + var j, bodyId, target = e.target || e.srcElement; + for (j = 0; j < tabs.length; j++) { + bodyId = tabs[j].getAttribute('data-content-id'); + if(tabs[j] == target){ + domUtils.addClass(tabs[j], 'focus'); + domUtils.addClass($G(bodyId), 'focus'); + }else { + domUtils.removeClasses(tabs[j], 'focus'); + domUtils.removeClasses($G(bodyId), 'focus'); + } + } + }); + } + if(!editorOpt.disableUpload){ + $G('tabHeads').querySelector('[data-content-id="upload"]').style.display = 'inline-block'; + } + if(!!editorOpt.selectCallback){ + $G('videoSelect').style.display = 'inline-block'; + domUtils.on($G('videoSelect'), "click", function (e) { + editorOpt.selectCallback(editor,function(info){ + if(info){ + $G('videoUrl').value = info.path; + createPreviewVideo(info.path); + } + }); + }); + } + } + + function initVideo(){ + createAlignButton( ["videoFloat", "upload_alignment"] ); + addUrlChangeListener($G("videoUrl")); + addOkListener(); + + //编辑视频时初始化相关信息 + (function(){ + var img = editor.selection.getRange().getClosedNode(),url; + if(img && img.className){ + var hasFakedClass = (img.className == "edui-faked-video"), + hasUploadClass = img.className.indexOf("edui-upload-video")!=-1; + if(hasFakedClass || hasUploadClass) { + $G("videoUrl").value = url = img.getAttribute("_url"); + $G("videoWidth").value = img.width; + $G("videoHeight").value = img.height; + var align = domUtils.getComputedStyle(img,"float"), + parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align"); + updateAlignButton(parentAlign==="center"?"center":align); + } + if(hasUploadClass) { + isModifyUploadVideo = true; + } + } + createPreviewVideo(url); + })(); + } + + /** + * 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作 + */ + function addOkListener(){ + dialog.onok = function(){ + $G("preview").innerHTML = ""; + var currentTab = findFocus("tabHeads","tabSrc"); + switch(currentTab){ + case "video": + return insertSingle(); + break; + case "videoSearch": + return insertSearch("searchList"); + break; + case "upload": + return insertUpload(); + break; + } + }; + dialog.oncancel = function(){ + $G("preview").innerHTML = ""; + }; + } + + /** + * 依据传入的align值更新按钮信息 + * @param align + */ + function updateAlignButton( align ) { + var aligns = $G( "videoFloat" ).children; + for ( var i = 0, ci; ci = aligns[i++]; ) { + if ( ci.getAttribute( "name" ) == align ) { + if ( ci.className !="focus" ) { + ci.className = "focus"; + } + } else { + if ( ci.className =="focus" ) { + ci.className = ""; + } + } + } + } + + /** + * 将单个视频信息插入编辑器中 + */ + function insertSingle(){ + var width = $G("videoWidth"), + height = $G("videoHeight"), + url=$G('videoUrl').value, + align = findFocus("videoFloat","name"); + if(!url) return false; + if ( !checkNum( [width, height] ) ) return false; + editor.execCommand('insertvideo', { + url: convert_url(url), + width: width.value, + height: height.value, + align: align + }, isModifyUploadVideo ? 'upload':null); + } + + /** + * 将元素id下的所有代表视频的图片插入编辑器中 + * @param id + */ + function insertSearch(id){ + var imgs = domUtils.getElementsByTagName($G(id),"img"), + videoObjs=[]; + for(var i=0,img; img=imgs[i++];){ + if(img.getAttribute("selected")){ + videoObjs.push({ + url:img.getAttribute("ue_video_url"), + width:420, + height:280, + align:"none" + }); + } + } + editor.execCommand('insertvideo',videoObjs); + } + + /** + * 找到id下具有focus类的节点并返回该节点下的某个属性 + * @param id + * @param returnProperty + */ + function findFocus( id, returnProperty ) { + var tabs = $G( id ).children, + property; + for ( var i = 0, ci; ci = tabs[i++]; ) { + if ( ci.className=="focus" ) { + property = ci.getAttribute( returnProperty ); + break; + } + } + return property; + } + function convert_url(url){ + if (!url) return ''; + url = utils.trim(url) + .replace(/v\.youku\.com\/v_show\/id_([\w\-=]+)\.html/i, 'player.youku.com/embed/$1') + // .replace(/(www\.)?youtube\.com\/watch\?v=([\w\-]+)/i, "www.youtube.com/v/$2") + // .replace(/youtu.be\/(\w+)$/i, "www.youtube.com/v/$1") + //.replace(/www\.iqiyi\.com\/v_(\w+)\.html/i, "www.youtube.com/v/$1") + // .replace(/v\.ku6\.com\/.+\/([\w\.]+)\.html.*$/i, "player.ku6.com/refer/$1/v.swf") + // .replace(/www\.56\.com\/u\d+\/v_([\w\-]+)\.html/i, "player.56.com/v_$1.swf") + // .replace(/www.56.com\/w\d+\/play_album\-aid\-\d+_vid\-([^.]+)\.html/i, "player.56.com/v_$1.swf") + // .replace(/v\.pps\.tv\/play_([\w]+)\.html.*$/i, "player.pps.tv/player/sid/$1/v.swf") + // .replace(/www\.letv\.com\/ptv\/vplay\/([\d]+)\.html.*$/i, "i7.imgs.letv.com/player/swfPlayer.swf?id=$1&autoplay=0") + // .replace(/www\.tudou\.com\/programs\/view\/([\w\-]+)\/?/i, "www.tudou.com/v/$1") + // https://v.qq.com/x/cover/wagzbx91asjomnu/w05337nxfof.html + // https://v.qq.com/iframe/player.html?vid=w05337nxfof&tiny=0&auto=0 + .replace(/v\.qq\.com\/x\/cover\/[\w]+\/([\w]+)\.html/i, "v.qq.com/iframe/player.html?vid=$1&tiny=0&auto=0") + .replace(/v\.qq\.com\/x\/page\/([\w]+)\.html/i, "v.qq.com/iframe/player.html?vid=$1&tiny=0&auto=0") + .replace(/www\.bilibili\.com\/video\/([a-zA-Z0-9]+)\/?.*$/i, "player.bilibili.com/player.html?bvid=$1") + // .replace(/v\.qq\.com\/cover\/[\w]+\/[\w]+\/([\w]+)\.html/i, "static.video.qq.com/TPout.swf?vid=$1") + // .replace(/v\.qq\.com\/.+[\?\&]vid=([^&]+).*$/i, "static.video.qq.com/TPout.swf?vid=$1") + // .replace(/my\.tv\.sohu\.com\/[\w]+\/[\d]+\/([\d]+)\.shtml.*$/i, "share.vrs.sohu.com/my/v.swf&id=$1") + ; + return url; + } + + /** + * 检测传入的所有input框中输入的长宽是否是正数 + * @param nodes input框集合, + */ + function checkNum( nodes ) { + for ( var i = 0, ci; ci = nodes[i++]; ) { + var value = ci.value; + if ( !isNumber( value ) && value) { + alert( lang.numError ); + ci.value = ""; + ci.focus(); + return false; + } + } + return true; + } + + /** + * 数字判断 + * @param value + */ + function isNumber( value ) { + return /(0|^[1-9]\d*$)/.test( value ); + } + + /** + * 创建图片浮动选择按钮 + * @param ids + */ + function createAlignButton( ids ) { + for ( var i = 0, ci; ci = ids[i++]; ) { + var floatContainer = $G( ci ), + nameMaps = {"none":lang['default'], "left":lang.floatLeft, "right":lang.floatRight, "center":lang.block}; + for ( var j in nameMaps ) { + var div = document.createElement( "div" ); + div.setAttribute( "name", j ); + if ( j == "none" ) div.className="focus"; + div.style.cssText = "background:url(images/" + j + "_focus.jpg);"; + div.setAttribute( "title", nameMaps[j] ); + floatContainer.appendChild( div ); + } + switchSelect( ci ); + } + } + + /** + * 选择切换 + * @param selectParentId + */ + function switchSelect( selectParentId ) { + var selects = $G( selectParentId ).children; + for ( var i = 0, ci; ci = selects[i++]; ) { + domUtils.on( ci, "click", function () { + for ( var j = 0, cj; cj = selects[j++]; ) { + cj.className = ""; + cj.removeAttribute && cj.removeAttribute( "class" ); + } + this.className = "focus"; + } ) + } + } + + /** + * 监听url改变事件 + * @param url + */ + function addUrlChangeListener(url){ + if (browser.ie) { + url.onpropertychange = function () { + createPreviewVideo( this.value ); + } + } else { + url.addEventListener( "input", function () { + createPreviewVideo( this.value ); + }, false ); + } + } + + /** + * 根据url生成视频预览 + * @param url + */ + function createPreviewVideo(url){ + if (!url)return; + + var conUrl = convert_url(url); + + conUrl = utils.unhtml(conUrl); + + // $G("preview").innerHTML = '
              '+lang.urlError+'
              '+ + // '' + + // ''; + + $G("preview").innerHTML = '
              ' + lang.urlError + '
              ' + + ''; + } + + + /* 插入上传视频 */ + function insertUpload(){ + var videoObjs=[], + uploadDir = editor.getOpt('videoUrlPrefix'), + width = $G('upload_width').value || 420, + height = $G('upload_height').value || 280, + align = findFocus("upload_alignment","name") || 'none'; + for(var key in uploadVideoList) { + var file = uploadVideoList[key]; + videoObjs.push({ + url: uploadDir + file.url, + width:width, + height:height, + align:align + }); + } + + var count = uploadFile.getQueueCount(); + if (count) { + $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); + return false; + } else { + editor.execCommand('insertvideo', videoObjs, 'upload'); + } + } + + /*初始化上传标签*/ + function initUpload(){ + uploadFile = new UploadFile('queueList'); + } + + + /* 上传附件 */ + function UploadFile(target) { + this.$wrap = target.constructor == String ? $('#' + target) : $(target); + this.init(); + } + UploadFile.prototype = { + init: function () { + this.fileList = []; + this.initContainer(); + this.initUploader(); + }, + initContainer: function () { + this.$queue = this.$wrap.find('.filelist'); + }, + /* 初始化容器 */ + initUploader: function () { + var _this = this, + $ = jQuery, // just in case. Make sure it's not an other libaray. + $wrap = _this.$wrap, + // 图片容器 + $queue = $wrap.find('.filelist'), + // 状态栏,包括进度和控制按钮 + $statusBar = $wrap.find('.statusBar'), + // 文件总体选择信息。 + $info = $statusBar.find('.info'), + // 上传按钮 + $upload = $wrap.find('.uploadBtn'), + // 上传按钮 + $filePickerBtn = $wrap.find('.filePickerBtn'), + // 上传按钮 + $filePickerBlock = $wrap.find('.filePickerBlock'), + // 没选择文件之前的内容。 + $placeHolder = $wrap.find('.placeholder'), + // 总体进度条 + $progress = $statusBar.find('.progress').hide(), + // 添加的文件数量 + fileCount = 0, + // 添加的文件总大小 + fileSize = 0, + // 优化retina, 在retina下这个值是2 + ratio = window.devicePixelRatio || 1, + // 缩略图大小 + thumbnailWidth = 113 * ratio, + thumbnailHeight = 113 * ratio, + // 可能有pedding, ready, uploading, confirm, done. + state = '', + // 所有文件的进度信息,key为file id + percentages = {}, + supportTransition = (function () { + var s = document.createElement('p').style, + r = 'transition' in s || + 'WebkitTransition' in s || + 'MozTransition' in s || + 'msTransition' in s || + 'OTransition' in s; + s = null; + return r; + })(), + // WebUploader实例 + uploader, + actionUrl = editor.getActionUrl(editor.getOpt('videoActionName')), + fileMaxSize = editor.getOpt('videoMaxSize'), + acceptExtensions = (editor.getOpt('videoAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');; + + if (!WebUploader.Uploader.support()) { + $('#filePickerReady').after($('
              ').html(lang.errorNotSupport)).hide(); + return; + } else if (!editor.getOpt('videoActionName')) { + $('#filePickerReady').after($('
              ').html(lang.errorLoadConfig)).hide(); + return; + } + + uploader = _this.uploader = WebUploader.create({ + pick: { + id: '#filePickerReady', + label: lang.uploadSelectFile + }, + swf: '../../third-party/webuploader/Uploader.swf', + server: actionUrl, + fileVal: editor.getOpt('videoFieldName'), + duplicate: true, + fileSingleSizeLimit: fileMaxSize, + compress: false + }); + uploader.addButton({ + id: '#filePickerBlock' + }); + uploader.addButton({ + id: '#filePickerBtn', + label: lang.uploadAddFile + }); + + setState('pedding'); + + // 当有文件添加进来时执行,负责view的创建 + function addFile(file) { + var $li = $('
            • ' + + '

              ' + file.name + '

              ' + + '

              ' + + '

              ' + + '
            • '), + + $btns = $('
              ' + + '' + lang.uploadDelete + '' + + '' + lang.uploadTurnRight + '' + + '' + lang.uploadTurnLeft + '
              ').appendTo($li), + $prgress = $li.find('p.progress span'), + $wrap = $li.find('p.imgWrap'), + $info = $('

              ').hide().appendTo($li), + + showError = function (code) { + switch (code) { + case 'exceed_size': + text = lang.errorExceedSize; + break; + case 'interrupt': + text = lang.errorInterrupt; + break; + case 'http': + text = lang.errorHttp; + break; + case 'not_allow_type': + text = lang.errorFileType; + break; + default: + text = lang.errorUploadRetry; + break; + } + $info.text(text).show(); + }; + + if (file.getStatus() === 'invalid') { + showError(file.statusText); + } else { + $wrap.text(lang.uploadPreview); + if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) { + $wrap.empty().addClass('notimage').append('' + + '' + file.name + ''); + } else { + if (browser.ie && browser.version <= 7) { + $wrap.text(lang.uploadNoPreview); + } else { + uploader.makeThumb(file, function (error, src) { + if (error || !src || (/^data:/.test(src) && browser.ie && browser.version <= 7)) { + $wrap.text(lang.uploadNoPreview); + } else { + var $img = $(''); + $wrap.empty().append($img); + $img.on('error', function () { + $wrap.text(lang.uploadNoPreview); + }); + } + }, thumbnailWidth, thumbnailHeight); + } + } + percentages[ file.id ] = [ file.size, 0 ]; + file.rotation = 0; + + /* 检查文件格式 */ + if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { + showError('not_allow_type'); + uploader.removeFile(file); + } + } + + file.on('statuschange', function (cur, prev) { + if (prev === 'progress') { + $prgress.hide().width(0); + } else if (prev === 'queued') { + $li.off('mouseenter mouseleave'); + $btns.remove(); + } + // 成功 + if (cur === 'error' || cur === 'invalid') { + showError(file.statusText); + percentages[ file.id ][ 1 ] = 1; + } else if (cur === 'interrupt') { + showError('interrupt'); + } else if (cur === 'queued') { + percentages[ file.id ][ 1 ] = 0; + } else if (cur === 'progress') { + $info.hide(); + $prgress.css('display', 'block'); + } else if (cur === 'complete') { + } + + $li.removeClass('state-' + prev).addClass('state-' + cur); + }); + + $li.on('mouseenter', function () { + $btns.stop().animate({height: 30}); + }); + $li.on('mouseleave', function () { + $btns.stop().animate({height: 0}); + }); + + $btns.on('click', 'span', function () { + var index = $(this).index(), + deg; + + switch (index) { + case 0: + uploader.removeFile(file); + return; + case 1: + file.rotation += 90; + break; + case 2: + file.rotation -= 90; + break; + } + + if (supportTransition) { + deg = 'rotate(' + file.rotation + 'deg)'; + $wrap.css({ + '-webkit-transform': deg, + '-mos-transform': deg, + '-o-transform': deg, + 'transform': deg + }); + } else { + $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); + } + + }); + + $li.insertBefore($filePickerBlock); + } + + // 负责view的销毁 + function removeFile(file) { + var $li = $('#' + file.id); + delete percentages[ file.id ]; + updateTotalProgress(); + $li.off().find('.file-panel').off().end().remove(); + } + + function updateTotalProgress() { + var loaded = 0, + total = 0, + spans = $progress.children(), + percent; + + $.each(percentages, function (k, v) { + total += v[ 0 ]; + loaded += v[ 0 ] * v[ 1 ]; + }); + + percent = total ? loaded / total : 0; + + spans.eq(0).text(Math.round(percent * 100) + '%'); + spans.eq(1).css('width', Math.round(percent * 100) + '%'); + updateStatus(); + } + + function setState(val, files) { + + if (val != state) { + + var stats = uploader.getStats(); + + $upload.removeClass('state-' + state); + $upload.addClass('state-' + val); + + switch (val) { + + /* 未选择文件 */ + case 'pedding': + $queue.addClass('element-invisible'); + $statusBar.addClass('element-invisible'); + $placeHolder.removeClass('element-invisible'); + $progress.hide(); $info.hide(); + uploader.refresh(); + break; + + /* 可以开始上传 */ + case 'ready': + $placeHolder.addClass('element-invisible'); + $queue.removeClass('element-invisible'); + $statusBar.removeClass('element-invisible'); + $progress.hide(); $info.show(); + $upload.text(lang.uploadStart); + uploader.refresh(); + break; + + /* 上传中 */ + case 'uploading': + $progress.show(); $info.hide(); + $upload.text(lang.uploadPause); + break; + + /* 暂停上传 */ + case 'paused': + $progress.show(); $info.hide(); + $upload.text(lang.uploadContinue); + break; + + case 'confirm': + $progress.show(); $info.hide(); + $upload.text(lang.uploadStart); + + stats = uploader.getStats(); + if (stats.successNum && !stats.uploadFailNum) { + setState('finish'); + return; + } + break; + + case 'finish': + $progress.hide(); $info.show(); + if (stats.uploadFailNum) { + $upload.text(lang.uploadRetry); + } else { + $upload.text(lang.uploadStart); + } + break; + } + + state = val; + updateStatus(); + + } + + if (!_this.getQueueCount()) { + $upload.addClass('disabled') + } else { + $upload.removeClass('disabled') + } + + } + + function updateStatus() { + var text = '', stats; + + if (state === 'ready') { + text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); + } else if (state === 'confirm') { + stats = uploader.getStats(); + if (stats.uploadFailNum) { + text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); + } + } else { + stats = uploader.getStats(); + text = lang.updateStatusFinish.replace('_', fileCount). + replace('_KB', WebUploader.formatSize(fileSize)). + replace('_', stats.successNum); + + if (stats.uploadFailNum) { + text += lang.updateStatusError.replace('_', stats.uploadFailNum); + } + } + + $info.html(text); + } + + uploader.on('fileQueued', function (file) { + fileCount++; + fileSize += file.size; + + if (fileCount === 1) { + $placeHolder.addClass('element-invisible'); + $statusBar.show(); + } + + addFile(file); + }); + + uploader.on('fileDequeued', function (file) { + fileCount--; + fileSize -= file.size; + + removeFile(file); + updateTotalProgress(); + }); + + uploader.on('filesQueued', function (file) { + if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { + setState('ready'); + } + updateTotalProgress(); + }); + + uploader.on('all', function (type, files) { + switch (type) { + case 'uploadFinished': + setState('confirm', files); + break; + case 'startUpload': + /* 添加额外的GET参数 */ + var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', + url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params); + uploader.option('server', url); + setState('uploading', files); + break; + case 'stopUpload': + setState('paused', files); + break; + } + }); + + uploader.on('uploadBeforeSend', function (file, data, header) { + //这里可以通过data对象添加POST参数 + if (actionUrl.toLowerCase().indexOf('jsp') != -1) { + header['X_Requested_With'] = 'XMLHttpRequest'; + } + }); + + uploader.on('uploadProgress', function (file, percentage) { + var $li = $('#' + file.id), + $percent = $li.find('.progress span'); + + $percent.css('width', percentage * 100 + '%'); + percentages[ file.id ][ 1 ] = percentage; + updateTotalProgress(); + }); + + uploader.on('uploadSuccess', function (file, ret) { + var $file = $('#' + file.id); + try { + var responseText = (ret._raw || ret), + json = utils.str2json(responseText); + if (json.state == 'SUCCESS') { + uploadVideoList.push({ + 'url': json.url, + 'type': json.type, + 'original':json.original + }); + $file.append(''); + // 触发上传视频事件 + editor.fireEvent("uploadsuccess", { + res: json, + type: 'video' + }); + } else { + $file.find('.error').text(json.state).show(); + } + } catch (e) { + $file.find('.error').text(lang.errorServerUpload).show(); + } + }); + + uploader.on('uploadError', function (file, code) { + }); + uploader.on('error', function (code, file) { + if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { + addFile(file); + } + }); + uploader.on('uploadComplete', function (file, ret) { + }); + + $upload.on('click', function () { + if ($(this).hasClass('disabled')) { + return false; + } + + if (state === 'ready') { + uploader.upload(); + } else if (state === 'paused') { + uploader.upload(); + } else if (state === 'uploading') { + uploader.stop(); + } + }); + + $upload.addClass('state-' + state); + updateTotalProgress(); + }, + getQueueCount: function () { + var file, i, status, readyFile = 0, files = this.uploader.getFiles(); + for (i = 0; file = files[i++]; ) { + status = file.getStatus(); + if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; + } + return readyFile; + }, + refresh: function(){ + this.uploader.refresh(); + } + }; + +})(); diff --git a/public/static/plugs/ueditor/dialogs/wordimage/wordimage.html b/public/static/plugs/ueditor/dialogs/wordimage/wordimage.html new file mode 100644 index 0000000..913a23e --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/wordimage/wordimage.html @@ -0,0 +1,221 @@ + + + + + + + + + +
              +
              +
              + +
              +
              +
              复制路径
              +
              +
              +
              +
              本地选择保存
              + +
              +
              +
              +
              +
              +
              + Windows使用教程 +
              +
              +

              1、点击复制地址按钮

              +

              2、点击本地选择文件,粘贴剪切板的路径到文件选择路径

              +

              3、点击确定

              +
              +
              + Mac使用教程 +
              +
              +

              1、点击复制地址按钮

              +

              2、点击本地选择文件,按快捷 Command+Shift+G ,粘贴剪切板的路径到文件选择路径

              +

              3、点击确定

              +
              +
              +
              + + + + + + + + diff --git a/public/static/plugs/ueditor/dialogs/wordimage/wordimage.js b/public/static/plugs/ueditor/dialogs/wordimage/wordimage.js new file mode 100644 index 0000000..ef531d1 --- /dev/null +++ b/public/static/plugs/ueditor/dialogs/wordimage/wordimage.js @@ -0,0 +1,93 @@ +/** + * Created by JetBrains PhpStorm. + * User: taoqili + * Date: 12-1-30 + * Time: 下午12:50 + * To change this template use File | Settings | File Templates. + */ +var wordImage = {}; +var g = $G, flashObj, flashContainer; + +wordImage.init = function (opt, callbacks) { + showLocalPath("fileUrl"); + createCopyButton("copyButton", "fileUrl"); + addUploadButtonListener(); + addOkListener(); +}; + +function addUploadButtonListener() { + g('saveFile').addEventListener('change', function () { + $('.image-tip').html('正在转存,请稍后...'); + uploader.addFile(this.files); + uploader.upload(); + }); +} + + +function addOkListener() { + dialog.onok = function () { + //console.log('imageUrls',imageUrls); + if (!imageUrls.length) return; + var urlPrefix = editor.getOpt('imageUrlPrefix'), + images = domUtils.getElementsByTagName(editor.document, "img"); + editor.fireEvent('saveScene'); + // console.log('images',images,imageUrls); + for (var i = 0, img; img = images[i++];) { + var src = img.getAttribute("data-word-image"); + if (!src) continue; + for (var j = 0, url; url = imageUrls[j++];) { + // console.log('url',src, url); + if (src.indexOf(url.name.replace(" ", "")) != -1) { + img.src = urlPrefix + url.url; + img.setAttribute("_src", urlPrefix + url.url); //同时修改"_src"属性 + img.setAttribute("title", url.title); + domUtils.removeAttributes(img, ["data-word-image", "style", "width", "height"]); + editor.fireEvent("selectionchange"); + break; + } + } + } + editor.fireEvent('saveScene'); + // hideFlash(); + }; + dialog.oncancel = function () { + //hideFlash(); + }; +} + +function showLocalPath(id) { + //单张编辑 + var img = editor.selection.getRange().getClosedNode(); + var images = editor.execCommand('wordimage'); + if (images.length == 1 || img && img.tagName == 'IMG') { + g(id).value = images[0]; + return; + } + var path = images[0]; + var leftSlashIndex = path.lastIndexOf("/") || 0, //不同版本的doc和浏览器都可能影响到这个符号,故直接判断两种 + rightSlashIndex = path.lastIndexOf("\\") || 0, + separater = leftSlashIndex > rightSlashIndex ? "/" : "\\"; + + path = path.substring(0, path.lastIndexOf(separater) + 1); + g(id).value = path; + //增提醒用户选择哪些文件 + var names = []; + for (var i = 0, len = images.length; i < len; i++) { + var img = images[i]; + names.push(img.substring(img.lastIndexOf(separater) + 1, img.length)); + } + $('.image-tip').html('请选择:' + names.join("、") + "共" + images.length + '个文件'); +} + +function createCopyButton(id, dataFrom) { + var url = g(dataFrom).value; + if (url.startsWith("file:////")) { + url = url.substring(8); + } + url = decodeURI( url ); + g(id).setAttribute("data-clipboard-text", url); + var clipboard = new Clipboard('[data-clipboard-text]') + clipboard.on('success', function (e) { + g('copyButton').innerHTML = '复制成功'; + }); +} diff --git a/public/static/plugs/ueditor/index.html b/public/static/plugs/ueditor/index.html new file mode 100644 index 0000000..9beb870 --- /dev/null +++ b/public/static/plugs/ueditor/index.html @@ -0,0 +1,139 @@ + + + + UEditorPlus 完整演示 + + + + + + + + + + + + + +
              +

              完整示例

              +
              + +
              +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + +
              +
              + + +
              + + diff --git a/public/static/plugs/ueditor/lang/en/en.js b/public/static/plugs/ueditor/lang/en/en.js new file mode 100644 index 0000000..586faf0 --- /dev/null +++ b/public/static/plugs/ueditor/lang/en/en.js @@ -0,0 +1,613 @@ +/** + * Created with JetBrains PhpStorm. + * User: taoqili + * Date: 12-6-12 + * Time: 下午6:57 + * To change this template use File | Settings | File Templates. + */ +UE.I18N['en'] = { + 'labelMap':{ + 'anchor':'Anchor', 'undo':'Undo', 'redo':'Redo', 'bold':'Bold', 'indent':'Indent', + 'italic':'Italic', 'underline':'Underline', 'strikethrough':'Strikethrough', 'subscript':'SubScript','fontborder':'text border', + 'superscript':'SuperScript', 'formatmatch':'Format Match', 'source':'Source', 'blockquote':'BlockQuote', + 'pasteplain':'PastePlain', 'selectall':'SelectAll', 'print':'Print', 'preview':'Preview', + 'horizontal':'Horizontal', 'removeformat':'RemoveFormat', 'time':'Time', 'date':'Date', + 'unlink':'Unlink', 'insertrow':'InsertRow', 'insertcol':'InsertCol', 'mergeright':'MergeRight', 'mergedown':'MergeDown', + 'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows','insertcode':'insert code', + 'splittocols':'SplitToCols', 'splittocells':'SplitToCells','deletecaption':'DeleteCaption','inserttitle':'InsertTitle', + 'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'cleardoc':'Clear', 'insertparagraphbeforetable':"InsertParagraphBeforeTable", + 'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph','simpleupload':'Single Image','insertimage':'Multi Image','edittable':'Edit Table', 'edittd':'Edit Td','link':'Link', + 'emotion':'Emotion', 'spechars':'Spechars', 'searchreplace':'SearchReplace', + 'insertvideo':'Video', 'help':'Help', 'justifyleft':'JustifyLeft', 'justifyright':'JustifyRight', 'justifycenter':'JustifyCenter', + 'justifyjustify':'Justify', 'forecolor':'FontColor', 'backcolor':'BackColor', 'insertorderedlist':'OL', + 'insertunorderedlist':'UL', 'fullscreen':'FullScreen', 'directionalityltr':'EnterFromLeft', 'directionalityrtl':'EnterFromRight', + 'rowspacingtop':'RowSpacingTop', 'rowspacingbottom':'RowSpacingBottom', 'pagebreak':'PageBreak', 'insertframe':'Iframe', 'imagenone':'Default', + 'imageleft':'ImageLeft', 'imageright':'ImageRight', 'attachment':'Attachment', 'imagecenter':'ImageCenter', 'wordimage':'WordImage', 'formula':'Formula', + 'lineheight':'LineHeight','edittip':'EditTip','customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset', + 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background','inserttable':'InsertTable', + }, + 'autosave': { + 'autoRestoreTip': 'Has been recovered from draft' + }, + 'insertorderedlist':{ + 'num':'1,2,3...', + 'num1':'1),2),3)...', + 'num2':'(1),(2),(3)...', + 'cn':'一,二,三....', + 'cn1':'一),二),三)....', + 'cn2':'(一),(二),(三)....', + 'decimal':'1,2,3...', + 'lower-alpha':'a,b,c...', + 'lower-roman':'i,ii,iii...', + 'upper-alpha':'A,B,C...', + 'upper-roman':'I,II,III...' + }, + 'insertunorderedlist':{ + 'circle':'○ Circle', + 'disc':'● Circle dot', + 'square':'■ Rectangle ', + 'dash' :'- Dash', + 'dot' : '。dot' + }, + 'paragraph':{'p':'Paragraph', 'h1':'Title 1', 'h2':'Title 2', 'h3':'Title 3', 'h4':'Title 4', 'h5':'Title 5', 'h6':'Title 6'}, + 'fontfamily':{ + 'default':'Default', + 'songti':'Sim Sun', + 'kaiti':'Sim Kai', + 'heiti':'Sim Hei', + 'lishu':'Sim Li', + 'yahei': 'Microsoft YaHei', + // 'andaleMono':'Andale Mono', + 'arial': 'Arial', + // 'arialBlack':'Arial Black', + // 'comicSansMs':'Comic Sans MS', + // 'impact':'Impact', + 'timesNewRoman':'Times New Roman' + }, + 'customstyle':{ + 'tc':'Title center', + 'tl':'Title left', + 'im':'Important', + 'hi':'Highlight' + }, + 'autoupload': { + 'exceedSizeError': 'File Size Exceed', + 'exceedTypeError': 'File Type Not Allow', + 'jsonEncodeError': 'Server Return Format Error', + 'loading':"loading...", + 'loadError':"load error", + 'errorLoadConfig': 'Server config not loaded, upload can not work.', + }, + 'simpleupload':{ + 'exceedSizeError': 'File Size Exceed', + 'exceedTypeError': 'File Type Not Allow', + 'jsonEncodeError': 'Server Return Format Error', + 'loading':"loading...", + 'loadError':"load error", + 'errorLoadConfig': 'Server config not loaded, upload can not work.', + }, + 'elementPathTip':"Path", + 'wordCountTip':"Word Count", + 'wordCountMsg':'{#count} characters entered,{#leave} left. ', + 'wordOverFlowMsg':'The number of characters has exceeded allowable maximum values, the server may refuse to save!', + 'ok':"OK", + 'cancel':"Cancel", + 'closeDialog':"closeDialog", + 'tableDrag':"You must import the file uiUtils.js before drag! ", + 'autofloatMsg':"The plugin AutoFloat depends on EditorUI!", + 'loadconfigError': 'Get server config error.', + 'loadconfigFormatError': 'Server config format error.', + 'loadconfigHttpError': 'Get server config http error.', + 'insertcode':{ + 'as3':'ActionScript 3', + 'bash':'Bash/Shell', + 'cpp':'C/C++', + 'css':'CSS', + 'cf':'ColdFusion', + 'c#':'C#', + 'delphi':'Delphi', + 'diff':'Diff', + 'erlang':'Erlang', + 'groovy':'Groovy', + 'html':'HTML', + 'java':'Java', + 'jfx':'JavaFX', + 'js':'JavaScript', + 'pl':'Perl', + 'php':'PHP', + 'plain':'Plain Text', + 'ps':'PowerShell', + 'python':'Python', + 'ruby':'Ruby', + 'scala':'Scala', + 'sql':'SQL', + 'vb':'Visual Basic', + 'xml':'XML' + }, + 'confirmClear':"Do you confirm to clear the Document?", + 'contextMenu':{ + 'delete':"Delete", + 'selectall':"Select all", + 'deletecode':"Delete Code", + 'cleardoc':"Clear Document", + 'confirmclear':"Do you confirm to clear the Document?", + 'unlink':"Unlink", + 'paragraph':"Paragraph", + 'edittable':"Table property", + 'aligncell':'Align cell', + 'aligntable':'Table alignment', + 'tableleft':'Left float', + 'tablecenter':'Center', + 'tableright':'Right float', + 'aligntd':'Cell alignment', + 'edittd':"Cell property", + 'setbordervisible':'set table edge visible', + 'table':"Table", + 'justifyleft':'Justify Left', + 'justifyright':'Justify Right', + 'justifycenter':'Justify Center', + 'justifyjustify':'Default', + 'deletetable':"Delete table", + 'insertparagraphbefore':"InsertedBeforeLine", + 'insertparagraphafter':'InsertedAfterLine', + 'inserttable':'Insert table', + 'insertcaption':'Insert caption', + 'deletecaption':'Delete Caption', + 'inserttitle':'Insert Title', + 'deletetitle':'Delete Title', + 'inserttitlecol':'Insert Title Col', + 'deletetitlecol':'Delete Title Col', + 'averageDiseRow':'AverageDise Row', + 'averageDisCol':'AverageDis Col', + 'deleterow':"Delete row", + 'deletecol':"Delete col", + 'insertrow':"Insert row", + 'insertcol':"Insert col", + 'insertrownext':'Insert Row Next', + 'insertcolnext':'Insert Col Next', + 'mergeright':"Merge right", + 'mergeleft':"Merge left", + 'mergedown':"Merge down", + 'mergecells':"Merge cells", + 'splittocells':"Split to cells", + 'splittocols':"Split to Cols", + 'splittorows':"Split to Rows", + 'tablesort':'Table sorting', + 'enablesort':'Sorting Enable', + 'disablesort':'Sorting Disable', + 'reversecurrent':'Reverse current', + 'orderbyasc':'Order By ASCII', + 'reversebyasc':'Reverse By ASCII', + 'orderbynum':'Order By Num', + 'reversebynum':'Reverse By Num', + 'borderbk':'Border shading', + 'setcolor':'interlaced color', + 'unsetcolor':'Cancel interlacedcolor', + 'setbackground':'Background interlaced', + 'unsetbackground':'Cancel Bk interlaced', + 'redandblue':'Blue and red', + 'threecolorgradient':'Three-color gradient', + 'copy':"Copy(Ctrl + c)", + 'copymsg':"Browser does not support. Please use 'Ctrl + c' instead!", + 'paste':"Paste(Ctrl + v)", + 'pastemsg':"Browser does not support. Please use 'Ctrl + v' instead!" + }, + 'copymsg': "Browser does not support. Please use 'Ctrl + c' instead!", + 'pastemsg': "Browser does not support. Please use 'Ctrl + v' instead!", + 'anchorMsg':"Link", + 'clearColor':'Clear', + 'standardColor':'Standard color', + 'themeColor':'Theme color', + 'property':'Property', + 'default':'Default', + 'modify':'Modify', + 'save':'Save', + 'formulaedit':'FormulaEdit', + 'justifyleft':'Justify Left', + 'justifyright':'Justify Right', + 'justifycenter':'Justify Center', + 'justify':'Default', + 'clear':'Clear', + 'delete':'Delete', + 'clickToUpload':"Click to upload", + 'unset':'Language hasn\'t been set!', + 't_row':'row', + 't_col':'col', + 'pasteOpt':'Paste Option', + 'pasteSourceFormat':"Keep Source Formatting", + 'tagFormat':'Keep tag', + 'pasteTextFormat':'Keep Text only', + 'more':'More', + 'autoTypeSet':{ + 'mergeLine':"Merge empty line", + 'delLine':"Del empty line", + 'removeFormat':"Remove format", + 'indent':"Indent", + 'alignment':"Alignment", + 'imageFloat':"Image float", + 'removeFontsize':"Remove font size", + 'removeFontFamily':"Remove fontFamily", + 'removeHtml':"Remove redundant HTML code", + 'pasteFilter':"Paste filter", + 'run':"Done", + 'symbol':'Symbol Conversion', + 'bdc2sb':'Full-width to Half-width', + 'tobdc':'Half-width to Full-width' + }, + + 'background':{ + 'static':{ + 'lang_background_normal':'Normal', + 'lang_background_local':'Online', + 'lang_background_set':'Background Set', + 'lang_background_none':'No Background', + 'lang_background_colored':'Colored Background', + 'lang_background_color':'Color Set', + 'lang_background_netimg':'Net-Image', + 'lang_background_align':'Align Type', + 'lang_background_position':'Position', + 'repeatType':{'options':["Center", "Repeat-x", "Repeat-y", "Tile","Custom"]} + }, + 'noUploadImage':"No pictures has been uploaded!", + 'toggleSelect':'Change the active state by click!\n Image Size: ' + }, + //===============dialog i18N======================= + 'insertimage':{ + 'static':{ + 'lang_tab_remote':"Insert", + 'lang_tab_upload':"Local", + 'lang_tab_online':"Manager", + 'lang_tab_search':"Search", + 'lang_input_url':"Address:", + 'lang_input_size':"Size:", + 'lang_input_width':"Width", + 'lang_input_height':"Height", + 'lang_input_border':"Border:", + 'lang_input_vhspace':"Margins:", + 'lang_input_title':"Title:", + 'lang_input_align':'Image Float Style:', + 'lang_imgLoading':"Loading...", + 'lang_start_upload':"Start Upload", + 'lock':{'title':"Lock rate"}, + 'searchType':{'title':"ImageType", 'options':["News", "Wallpaper", "emotions", "photo"]}, + 'searchTxt':{'value':"Enter the search keyword!"}, + 'searchBtn':{'value':"Search"}, + 'searchReset':{'value':"Clear"}, + 'noneAlign':{'title':'None Float'}, + 'leftAlign':{'title':'Left Float'}, + 'rightAlign':{'title':'Right Float'}, + 'centerAlign':{'title':'Center In A Line'} + }, + 'uploadSelectFile':'Select File', + 'uploadAddFile':'Add File', + 'uploadStart':'Start Upload', + 'uploadPause':'Pause Upload', + 'uploadContinue':'Continue Upload', + 'uploadRetry':'Retry Upload', + 'uploadDelete':'Delete', + 'uploadTurnLeft':'Turn Left', + 'uploadTurnRight':'Turn Right', + 'uploadPreview':'Doing Preview', + 'uploadNoPreview':'Can Not Preview', + 'updateStatusReady': 'Selected _ pictures, total _KB.', + 'updateStatusConfirm': '_ uploaded successfully and _ upload failed', + 'updateStatusFinish': 'Total _ pictures (_KB), _ uploaded successfully', + 'updateStatusError': ' and _ upload failed', + 'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', + 'errorLoadConfig': 'Server config not loaded, upload can not work.', + 'errorExceedSize':'File Size Exceed', + 'errorFileType':'File Type Not Allow', + 'errorInterrupt':'File Upload Interrupted', + 'errorUploadRetry':'Upload Error, Please Retry.', + 'errorHttp':'Http Error', + 'errorServerUpload':'Server Result Error.', + 'remoteLockError':"Cannot Lock the Proportion between width and height", + 'numError':"Please enter the correct Num. e.g 123,400", + 'imageUrlError':"The image format may be wrong!", + 'imageLoadError':"Error,please check the network or URL!", + 'searchRemind':"Enter the search keyword!", + 'searchLoading':"Image is loading,please wait...", + 'searchRetry':" Sorry,can't find the image,please try again!" + }, + 'attachment':{ + 'static':{ + 'lang_tab_upload': 'Upload', + 'lang_tab_online': 'Online', + 'lang_start_upload':"Start upload", + 'lang_drop_remind':"You can drop files here, a single maximum of 300 files" + }, + 'uploadSelectFile':'Select File', + 'uploadAddFile':'Add File', + 'uploadStart':'Start Upload', + 'uploadPause':'Pause Upload', + 'uploadContinue':'Continue Upload', + 'uploadRetry':'Retry Upload', + 'uploadDelete':'Delete', + 'uploadTurnLeft':'Turn Left', + 'uploadTurnRight':'Turn Right', + 'uploadPreview':'Doing Preview', + 'updateStatusReady': 'Selected _ files, total _KB.', + 'updateStatusConfirm': '_ uploaded successfully and _ upload failed', + 'updateStatusFinish': 'Total _ files (_KB), _ uploaded successfully', + 'updateStatusError': ' and _ upload failed', + 'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', + 'errorLoadConfig': 'Server config not loaded, upload can not work.', + 'errorExceedSize':'File Size Exceed', + 'errorFileType':'File Type Not Allow', + 'errorInterrupt':'File Upload Interrupted', + 'errorUploadRetry':'Upload Error, Please Retry.', + 'errorHttp':'Http Error', + 'errorServerUpload':'Server Result Error.' + }, + + 'insertvideo':{ + 'static':{ + 'lang_tab_insertV':"Video", + 'lang_tab_searchV':"Search", + 'lang_tab_uploadV':"Upload", + 'lang_video_url':" URL ", + 'lang_video_size':"Video Size", + 'lang_videoW':"Width", + 'lang_videoH':"Height", + 'lang_alignment':"Alignment", + 'videoSearchTxt':{'value':"Enter the search keyword!"}, + 'videoType':{'options':["All", "Hot", "Entertainment", "Funny", "Sports", "Science", "variety"]}, + 'videoSearchBtn':{'value':"Search in Baidu"}, + 'videoSearchReset':{'value':"Clear result"}, + + 'lang_input_fileStatus':' No file uploaded!', + 'startUpload':{'style':"background:url(upload.png) no-repeat;"}, + + 'lang_upload_size':"Video Size", + 'lang_upload_width':"Width", + 'lang_upload_height':"Height", + 'lang_upload_alignment':"Alignment", + 'lang_format_advice':"Recommends mp4 format." + }, + 'numError':"Please enter the correct Num. e.g 123,400", + 'floatLeft':"Float left", + 'floatRight':"Float right", + 'default':"Default", + 'block':"Display in block", + 'urlError':"The video url format may be wrong!", + 'loading':"  The video is loading, please wait…", + 'clickToSelect':"Click to select", + 'goToSource':'Visit source video ', + 'noVideo':"    Sorry,can't find the video,please try again!", + + 'browseFiles':'Open files', + 'uploadSuccess':'Upload Successful!', + 'delSuccessFile':'Remove from the success of the queue', + 'delFailSaveFile':'Remove the save failed file', + 'statusPrompt':' file(s) uploaded! ', + 'flashVersionError':'The current Flash version is too low, please update FlashPlayer,then try again!', + 'flashLoadingError':'The Flash failed loading! Please check the path or network state', + 'fileUploadReady':'Wait for uploading...', + 'delUploadQueue':'Remove from the uploading queue ', + 'limitPrompt1':'Can not choose more than single', + 'limitPrompt2':'file(s)!Please choose again!', + 'delFailFile':'Remove failure file', + 'fileSizeLimit':'File size exceeds the limit!', + 'emptyFile':'Can not upload an empty file!', + 'fileTypeError':'File type error!', + 'unknownError':'Unknown error!', + 'fileUploading':'Uploading,please wait...', + 'cancelUpload':'Cancel upload', + 'netError':'Network error', + 'failUpload':'Upload failed', + 'serverIOError':'Server IO error!', + 'noAuthority':'No Permission!', + 'fileNumLimit':'Upload limit to the number', + 'failCheck':'Authentication fails, the upload is skipped!', + 'fileCanceling':'Cancel, please wait...', + 'stopUploading':'Upload has stopped...', + + 'uploadSelectFile':'Select File', + 'uploadAddFile':'Add File', + 'uploadStart':'Start Upload', + 'uploadPause':'Pause Upload', + 'uploadContinue':'Continue Upload', + 'uploadRetry':'Retry Upload', + 'uploadDelete':'Delete', + 'uploadTurnLeft':'Turn Left', + 'uploadTurnRight':'Turn Right', + 'uploadPreview':'Doing Preview', + 'updateStatusReady': 'Selected _ files, total _KB.', + 'updateStatusConfirm': '_ uploaded successfully and _ upload failed', + 'updateStatusFinish': 'Total _ files (_KB), _ uploaded successfully', + 'updateStatusError': ' and _ upload failed', + 'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', + 'errorLoadConfig': 'Server config not loaded, upload can not work.', + 'errorExceedSize':'File Size Exceed', + 'errorFileType':'File Type Not Allow', + 'errorInterrupt':'File Upload Interrupted', + 'errorUploadRetry':'Upload Error, Please Retry.', + 'errorHttp':'Http Error', + 'errorServerUpload':'Server Result Error.' + }, + 'template':{ + 'static':{ + 'lang_template_bkcolor':'Background Color', + 'lang_template_clear' : 'Keep Content', + 'lang_template_select':'Select Template' + }, + 'blank':"Blank", + 'blog':"Blog", + 'resume':"Resume", + 'richText':"Rich Text", + 'scrPapers':"Scientific Papers" + }, + scrawl:{ + 'static':{ + 'lang_input_previousStep':"Previous", + 'lang_input_nextsStep':"Next", + 'lang_input_clear':'Clear', + 'lang_input_addPic':'AddImage', + 'lang_input_ScalePic':'ScaleImage', + 'lang_input_removePic':'RemoveImage', + 'J_imgTxt':{title:'Add background image'} + }, + 'noScarwl':"No paint, a white paper...", + 'scrawlUpLoading':"Image is uploading, please wait...", + 'continueBtn':"Try again", + 'imageError':"Image failed to load!", + 'backgroundUploading':'Image is uploading,please wait...' + }, + anchor:{ + 'static':{ + 'lang_input_anchorName':'Anchor Name:' + } + }, + emotion:{ + 'static':{ + 'lang_input_choice':'Choice', + 'lang_input_Tuzki':'Tuzki', + 'lang_input_lvdouwa':'LvDouWa', + 'lang_input_BOBO':'BOBO', + 'lang_input_babyCat':'BabyCat', + 'lang_input_bubble':'Bubble', + 'lang_input_youa':'YouA' + } + }, + help:{ + 'static':{ + 'lang_input_about':'About UEditor Plus', + 'lang_input_shortcuts':'Shortcuts', + 'lang_input_introduction':"UEditor Plus is based on UEditor.", + 'lang_Txt_shortcuts':'Shortcuts', + 'lang_Txt_func':'Function', + 'lang_Txt_bold':'Bold', + 'lang_Txt_copy':'Copy', + 'lang_Txt_cut':'Cut', + 'lang_Txt_Paste':'Paste', + 'lang_Txt_undo':'Undo', + 'lang_Txt_redo':'Redo', + 'lang_Txt_italic':'Italic', + 'lang_Txt_underline':'Underline', + 'lang_Txt_selectAll':'Select All', + 'lang_Txt_visualEnter':'Submit', + 'lang_Txt_fullscreen':'Fullscreen' + } + }, + insertframe:{ + 'static':{ + 'lang_input_address':'Address:', + 'lang_input_width':'Width:', + 'lang_input_height':'height:', + 'lang_input_isScroll':'Enable scrollbars:', + 'lang_input_frameborder':'Show frame border:', + 'lang_input_alignMode':'Alignment:', + 'align':{title:"Alignment", options:["Default", "Left", "Right", "Center"]} + }, + 'enterAddress':'Please enter an address!' + }, + link:{ + 'static':{ + 'lang_input_text':'Text:', + 'lang_input_url':'URL:', + 'lang_input_title':'Title:', + 'lang_input_target':'open in new window:' + }, + 'validLink':'Supports only effective when a link is selected', + 'httpPrompt':'The hyperlink you enter should start with "http|https|ftp://"!' + }, + searchreplace:{ + 'static':{ + lang_tab_search:"Search", + lang_tab_replace:"Replace", + lang_search1:"Search", + lang_search2:"Search", + lang_replace:"Replace", + lang_searchReg:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"', + lang_searchReg1:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"', + lang_case_sensitive1:"Case sense", + lang_case_sensitive2:"Case sense", + nextFindBtn:{value:"Next"}, + preFindBtn:{value:"Preview"}, + nextReplaceBtn:{value:"Next"}, + preReplaceBtn:{value:"Preview"}, + repalceBtn:{value:"Replace"}, + repalceAllBtn:{value:"Replace all"} + }, + getEnd:"Has the search to the bottom!", + getStart:"Has the search to the top!", + countMsg:"Altogether replaced {#count} character(s)!" + }, + spechars:{ + 'static':{}, + tsfh:"Special", + lmsz:"Roman", + szfh:"Numeral", + rwfh:"Japanese", + xlzm:"The Greek", + ewzm:"Russian", + pyzm:"Phonetic", + yyyb:"English", + zyzf:"Others" + }, + 'edittable':{ + 'static':{ + 'lang_tableStyle':'Table style', + 'lang_insertCaption':'Add table header row', + 'lang_insertTitle':'Add table title row', + 'lang_insertTitleCol':'Add table title col', + 'lang_tableSize':'Automatically adjust table size', + 'lang_autoSizeContent':'Adaptive by form text', + 'lang_orderbycontent':"Table of contents sortable", + 'lang_autoSizePage':'Page width adaptive', + 'lang_example':'Example', + 'lang_borderStyle':'Table Border', + 'lang_color':'Color:' + }, + captionName:'Caption', + titleName:'Title', + cellsName:'text', + errorMsg:'There are merged cells, can not sort.' + }, + 'edittip':{ + 'static':{ + lang_delRow:'Delete entire row', + lang_delCol:'Delete entire col' + } + }, + 'edittd':{ + 'static':{ + lang_tdBkColor:'Background Color:' + } + }, + 'formula':{ + 'static':{ + } + }, + wordimage:{ + 'static':{ + lang_resave:"The re-save step", + uploadBtn:{src:"upload.png", alt:"Upload"}, + clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"}, + lang_step:" 1. Click top button to copy the url and then open the dialog to paste it. 2. Open after choose photos uploaded process." + }, + fileType:"Image", + flashError:"Flash initialization failed!", + netError:"Network error! Please try again!", + copySuccess:"URL has been copied!", + + 'flashI18n':{ + lang:encodeURI( '{"UploadingState":"totalNum: ${a},uploadComplete: ${b}", "BeforeUpload":"waitingNum: ${a}", "ExceedSize":"Size exceed${a}", "ErrorInPreview":"Preview failed", "DefaultDescription":"Description", "LoadingImage":"Loading..."}' ), + uploadingTF:encodeURI( '{"font":"Arial", "size":12, "color":"0x000", "bold":"true", "italic":"false", "underline":"false"}' ), + imageTF:encodeURI( '{"font":"Arial", "size":11, "color":"red", "bold":"false", "italic":"false", "underline":"false"}' ), + textEncoding:"utf-8", + addImageSkinURL:"addImage.png", + allDeleteBtnUpSkinURL:"allDeleteBtnUpSkin.png", + allDeleteBtnHoverSkinURL:"allDeleteBtnHoverSkin.png", + rotateLeftBtnEnableSkinURL:"rotateLeftEnable.png", + rotateLeftBtnDisableSkinURL:"rotateLeftDisable.png", + rotateRightBtnEnableSkinURL:"rotateRightEnable.png", + rotateRightBtnDisableSkinURL:"rotateRightDisable.png", + deleteBtnEnableSkinURL:"deleteEnable.png", + deleteBtnDisableSkinURL:"deleteDisable.png", + backgroundURL:'', + listBackgroundURL:'', + buttonURL:'button.png' + } + }, +}; diff --git a/public/static/plugs/ueditor/lang/en/images/addimage.png b/public/static/plugs/ueditor/lang/en/images/addimage.png new file mode 100644 index 0000000..3a2fd17 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/addimage.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/alldeletebtnhoverskin.png b/public/static/plugs/ueditor/lang/en/images/alldeletebtnhoverskin.png new file mode 100644 index 0000000..355eeab Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/alldeletebtnhoverskin.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/alldeletebtnupskin.png b/public/static/plugs/ueditor/lang/en/images/alldeletebtnupskin.png new file mode 100644 index 0000000..61658ce Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/alldeletebtnupskin.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/background.png b/public/static/plugs/ueditor/lang/en/images/background.png new file mode 100644 index 0000000..d5bf5fd Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/background.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/button.png b/public/static/plugs/ueditor/lang/en/images/button.png new file mode 100644 index 0000000..098874c Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/button.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/copy.png b/public/static/plugs/ueditor/lang/en/images/copy.png new file mode 100644 index 0000000..f982e8b Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/copy.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/deletedisable.png b/public/static/plugs/ueditor/lang/en/images/deletedisable.png new file mode 100644 index 0000000..c8ee750 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/deletedisable.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/deleteenable.png b/public/static/plugs/ueditor/lang/en/images/deleteenable.png new file mode 100644 index 0000000..26acc88 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/deleteenable.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/listbackground.png b/public/static/plugs/ueditor/lang/en/images/listbackground.png new file mode 100644 index 0000000..4f82ccd Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/listbackground.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/localimage.png b/public/static/plugs/ueditor/lang/en/images/localimage.png new file mode 100644 index 0000000..dcecad4 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/localimage.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/music.png b/public/static/plugs/ueditor/lang/en/images/music.png new file mode 100644 index 0000000..2f495fe Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/music.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/rotateleftdisable.png b/public/static/plugs/ueditor/lang/en/images/rotateleftdisable.png new file mode 100644 index 0000000..741526e Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/rotateleftdisable.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/rotateleftenable.png b/public/static/plugs/ueditor/lang/en/images/rotateleftenable.png new file mode 100644 index 0000000..e164ddb Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/rotateleftenable.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/rotaterightdisable.png b/public/static/plugs/ueditor/lang/en/images/rotaterightdisable.png new file mode 100644 index 0000000..5a78c26 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/rotaterightdisable.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/rotaterightenable.png b/public/static/plugs/ueditor/lang/en/images/rotaterightenable.png new file mode 100644 index 0000000..d768531 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/rotaterightenable.png differ diff --git a/public/static/plugs/ueditor/lang/en/images/upload.png b/public/static/plugs/ueditor/lang/en/images/upload.png new file mode 100644 index 0000000..7bb15b3 Binary files /dev/null and b/public/static/plugs/ueditor/lang/en/images/upload.png differ diff --git a/public/static/plugs/ueditor/lang/zh-cn/images/copy.png b/public/static/plugs/ueditor/lang/zh-cn/images/copy.png new file mode 100644 index 0000000..b2536aa Binary files /dev/null and b/public/static/plugs/ueditor/lang/zh-cn/images/copy.png differ diff --git a/public/static/plugs/ueditor/lang/zh-cn/images/localimage.png b/public/static/plugs/ueditor/lang/zh-cn/images/localimage.png new file mode 100644 index 0000000..ba5f07a Binary files /dev/null and b/public/static/plugs/ueditor/lang/zh-cn/images/localimage.png differ diff --git a/public/static/plugs/ueditor/lang/zh-cn/images/music.png b/public/static/plugs/ueditor/lang/zh-cn/images/music.png new file mode 100644 index 0000000..354edeb Binary files /dev/null and b/public/static/plugs/ueditor/lang/zh-cn/images/music.png differ diff --git a/public/static/plugs/ueditor/lang/zh-cn/images/upload.png b/public/static/plugs/ueditor/lang/zh-cn/images/upload.png new file mode 100644 index 0000000..08d4d92 Binary files /dev/null and b/public/static/plugs/ueditor/lang/zh-cn/images/upload.png differ diff --git a/public/static/plugs/ueditor/lang/zh-cn/zh-cn.js b/public/static/plugs/ueditor/lang/zh-cn/zh-cn.js new file mode 100644 index 0000000..a4df4a4 --- /dev/null +++ b/public/static/plugs/ueditor/lang/zh-cn/zh-cn.js @@ -0,0 +1,748 @@ +/** + * Created with JetBrains PhpStorm. + * User: taoqili + * Date: 12-6-12 + * Time: 下午5:02 + * To change this template use File | Settings | File Templates. + */ +UE.I18N['zh-cn'] = { + 'labelMap': { + 'anchor': '锚点', + 'undo': '撤销', + 'redo': '重做', + 'bold': '加粗', + 'indent': '首行缩进', + 'italic': '斜体', + 'underline': '下划线', + 'strikethrough': '删除线', + 'subscript': '下标', + 'fontborder': '字符边框', + 'superscript': '上标', + 'formatmatch': '格式刷', + 'source': '源代码', + 'blockquote': '引用', + 'pasteplain': '纯文本粘贴模式', + 'selectall': '全选', + 'print': '打印', + 'preview': '预览', + 'horizontal': '分隔线', + 'removeformat': '清除格式', + 'time': '时间', + 'date': '日期', + 'unlink': '取消链接', + 'insertrow': '前插入行', + 'insertcol': '前插入列', + 'mergeright': '右合并单元格', + 'mergedown': '下合并单元格', + 'deleterow': '删除行', + 'deletecol': '删除列', + 'splittorows': '拆分成行', + 'splittocols': '拆分成列', + 'splittocells': '完全拆分单元格', + 'deletecaption': '删除表格标题', + 'inserttitle': '插入标题', + 'mergecells': '合并多个单元格', + 'deletetable': '删除表格', + 'cleardoc': '清空文档', + 'insertparagraphbeforetable': "表格前插入行", + 'insertcode': '代码语言', + 'fontfamily': '字体', + 'fontsize': '字号', + 'paragraph': '段落格式', + 'simpleupload': '单图上传', + 'insertimage': '插入图片', + 'edittable': '表格属性', + 'edittd': '单元格属性', + 'link': '超链接', + 'emotion': '表情', + 'spechars': '特殊字符', + 'searchreplace': '查询替换', + 'insertvideo': '视频', + 'insertaudio': '音频', + 'help': '帮助', + 'justifyleft': '居左对齐', + 'justifyright': '居右对齐', + 'justifycenter': '居中对齐', + 'justifyjustify': '两端对齐', + 'forecolor': '字体颜色', + 'backcolor': '背景色', + 'insertorderedlist': '有序列表', + 'insertunorderedlist': '无序列表', + 'fullscreen': '全屏', + 'directionalityltr': '从左向右输入', + 'directionalityrtl': '从右向左输入', + 'rowspacingtop': '段前距', + 'rowspacingbottom': '段后距', + 'pagebreak': '分页', + 'insertframe': '插入Iframe', + 'imagenone': '默认', + 'imageleft': '左浮动', + 'imageright': '右浮动', + 'attachment': '附件', + 'imagecenter': '居中', + 'wordimage': '图片转存', + 'formula': '公式', + 'lineheight': '行间距', + 'edittip': '编辑提示', + 'customstyle': '自定义标题', + 'autotypeset': '自动排版', + 'touppercase': '字母大写', + 'tolowercase': '字母小写', + 'background': '背景', + 'template': '模板', + 'scrawl': '涂鸦', + 'inserttable': '插入表格', + }, + 'autosave': { + 'autoRestoreTip': '已自动从草稿箱恢复' + }, + 'insertorderedlist': { + 'num': '1,2,3...', + 'num1': '1),2),3)...', + 'num2': '(1),(2),(3)...', + 'cn': '一,二,三....', + 'cn1': '一),二),三)....', + 'cn2': '(一),(二),(三)....', + 'decimal': '1,2,3...', + 'lower-alpha': 'a,b,c...', + 'lower-roman': 'i,ii,iii...', + 'upper-alpha': 'A,B,C...', + 'upper-roman': 'I,II,III...' + }, + 'insertunorderedlist': { + 'circle': '○ 大圆圈', + 'disc': '● 小黑点', + 'square': '■ 小方块 ', + 'dash': '— 破折号', + 'dot': ' 。 小圆圈' + }, + 'paragraph': {'p': '段落', 'h1': '标题 1', 'h2': '标题 2', 'h3': '标题 3', 'h4': '标题 4', 'h5': '标题 5', 'h6': '标题 6'}, + 'fontfamily': { + 'default': '默认', + 'songti': '宋体', + 'kaiti': '楷体', + 'heiti': '黑体', + 'lishu': '隶书', + 'yahei': '微软雅黑', + // 'andaleMono':'andale mono', + 'arial': 'arial', + // 'arialBlack':'arial black', + // 'comicSansMs':'comic sans ms', + // 'impact':'impact', + 'timesNewRoman': 'times new roman' + }, + 'customstyle': { + 'tc': '标题居中', + 'tl': '标题居左', + 'im': '强调', + 'hi': '明显强调' + }, + 'autoupload': { + 'exceedSizeError': '文件大小超出限制', + 'exceedTypeError': '文件格式不允许', + 'jsonEncodeError': '服务器返回格式错误', + 'loading': "正在上传...", + 'loadError': "上传错误", + 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!' + }, + 'simpleupload': { + 'exceedSizeError': '文件大小超出限制', + 'exceedTypeError': '文件格式不允许', + 'jsonEncodeError': '服务器返回格式错误', + 'loading': "正在上传...", + 'loadError': "上传错误", + 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!' + }, + 'elementPathTip': "元素路径", + 'wordCountTip': "字数统计", + 'wordCountMsg': '{#count} / {#leave}', + 'wordOverFlowMsg': '字数超出最大允许值,服务器可能拒绝保存!', + 'ok': "确认", + 'cancel': "取消", + 'closeDialog': "关闭对话框", + 'tableDrag': "表格拖动必须引入uiUtils.js文件!", + 'autofloatMsg': "工具栏浮动依赖编辑器UI,您首先需要引入UI文件!", + 'loadconfigError': '获取后台配置项请求出错,上传功能将不能正常使用!', + 'loadconfigFormatError': '后台配置项返回格式出错,上传功能将不能正常使用!', + 'loadconfigHttpError': '请求后台配置项http错误,上传功能将不能正常使用!', + 'insertcode': { + 'as3': 'ActionScript 3', + 'bash': 'Bash/Shell', + 'cpp': 'C/C++', + 'css': 'CSS', + 'cf': 'ColdFusion', + 'c#': 'C#', + 'delphi': 'Delphi', + 'diff': 'Diff', + 'erlang': 'Erlang', + 'groovy': 'Groovy', + 'html': 'HTML', + 'java': 'Java', + 'jfx': 'JavaFX', + 'js': 'JavaScript', + 'pl': 'Perl', + 'php': 'PHP', + 'plain': 'Plain Text', + 'ps': 'PowerShell', + 'python': 'Python', + 'ruby': 'Ruby', + 'scala': 'Scala', + 'sql': 'SQL', + 'vb': 'Visual Basic', + 'xml': 'XML' + }, + 'confirmClear': "确定清空当前文档么?", + 'contextMenu': { + 'delete': "删除", + 'selectall': "全选", + 'deletecode': "删除代码", + 'cleardoc': "清空文档", + 'confirmclear': "确定清空当前文档么?", + 'unlink': "删除超链接", + 'paragraph': "段落格式", + 'edittable': "表格属性", + 'aligntd': "单元格对齐方式", + 'aligntable': '表格对齐方式', + 'tableleft': '左浮动', + 'tablecenter': '居中显示', + 'tableright': '右浮动', + 'edittd': "单元格属性", + 'setbordervisible': '设置表格边线可见', + 'justifyleft': '左对齐', + 'justifyright': '右对齐', + 'justifycenter': '居中对齐', + 'justifyjustify': '两端对齐', + 'table': "表格", + 'inserttable': '插入表格', + 'deletetable': "删除表格", + 'insertparagraphbefore': "前插入段落", + 'insertparagraphafter': '后插入段落', + 'deleterow': "删除当前行", + 'deletecol': "删除当前列", + 'insertrow': "前插入行", + 'insertcol': "左插入列", + 'insertrownext': '后插入行', + 'insertcolnext': '右插入列', + 'insertcaption': '插入表格名称', + 'deletecaption': '删除表格名称', + 'inserttitle': '插入表格标题行', + 'deletetitle': '删除表格标题行', + 'inserttitlecol': '插入表格标题列', + 'deletetitlecol': '删除表格标题列', + 'averageDiseRow': '平均分布各行', + 'averageDisCol': '平均分布各列', + 'mergeright': "向右合并", + 'mergeleft': "向左合并", + 'mergedown': "向下合并", + 'mergecells': "合并单元格", + 'splittocells': "完全拆分单元格", + 'splittocols': "拆分成列", + 'splittorows': "拆分成行", + 'tablesort': '表格排序', + 'enablesort': '设置表格可排序', + 'disablesort': '取消表格可排序', + 'reversecurrent': '逆序当前', + 'orderbyasc': '按ASCII字符升序', + 'reversebyasc': '按ASCII字符降序', + 'orderbynum': '按数值大小升序', + 'reversebynum': '按数值大小降序', + 'borderbk': '边框底纹', + 'setcolor': '表格隔行变色', + 'unsetcolor': '取消表格隔行变色', + 'setbackground': '选区背景隔行', + 'unsetbackground': '取消选区背景', + 'redandblue': '红蓝相间', + 'threecolorgradient': '三色渐变', + 'copy': "复制(Ctrl + c)", + 'copymsg': "浏览器不支持,请使用 'Ctrl + c'", + 'paste': "粘贴(Ctrl + v)", + 'pastemsg': "浏览器不支持,请使用 'Ctrl + v'" + }, + 'copymsg': "浏览器不支持,请使用 'Ctrl + c'", + 'pastemsg': "浏览器不支持,请使用 'Ctrl + v'", + 'anchorMsg': "链接", + 'clearColor': '清空颜色', + 'standardColor': '标准颜色', + 'themeColor': '主题颜色', + 'property': '属性', + 'default': '默认', + 'modify': '修改', + 'save': '保存', + 'formulaedit': '公式修改', + 'justifyleft': '左对齐', + 'justifyright': '右对齐', + 'justifycenter': '居中', + 'justify': '默认', + 'clear': '清除', + 'delete': '删除', + 'clickToUpload': "点击上传", + 'unset': '尚未设置语言文件', + 't_row': '行', + 't_col': '列', + 'more': '更多', + 'pasteOpt': '粘贴选项', + 'pasteSourceFormat': "保留源格式", + 'tagFormat': '只保留标签', + 'pasteTextFormat': '只保留文本', + 'autoTypeSet': { + 'mergeLine': "合并空行", + 'delLine': "清除空行", + 'removeFormat': "清除格式", + 'indent': "首行缩进", + 'alignment': "对齐方式", + 'imageFloat': "图片浮动", + 'removeFontsize': "清除字号", + 'removeFontFamily': "清除字体", + 'removeHtml': "清除冗余HTML代码", + 'pasteFilter': "粘贴过滤", + 'run': "执行", + 'symbol': '符号转换', + 'bdc2sb': '全角转半角', + 'tobdc': '半角转全角' + }, + + 'background': { + 'static': { + 'lang_background_normal': '背景设置', + 'lang_background_local': '在线图片', + 'lang_background_set': '选项', + 'lang_background_none': '无背景色', + 'lang_background_colored': '有背景色', + 'lang_background_color': '颜色设置', + 'lang_background_netimg': '网络图片', + 'lang_background_align': '对齐方式', + 'lang_background_position': '精确定位', + 'repeatType': {'options': ["居中", "横向重复", "纵向重复", "平铺", "自定义"]} + + }, + 'noUploadImage': "当前未上传过任何图片!", + 'toggleSelect': "单击可切换选中状态\n原图尺寸: " + }, + //===============dialog i18N======================= + 'insertimage': { + 'static': { + 'lang_tab_remote': "插入图片", //节点 + 'lang_tab_upload': "本地上传", + 'lang_tab_online': "在线管理", + 'lang_input_url': "地 址:", + 'lang_input_size': "大 小:", + 'lang_input_width': "宽度", + 'lang_input_height': "高度", + 'lang_input_border': "边 框:", + 'lang_input_vhspace': "边 距:", + 'lang_input_title': "描 述:", + 'lang_input_align': '图片浮动方式:', + 'lang_imgLoading': " 图片加载中……", + 'lang_start_upload': "开始上传", + 'lock': {'title': "锁定宽高比例"}, //属性 + 'searchType': {'title': "图片类型", 'options': ["新闻", "壁纸", "表情", "头像"]}, //select的option + 'searchTxt': {'value': "请输入搜索关键词"}, + 'searchBtn': {'value': "百度一下"}, + 'searchReset': {'value': "清空搜索"}, + 'noneAlign': {'title': '无浮动'}, + 'leftAlign': {'title': '左浮动'}, + 'rightAlign': {'title': '右浮动'}, + 'centerAlign': {'title': '居中独占一行'} + }, + 'uploadSelectFile': '点击选择图片', + 'uploadAddFile': '继续添加', + 'uploadStart': '开始上传', + 'uploadPause': '暂停上传', + 'uploadContinue': '继续上传', + 'uploadRetry': '重试上传', + 'uploadDelete': '删除', + 'uploadTurnLeft': '向左旋转', + 'uploadTurnRight': '向右旋转', + 'uploadPreview': '预览中', + 'uploadNoPreview': '不能预览', + 'updateStatusReady': '选中_张图片,共_KB。', + 'updateStatusConfirm': '已成功上传_张照片,_张照片上传失败', + 'updateStatusFinish': '共_张(_KB),_张上传成功', + 'updateStatusError': ',_张上传失败。', + 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', + 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', + 'errorExceedSize': '文件大小超出', + 'errorFileType': '文件格式不允许', + 'errorInterrupt': '文件传输中断', + 'errorUploadRetry': '上传失败,请重试', + 'errorHttp': 'http请求错误', + 'errorServerUpload': '服务器返回出错', + 'remoteLockError': "宽高不正确,不能所定比例", + 'numError': "请输入正确的长度或者宽度值!例如:123,400", + 'imageUrlError': "不允许的图片格式或者图片域!", + 'imageLoadError': "图片加载失败!请检查链接地址或网络状态!", + 'searchRemind': "请输入搜索关键词", + 'searchLoading': "图片加载中,请稍后……", + 'searchRetry': " :( ,抱歉,没有找到图片!请重试一次!" + }, + 'attachment': { + 'static': { + 'lang_tab_upload': '上传附件', + 'lang_tab_online': '在线附件', + 'lang_start_upload': "开始上传", + 'lang_drop_remind': "可以将文件拖到这里,单次最多可选100个文件" + }, + 'uploadSelectFile': '点击选择文件', + 'uploadAddFile': '继续添加', + 'uploadStart': '开始上传', + 'uploadPause': '暂停上传', + 'uploadContinue': '继续上传', + 'uploadRetry': '重试上传', + 'uploadDelete': '删除', + 'uploadTurnLeft': '向左旋转', + 'uploadTurnRight': '向右旋转', + 'uploadPreview': '预览中', + 'updateStatusReady': '选中_个文件,共_KB。', + 'updateStatusConfirm': '已成功上传_个文件,_个文件上传失败', + 'updateStatusFinish': '共_个(_KB),_个上传成功', + 'updateStatusError': ',_张上传失败。', + 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', + 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', + 'errorExceedSize': '文件大小超出', + 'errorFileType': '文件格式不允许', + 'errorInterrupt': '文件传输中断', + 'errorUploadRetry': '上传失败,请重试', + 'errorHttp': 'http请求错误', + 'errorServerUpload': '服务器返回出错' + }, + 'insertvideo': { + 'static': { + 'lang_tab_insertV': "插入视频", + 'lang_tab_searchV': "搜索视频", + 'lang_tab_uploadV': "上传视频", + 'lang_video_url': "视频网址", + 'lang_video_size': "视频尺寸", + 'lang_videoW': "宽度", + 'lang_videoH': "高度", + 'lang_alignment': "对齐方式", + 'videoSearchTxt': {'value': "请输入搜索关键字!"}, + 'videoType': {'options': ["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]}, + 'videoSearchBtn': {'value': "百度一下"}, + 'videoSearchReset': {'value': "清空结果"}, + + 'lang_input_fileStatus': ' 当前未上传文件', + 'startUpload': {'style': "background:url(upload.png) no-repeat;"}, + + 'lang_upload_size': "视频尺寸", + 'lang_upload_width': "宽度", + 'lang_upload_height': "高度", + 'lang_upload_alignment': "对齐方式", + 'lang_format_advice': "建议使用mp4格式." + + }, + 'numError': "请输入正确的数值,如123,400", + 'floatLeft': "左浮动", + 'floatRight': "右浮动", + 'default': "默认", + 'block': "独占一行", + 'urlError': "输入的视频地址有误,请检查后再试!", + 'loading': "  视频加载中,请等待……", + 'clickToSelect': "点击选中", + 'goToSource': '访问源视频', + 'noVideo': "    抱歉,找不到对应的视频,请重试!", + + 'browseFiles': '浏览文件', + 'uploadSuccess': '上传成功!', + 'delSuccessFile': '从成功队列中移除', + 'delFailSaveFile': '移除保存失败文件', + 'statusPrompt': ' 个文件已上传! ', + 'flashVersionError': '当前Flash版本过低,请更新FlashPlayer后重试!', + 'flashLoadingError': 'Flash加载失败!请检查路径或网络状态', + 'fileUploadReady': '等待上传……', + 'delUploadQueue': '从上传队列中移除', + 'limitPrompt1': '单次不能选择超过', + 'limitPrompt2': '个文件!请重新选择!', + 'delFailFile': '移除失败文件', + 'fileSizeLimit': '文件大小超出限制!', + 'emptyFile': '空文件无法上传!', + 'fileTypeError': '文件类型不允许!', + 'unknownError': '未知错误!', + 'fileUploading': '上传中,请等待……', + 'cancelUpload': '取消上传', + 'netError': '网络错误', + 'failUpload': '上传失败!', + 'serverIOError': '服务器IO错误!', + 'noAuthority': '无权限!', + 'fileNumLimit': '上传个数限制', + 'failCheck': '验证失败,本次上传被跳过!', + 'fileCanceling': '取消中,请等待……', + 'stopUploading': '上传已停止……', + + 'uploadSelectFile': '点击选择文件', + 'uploadAddFile': '继续添加', + 'uploadStart': '开始上传', + 'uploadPause': '暂停上传', + 'uploadContinue': '继续上传', + 'uploadRetry': '重试上传', + 'uploadDelete': '删除', + 'uploadTurnLeft': '向左旋转', + 'uploadTurnRight': '向右旋转', + 'uploadPreview': '预览中', + 'updateStatusReady': '选中_个文件,共_KB。', + 'updateStatusConfirm': '成功上传_个,_个失败', + 'updateStatusFinish': '共_个(_KB),_个成功上传', + 'updateStatusError': ',_张上传失败。', + 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', + 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', + 'errorExceedSize': '文件大小超出', + 'errorFileType': '文件格式不允许', + 'errorInterrupt': '文件传输中断', + 'errorUploadRetry': '上传失败,请重试', + 'errorHttp': 'http请求错误', + 'errorServerUpload': '服务器返回出错' + }, + 'insertaudio': { + 'static': { + 'lang_tab_insertV': "插入音频", + 'lang_tab_searchV': "搜索音频", + 'lang_tab_uploadV': "上传音频", + 'lang_video_url': "音频网址", + 'lang_video_size': "音频尺寸", + 'lang_videoW': "宽度", + 'lang_videoH': "高度", + 'lang_alignment': "对齐方式", + 'videoSearchTxt': {'value': "请输入搜索关键字!"}, + 'videoType': {'options': ["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]}, + 'videoSearchBtn': {'value': "百度一下"}, + 'videoSearchReset': {'value': "清空结果"}, + + 'lang_input_fileStatus': ' 当前未上传文件', + 'startUpload': {'style': "background:url(upload.png) no-repeat;"}, + + 'lang_upload_size': "音频尺寸", + 'lang_upload_width': "宽度", + 'lang_upload_height': "高度", + 'lang_upload_alignment': "对齐方式", + 'lang_format_advice': "建议使用mp4格式." + + }, + 'numError': "请输入正确的数值,如123,400", + 'floatLeft': "左浮动", + 'floatRight': "右浮动", + 'default': "默认", + 'block': "独占一行", + 'urlError': "输入的音频地址有误,请检查后再试!", + 'loading': "  音频加载中,请等待……", + 'clickToSelect': "点击选中", + 'goToSource': '访问源音频', + 'noVideo': "    抱歉,找不到对应的音频,请重试!", + + 'browseFiles': '浏览文件', + 'uploadSuccess': '上传成功!', + 'delSuccessFile': '从成功队列中移除', + 'delFailSaveFile': '移除保存失败文件', + 'statusPrompt': ' 个文件已上传! ', + 'flashVersionError': '当前Flash版本过低,请更新FlashPlayer后重试!', + 'flashLoadingError': 'Flash加载失败!请检查路径或网络状态', + 'fileUploadReady': '等待上传……', + 'delUploadQueue': '从上传队列中移除', + 'limitPrompt1': '单次不能选择超过', + 'limitPrompt2': '个文件!请重新选择!', + 'delFailFile': '移除失败文件', + 'fileSizeLimit': '文件大小超出限制!', + 'emptyFile': '空文件无法上传!', + 'fileTypeError': '文件类型不允许!', + 'unknownError': '未知错误!', + 'fileUploading': '上传中,请等待……', + 'cancelUpload': '取消上传', + 'netError': '网络错误', + 'failUpload': '上传失败!', + 'serverIOError': '服务器IO错误!', + 'noAuthority': '无权限!', + 'fileNumLimit': '上传个数限制', + 'failCheck': '验证失败,本次上传被跳过!', + 'fileCanceling': '取消中,请等待……', + 'stopUploading': '上传已停止……', + + 'uploadSelectFile': '点击选择文件', + 'uploadAddFile': '继续添加', + 'uploadStart': '开始上传', + 'uploadPause': '暂停上传', + 'uploadContinue': '继续上传', + 'uploadRetry': '重试上传', + 'uploadDelete': '删除', + 'uploadTurnLeft': '向左旋转', + 'uploadTurnRight': '向右旋转', + 'uploadPreview': '预览中', + 'updateStatusReady': '选中_个文件,共_KB。', + 'updateStatusConfirm': '成功上传_个,_个失败', + 'updateStatusFinish': '共_个(_KB),_个成功上传', + 'updateStatusError': ',_张上传失败。', + 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', + 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', + 'errorExceedSize': '文件大小超出', + 'errorFileType': '文件格式不允许', + 'errorInterrupt': '文件传输中断', + 'errorUploadRetry': '上传失败,请重试', + 'errorHttp': 'http请求错误', + 'errorServerUpload': '服务器返回出错' + }, + 'template': { + 'static': { + 'lang_template_bkcolor': '背景颜色', + 'lang_template_clear': '保留原有内容', + 'lang_template_select': '选择模板' + }, + 'blank': "空白文档", + 'blog': "博客文章", + 'resume': "个人简历", + 'richText': "图文混排", + 'sciPapers': "科技论文" + + + }, + 'scrawl': { + 'static': { + 'lang_input_previousStep': "上一步", + 'lang_input_nextsStep': "下一步", + 'lang_input_clear': '清空', + 'lang_input_addPic': '添加背景', + 'lang_input_ScalePic': '缩放背景', + 'lang_input_removePic': '删除背景', + 'J_imgTxt': {title: '添加背景图片'} + }, + 'noScarwl': "尚未作画,白纸一张~", + 'scrawlUpLoading': "涂鸦上传中,别急哦~", + 'continueBtn': "继续", + 'imageError': "糟糕,图片读取失败了!", + 'backgroundUploading': '背景图片上传中,别急哦~' + }, + 'anchor': { + 'static': { + 'lang_input_anchorName': '锚点名字:' + } + }, + 'emotion': { + 'static': { + 'lang_input_choice': '精选', + 'lang_input_Tuzki': '兔斯基', + 'lang_input_BOBO': 'BOBO', + 'lang_input_lvdouwa': '绿豆蛙', + 'lang_input_babyCat': 'baby猫', + 'lang_input_bubble': '泡泡', + 'lang_input_youa': '有啊' + } + }, + 'help': { + 'static': { + 'lang_input_about': '关于 UEditor Plus', + 'lang_input_shortcuts': '快捷键', + 'lang_input_introduction': 'UEditor Plus 是基于百度UEditor二次开发的所见即所得富文本web编辑器,主要丰富也界面样式,注重用户体验等特点。基于Apache 2.0协议开源,允许自由使用和修改代码。', + 'lang_Txt_shortcuts': '快捷键', + 'lang_Txt_func': '功能', + 'lang_Txt_bold': '给选中字设置为加粗', + 'lang_Txt_copy': '复制选中内容', + 'lang_Txt_cut': '剪切选中内容', + 'lang_Txt_Paste': '粘贴', + 'lang_Txt_undo': '重新执行上次操作', + 'lang_Txt_redo': '撤销上一次操作', + 'lang_Txt_italic': '给选中字设置为斜体', + 'lang_Txt_underline': '给选中字加下划线', + 'lang_Txt_selectAll': '全部选中', + 'lang_Txt_visualEnter': '软回车', + 'lang_Txt_fullscreen': '全屏' + } + }, + 'insertframe': { + 'static': { + 'lang_input_address': '地址:', + 'lang_input_width': '宽度:', + 'lang_input_height': '高度:', + 'lang_input_isScroll': '允许滚动条:', + 'lang_input_frameborder': '显示框架边框:', + 'lang_input_alignMode': '对齐方式:', + 'align': {title: "对齐方式", options: ["默认", "左对齐", "右对齐", "居中"]} + }, + 'enterAddress': '请输入地址!' + }, + 'link': { + 'static': { + 'lang_input_text': '文本内容:', + 'lang_input_url': '链接地址:', + 'lang_input_title': '标题:', + 'lang_input_target': '是否在新窗口打开:' + }, + 'validLink': '只支持选中一个链接时生效', + 'httpPrompt': '您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀' + }, + 'searchreplace': { + 'static': { + lang_tab_search: "查找", + lang_tab_replace: "替换", + lang_search1: "查找", + lang_search2: "查找", + lang_replace: "替换", + lang_searchReg: '支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”', + lang_searchReg1: '支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”', + lang_case_sensitive1: "区分大小写", + lang_case_sensitive2: "区分大小写", + nextFindBtn: {value: "下一个"}, + preFindBtn: {value: "上一个"}, + nextReplaceBtn: {value: "下一个"}, + preReplaceBtn: {value: "上一个"}, + repalceBtn: {value: "替换"}, + repalceAllBtn: {value: "全部替换"} + }, + getEnd: "已经搜索到文章末尾!", + getStart: "已经搜索到文章头部", + countMsg: "总共替换了{#count}处!" + }, + 'spechars': { + 'static': {}, + tsfh: "特殊字符", + lmsz: "罗马字符", + szfh: "数学字符", + rwfh: "日文字符", + xlzm: "希腊字母", + ewzm: "俄文字符", + pyzm: "拼音字母", + yyyb: "英语音标", + zyzf: "其他" + }, + 'edittable': { + 'static': { + 'lang_tableStyle': '表格样式', + 'lang_insertCaption': '添加表格名称行', + 'lang_insertTitle': '添加表格标题行', + 'lang_insertTitleCol': '添加表格标题列', + 'lang_orderbycontent': "使表格内容可排序", + 'lang_tableSize': '自动调整表格尺寸', + 'lang_autoSizeContent': '按表格文字自适应', + 'lang_autoSizePage': '按页面宽度自适应', + 'lang_example': '示例', + 'lang_borderStyle': '表格边框', + 'lang_color': '颜色:' + }, + captionName: '表格名称', + titleName: '标题', + cellsName: '内容', + errorMsg: '有合并单元格,不可排序' + }, + 'edittip': { + 'static': { + lang_delRow: '删除整行', + lang_delCol: '删除整列' + } + }, + 'edittd': { + 'static': { + lang_tdBkColor: '背景颜色:' + } + }, + 'formula': { + 'static': {} + }, + 'wordimage': { + 'static': { + lang_resave: "转存步骤", + uploadBtn: {src: "upload.png", alt: "上传"}, + clipboard: {style: "background: url(copy.png) -153px -1px no-repeat;"}, + lang_step: "1、点击顶部复制按钮,将地址复制到剪贴板;2、点击添加照片按钮,在弹出的对话框中使用Ctrl+V粘贴地址;3、点击打开后选择图片上传流程。" + }, + 'fileType': "图片", + 'flashError': "FLASH初始化失败,请检查FLASH插件是否正确安装!", + 'netError': "网络连接错误,请重试!", + 'copySuccess': "图片地址已经复制!", + 'flashI18n': {} //留空默认中文 + }, +}; diff --git a/public/static/plugs/ueditor/plugins/demo/demo.js b/public/static/plugs/ueditor/plugins/demo/demo.js new file mode 100644 index 0000000..addd6e0 --- /dev/null +++ b/public/static/plugs/ueditor/plugins/demo/demo.js @@ -0,0 +1,3 @@ +(function () { + +})(); diff --git a/public/static/plugs/ueditor/themes/default/css/ueditor.css b/public/static/plugs/ueditor/themes/default/css/ueditor.css new file mode 100644 index 0000000..80b359a --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/css/ueditor.css @@ -0,0 +1,2091 @@ +/*基础UI构建 +*/ +:root { + --edui-color-active-bg: rgba(200, 200, 200, 0.3); + --edui-color-border: #EEEEEE; + --edui-bg-toolbar: #FFFFFF; + --edui-color-muted: #CCCCCC; +} +@font-face { + font-family: "edui-iconfont"; + /* Project id 2897874 */ + src: url("data:application/octet-stream;base64,d09GMgABAAAAAC6IAAsAAAAAZJAAAC43AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACQLgqBoHiBgwEBNgIkA4MIC4FGAAQgBYUjB4oFGwxUdYacxwFAazdlFGVhlaMINg6AiLYt+/8/JrckBu4G6PtVhQTH3ZgHEw7ZGIS0AwU7I1KxJBpeyAe5d7lZ9VsLgpBPDiKp8tGejC58hBYt5eVkzYJNQ4ZpYPJCcAuNwAeqja67euBKUPm95/Nz9b9xi7n3kKRoQlFrZO/BAyAHVYREF5nygEIDCY8w9yFFOES61aSQQkqDUEICKSSQUJNACi1IGgSp2dBEagDBwlnAw5IoRoOCio0D9USxEUQ75xELYmmcZwHkfQu2hqVfSwDw/Ms9O+/9uw8BJZklGJd8sORRW5ZgJm3Nw5b0slnDSDQ4ELGQLb3d63sU6glwQeS+zbao618pvvzfSnZ8KdDU8ePUtR1WtpMHyLfYq7welJinA8LgYGv3pCGWaREmkvOmcpq7V95tWRA4AsMlBSaBIWEnPmR9pK/0XTAECopBPgTDMQhej86/vq/6+inSc0ktk4aF7lO29Kn9ur4DkZcSbZBgQNBt5hwsNzG7Ds4LecRBRMD/qVq2BLkpUOcU6RCrUDQ5FY2bcv4MIHIwhESApE4gVzpB6QnCBg65CdLaT9QmEOJeipGgtHuEtN5H4kLMtXMs3blq/FzZndvW5v/xT+R6RWsHwEb7ufKSCU7HQnPLRKm3PxLDWpvd/GfM5ePXjSkRIpekP0R34/YeZFv/b5TBRRtYA3XRMPIYk/fj3mBAgDItrKN2aIqQreTYURI44mMaLDY227Tddfz20xxPm+HX4RO612AecYN17xBwxvz0zZ+K8mBxF+LbNHbu3uLWMz79Y4cNsD9ca28CZraAC2xQNLKMffMPWBOEpUWGBXA/fMieArCmjSvtxxNEKFQ4uXhqKVKZlDKbZp4GVm326DWgB/rlOQWWUFSyslrQ0no70U3vh/dnv2Un7cJtPdgV3vsPAe/wf/npz/8h0Hok+rPVf+Yfb7jhfV64IOIf/v3PG68z1lyWkX2f7cHPfPQNfQwsvBO5N/VH8KBCpSrVaiypVWdSvQaNmjQb0iJDpiyp0qQbkSJekmSJ4iWIEyVajFi+fKxbNqjEgnYDFgVYUWbVmmDjLBG6hAkXaEwPV4deffoVCVWuW74QxoQ2fgoUmpZnxqw58xylOkUaFiTblFE5cvkr1sqGWcFvEMB50ncDAgoqIBhUQnCoghBQDSGhBnKDJQgFtRAa6iAMTEJYqIfcoQHCQSOEhyaIAM0QEYYgErRAZMiAKJAJUSELokEq5AFpkCekQ3QYgbwgBfJ+iIcgCfKFZIhxccvvFRoTh7BYOLSVPyAKCoBoiA0xEAdiIS74QjzwgYJgHRLCMhQKg1A4lEDRsADJoB2SwwAUD4uQGgIgPaxAyVAGpcAqlAprkAmCoVIYh8xgQdMgApp36K8GQBhkhXCoDQKhPTAG9UIPNAAuNAYd0HfohX4cNqe/8AYfDwkogoeDUHi+UA4vCrrhySAfXhaEwFsABt7Sg69ejDZ0AsMP3cAoQDcxCtEnjGn0GSMPfcGYQV8xZtE3jDn0HWMe/QNwsB8PpdifBJ3YXzAi0UKMYdQKCMI7GGTjnQim8O49jOIDduSY3DFy0XSAPz6+hGJ8+nu0on9gnbqwH5jmBu4BzBcS3oC0F4gz9p4GcJmXDZYjiCUtVyCTs1scNh9BSnf5CcFmrh/X4QP4ChAoYpH8OHl/PoKZp6C8xZcRCdfCnrwf/9O84YYpPj7mK5WAINyzYFiAl/nlxBZ0mwVxxOBQchZ/TG2kVCvWdtFlSELoXJnUjHVhWdUN1oQgaOE6NcPF+2+N2DWr+l2KUrPh6p4zt8HdmkWXIspNgDqhzWjVisz9O8WkJyNofemVNvs69lRArKlpspRtUEDd9oUgW5GEFinLHZVQaEDUjzkzR/NZ/3M6ywJYppNp+V97uugWLSLTyhKVtSpzLNzEdeY48Hk+dVC1LT2uAuGZcfCIS7R/6LfvcaAkNhom0m5zjEe5pt/vjXS8QNUgybPtU+yajhE11RrkITUbLHxH83ziS63dkcGe0xb1TltKQkzmcdypNlo38l9jBQstd7L7jxEmquaVUVsbVjTqo2hSB9Gg9LUL0XJw5cTK0X9XpsSz5E5khZ8wq+GIDwLT/62tiVeSGwVCom1ObIU/eqrLctVayUrlqlg/YO6PkXGRPCupa57VceJq3YwppkCM2LabZsvpbGoY1Fj7PzXlMZt5NZW+vH7XAWOLRFijMURCxAnqyOs508XreSI2Vm126t2Ph9rybSjjQ52ZvABbw4OoBY5wwaTWAkAYmYS0EGGfv/SuNt2Xg74RfD6hTz7eq9tg6fWViN7p1Zxg0Fv4dhhaUaSOp1WrrS3B2rrn+3Xkvn5HN54DalCukirEN+cVw/Z9Mwhwxjk38G70Tt1saD7JsyjxGjNuwCnSub8ivkKjEU5qPU/Xw9b34Qd3kZYmWEML29SBefyiavUh/OrjQZOgQhi8HDk2EOqYx6pGBGMY0jHSraSqhVaT3JLG7LsXrUv3nDsXzPO30XnxeRgSARbUyqKCLEx0Iaf379QDZ87Vc4cKbAfPIicexMq75DoQakgfeYyTeFYDc6pHS1ebkbJiC1odg0+Z+xTjvSuhxqiftnqfQ6pPXpyC9/W7QyRK3zAm8JNm9zcd2BvluOEjVdM3VPSWj5Aa6K99Xn0QRNEyC6rFI4dhrxNseEpvuXdpDAgnXzvTXQQTI8sFtwsQxrL8YXXWq4Q+BKA4m2y8W9V7HN7hX49TIv3hXY3V/D41GOijc4+qCoffPX1yuSt82Ymgzdz0Dy8QBef6MMWNfRp6xUoNoIZaX8XLUoaVq++b03Suamhc5rCJIPK63l+9Qzho3yCMHtJSA0iuHwbCkRuYK940qQGxuv8MxyDGozc3GdDLGo0PNXQ9qTwV28WUV7WnPGve6mR1N05aDytUilMvL+XTje5AfeuIf/8t20ZD9+X3+d3w2KpIf+aWLr7/3nWDj37dceTI+m7HtSgKf/g6DHU5b15wLlkX1e2C5+OXA2wWJoXa+9pdnnRwIYMxiqzTZ7qmVpOY4K/2lTYZwt4EGHE6TuP4p5tH1NEDh768u1HaIl7v77EiD61HzgPzviY1s+40LG+wkIcwj4+wSdQkWtAT6k++DagidyjocH+TlOR8ZjeFHHlBpEl2EXqQmylsk7bVcVpmk5COSXI0zE91FFlZ8WDUu5DEiClSEaqwCGa5q326ZHDyt4biVJU5jBLbroWYFJvELaZln5wKuMEmDvPIUCEEJNBh2yhmS6iGmjewvd8Mnzm1jG67lnaK7xXUKcc0GpQIRXhbsk9OORWy2X0GY1JTOEXWZDpIp/mVIFajZ2XFZeIrQ+QUTH7GlFamFSWNSdKzyhN5+BnCtdzAkZ0breYTd1kSLJzLRnQXQ3fYAmwLgkJM3it/+TjZjbJdInz2hICjuHz8TrOcPETqyLLOSxuwhHLZNFUWtipn145JZVgFobjAYISIBbLBHdV8TcqleIwTxWyOEdmkvBN1qY9FSZ01LimKv0MaPtouUEfWZS4bmtKn+2xeUYyEXzyC8eBN+/p+MA/eBgScDWMLzb+qKe/rQYsdHOl+W91swW6v71YqrjBAKOWy/pzvkNsH59JYNj1uE+DtEP0i9EZJwGFFKjXWRcAcVIXnmfRH/fuljPQTPc6YoIA2ID1kHm0TJRk0ABwihJ91GlYgowMFVBuu/XscIOQdUjzGQLUIjCzpTge9C78lSMiFAY0EhMtdV4jBKrK7xiqkIKoiRfqnSpOSHVA0GhTqUnMSCLPNqdoit1dlRlihIeSM8PZqNSYQINPFqHJWgAxfqVTG7RPL+s6iGEdlYXYHyvRGNICoa5ygRCfP5Yc2mGw/EDa4OzkyrFjU5MYCNKUWEJZxoas+IIWvFK8aiGxj0cOFbWYfQTEd/HxhKITsz/8TN9E2aRVSA93Dq94WQPHTbXyTrZvBvLKsDqZHiixsK0Zh+Hr14e4JbidQtjaL2cJPMLKeDGsMAYBzTHsV4zBOGMRH2ydwF3XutpnElv4AgQgrCjHP7krqOLOLnM7jspvp3RbrLRQVMMiYzCQlHmKXowMdefIGCp8BWqkOEmqoEA/msYG3ixbwG82sIuQFjzJ2FVYUPCjzumGQweQaiL2DGqoamNMqV/ODB0GUzHeikMX+R7n7ru87K1s9emJVyzV9iBl9mm9EYb8fyxE/od52QNV9TEJ3EIE7ta7iVv29VMQ9uVfHQM6PAn1XjxV17rmlPvEskhjp+qOcvOcEoFsZe7vZhZFnGd1Xsxlp/FOYKF4k4EVgNzZ3hjSytVeMtEnA5xu6GqpZwkY6D4wijAl5/1xm1OCza7siCflTLcF4LJZx3H+4eft07L0tFYmVZf0x166UNnPwFRR0IMIIQSKN+T3eo7QoEPd5qUAVeeF6c8WC8N284NBH1o9oRlLXvC+GFR8dpZQfkb6ScYosdeBHtQ9gM9IjGHtKicAH1Jsx33ww1nHkPLdGNzlb+M16qfJ1auPqs+dtoDLr4WBqaxEJgy4gJUfAhYE5UQDcAPQ2cbwYLtxx7l2Cebx41759HpxywZLBc6AbGP/tLv7QvTW8qtguAKxCO5ZABhWLHY/xczlZs/G9vuuhz4WTof70vcckuoSEI60reYpZhWNg0aETJBoAXNKz49HULXmfQTLvl4kOfoV68CnD6fUWc7gYv7UQt2AW5/B5JCVm9n3S7CKUzvG3QUoJUVdOe5OVWMUdUm9FsXXl3KF/ephcnj14Nhsf2vd1QcbU3zeCQgpFipVYzeRPGxkdVra1N0GXcNXg5nfnPys/kWxc8NrZD8r/tG8qjE1Q1a6BqjIubqER8HsfPyt6b9dYEB0BfP8BJPj0PagzfjfLqFlGfZhM+h2DXcZqDBgajLPkZYFnBQn4XM5R41WmoE4DVLcH6EaXGGZUCkNf8U7HqK+dOjSzMgynjcZI7VD4/oSOLnObgUv+V0StwUyyIqd0tsrr/vtQ+pMpd1zzOrvkkE9p5tqS5tK2j2JVzo4LuBwF6oB2X3l16sCJVVHUtAxpgt3ndAktbFDnFrjsADAnS9hkkc/XuVZQeW5kdjVNgGp2rdkCRzF3UDLriFspdYPiLwok8mQfCD4wr9JiwXUr47QHCp5qrcBgkN/o9O6zlkW6cTX+0b24BGcv+l/RfMTDRL8Plz7Gdli/sAi5+tkf75/Kp0fWQzs2G73LOYwVJP7q/dPkahDMOV5XnGq2dEPJmsFEUN5OMyrNvco4rAylOmg1Q8oTe7A4mRoQfQexS9LIwmCybwKE+kapAVXXrpmi2gJSMq+NIPa8MdfZkEmkdN8e657ludsjhK7EGs2Grm3WHVnvh47tLmYIcL62C7Ab/Mot31hA06YHgB8MgbpG54ISGMKSTMbK6MczYVONko0aGal6du17mrAceRYMfK6Zb4IyDxdWPxkIMH+7MClvEEoKnIcZviW3XmNTuxzm9NtJ5vlUlVoQNkIUqrivxFUI2CSIEWlRt8cAwgrkFesqmU0znmmnMmc/uWVGlmkwqQzNWo+bDugHdbJ1ukZRGz4kSa6MvHrN1nPbP636rm+H/exkbUq8EDjRl70Z7/hL82RO7fWTM5+s/L3Qnaarwy9AcVZnM895pyHvcO2V8fwfI2O/rZ973eojnKGuLSh2JlmLZJElOrd2C+tMiJOKexqx+4a+gjwwwR2I1xDtq75DH57t35+7QWY3aQ5faiZdBrSJSfaeeHYsVjPjO+tOMtmwtl13b4FiXWvnFWJLk/oENXcxUdqR0omUViQ3oxtJR+Qyk8jgVQOGCGtG4oPYIjk23ABVq+qfJgvyROP2J87Kec3sPEYGVgS0IbWe8rl289VYu9GfDRMuOqfcoKYKMR6o4IBp9Uya8/HYGD5SmvYXFesxHT1xJX6GLku7sGJYunwJzz9eRdIuxk/1jvO5p6OIzkmcTpVWJm+cLvJYJURRHi60n7pdnDO3gRe2SQTGzhUDvX3pljp2U9DcMsBtvRguE+sjgrdRP92wWzrclb3AzQDqJq6nKeyB2N/j0lBD9xcGiEnX8zgdVsx1C6DHL3CFymUDHC8mZZrsYdKlGM824HZPOvf0Pn4cGG9M2BV34uEgiYtILzopHEjAfGw4+dK55arVvbmndFqg/ybxP6NuF/839UxnAO8coklq98Xr7b00rD45Nr+Hp5qZyQj4KuDFwFrWGz/uBqA8JbZQzyUuOs2oSln/Und7u9BNC4JSsxPaP5/cK14V56qzJemkH1OafvCx2gqiT/VGtJBVFC/A7tlCjpjbq/YkjVNq/gI696BZLg/KSuMvL57ElSruVFE8ESV1b44Z88i3RfJ++f/a2YQH44fn8BtX4nS6a+CxXggTD5EPcrLPv1M7fAYVzwQLzI9qb7lIPvH+6S17J2tdU0HfXJEVwfgGE56O9w8g8mieO/VpkTRxwg3QsEyYxEZtzjYccYInLkeyh49G5Rk3Ceg8nsJsM8Azmc/+1oHdTVxKHdPbNH82DNb8X3Wz5uPcBx9OfJT/T5mQ0ZxzzUf/LX+5RvmPn3rls7X0m+obb2hvpR4kyhH1jfRbfhDXQU0UkgiSkKmWJGgxgcP4pU1UORsvjrZfGFSGPSDa0hxlibDXqPBsbFMHQ5vG0DmafDmddl5gYSWvkNs0PZPkKWxLCEtoE37a0aaaIZ2hWg5aSrgOWCjsDMf2gTBKGHjyBMynQQ8WA/Eg3d8ZLxu8dU0MGupLx8c3bky6csW1WiZQKSlbEtrUBw/kY6qGTLcMt4ACPqglbd6MPf9jM0nrJudS8lf5b35ezZWD1f6e/6cVeJyMfAbSF7t+Z0tRi3jq26K34oHmAXB3TeXdSsVDYuWe3QzDwO1Y9j8BI/prSFMEPBZZjriRfI09AGf0KpJiYytjD8VUDp7xIuOGhx/6P39eabUmqytpVFkijrXpn+53QYl8waR0RRMFGaIt4Qv0LEesvKtf/kcgVO7e/e3Hj+XFhw/NbWiQri8pAX6N7oM//dRV26U2XxmdJ5Xm1UjzXZuROX5u/CygdeGj8qMUqinJl0Y1lx2jvrLzG87T7xwYf/7qjVb75lV+4oyWsigIl9vQoNVU5C2ZTskuxWRq5uY12ouhNpzaY1m1shUgz1rDLC8/XRVw138oIDZgyH/Q+JsC6hZLVhxbvyHVPm0cZUcNKiG2qbujBAr+dtnEvn35XkmBSnlJiXyOkOkc66VQ8NYu6e1VE9UVND57V+CXIkPRF4Nujg/EGVB+lyY8KEWEDg+dPDk0LCW80Z0LR4c5dz2c10VnvOr1QzP2v2Kk+N05xUD7nbzjN62M5qRto/XzHWT20CwePVjmEBh3voV47KU9QnLmKkhI6wlB+xIc/B5a/lm+4s9M8lqCcAn9gn7altbiT9naGFiq0xszOElfIaqAL6BCX+fOqwSTgtIlBZw0Q0pao1iXlRyg86+e65u8CWrkhfAaoU2BzqdG558ckKWf5KPyiTMYVFPYQHwIjHh+l1iMjwSk8nPFtMRkdKk0ewpnqm9MGsDjjgQnhp9n5qU0VeSrTAc4EIBg1hbJC6OiCuVF40JGg0738cOas/RT0sMMISGGsPTjQk4ZQtL9OP0PEvZUr9YnVJX/ceE7kzft2q/ZM2kadT6l73+bGXLbt4/HuhYzyGrRg5z5gmdAcLdzAo9omlSuKpkZVEZBJFL4DTuX7QaJnWt6M0pOxlbzjSxzPTbdPYs9xd/krcmPbnx8wk7/+/O/vzw9HmEbeavzOXVekcWyLGBnc3Mq8O+v7zL5Gzwz6VrTmn37MJFzekrNUOW5tsJNnakb7SmpNcEKva5Rwa/uPvqkpohdqNTJ1il9DfZzTxemz1DqtI3BrL1Ykq9eNF9/EEjEtNC3BA5hSO3+bSjL7wxrgHnGjxXacBpuiDIHWD+YPtT8R/Oqj82fmttDaL/QQn/2qj+HOqkBjzQqaL947GAuqt6sLFHOdPOE0oI5dOVErjZ6jtBsEmdHRmaLTVcSGc2xm8RX6MHNjNukuYvn+nLx7zyDHBmRWI91SjtwnWb6/Y+n1vDG3+LUZB6GiF5BtpNR14PnEY5TT7xT83iaMaafUZovjSgYWxhd67kg33T7kPfBRcTFxE7vM7fzTQgkq104FlmQJ41+xUjUJUZl6jL7N1garTo2p/rvG3wLaRTdKXBzH6rNjZrPSY4JVoGQRaW54WSpJDdHMi1X4malpIBppQv9QLAqhptMyXdrc4NEemGwWsYzs0UtfjA+9Q5tEnXSKyqf6lsTmxSK5+16ofALT5ws1qsP566iT4gmQpoLPwUFcnkSHiewCN1NdKCL6BOeklhMh5r7DdNOasf8xuNu5eBs9X2/GYkdRHV6qDeg1ZMna4jtpMhWb4t7zWxS2uUtaPKbRpIyJcwkplquRXeTutH6yUv9wjT4JJDFU0gpOHQHqQOvlbaD/6Z10oQHYrBVu/KC3N2i8zZc9PCuFAQSsDlRwKExYZyUfkxY/RQnulUwzLKKXocs2cl+8m/RgMG7Kua7kowX49vR60fB3Bd0TH9pSq9y8v7IRzcdDd2ViEezOdcdwvRgaFgHBmAcWNrk1Ghjb8aq8g9/7cE4KA4P7R+G29qM2kNWuJ1DoA+Jiq7aHzq+0IXtwRw2sC4/pzk3J+PQ2MouDh/63OSzWgONltWeGhK7k3IMKGnLYbUVXN9OwtQ7G5ubVXmt5/reX7EObAMLKCJwVDMMwYXRKBQYHE7uO8FGiEEkhaKz6NLLE1H4ZIYI48TysU6Kc/g5n2QMAeZENnSCx1KL4QguqNTSJFy5RmfRqorswB0nzPfK9FD+8+YEpbfF7jXz8zevuumZHkL8W5hbjg/O91lQ6/31s0XQ2KT8G8jLyBgnhtJPuVJCgXnMI4zJom9OK8mr8jN0T7dA+GnuzeOnOwgysLPm2DLuxoVPKzCCHrLx6/7Qp6D3iZF8gmyszKFyYCDu/dt4iyUensT2mlzZsEaXiVgwnT/dpnXnM0/jFfjTTL671pZ7ESzIRKzRVTXQJ6vZcEt8vIXMUfvk/tyUyTfyTxoFWYHzV/nmcrTgsl+9rF5eJ6sDi/yTRRl+KU9p/KmjTwUpvVLduUCbe2TpVH7r+RXxTfF9ZowDE1SjYgWGGESilLxAvqshgSr/6iCMg9yPYWP62/w5Vh+19xL1Em+1j5XRBD7/8KZwzZCavI8E3UrC9JeZUf3USNr8AarKg/OQ3f13hCiju4JtUN+CSPvIajNEY8MwSB6sMg/6sJlkHFGX5h0gZsn6Wdg0h52F0WuA/BbZ98YkGU/GtxZbS7mgpa6leavNH11WtvOtsjp7XTXMaps9dt8qGjT5BylbarPbgmwtNudLI0zjcQDjpPRgDkZpQT8Zkqk2rM3kppn8jT347sPZcDKkzd12dF/Lfy3NjvrX6VbLvy0f47hxZQeUw9XFHdPiTlmRPVuRvU4wb4Sm3WY/sAyHaE4ZElfdcDC7HNxoZlXJIQyAw3mqaPOHHlCeOMqp+jt5W3rKnuT3Ju+p2xNXK25PkK3OdnLrprpNDZbWTxIbf7ptm6YoazOYfMqCjJLnlYHtIfe0eQv+99PyuuVDAgOmh+LEGHbV7YrZTlZMd51k3vEbltUtCy1D6luWsmk5ELjlDfsw/dhzKIng6QDPHCcxHcQOzEm09vHN3noU047uRLdjjqK7zfXc7f1r68JWyl1G6FjoOKq5nNqiX0GHE3G4yXcZwbGwYzYQ/THiPpFDuE7gEO8TxIbzuHiw86BKHeo7S8onfCMj1IgMSNQSiEWIIOwQ9SoWwjqpJwpHAPZqRgBvcRqGITrEJk4gdWR4+2C3k0zUE1TIaISoEDSf9gTVRNqOHQKxAILqhKHXFQ6DMMANxJuuc2QE68TuABDVif1MVBMs7GAH9ipQwAf0A6JyJZkjBGcslXykyb1AmDxMmfjCCxiHRZDIYrGKRLMQVDpSDdEhoVUXCF9BIshzeVl7rCLIYhGZRCOrrxZEZQOqnerAOIvRBHpMPYA44bDFAoFQkmzt5OjBRjCVQkTUAO1ylUqtbqdqK6Fe3hpqt83mZM1j1eXk1CWbOdvb73lme2RcaPc1NGR73ptnemR53vPyUqkW75zHmsvKyZnTeSG0vbZGVbfx0LTbbEOCDv4QSPOsaCtuf6Ghw6YUrJ7atrUirf5g7a7sir3GlWMFT6qH7gW0cktF6qwdC45cXLZIEY4TsFTfza+/eHjF+fj/Zhv49jUTZcvSxQVtuzR4md4SORkk3CsrY1zp9V3tXNmFd3Phve/7C+Vl5cGlZWW+vVcYosbFfo/ey4zS82XlZcHZUx0lYZxpLcHlOMblXkbZB0s/eOQLy/S42qz5wof3H0qbhSwCaUUVvxQN+CvAU78EBZ/xwtbFCn+2e5DrO/R3tKhvufmshK9Kmt4JztitrDsIWkskaEpwx3sbjh91qYtmBx5d1fYE3Sb+zX2IMOD+51J6EQeF5ngWndvdVDOcFMfp/SSoXyl83WS/IytX7D2Xtehl+s4apZ5F8/yDK7Lke4MsRIpfY8KaPGOjTBcXliWNi6moiGkQcipOejYVJ9M1Gj2/hOiFQn2IMAoSaeP0ibYZBQlDhM9An3ogjqgP1PA97+6JvYW8DgNVs0JUqRp7JESBeFwTBbJaOBhOBQfLSU19+waiQpK7V4faI7YftyI1yAKkGmlV6FtDA4aFyhKFomSuoiXyuVF5ydwWShQ7/6VUsisoUah6VBSlgl1nI5VCpVDB6jw+dahtAo7vDs0OIcfEEdImvhwIMinbSStNb4khkqmKkokfFdERsYunmGKXoivsrMTZWQ8662ivqUBFHAwir5jYHdwIkXYqWa4D4iNWpSSdc6U7rK5/+J8qSk7byl7OdqFGuIMO3bFh22WKcw4gjnnnguzKf/ErJnoHh4y4nUqaNw98BUHX4VV4SBlRKFU6JDdk92pK9CFr9XIZmY3nmkW5wuQj/h2J5REOhoDRyJGNlJu4m8EImYT+ac40fyF9F+XheNfvVDvFRLHzvlWKa73YSl1MtaaF1A3jnbeBlNOMm03Ltbd6WPExXfSuGHxumlwNYdT06ZSNFzNv1ngnOJGfryaMfdxCcmIJbAaHgO0nbfl4O8KJRDojvCsz6cMO+HCU9GzYtPp4Dx5FS+ERqDc0cYJ6AktalVdrotS+dK8mUhmUNSdqilQ4A0vCIc1ua70p3gxSBTgkhLS6oRhH4PhyCDXfm4AoV989mZlD8tmkhRFKCF8VQFhacClVzqwMWVvyuyg05bbYQPkV13HHoubRrbOMNrPeKuXPdK9/NV+3jjbfq+kDoK+vf8FoqYwYR0bBaIvlVDA6YgSjAOLlWzQKqodr/M7gFIxDikMMBe5MtbZar+RbfSuER/EKv/EH/RT4gbgMYnVFkYCTnbHWMAcKkgeRRNCevlpAbPbPWYNJM2ZCZabQQc+T4Rlys37OA/BX7Xh5st+x9TV+Gcq8w7CLBYcyFLnxo15lgkShJC1NzTC0oVmYISwTXQ2GHaPiUlGiGYUSpFyAhzAaVTreluU/1zZskNOh9RqFJA/29X6G/GT4IN0UUgbNmJk0eLQazcRSfox3G0Kk6WkSYWKZYNQ7Ny5DUXAIdjHvcIaSkLykjWFOrh0Hf8+5DzwQViaHOWCX6rOqrAPVocpqD04/PKeJKq36n87JgNVdLtWhaUmwBnSaPXZ2PthWYTYD8UHIdFMnT9jiDT+IyeXd11cPlb+HzPUu1xB3BQ0cNqZsK58fXc4qy6mqtlRp57FKbw8ghw2AAXdJ50Byzwc6Je4RkUD33TMjNm07UTNDcyudULQmXAvc9PoMaydxSH3ETmvG+Sy4gUWL4GpsUuHx4rvNjObIqucPwNAR4fpsSlroVpXs+oALT0qjRGRFrtwSFfgy7Zmokd0v+uHB15Mjsr2mfv37I5HD4BA/EnQK/+B4HduPzbFZ4yyCWMgsXzfhAQsqg0sJLo4GXMbbTudcu7bcaIKgmRps3BZpQNkmaQp4NoMPvDd8JnDxTU7nCibbpz2ZHS/2keBHMZRjC2iYUbzk4ctVhZcu2X05vnZ0NGHz5z5c1BiO9oP9//oVeK6xuFWMKq/5iPf20uTDKQanYTD4jB1i1BizyOnMUVnze8DvR2046oEAUZnQUBTH0K44i9HUYxK6NuVqgfgwMHEpXNU932Gi7nD0OAbgUbgmAA9wKX8YQQ8YAbRKfiUNeGiuG9AqBBUZDKcDuD1fYAXDRpFDBAAELA4rJJmJyEtCCu42dK73sFIddk2dPZBNk3DCRwwbhQ7hK6PasRGSzKQPXt2dIYGt9sxYvZrDWbOa4okwI5Hn4BS4GeFJWZNfsBoJjtYu9J2MRCKFcK0Bt1Q3pD44opvdDMi6kj6zHKxL6A61FxAczMGGz/QKP0bSsNSkdfkkdbI4f10TGhIIQNSaC/i5gXZ7YC6/4IoQLrvdnhtYwL/CWKhs6/TC9/+7owvHEiUadLqPHVq4Awx1tOwoSAs4a5/mBJWqxtNrZS/5p88vVjZH/fN/Rr8sA7tTPfaH7ffQxzhFHcss7D9k6Gn2SQFFD3QAFNhg7KzViuMFP+ERsJfqLdg23jaFPZvLzhiadsW873JAcnagcjFwDSWIJ7m7qqQDuFxVuV8SvU2ae1167LnS67maladzU4S64GCdMOWgkNGg0/3gIad70O7TPjtGrlKSeoNUH9yEO9d3O9d9wjOClwQUBxl3nylC3S4s7tYdrmCRyWQ2vyhjRMnoSqHbJqXbI5hMSGW+Z0owMZlmFXSvIqHjY9f2rEtOnpSoT67zrPS7Fz4VBw4mJh44UOl5vdZ9AveJCcXVpLhPT0hP4AruEXeOZ3m1f/8rdeS4ryz38IPALh3t/if2icChY8fuUrkFNwyGIf5QfPxdy+1TTU0s+Zcvrm/f80r/+Qd0qoAqFjyIjysqAqrigGKV1q2qgAf1RAA4oNr448fGAoSmOoFVpRoArO7WdUaig6RpbTWSPmq+33u1i8jdYzEOcoelHtOOcYWOR7XjRobalZ3lanp/6pTziN1985aJ8f+ys12hri1bsPYY5+nT74vy7NjNm119xKL9NmObej/Y/6uSnZvUGNGpqLBOdl8Y5O7nUzsfJPaTjEMZAm3nx9+YSuZgyKsLgp5vveRTCYcGrz8v/GfjlgYOhtO7k2xAfUVtAPKlj957JTpU+B5yvdXgp9tzbADdHn4oH/fghCEsqxo4QvXtozhhkRHN02OTWzPef2i6OR1C06N2/V+6i47OR0TyEX8W8NEVaLqbAygIgUBmo3tBe8vda8sihFZcq3s17zn3/tluXi5NJ+1v+6MkN9DIXbaMawzMHVSKC82IkZsbOAgZYuZBIaMA/WlKlvxUIi+UyabKix/LS2SFU2XF8se5RLExas0G8s5AD1q/wEnbzTkF/ZFZfRIkhFCZhPpgnTZIL9wnlHALL9WbVAgIKQkK32a0vYLYGLM5Zr4uQWmOVSE0vhaAvCwMz7F841Rxvlk4eLYFbV9qaIv4eiTev92/3k2SMDNWGpOeE1YQXjm5WbzWzvpduH87O6olJrU0OywrVDxZmoGaOmmgIypD1IEuFhnWFcXKJe6/E9uPXWG8OiU79Vr2WhuvGB30zzdSIf+VBeRdCv9hjQ9GJXMdv+pxNUOJ59/Ac2z1BWTE1wfFBr19/ny71p6fPwfbcNlR1L/XH3yNN5Ac8+sBPacMkJcHkkB0UF/vJBoez/p3NOEq12kwOLn2CL2HkvvEe0UqmKW6m4HLG71HMa1TPPpp6aikwyXnR2b4TubJvgHJ4/2tB5Zz8F9r3kKchp7cPN+iNodFQwr9lRBNWFIs+sPavAi2INhugUloGbn7zoWAqhq3c8m0RWVj1MU++beSUlrT5skTzUmqL7xctyc0J2iBeU4IItr1HYLwieAhzH2aL0SGejcdhc41I6Q1zsKOpXt0HzMUPCEIX6lvEkRMvGO3jjsVCmOltHFuuha0b72P5yO9roOOf9dpdWsRqc31qfWeqckbHR57OjqU/izHQxoP43X3/w9KUZHDP/hphcE6083oZELwWbxkIPdwp52hCkl3tz177Gy/J9HRs8Zrd8ezvz3jFsW+Wsk99lkzfOyoIajYRvvVWA435dVps4JZ34VotKlvxURszA2RsXGdAmJX9IlWXKGxOzbiW+81IpvvvA0lkhR76CP/nnc6ODZOr5twQBIliauPDVC2t7kdwoJY+0nkW/twk442SiQ2SLR3ZBMZwDctASvZPHvZ3baRDpuDTkvEmh9u0e9yykZBnytmjqrlahERgX2ylX5PKhb4AOYKX9WRZT23vkMYXNAB4D7o0qugYyEHsJYZtjBUBm58jKkBxQKQP9iPmyZeBdYXLXBXSU9kMpWwTS1H/KqLnXRWkrXWe7VcZGhdOrRnaK+q0ptGYuzZ7/hYvC7Rh+RAO0XPZXc5suuJ+QyPgSKtsW0emlJw0e8U49obB4S7IM52yJ/S8VGJsbqEnFyQBqruY3AutIgU+8WzQzz8MnLeMomBTo9/zOkA/Fggm1NuMyVMT+j3ZP8BNQAb2Zh/+erL/F97flLfpNzOINdDvztsjFtBPQzY8AhEik0LBMhh+B8cEOHZVadEBmNNg08Vs9/jK21BbW5+LnUwv+r9rkDt1Afzh94foND8DIEiHQfB5H9DlLPi/UaC6++3hLhPbTH/LXUw///7XTHVSfhgeZ3eH2CmkpsLlFNTzWIFGcI030zJS4kCp7cnN7nkv7F0Js2X48f9H9qSlOn44Ihb+x0F2uws7XI5MYtTVMnTt+q3iVmmqnIObwerWf1weBhFywde8p3PCjKEab7Rn5i8lCjy596T2zP/xoI8UyvbFLKNxP8PbYTdy3c6PjgKFb6zEj7piL3b5XJiFkmPKtbl6dsIKEtLpspPdw5vB2sNs344FG4xlB30r+R7HEbIZrf6NvsGOgAJIDhIIQMP9P/3/v8BBoEABSiACBPKuJBKG+t8EEZxkmZ5UVZ103b9ME7zsm77cV73834/RJhQxoVU2ljnQ0y51NbHXPtc9/N+v4z5O26TXsKoaVntSfLblGnBtlcWCqNf4S82KSplPP1E/mLRGx+SrzHC2302va/GD2IqQVGZPPaSr4rLhCtir4A/6eQBuoprN3kWHnNvyQ8ruO6tVMI2KF2NVVOxwVLGOFMK/cF3kYXhflBt+5ys54oUPNxv4FEMCnsfI9oDwvuce55B6oL4B1eiwb3mjvdrbmpWtHSxoW6r6AOTXivUU0P2epYrup96pVspRvwkQxGMIFeF3SrmB8d4n2lPY0KPnP0Kj1rlZM7EqVy1o+/ywu0xRuMfp9KgdktDmuUS70/OFnaVlBb9Nuv6g3RJ5ZOYSX5zOcC/Uh/1IhqgCJyaPfxS3EnyJRuyVN1lco7kiV9fmCBdS/tkRn7NKLbX+ty8prozwPAF6/OD1isUUnw/U92bF1lsou0RhbDdb7ylaNDHq5IZURQ5INlEgEMRFO8HMAzX8o+85DmVDPPUe08YDjcqD/dzGM2Me50HRZBxpQ+9gA0qNcOmdu591t7WfcO1bf90MTzTLnVxyGEt6s9iJ/+jewWKw3WlEh4X/0lN6q4hVybD8yiayZw9VT47xdZW+WIt1sUxDzgVuBU3628+xoDzTK39K1C/+9WtIGAYW06MR8RpKe68N0vxZodMUWfap2LvuKbxo2dp2MfcYvLuikrYQKlBh9Uyb3oJoTGuVwKKPQBExOTDTGoaYkrAUJRilcYPlelmr6PJKgwbQ32TLE37gWSAZpouMHgJGGbhcAc=") format('woff2'), url("data:application/octet-stream;base64,d09GRgABAAAAADdsAAsAAAAAZJAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8QFDMY21hcAAAAYgAAANAAAAILqHmqxxnbHlmAAAEyAAALN4AAFB4gm8AYWhlYWQAADGoAAAAMQAAADYliGcsaGhlYQAAMdwAAAAgAAAAJAflA/tobXR4AAAx/AAAACIAAAGIiCb/9mxvY2EAADIgAAAAxgAAAMbxZ91ubWF4cAAAMugAAAAfAAAAIAF/AOZuYW1lAAAzCAAAAUwAAAKjCVMyunBvc3QAADRUAAADGAAABQWGsMIgeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGFhYJzAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnjG8/cPc8L+BgYH5DsNqoDAjiiImAILQDY54nNXVy0+UVxzG8e/AiHLxfi3eUNFSkKJtufQ2tkgrItqWKra22pbEhYlbN+KCuOjelX+CLkriwnTlgjT9B3TlX/A772QkMdG2VEn0OfMQVsadC+fkw8y8DJx33vOc5wVWAI1yUMp6+TslvaJhRkdL9eONtNSPlxtO6/2vfKG/6YjO6Iru6I2+GIpKjMRYjMdkTMXFuBRX4mrMxM24FbMxFw/jWSqn1tSe+tNgmkjT6XqaTffSg7SQFotKMVxcK25US9We6uNaS+3yo+r84osXECzPMFCfYfQ1Myy8cob76cnSDNPLMzTXZ3ieZ3ijj5Ku1O3l8Ud93HnNuPvK8SdzS+Ov5fF3fcAHfMhH9DPAzwwyxPd8zCd8ymd8zjgV9rKPTnbTwR5OsYt32MFOtuu5nW1sYjNb2MpKmviN85zgfc7xJWP8pPW+wCF+0TdYzXc0sIER1rGeVr7la63+MMcY5biysZbDfMV7rNH3nVAyVtFND2foYpKz/MCPylQfR9nISdrYz2m+4QDv0kwvR3LuSk1veB3ehkdb/lG+vfRuKmfftMZEybTaRINp3YlGUwKIsikLxApTKogmUz6IlaakEKtMmSGaTekhWkw5IlpNiSLaTNkiVptSRqwx5Y1Ya0oesc6UQWK9KY3EBlMuiY2mhBKbTFklNptSS2wx5ZfYakoysc2UZWKJ0k20m3JObDfy8w6rf36nkT+7y8j/b7eRz6XDyOeyx8jnstfI57LPyNe108jXu8u0q4hu0/4iek07jegz7TliwLT7iEHTPiSGTDuSqJj2JjFiuZVj1LRfieOmnUuMmfYwMW7azcSkkddwyrTDiYtGztclI6/VFSPPedXIaztj5LW9aeS83DL1BDFragxizvLdJh6aWoRYMPUJ8b+Rv9MzU8eQypbvUKnV1DukdlMDkfpNXUQaNLUSacLUT6Rpy3e1dN3Iv581tRfpnqnHSPdNjUZ6YOo20hNTy5GemvqO9I+p+Uj/mjqQ9J+pDUkLpl4kLVq+6xYVU1dSDJtak2La1J8U10xNSnHDcnNUS6Z2pdpj6lmqj02NS63Z1L3UWkwtTO2yqY95VDU1M/PPTR3N/KLR+BLaTr98eJzVfAl4W9WV8Lv3vkXL0/L0JD3LsiRLsiTb8i5LiuPEcUiInYWQTQ5ZgJAQJxDKMkBYQovaEgopYR0ow0AJMwX6k8JQtjItAx5oobSlhekkZTplILR0OmUpQ1uG9rde/nPuk2w5S+H/p//3f7/0dO+5+3LOPefce8+TIAnC4WfYP7JhwS+0CUPCamFcEKREJp1J9xcLxUKfETSCfkVWZJZA14/hPkzpxzwsAdmGSD9mh7xR4oc8mUQXmYoMTkWmeaEuMkSqUVS47Kytc+bOnbP1rN9ut4Dtl29fP5bL53Nj619evzbX359bu77NpTvaOzraHb6wPQdV2M9RdWJvbGoK2/WwPZlOJe2f8viYw+93MG/YETCMgH3+0OD49t9uHx+cO7cKDLFhqGzdK+vWYvUW0F/5LNTQuv0vtrfaw7q9t3xdudc+39foCI8sHw07GqGZ1GnbTmtxrAqGbd4ury3sZzatq79LUwT4EHToffSvYO6EFMxZ/zzC5yFGgn4PgVkj1yedmvbss1qiS3tL095yKZudvk7fs9/QuhIQAZEKIwIDHPycPUc/EmxCgxCHivvTCdkf7CsQLZ6P54tGMaNocc3QGABGMZDLs46OIXwqPvKsee2h2/LfP0TfWzqc//rD+bGlNBjjyUSo+JZuPnRb//cPkb3mH5eSOyvb8w8/nF/74x9bfWd30OcEH7SXTCjQ8yxJyAYB7JJCmt24yOMwz3ze4VkkiYz47DEH+RUT6bNq5cM/qnbRvFdV6Q7RjtWIvK776BuCR9AFQwgLQjGRzmj9hWKqL2hogGuS1HIkDmOIB+I3BKK0yU//nXuVb+zdS3OmTt6tDNOJZojf4I9SAgn3on+veQ853byH9l0HTagwT/+T/ZJJMGM2ISokhXahSygKC4WThJXCmLAB2g0oSQK/fCoOLQeSeSDCZDwhKwgWipmgQfKQnk9ninaApABJZ7IEEvqAJN0ECLcfyNOafChK8sW4AnmT6LzWtY19+athcx6ZE+9ho7JIzW+LClncGW8SA+Zz7PvPUe2AGTUbyGfpEvMdf8AZbfQ+0HpCa+sJK9BpjWazc7LZD80P7qf/9Ue78ehFu1raN9+4rZO4t92/9NXO+IEfQnWS+MoP473sofYW87ltZHDbs0a86QBpNhu2kc+euM1810aNyPuZBScvaG0FJ7MYq5yT/an5wbb7/5iJP7IrIG7mZAlz9SHbwxyCF3AikHggqVlfa4zEUMh3ybMXnH/B+YX1+fx68xeHDjHHBZVT6d9WTiV78ut3bMibD33n27W6fseuY2q1roSb+KMkp1W/eUMxyOz8hkJhQ34LfJ5//nmmFjZgBRfRxytL6eNbbn3+O9V6HmM/YDLQHFB5ylAycjKBpK0Ec32FYk4GAlSSQyTXZxS1eDFND7098u6GT+0980yS3DUyvu5zvs1285vrrvJt1p+58otnnmm+tmvkV++OvH0Cz7DoU2tWkYs/tWbXV3nKIgF5263sIbYD1mdY6BRGhBL0vgsoHUkioPmDuXhfIa/1d5OgkcwHDd0vQ0oaYgq5eMAfHCQsM0Ty/V21IUMngfvNI8DHUtY8WnSTZLsTWzuKzWZLrLMzRp+NdbZe2dZ0S6rtbLtcGZLtdpn8zKf+5MwHgw0Dmy/cPDCweaBldughyS0ZkmR+LTWcTg8vRSdNb+ja2tzW2Tz57ebOzmY61lzsb03/ZaStEsNa2BzZftDlM7UHwwtTs7GeCzfP1nwPSVCPW7qvWgk4ghPG/gD7J7YOxt4qFGCNrBROE3YIlwq7hZuFu4HHx7soDBQmOw5jgMmAUeAwAYpiHIxbg4EnlUR6LgGeFowQa3bqQnoS2H9hkPQFIUDiGICSGJDqU3LHDczIFq8PsFTlvuyitq7lXXRJ9/KuruXdlSfC3WF46JKmriZ4ztabmtLhsG5+1h8OZwD41w4A/B06gOS6yYPos3Z0K/dOp/xoGvwhdzugGt3cUlf2run4ktizNEuVagf+AL1hwXBXU+UP1a4oTV3hM5v0u7HA3VigBpk27FImTMawj+mmb1vB+ufm+kCVH5dBGvSiLElncvk4iNZ4PglSMwe8rNiFXNpNlGQgB1IY3CgxYNmAKM64CS2ffFXyQ/M9Bqz6w+T8BSfnNqaW5a8aWbVkdEf4ts8z9vnbwjtGl6waXTC/f1nq1B0rF5Ya0g2lha1tydjS7ly8+eIlpUBHoLTk4uZ4Y2PXsnjCkm+HP2IdTOQySetPKxLSR9pNoyDEi/15LTUdYNlmv1n26J1nnGDLn3r6HELaLXDTICECORAIiSXW4DHvDPiXbFmTDJ/cqzrJoyeYrwT9SzG8otdZlSUgC+9iEa6PdAqroOVpHWRaLzGOqY0Al9dxWgKQ20OqXH8e9K+LYPYISYIQgC8Vzt90WmFgoHDapjdqwPkbVyzr7O7uXLbiyRrQvXDY6HR5DVejbNCFqrvdJ4aavU1O20J3sCEZY5EZFXBg8YwKOGA2jo6Ss6SoEYq0NHo8osd/4nrNcDSpbUEbk/2esDfb0xCyKZw/vspeYb0g0y4EWQZLEHurB+VuHICbxEgUFatigYf5mLgDShUmAnHIwLUkOZPGDIUg6CGQPcPSQ8DgdMRTN8g6jD8GjLnlVqdHXDD/vDOJRHMNg6EwCd+48ukdpXGHM9Ec2jDg6Qj5vN6eRo/a65432uQSV5cTLV76ytplq0ZudBJ/g3NL0HA55C9JjlBAOkcMBOxixql6DDkhBvwOMWx3eRokA+OZL9yrhTsWv0Y86p6tm9vM90RKi2EpYJwQf2jz3Ezs0hWrT127qOj3u+yKGnDbZfvV6WjjvLQjdsWaU8ZV7b7moLH2QVfIJ6rjQZvU4Cb3uIJ2p8s86LDb/I4dDklSvac5bTbducwuyS7vkNOm+B3d9vaexZd9vUZrb7B9rFnICFmhW1iMmhBoDCgdgFSAGUaQ6w+SgCUp5oIAGCLA/7pICvQYArqZ4ZezpK4I547IAwMs16m7zH6X3hnti0T6ohAiP6iFKv9BrjMvsn53NOq1nHpjo07H9Uaqv+vSdde7UGwi0he5HAOXAzABhV96yXT9tlMPXYaRl4X0CX8oBOon6pDfY0+wAl83gyilj6muH0Ox1zN51DdhrEAByFDSVLhkfPMgfDaPv1cDLtm6dk1fLte3Zu33asCqL+mNur5ftANm7Sw/IzsHJg/OyM8BMrToZ6rfr/4mYF9JdWcI8CBD3w9z3hcW8rAHGRFWCOtw3UMPYasAZN1Okml0uiguCFgBgBtYD7jUob/oDNF0posWa5rblAoXrwFTSVSI9LlTi2IxtS9pcyvXXCu7lUROjcVOTLn7Iv0bertmFYMbhtQG9TNXOhtcQxuCs2Z19a0vhlOpfDr9LfAKqVRlq+V/szGdzqdSZCLSeGJKGzqxV9I0qefEed7UolC0lN8YilxwxVobJR4Poba1V1wQCW3Mv9030gfPrZY3I2DpuD9lt7K0kBCGgSJXCTuFzwnXC18S9glfE54X/sWSDmlc4tzLW0pIgKMSeZ4ME8NQkHPcGzl0YNbmEc75UJlRUM6ilM3U5kSf0nosSTxDO4KsEJKhWdgYQLpC5HgiQ/iGD1gGOaq2ehGvJIA55fuL0E/MBH3pDVr8OSMjt8I+oloFHcuk6Y9lB9GT/nai2wyZ9Z9y1rp+phg2H2n3t/iIQ84ubqeybveRpC/q12O+JPUpfom1L8629PeP9ve3BGOxjlisp7I/lculyOmK06mY90BkkJaCMYfHkatsdtpt5Buy2yGZiyX6l4pkPiI5PBJZbrNXno20tc1ua4t4/P5IIDBrERZH56RIwOc/FbI5JNHhVZxhvyMb1EXZ4fI3GIzJ4oM2ecOSjvkk4k62eb396/rh8WjtSVeEzO9YskG20THouupuaXJHisnBBQsGk0UWViMtbhX6/mFucQ6e62LZGDyV+f0tNNeSc7idsUDlJew8+YbN4bCZi1v6k0EbeVJyuiVzVII+82E8YguSd9qh37Pbzw5EsOvQUXg+VB3N3j4vjMHpVBXsvaa3e9WzZIfdISkOyWazyS67Tebr7332eeYFrdGAXVW3ME9YgHsGRCgSAeyEjgOzOliyyGVKudZht0f3mw/YVNVGxtD9BHDldfozDFRawG2ij1WWkUWq5nRq6s3wA+gW1asCZI5awedUG/2IF7DZVPpRpQf4icTHczfTquPJgTwVdN7HJO/v8UZGZtB9OsmAw1/Mglj95K/BZVHu2eqiLLjyKZvTaaMCun6zlbxK/8PpVVWvs9Jl+V9R0VPJIzDYd+1Opx0oXDXfeQf2sTP72g28e0RYi3vZGT1OogtLCnt8HJjVwUrdqFLHwMvMUe3Hfu/HiD8N1Y148k1yGMdhEsQTedVsrQ3Z3OxEfDlvqnrWyM3llv8VK9MVgO5HOOqX22BWzJ0ojz/hXOg5hPGwwh8sHgeuzyMdQa/1KGZHzMXHTMAUNJMSTMJRehinoh775uCMqbhx5lRcYWWiY9YsWDNiLid7+FaAz8UCmAufEBCieCYEDL+b1PefJfNEs/apGjtBvF6yE7MHK6Kn2dS5q8xe8lWn/XK6VJYelQixlggkrttWWUNf/rLdWXnTaucQ+4DFYJc4IpwL0iWuZfozeWgqkcWdspJQemUPlTmfnke02kzqaZA2Wg0nubhm+IG1gwbRN48W0lIv8PQwQeUJAL3QBYLJCTppsjdhAW6CCim7ZfI9wiilhKLDmAhKIHA2RZJVKaHaWdquqktsXhHgyZ8CDGojzy85FQnyVfY5NLZhleh1EgDKVPF66SWrGM4223AF9Xpt7CpIpFspE4nIm8HSZZtXoo45lQMwH5pKmkTRNodmbC6Xplb2WZ1gklxWtGthj9Jgvu10gX+tzQMs07yFBJwul8P8JbnArkhem7nTqVZ5zm/YHYCvoNAhzIL99ibUwQBZcQ21q5lEZ4UxFK/6wHzqybduKaf6u2naTWBqq5Eg3/kkF9nVQC+LkJhs5E1Oh1Eb5zLfxDjz5reQWt+CqHfRsWHQ3MLI2bLmpPLwQxj34DyZql55O2WEeaGC3xCNV/SvnB5TUH/nVEgzf1OLJaNVUm6yKPuQJLKNElE1qQixeUlzSacwRqtnPu+zN0C25IQ5QF14fummipbLJ/NTRytAwkYAdrRaF80Y/IjT0uxA0TOIpVwk0uz1eWVtYcP2G1edc06qt6l3AH6pc85ZdeNZxolaeV4i2Xj5qtI/lFZfFk5WDrcWW+F5tzwvmVi+a1Qku9K7lcF0pCcCT3pQ2Z02d4uju5YnklDniev2ZDKt6evWjZDvNbW2zspkqvh8j/0d4DMgNEDfh4XT8eyIygqTowS0qThoptjDTCpMUqg9d/EdQ/WUKFDDKqs/JiI9EcAjhSRcyRZHK+Lm1EMCcoB8RtKDPumXTHZ72FLSv5TZHaIiM/Pca/aABuA05qc6lnXAk5pvIOu4PTGQSAwsRMf8BaFsXIJlIA+RBRyDT82TicMrn8Vos0MlLmflHcWjyLaHHpJlyjzK82Se+Y/jTltrU6xj6bqlHc3hVqQWErc5zTfis3mtC2fH6R5cmeKY5PLK/U6vsyB5VSqvp5J4zDna+GeYo/gUfeenKN+SgTg/uvh/ND8fkoVDMnF6pXGkdLJd9jpgqsynYMz/vfnZ1S97XdIYcAybKNH1uJqkAkzU1P0A+z75S9Tq63WOJHty8iYUGew8GwqOW6BAtYyDr5d7YL3UztK7uf4yB2Z3g1XLDFaSzOdSSS3HcoFkTf4BT6lyikAc02Cl5doAzicDIDCQbVf3e9axAeV7g3SG7Z38JRdpjSjG9u6t/PVe/Dy+BSO3kGvORv9s81I6F6MrL5LPmZe27iVPyZrkA0XML2lAGbMcDpnlZSojN6nKG1DPKrbdrWSnuXn3bmRPO8094O1+kOxs3Y0fMyhROfB3mPnhoEKcmjxfIlScp3glQZkxHw1Ck9AstICsOmomlHi+jcIgFZgJHQaqgd8GczFzWObviRO6LpofPs5Ht5d+UHmOzp3Z2wehTw+aZD/0rLNCkzNwgm13CD1CP/D4ucJ8TvFH9ETKccqeS3JasjrTcY3VkBQHpGAXZyAlZ9E8KWR60zO4/Yzem985G+Zt715kvDD1HDvkGvNS8vDeGSjZgbMIXH2+TAhh8xVgCwqf3pnDPLAJoU3mntPRPx3RYuEIPnSphZndfuTlA7KdMakIxG3hGujUWTcnyer5CdLpIN87nHz0rJB8lTzz8UCVPCM0nmcwSTpEGejDnMSrqIvnc4F6pXfGRFQeXozwYrJzLvpzzT1P33bb00BOt+Gn8hVw6MbbzMdXYOoKWGhHUOPj98MU3s8doEDyZRj4l3fvbrW83ZXHwSFXWBJOOGKs+lFjXXGMVQl4LVZRD3ifIgfypwbLT2B4xiNG+1Nzz0uw2bn3Xpj5/1H5wbFGuhsVmaOGef3VV7cuxdBSsnMQ/UGOYRjlVVe1Wt5VlSeuvvpq8qDTXpsrGK8O4y2BNvVbGHlYiPHRLqhq4juE84Qrhc8LtwhfEu4X9gvfEp7Bu4Tpo39EGg4E0YZDUWCcxieM+39Vlv57ZQHusOk/KA6HueExhB+DXXPoppt8xw2Qlk+cD88RMApC2nED+51uJzzsLoeyD7qBzt1XvHZUAArwAE3+efNZ+y+QVzfRQ1OyJ8bXdvEYqxlmDeWKfoRfjFuzax2XAiGfV0m4dd1N/83l1ytvPwyf96ec4cn3mSQx5gWX9uguswfPNMnLLt2ctW94n1muOR9JbAXmBKd2bvsAO8iy1X3inJnSVToezGUe3qzHLGYLC5TLQjYxud/uctlZCXYY5t+YAgaoAAGyrD5lmV3tlX2qXJJ98pis+uReF8u6fKrqcx1U0VMPAAgRB1z2e3oUlw9yYmaX0nOP3XXMftevnNTxYDxVVkAD7oc+c9sCOdENOrP83+h36Yj+Vgdh/5teTC8pSgkL9P6NHRkgv+Rnf0UPAF0gN+gRBoTZwBHw3p3P/AyMf0yYJK1DwoSsHwNiN1aeREzTUXSPA1dcs+JdcXhmHeHTCYnNwmzgmL84Nkz9BmaNmy/N9K1zaH4Hh7tilxASUvwGCu/O45kAsGlO4ppF6LhdQTuDagBWAOTCLynRbOVAOVvOZkulcqkEbqlcLpUxlv8OQBDSsmb27GA7PG9nA9n9WVIeO1Cy9v3gfJYRmOsw9ABPwfH0depeWoqjxEAdDzQ/A6SLkgFpwkq+UMhXGUOXlisP7N9Px/bvNw+UeeMlJkwlPuALlQ4LY4dBOx07UD4slMtE+ITtophCC45kzlBAimWKgXh9u6SdV0oEqH5/uVr1ES1Xe1a2+lW9Y7yYfZVdI+QhkAGFNAqaP97YwTYCT7MN3AoWIQrTuqy0KE9D0yN6x3zzW426nh9ZFCZXd8Rip1yys8McHwoGAsFda1auWj1EGuabv+rYefEpsVgHuaNxZCSv643m5a5Mo4sOYGErBgrvvATzQOE1K1eu2YU1VAtDrRfvxMLYzggWDqdd1t4W5uwA/WchDmtBIIEknskn8RgeWWEGHFitRq4wjwLKFEMKxLthoyPifRHezmTwGiYY8LuZkgMhdPKXzvBIlMiy/fS7ll96weqvltwQpJJn7M5l519Bvmu+wEisp9jd3BKKNdldw95g7+7V7XPndtK9J5Hg+B0hWXGpntvHv37f+BcBlmyhL47/7WO7P+1tysxvSzel/Ua0QdZmGb7M6NzW4bZku9EroPXP4WfZM2w+UL9DcEM4KETqtNzZwpBwgrBIWCIsx7tYPZfnNgJA9gAmGfxSsBJSgRzaCpB8Evd2GYglEIs5CPw0NCbgGxGtWgZ9CWgYj9+Gt4Q7w1u2vMAf8p9nnknaMaYyasVvgeCWLRB7/ZZqBM+4ZYt5IXl/i3mQtNN/2xLuajT/YovphfI8sbErPPk5jH3+TLpmy+RbWInphVhINz1nmge30Ce3vGB6yH9CLe01G5c/sB+zUcDlIkFIfRwuQXXndy8zkJnj2BQBm/Tk2zcBMqlUj0zYSteQ+YL5AmXNPYWeGjI9Rm54wepoVwG42N5Nx0Mm+fJnvD4HIM9Cp6FU0ZkYaEmGW/yAT6VqzxcH/tUK+umosFIYF3aiTV86ky4UU5oid+HevGDw9a1IaIKT4lZ5UhTPlqoLHnJECR7xFdFXpKOveVjm6AsoZermqXrXRPc4NCqBRBIuVEMOVd2naiCXzP9gkNX8tctpN2Cz43KKkq/yktzosi9RQ3anq/BrJ2Y2f012thWLq4rFNrfP1+TzuYPBtlkt3XO2Xb5tTnfLrLZgsGNxttAxNNRRyC4edtnVkDRGPp2W1IaQlLM5XS5z2OFlmxjbJBmNqgSu2+7yaGQCYiOiE3Lp5udX8OybaDM2tKpYxoaafOb5jYH+0aHV/XO3zZmzbW7/6qHR/gD5MLu4o31sZPHikbF2aNqS6U+w77FzBU1Ig7wYANrp45dZ+A304h1sMMVt6vozBBUOVD/wYjZlxI+SnclU3u30uzW3YXTmzUtkTSYpWTavZDZWZOyk92SZ9P/A3MYck2VRkkSG7iWFdCDSEPEHNBJqnr+s0AeZWhQoWWZQyM5OehfE/msvmaOyuAELbRBRzomHDx++UgSOL6iwyhcKa2Btz7CBqx5G4oW2dTksW0eTeK03tVEp5FKw4Gu2Qoh6plXJQbOqOjB78+zZmy9CU6V7NcPQ8rLNiDcoct4KKA1xwyaTfYnBEweTSXASY9XcF22eTbLTsMkz5o9VRWsCiybomOVXHqBj3DRqduUB7lfHSurHSv5vjJVlZ1d7O3vzV+rHN6Pbk7/n4+QjLlVzwyj/XIOt4rb8ZxhvzeoNjcGQvafiVWu3uFXPJxtv5eKP6TIrT89C5WjiqFVmrjomkdSNt/z/x3g/IaapeUw6qd4N7eJrN8bvGgQpaMhVaz5OjrJSI1ENjWjr50Kpu2WgYT3ae9ZYL1Y+0JVJDC4aTIQ6B0jH9DB7D2Bv0Glti+uuwdP6a4MxX3Q3kTNqQ4z0p1xk3cxxwWiga1NrTwfuWLDOS4ozTQzjtcVEp2wRKZ9zCz2yZVWjHzdQmjHb4Jea55zczjuKAJ92KoAO2gJq6AyvdDSq2k+e08xxZQHkmyFtTAtx57AQ0sqoypa1EM1yj0cIVRuWL7AP2U7Y2+HOoSRcJvw17h1m3DrX6OuIm/NUAsRElA4xNHbhh165PgS7mJsaEI+WHvyeQOdXSfzcnJtl+D2oMBPriAwpHKQ2s6yQ0jNIfJrg8Zp7KeVdr+Bg6M2Vsup3Ov1qXaSPw5Ofi3QpVFQ1r0t0ex1EteP+3K4Sh9cNsZoqUiXdB0qVWxRdzGid17eozxfWYV9pXy9Tm8dxNkhtt0+WxaThcIpKoiGMFThFiHEitAMcOhFKhuAx31b9Qb8KWDFvtWI2JZvsXhWtuOzM5VWhZqfXxWwaRmn2hoQSyOYCsuTvbm8ggZa+vhbeO9AuPOoFik9z6GGfS8pGiVeWbmxIQHFZLEsymiw16nwNgfSkY7U1BDpOdZkjEcLAMoUumqyhLHXcNVRocpsvWkuCjvWfNujS422yK9Uf4ZTIietYy4kImS6+7nrHzuqN6k0DnSG+/rLHWEM2zt8o5+cNoI+jNr5KGBNOO4LP1fcrA/p30MAR5acWVoQElUA6k08GZNi/aTkZFHRYf1nCd3OWvVtO0XIaC3Czt3w9w5vu+t9ed5eRNndVVxcfHqWpnoNdmcPCE03fOghjHoMtZgkX1UH4YPhIngfj+szBnhSftOqKu0yxVdLGXde5m544LGTIFfXFS7izNPfzKEGww3xMAP+bD+sO9+mNQkbIAeefj+cRetKS0hYDlOrWH5uRkqq3+zhuyo4dkd6BvqamvoHeCNlBz+a73dvAfa8ugR3gUT6ePHnV8VLogSYejc5IleghKhLBnJFeNzIkoP5yBEM8l9vKVb1LOvw59k/sCqBWgV/iyBm8VHfToBFEBoEafJG/WmPxhKmz6O/ILulcWVn73NMrxy8iF2z1dTQqvpXr6caV635ypsTEkyUqORQStbkUdhlj4nmy2BXsGVj8xv88tMQlt3S4Bh/97iOz5zW0UifkVVWby04iCp4TO6boUgGuh2eGeGI4yM+KT8Y9lGUuidccOp5RwIaP1FEc7BOqfH4miWpBcgxapAcQ++YBpITSwYNIEaUabdDyFJ+vI0laaaunof3cPQiNC1gHlq8mm5ddVqXBemI0v2mjY0cRH+LhKvbPgIcsf5cAGHc3N2eono4OoZEGvukUNPCUwm1Z7MI+6L9WPv3cWkU+V3KpijWDMPcrRCad+ZN1KzfS9Ss1KdTuG7+AXERfH+gxOkX5PEh0KubP7S5FdUkni07aGhqa/ch3Hx10tyds6pJDk69bd7Blrgs0wv6jX5grDFt2B8nagW0ej2xg2oEx9KM5x/QtpGFlGSTcjkPi14YRkizmFDIcSU5EkskIKZtlWh5ORiaSkTeQm5NhdJsxbYIIyYhZJuV9keS+N8bHWTkZSUYqUHSYTkxAcajD2ktBYVOIJImA9Q6bbyQj+/aN1585Bao7p/yxXjTATSk/+KkaIsL+VAdqp9x02U3TGZbFdWIdMyVDRPiGLWh4ZcVGBFcSl9Q+m6j4jKCyA7bR6JfGqoK7KsLHaOgbNlnSgkEs0qCbAsaSrXYj4BFt9rLdCHqYzc5lxgSbYM3Adbq4jW08ECVGLhDP52DxEbSrjSvFHJ5a5TRuql8bSbKLZLRcPA05kkoxjq/TlSsCaQnDJE6EW8hkxRucS+7xnPvjlNvOFpHFhbLPbU64feXCYvJp+mnmkNVNrzWZP8p43GQCS0xMQGkijAysPHnRouFNw8OHBci6D7GzD4oT4cSFXW179w7M6qmeaz5MPxCMqk3Vam7NwI9cFc42+CkGN8iMkuRx4lN14sWYYV81zWONen3npfbZfct1x/wulzeg9awONcbyv8wO8Khu1Rvw9qyBqAL5rw/whuADlN5TUOUQi7r8unvyTYxhUXQ5TB7rX90X7ZpFiFf1ePqynfnU7BiPKtL6qEk9rMPzBlAf6AGHaqGw3x/2Td8hoM0xytRWzlVn7BmS/IQ3hwe8Rx6FGoBwKlRFIzhbx0oleEj79Fko8CBSGqiJvAGePkZLId9hi7ZAGy3t31/tx+/ZXoY3bUWQ6hfgPhy2IwYesXRP2QRZby/AXNfdYdRuR9Gsdy4ppFNKzY4bjWprOmERXJn050HwT6mEeCbRN49U7yUz6Vtd+lP2iO546gtomX3QRlUb9dM3XfqL9kbd/uK11VgPZcRnyi/qIT+1OUT5IMZf+6JdNyhRQKt7lYefsvuitqdAx6KE/B7DNl/I8RSWkVXRBmV+bRVqtE9VBAUTL35huhV/SH/REdIJmSCEuhmGn4Kwvdo/ND4Ruc34Z9kYlzvNFv6OPLEOxI+L0yMPzOmYeeBojJZC2mGBn20D2kr7mXAkSvl52+HqubnOb8tywjxhKb8XmXoZADlaCogGXxDArg1Wu8pAvrWR6ZseJX5smGUrDyT7+pIgj/r6Kl+Avpb2YxidH+4nIBN1w9CJ4DcM/3FgKvQlsTQ6+8fGKqU+YMeoNB8Wkn2Ei7iGdAM8DxgZA579licodXciNSnP3/AkWlIr8jc683GpeveBX4RZtnzAPECyFShkllFE1H6kjHGUS+CSOUaF0n5rIvEu4GPbwjcuAkd8Sal8ENsiB6zWpts6bkuO47Rj3XZOtabjyJBgqj9SB2PLdBhGeZC0v40NVW61PnSH5R+7cfJArQ/i1DsPCZAls/HMGRYiaHW4cJE2cK3GSBBNcwAEqsEFbQT8QBFAVkDkeg3ABV8Hk6/dwNiNlLKtIqVbGaU3MnYDD4oQ+rRIThJF81HxSJ+eewPmk0VzDqUyrQbIt0U5DBlOEg8L0jIJngdEHqzZqP4De44tgBn0H22TU0ijxheXLJ5TtXPMWfZPl1fUaDYbpb+LtpNstKLS31Ve9gQCnpsD0cDNCLAFGB1tb8c8WXOueTX93RPBaMC8D1PJ+kA0yHWfG9n77Hzg4J1CAdbdav7ei5ufr06ZEPKXzo/z7oslA6GD8RpgALdIc8soNF6DzKDjUWHrxnXXpjOZ9LXrNn5vGtx6zmnr88Vifv1pr9YA83fWiyFkg+UnY6dsPiXmysSY2nnldVd2usRYhp1/ZEUWOFmeURUHyMNYS+25Kd3WlvaIjRlvYXCw4M00ijVZdpgdBFqq2U0L9VwlU89Jjsdh7pt8DN+AZMv84Sb9E8Cxrhg8/2J55FvodzZXg7X7lO+KCksJduiTUFQyRQOvSFlRZ3FDySQNJVc0lE2j5OrEDfTJyg0Tv77rdnL37DWJH5w9/mJ8zeAbZCNdTWdvmDx8InGQ1LUtK7//4JL0ldN2dcO0HykgRTJ2olBQLfPm783f518iuRwuu1xNv8Q1hu9ELfrfeicKT+qrcrYqLasSGUpRYXvtXwRergHbT1k62p7Nto8ufbgGjDpCjgsvdIT86PrrYCbMKMqByvCMshwgbziOLFqFrb3XQ+xJ0PtbQPadKJRAoztL2CPcLDwqfAtHmsaNFn8RB3dh1eMiNLzEF3z4JY2cwVuadIa/wZPm1zsFfsUT5Aa3sl+2Vy8sjKq9BAy+D+YDZgvtETKg8gb9vKV0taHasVSw2oxc14r+STPSk5we2Gs5PB4HbL88AQ+4To/HCXGeUZBK6bRhmAbEBGpPkD9sSeXN4LARDQZp1BgORo3K1qgSsC1ZsNhGt0dtAcVccQJ5WKl0OzydzVhhcycU7mzGhgBMeZwY6XT+6WTaeIxuBawOP2pkeP/MO2d0jMPmyxR6FjXmGdBL9Mlvo4qy5IQlSqDyc4DI108wV9gC9AKPM9YJpTpjWPkUWOaNezyVi/90+vRd/nfZqOCrys+Ewq+dcDeYtC6iWDJDjCIsSrped5uq6nrC7aPJV8gyl8v8R3f56T0k9uHwR+srbMRT+TdXyvWEawOkpV1knqvSuocMfDj8hy2Vms2EKNB9XJbiCUAGbSZCJK6hxYCugbYVgM0/mkhUdS/+lwFFjETTBTSgEIXJYVaeLG8abh4ebi43DzfzB377ysN0X2WCDg+bw2TTYWHTJgK/4YkJ2O7c2t5+KxHa2w8LwxP83ZEX2c9gPSAPbIF9cEnYLJwrXA4cYsp2JugHASrXdpYZLmSrb6pJfiD0BN75FoHvI7HDUsfXGZDca7d2uLWvGeFI9aVJXbVGXXMkdrPsdko3yx7nBgfa+DrKDht/mQsc+k89a3qu7XlGVa+909PtXeP13uXwqxM95r5r7/R2alPhai5y8XRR83tQFVT4K6helbGNB26RnB75ZnAi1UxO56U2zONcubBndU/vM6rfeZeHeNZ4O713XauqE71kveNOLw/fuQfCfdd082wLsZTDQbprjTlOx2olbICfN0zZiMX4m2JLrVNuPHJOVu8zlekrTf7S0cfZCKWKON1pHkduJ2+gqY7ZDC740yHyUZ29GKuDK+wuxu4Soc/PT9v5/KDqQw0PTcdWrpmGb9vFbGyXKMkfylL1P0xuoj+fGtfHWjYpH2f5dI3Je0p4T+vh44yDvllnsnTKNPzP0yD56jR87D7PxASZGcxJH2edZavrLfntdMdp+XidvuPYnb7uOJ2e+r+YGf3Wj+j3keGP6/elR0+yBet/pm5b72PdxDToM1oAC6kjaRjfjsrBvpvyN+5xz87wECSnJ9k19cR6YUmhhX/NU2U9Exl5mSnjCn2ZyEQU1zy4YtrQcYVy330KVUS6UVEqXyGyTEXzI0vnvpsdYhtBp+niVkeZtJvyP+3o46/4ok7DjqcDJ7VjKTtJesdrdr9ud2gB2+tOJkuievsZ60q7W9Lplt2ldc+uG7PAsXVnXLD5tFkDA7NOP+PnNeAvyPU/kohTc5rnOXxO6dsOya7bJCf54ZFln+U1Tl45o/TPzzh91kBNX3yB/T0bAP49Ys3u1Ol8ju+Wp7S26g66UH/FVbuCPzKN7Zl8B/+Xg/nBnXw7J8rZ9pHFX1s80p6VxRym/AQdiJ8zfun4oDQdlwpnmpoyYfqEzMyJscWjbdls2+jiMTLMZCsF4+eMz4FnOg7kIehlr4gC6wZZ2CoU+X3nOs5LjvprFQn/JkDj52uAE/S0IcLyBv//G3xrOw55kukMDweCMpu6oYBqitZLUf0FdvXk7xKzmptnJZganxWPz5r8MVNj7b25eee1zDll47aT9s6mHVnWf/2yzWtW5/JK5elIOyvdYeto3DQr10vanwh3NzV1F9Fpwrenm5tZF1RWud2qlG4Hv7c9Zl4bnJtf0d0DRa6JtVdW3kMLc7q7lq88nWSzZyzLzQ3/faydfD9sVVTsDv81vofdEePn5RZeUzUrXcQX6CMWgiwUoyQtkirm2B7zEGKhTYZFXJKcOzBAYrUost+KYgMw4Q6xcobdmnuHRL+MoLVGvs5+xE4W2gEDm6Fd2MwF5aqA78f/A7HuTPAahb9rwd9WGsIXYhTLVCfNNSaM4FnwEpamCzX7W4zK4FsaRpCXS1PN61YkyX5ZaFFoQyh0mT2kas1ut7dlWfgyvOxaHz/llPilTR6P0vwTV1Ily9RQUjUfc9F1Uymizwi4mf24dRBRadbUECRD6iJIliTFHW9WPN7wpVjHemzn0qZlLV73MBoAq8kQtKAmyVtTKQ43s+lB47h11O6ZLHxt5P9DBgzYMmVCQ69iIcf/z02pnhwWON3W/mpgGqPIdyzOgm//8y20Yr1AijuRTJojmv19k25+XZaainOjGV+gJ56LDTY67SycCUtGaNaVC8eLnclFkqj8J8f/nYzF0yQR7oo0b89oLok2ZKLU1hhdeNPynSc0A9P6hd5ENvrDIuwzgtFwtKXYoIkenzejq/ifPM70kshA99jA6GBnt+gCMqHBha3FeKNT6QjmG/1RMaR3b2hZOjC+YLgg2ZuqOvSr9LAQAG7fwf/fDWgHLyFg/HxPhDf0OeA5hapt1xDB/0PAv0fQyfWg8L/a2EhaPW0R4jbfkWXid8hq6IAnpMoO4pdl8x03ibR5SGsoZL7qeZ96SG/jaJj0eCDSfEv2yuZbzmiT19sUdZIwBEkYqoJdRHi00fyRh1xSPX95ga0FXDULPfzeB2+aMvE6pjiFkyHWRViUApfEtcbPR/Wp00geT5/ra8pfPGI+g9Odxjv6NJ/4nbPHRxpDi36SnpdKzUs/gAmvv87d7Eh7+wi5v++LV60gnCFWThWREZK+dRect54sJ+nhZcMZSSQ2JleWyCLJihLJjo6NZoX/BTPF+NcAAHicY2BkYGAA4tcMi/nj+W2+MnCzMIDAQ8OJK2H0////Q1nYmTuAXA4GJpAoADuyC9gAAAB4nGNgZGBgbvjfwBDDIvv////fLOwMQBEUkAQApBQG53icY2FgYGAZFvj/f1QME0OXRxcnE8ui202KOzHFAX0RFZIAAAAAAAAAngDCAPwBIgFWAewCEgI2Am4C7APEBA4ESATGBX4F5AZCBsgIAghqCMAJRgnMCgAKpAswC4wMHgyuDMgNUA2SDhwOkg8KEAYQWhC2ERIRhhHIEgQSQBKeEwAThBPoFKAU/BVyFeoWYhbaFzAXpBh8GNIZWhnUGh4amBrgGz4blhvyHHwcwB1cHaAeEB5GHnoevB8eH14f4iAsIFogbiDcIeoiICJkIxgjhCPeJDoklCTYJUQlqCYwJmonCCeMJ94oPAAAeJxjYGRgYEhiuMUgzAACTEDMBYQMDP/BfAYAKZ8CZgB4nH2QzU7CQBSFz/CjEaILTUxkNStcGFogrtgZEoiJKxYkLqG0UNJ2mulAwt53cOmT+Bzu3PkcemgHEzDSydx855w7NzcFcIlPCBTfFW/BAudUBZdwCmm5TP/WcoV8b7mKOh4sn9B/slzDHZ4t1znxhRNE5YyqiVfLAg28Wy7hAh+Wy/S/LFfI35aruBY3lk/QEK7lGsbi0XIdTfHW1/7E+DM53cjQU0mgEqpV2NqJkT9fRRO95+2Jsa+zUCWy47T3/KGf+Ho3OlvPu8YEMtAqloPtiChSMtVq6XvGWRiT9lw3sL7jqRh9aPiYwLDO+Gun2LCG8KCQIMhrka3otv4kI2ZzZhFn6CN9/ydjZhoZ/a2W6MBB+0j/kFmSvzncOsOau3TpGnZLXs03MWnwu0XEo+ikebak49F3sMhfpejB5QkO+p18h/gHeJp993icbVNnd9s2FNW1SSUSJdlO0rhN955sGzfdM27TdLnpcPdQQfCRRA0SCABacX99H0nl2Dkn/MBz38Cb9402RsM3Hd3/y7CBTUSIMcY5nMcEUySYYY4FtrCNHVzARVzCA7iMXTyIh3AFD+MRPIrH8DiewJN4Ck/jGTyL5/A8XsCLeAkv4xWkeBWv4XVcxR7ewDW8ibfwNt7Bu3gP7+MDfIiP8DE+wXXs41N8hhv4HDfxBb7EV/ga3+AA3+IWvsP3+AE/4hA/4Wf8gl/xG37HH/gTf+FvLPEPBDLIUexN2+SxU2UVtpRcqlqUtGytNiKPZUXyaKwKJ2ra3hfyqHSd942iIBk2dXCbLuikUE3uyGohaaKkdXSsaMURb6u9hFpnUn9SZ0bHdeuVjCrSdlKJJl/mTqxi61QToqBqijOh8ja5aUypKT0Q1k/7YtLGNDQboKQmkFvrNRUhGWBf/kRqEi7NjUxWxuVpb7o6tZ1D5kgcjUUbKuOSYFpryUnhibE2qwFP2ab+M00Qeqsmx69ys2o4p9bJIHfQbw+4T9lr5t5qFdJgUmdW/lSSRvvFqdS9XajGkwvsJzJzTFf2rpU6tcKJ0glbHQhXqmbfhGDq3fuZDo2dtw33Ro5yrXyYdb90rbg05OoTpcecRkmhL59VnjY4FSEIWdU8z4lvMy+dsoxI82IF9+tbHtCg3ayFnWRl145xfi7yfMlwKQrexOKulFFhHPVGbu6MsZMG4zTn6IE697k0daYaxl1ZG0bftbH3bA2DyDRttDrizkzcSxFzz8RW+EDjNUMz1/pqGuhOWN5uTaCdYcDdJtKsH+RO0XIO6YialO5YJt7ijE8w9nygmskb6AJXWYuQnqHUzj2qjnAX79EMfEw095JW1L3Yvd61LrXw/pCrSm+1obPmsa+V5gFpVTbpv60Pqjg518VqtZiKpqN8x7ZYasNM5OBKpisudkyOqemiKtR63DYciw+yyTlvMsTq65wNeH0eg9CfR8HbXm8u4iZPJjxCcl1Fcd/BWPG6+Sr7uD44dUSRNDlFfLD5aPQ/By+Y9Q==") format('woff'), url("data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI8QFDMAAABjAAAAGBjbWFwoearHAAAA3QAAAguZ2x5ZoJvAGEAAAxsAABQeGhlYWQliGcsAAAA4AAAADZoaGVhB+UD+wAAALwAAAAkaG10eIgm//YAAAHsAAABiGxvY2HxZ91uAAALpAAAAMZtYXhwAX8A5gAAARgAAAAgbmFtZQlTMroAAFzkAAACo3Bvc3SGsMIgAABfiAAABQUAAQAAA4D/gABcBB3////7BAcAAQAAAAAAAAAAAAAAAAAAAGIAAQAAAAEAAOsAow9fDzz1AAsEAAAAAADhMZGpAAAAAOExkan///9VBAcDiAAAAAgAAgAAAAAAAAABAAAAYgDaABMAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAQEAAGQAAUAAAKJAswAAACPAokCzAAAAesAMgEIAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAwOYA7fwDgP+AAAAD3ACrAAAAAQAAAAAAAAAAAAAAAAACBAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAP//BAD//wQA//8EAP//BAAAAAQA//8EAAAABAAAAAQA//8EAP//BAAAAAQA//8EAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABB0AAAQAAAAEAAAABAD//wQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAP//BAAAAAQAAAAEAAAABAAAAAQAAAAAAAAFAAAAAwAAACwAAAAEAAADhgABAAAAAAKAAAMAAQAAACwAAwAKAAADhgAEAlQAAABgAEAABQAg5iTmKOYq5i3mL+Y45j7mROZK5kzmVuZi5mXmaeZ15nrmgOaX5qfmrebA5tjm+ucE5wvnGuc15zfnUud754Lnree859Ln+Of86D7oQuh86JHpAekr6fDrCuts7Ont/P//AADmAOYo5irmLeYv5jbmPuZE5kjmTOZW5mLmZeZp5nXmeuaA5pfmp+at5sDm2Ob45wTnC+ca5zXnN+dS53vnguet57zn0efz5/zoPuhC6HvokekB6Svp8OsJ62zs6e37//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAYACoAKgAqACoAKgArACsAKwAsACwALAAsACwALAAsACwALAAsACwALAAsACwALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC2AMAAwADAAMAAwgDCAMIAwgDCAMQAxADEAAAAMgAzADQANQA2AFwANwA4AFMAOQA6ADsAPAA9AEwAPgAiACMAJAAfACAAIQBOAB4AGQAcAB0AGwAZABoAGAAUABUAFgAXAAcABgBhAF0ASwAuAFoAQQBKAFsACgBeADAAXwBgAA0AUQACABIARAAQABEACwBQAEYABQBCAEcASABJACwADwAxAEUAKQAOAAEAUgBAAAgAKgArAFUAKABWAFcAWABZAAQALwBDABMATQAMACUAVABPACYAJwAJAC0APwADAAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAASoAAAAAAAAAGIAAOYAAADmAAAAADIAAOYBAADmAQAAADMAAOYCAADmAgAAADQAAOYDAADmAwAAADUAAOYEAADmBAAAADYAAOYFAADmBQAAAFwAAOYGAADmBgAAADcAAOYHAADmBwAAADgAAOYIAADmCAAAAFMAAOYJAADmCQAAADkAAOYKAADmCgAAADoAAOYLAADmCwAAADsAAOYMAADmDAAAADwAAOYNAADmDQAAAD0AAOYOAADmDgAAAEwAAOYPAADmDwAAAD4AAOYQAADmEAAAACIAAOYRAADmEQAAACMAAOYSAADmEgAAACQAAOYTAADmEwAAAB8AAOYUAADmFAAAACAAAOYVAADmFQAAACEAAOYWAADmFgAAAE4AAOYXAADmFwAAAB4AAOYYAADmGAAAABkAAOYZAADmGQAAABwAAOYaAADmGgAAAB0AAOYbAADmGwAAABsAAOYcAADmHAAAABkAAOYdAADmHQAAABoAAOYeAADmHgAAABgAAOYfAADmHwAAABQAAOYgAADmIAAAABUAAOYhAADmIQAAABYAAOYiAADmIgAAABcAAOYjAADmIwAAAAcAAOYkAADmJAAAAAYAAOYoAADmKAAAAGEAAOYqAADmKgAAAF0AAOYtAADmLQAAAEsAAOYvAADmLwAAAC4AAOY2AADmNgAAAFoAAOY3AADmNwAAAEEAAOY4AADmOAAAAEoAAOY+AADmPgAAAFsAAOZEAADmRAAAAAoAAOZIAADmSAAAAF4AAOZJAADmSQAAADAAAOZKAADmSgAAAF8AAOZMAADmTAAAAGAAAOZWAADmVgAAAA0AAOZiAADmYgAAAFEAAOZlAADmZQAAAAIAAOZpAADmaQAAABIAAOZ1AADmdQAAAEQAAOZ6AADmegAAABAAAOaAAADmgAAAABEAAOaXAADmlwAAAAsAAOanAADmpwAAAFAAAOatAADmrQAAAEYAAObAAADmwAAAAAUAAObYAADm2AAAAEIAAOb4AADm+AAAAEcAAOb5AADm+QAAAEgAAOb6AADm+gAAAEkAAOcEAADnBAAAACwAAOcLAADnCwAAAA8AAOcaAADnGgAAADEAAOc1AADnNQAAAEUAAOc3AADnNwAAACkAAOdSAADnUgAAAA4AAOd7AADnewAAAAEAAOeCAADnggAAAFIAAOetAADnrQAAAEAAAOe8AADnvAAAAAgAAOfRAADn0QAAACoAAOfSAADn0gAAACsAAOfzAADn8wAAAFUAAOf0AADn9AAAACgAAOf1AADn9QAAAFYAAOf2AADn9gAAAFcAAOf3AADn9wAAAFgAAOf4AADn+AAAAFkAAOf8AADn/AAAAAQAAOg+AADoPgAAAC8AAOhCAADoQgAAAEMAAOh7AADoewAAABMAAOh8AADofAAAAE0AAOiRAADokQAAAAwAAOkBAADpAQAAACUAAOkrAADpKwAAAFQAAOnwAADp8AAAAE8AAOsJAADrCQAAACYAAOsKAADrCgAAACcAAOtsAADrbAAAAAkAAOzpAADs6QAAAC0AAO37AADt+wAAAD8AAO38AADt/AAAAAMAAAAAAAAAngDCAPwBIgFWAewCEgI2Am4C7APEBA4ESATGBX4F5AZCBsgIAghqCMAJRgnMCgAKpAswC4wMHgyuDMgNUA2SDhwOkg8KEAYQWhC2ERIRhhHIEgQSQBKeEwAThBPoFKAU/BVyFeoWYhbaFzAXpBh8GNIZWhnUGh4amBrgGz4blhvyHHwcwB1cHaAeEB5GHnoevB8eH14f4iAsIFogbiDcIeoiICJkIxgjhCPeJDoklCTYJUQlqCYwJmonCCeMJ94oPAAAAAUAAP+/A8EDQAAUACkAPgBTAGYAAAUiJyYnJjQ3Njc2MhcWFxYUBwYHBgMiBwYHBhQXFhcWMjc2NzY0JyYnJgMiJjQ3PgE0JicmNDYyFx4BFAYHBiciLgE3PgE0JicmNDYWFx4BFAYHBiciJjY3NjQnLgE+ARceARQGBwYCAHlpZTw9PTxlafNoZTw9PTxlaHpoWlYzNTUzVlrQWlczNDQzV1opDRMKKiwsKgoSGwkzNzY0CWwMEwEJGhwcGwkTGwkjJiUjCW0PEgMKFBQKAxAbChUXFxUJQT47ZmjzaGY7PT07ZmjzaGY7PgNANDNXWdFZVzM1NTNXWdFZVzM0/YETGwkoaHJoKAkbEwkxgIyAMQlBEhoKG0dOSBsKGhMBCSVeZ14kClIWGwgQLhAIGxQDCBEuNC4RBwAAAAABAAAAAAKmApkAFAAAJSInJjQ/AScmNDYyHwEWFA8BFAcGAY4jCxERwsIRIi4R5RER5Q0HYgsSLRLCtxEuIhHlES4R5QcDAQADAAD/4wPDAvgACAAYACEAAAE0JiIGFBYyNgERITUhNTcXNycHESERFxEDNycHFzcVMzUDLCw+LCw+LP0SAcL+ieGWNcvhAu5LQDWxsDVWSwIWHywsPiwsAQD9Ekti4ZY0y+EBjf76SwGc/Wg1sLA1V9PTAAEAAAAAA5oCwwASAAABIyIHAScmKwEiBhcBFjI3ATYmA5BGDwr+ZMYKD0YFBAMBEgkfCgHoAwQCwgz99voMCQT+pQwMAmsECQAAAAAEAAAAAAOmAuAADwATABcAGwAANyImJxE0NjclMhYXERQGBwEjETMBIREhESEVIY8VHgIcFALnFR4CHBT9t42NAjP+EwHt/UACwCAcFAJbFB4CARwU/aUUHgIBpf6hAV/+oQIyjAAAAAwAAP/7A+YDBQADAAgAHgAjACoALgA3AEQATQBRAFYAWwAANxUHIwEVByM1JSEyFhcVIzU0JicjISIGBxUjNTQ2NycWFwE1ARUHNSYnNwkBNQEFFQEmJysBNjcnMh4BFA4BIi4BND4BFyIGFBYyNjQmJwE1NyEHJic3IwcmJzfdLmcDnqgb/j8BPCEwA0gGBAL+xAQHAUktIRwEFf7DA8vDAhHV/h7+GAGBAkr+7BQVCx4aEKooQigoQlBCKChCKB4rKzwrK/b+8qcC9/oJF7N0eyQqYpBnLQEOZ6dL2C0h1c4EBwEFBNHOITEDriok/sNnATtnwhchHNUBIP4YZwGBRWf+7QgCFx3wJ0NPQygoQ09DJ0krPCsrPCva/vJnp/onIbJ7FQRiAAAAAAIAAP/2A4oDCgAQABMAAAEhFSMRIxEjESMRIi4BND4BARcHAcgBwnFwcXA2WjU1Wv7k4eEDCnH9XQKj/V0BijVaa1s1/q7FxAAAAAACAAD/9AOMAwwAEAATAAABIg4BFB4BMxEzETMRMxEzNRcHFwE6NVs2Nls1Y2NjY8bGxgMMNltrWzX+dAK1/UsCtWOVxsUAAAACAAD/tAPMAwYAEgAhAAAlFwcnBiMiJwcRIQcWMzI2NzMGASIGByM+ATMyFzcRITcmAuHrR+1bbY1kZAEje0dmWYISYgn+ulmEEmITv3+LZGT+3XtH6O1H60JkZAEje0ZtVFIBdW1Ue6hkZP7de0YABQAA/5UDrgNrABQAGwAtAEcAVQAAAS4BJyYjISIGFREUFjMhMjY1ETQvARYXIzUWFxMUBiMhIiY1ETQ2MyEVFBY7AQMnPgE1NC4BIg4BFB4BMzI2NxcWMj8BNjQnJSIuATQ+ATIeARQOASMDhSJlLDcg/iQfLS0fAsIfLSh/KRyTJSlqCQb9PgYJCQYB3BIM12StFhg5YnNiOTliOSQ6Ga4FDgUXBQX+rCVAJiZAS0AmJkAmAo8uZSApLSD8xCAtLSACViA3NCgmlB0p/R8GCQkGAzwGCdYNEv4RrRtEJTpiOTlic2I6ERKuBQUXBQ4FpiZAS0AmJkBLQCYACwAA/6oD0gNZABQAKAA2AEQAUQBeAGsAeACFAJIAnwAABSEuAjURND4BMyEyHgEVERQOASMBIg4BFREUHgEzITI+ATURNC4BIwciJj0BNDYyFh0BFAYjISImPQE0NjIWHQEUBiMTIyImNDY7ATIWFAYjASEiJjQ2MyEyFhQGIwUjIiY0NjsBMhYUBiMzIyImNDY7ATIWFAYjMyMiJjQ2OwEyFhQGIwUjIiY0NjsBMhYUBiMhIyImNDY7ATIWFAYjAyX9pitGKS5OLgJKL04uLk4v/bYbLxsbLxsCShwuHBwuHGoTHBwmGxsT/oEUGxsnGxsT2ywUGxsULBMbGxMBjPzWExsbEwMqExsbE/2lLBQbGxQsExsbE88sFBsbFCwTGxsTziwTGxsTLBMcHBP+YywUGxsULBMbGxMBnSwTGxsTLBMcHBNVBDBLKwIHL04uLk4v/fkuTi4DFhsuHP35Gy8bGy8bAgccLhtkHBOfExsbE58THBwTnxMbGxOfExz+CBsnGxsnGwFWHCYbGyYcxBsnGxsnGxsnGxsnGxsnGxsnG5IbJxsbJxsbJxsbJxsAAQAAAAADgAMBADEAACUiJiczNSEmNDchNSM2NzYzMhYXNy4BIyIHDgEHIxUzBhQXIxUzHgEXFjMyNzY3Jw4BAoBPhCP2/u4DAwES9iNBQ08zXCVMNYRHUkpIaxuWgwMDg5Yba0hKUkhDQTRMJV1rUURVGCYYVUQoKSMfSy8zISB1SlUVLBVVSnUgIRoaLkwhIgAAAAEAAP/4AywDBAAhAAABETQmBwUOARURJg4CHgE+ATc0NRElESYOAh4BPgE3NAMrIBT+gA8TLWFCCDVdXzwBASotYUIINV1gOwEBAAHVFRkEVQMYD/6cFRRKY1QjG08xDAsBs0L+0RYUS2NUIxtQMQsAAAAABAAA/+MDnQMdABQAKQAtAFIAAAEyFxYXFhQHBgcGIicmJyY0NzY3NhciBwYHBhQXFhcWMjc2NzY0JyYnJgMVIzUTHgEXFhUUBwYPAQYHFSM1NDY/AT4BLgEHBgcGHQEjNDY3Njc2AgBwYF42OTk2XmDgYF42OTk2XmBwXFBMLS8vLUxQuFBMLS8vLUxQL0RAFy0NEBcNGgYXAkQMDioSBBkgEBwLCEQOFhgjHwMdOTZeYOBgXjY5OTZeYOBgXjY5SS8tTFC4UEwtLy8tTFC4UEwtL/4aSEgBaQUeFxkdJBoPDwQPFEVaERcKHAwpFggDBhQPGxArMBgZCAcAAgAA/9gD0QMxADcAcwAANz4BNTY3NjcTFgYvAS4BBw4BHwEeATc+ATc2LwEuAQcuAQcGBy4BBwYHJy4BDgEfAQ4BBwYVFBYFBicmLwEuATYWHwEWNz4BJwMmPgEWFxMeAT4BLwE2NzYWHwEeAT4BLwE2NzYWHwEeAT4BLwE2Fh8BFgYoCw8EQ0FvZAEFAjMYOxkbARuQUb5rVWYKCyIgGVs5DywZEhAQMBoPDDEOP0gcDQRTgCIkEALRV0xSR5ALARQYC2MWFw0KBpcFChkVBWwEFRUJBCcLDA8XBiIEFRQKBBsJDQ8YBRcEFRUJAxIbMREbLEndAQ8MimViKf7uBAICNxsFFRdCIa5iPScfeFBTXVdGNxQUDQkHDBUOCQYJhiYeGj8mCh98VFhmDBGmIBYXV60NGRIEDGYWCAUYDgGhDRYJCw3+1goJCBQKawoFBQwQXgsICBMLTAkFBg0QPgsIBxQKLwkqMEl5sQAAAAAEAAD/4AOgAyAAJwArAC8ASQAAASM1NCYjISIGHQEjIg4BHQEUHgE7ARUUFjMhMjY9ATMyPgE9ATQuASUhFSEBITUhFxQGKwE1NCYjISIGHQEjIiY9ATQ2MyEyFhUDMy0TDf40DRMtHjIdHTIeLRMNAcwNEy0eMh0dMv3pAYz+dAGM/nQBjJoaEy0TDf40DRMtExoaEwJmExoCE+0NExMN7R0yHsAdMh16DRMTDXodMh3AHjIdzc3+DfMtExl5DRMTDXkZE8AUGRkUAAADAAD/ygO2AzYAFAApADsAAAEiBwYHBhQXFhcWMjc2NzY0JyYnJgMiJyYnJjQ3Njc2MhcWFxYUBwYHBhMnNTQmIgYdARQfARYzMjc2JgIAd2ZiOzs7O2Jm7mZiOzs7O2Jmd2VXVDIzMzJUV8pXVDIzMzJUV1KXExoTE6sECRQKBAkDNTs7YmbuZmI7Ozs7YmbuZmI7O/zWMzJUV8pXVDIzMzJUV8pXVDIzAT5G3AwUFAzvFQlRAhMLGQAAAAYAAP//A4ADAQAbADUAPgBHAFAAWQAAATIWFxYXHgEOAQcqASMmByoBIy4CNjc2Nz4BNyIOAQcOAR4BFxYyNzYXFjI3PgImJy4CNyIGFBYyNjQmFyIGFBYyNjQmISIGFBYyNjQmNyIGFBYyNjQmAgAdMg4lRh8fDDIjCA4HiIkGDgciMwwfH0UlDjIdNFsxLjg3Fls+DBgMfn8LGA0+WxY4OC4yWjcbJSU1Jia7GyUlNiUl/WUbJSU2JSW6GiYmNSUlAcAdGkUlET5FMQUREQUwRT8QJUYZHlU1XBkdcXxXCAIBDw8BAghXfHEdGVw16zJHMjJHMpUyRzIyRzIyRzIyRzKVMkcyMkcyAAAMAAD/2gOVAyYAIgBAAEkAUgB2AIIAjgCXAKAArADGANkAACUiJicmJyYvASYnJicmNTQ+ATIeARUUBwYHBg8BBgcGBw4BAyIOARUUFxYXFhczFhcWFzY3Nj8BNjc2NzY1NC4BByImNDYyFhQGJyIGFBYyNjQmEyEiJjURNDYzITIWFAYjISIGFREUFjMhMjY1ETQ2MhYVERQGJSImNwE2MhYUBwEGISInASY0NjIXARYGASImNDYyFhQGJyIGFBYyNjQmMyMiJjQ2OwEyFhQGByInLgE1NDcmNTQ2MhYUFxYXMRYXFhUUBwYnBgcGFRQXFhcWMzI2NzY1NCcmAtMGCgETIxQqARMIFwYDNFhpWTQDBxcIEgEqFCQSAQoGK0kqAgYTCRIBIxIeFBMfEiMCEgcUBQMqSSskNDRINDQkFh8fLB8fMP2rJTMzJQFfBwsLB/6hFh8fFgJVFh8KDwoz/WILCQgBtwYOCgX+SQUClAcF/rIFCg8FAU4ICf3CHSkpOikpHQ8UFB0VFThGBwsLB0YHCwtNHRUSFF0FCg8KBQQKEAcLGxQKKxYTBAYKDRQYFwMDBgStCAZbSixBAR0OIykQEDRZNDRZNA8RKiMNHQFBLEpbBggCVitJKgwOJBwOHTcjO0NDOyM3AxsMHSQODCpJK/YzSTMzSTOMHysfHysf/UE0JAIzJDMKDgsfFf3NFh8fFgG3CAoKCP5JJDQjFggBuAULDgX+SAUFAU4GDgoF/rIIFgHsKjopKToqahUdFBQdFQoPCgoPCvYMCiAQMhALCwcLCwwHBQoPChETKhAMaQYKCQoFBwoFCAgIBg0JCAYABgAA//ADgwMQAAsAFwAjAC8APwBDAAABISIGFBYzITI2NCYnISIGFBYzITI2NCYnISIGFBYzITI2NCYDISIGFBYzITI2NCYFITI2NRE0JiMhIgYVERQWEyERIQKr/qoIDAwIAVYIDAwI/qoIDAwIAVYIDAwI/qoIDAwIAVYIDAwI/qoIDAwIAVYIDAz93wLcCAwMCP0kCAwMHAK0/UwBRgwRCwsRDJILEQwMEQuTDBAMCxEM/kgLEQwMEQvDDAgC+AgMDAj9CAgMAvj9MAAAAAUAAP/wA58DEQALABcAIwAzADcAABMhMjY0JiMhIgYUFgEhIgYUFjMhMjY0JichIgYUFjMhMjY0JgEiBhURFBYzITI2NRE0JiMDITUhdQMWCAwMCPzqCAwMAx786ggMDAgDFggMDAj86ggMDAgDFggMDP1tCAsLCAIACAsLCBT+KAHYAukLEAwMEAv9LgsQDAwQC6QMEAwMEAwBsgwI/u0JCwsJARMIDP7s7AAIAAD/8AOfAxEACwAXACMALwA7AEcAVwBbAAATITI2NCYjISIGFBYBIyIGFBY7ATI2NCYnIyIGFBY7ATI2NCYnIyIGFBY7ATI2NCYDIyIGFBY7ATI2NCYHISIGFBYzITI2NCYlITI2NRE0JiMhIgYVERQWEyERIXUDFggMDAj86ggMDAMeqwgLCwirCAwMCKsICwsIqwgMDAirCAsLCKsIDAwIqwgLCwirCAwMCPzqCAwMCAMWCAwM/OIB/wkLCwn+AQgMDBwB2P4oAukLEAwMEAv+YgsRCwsRC5ELEQsLEQuRDBAMDBAM/k4MEAwMEAykCxAMDBALfAwIAbIIDAwI/k4IDAGy/nYAAAAACAAA//ADnwMRAAsAFwAjAC8AOwBHAFcAWwAAEyEyNjQmIyEiBhQWEzMyNjQmKwEiBhQWNzMyNjQmKwEiBhQWNzMyNjQmKwEiBhQWEzMyNjQmKwEiBhQWBSEiBhQWMyEyNjQmAyEiBhURFBYzITI2NRE0JgMhESF1AxYIDAwI/OoIDAwIqwgLCwirCAwMCKsICwsIqwgMDAirCAsLCKsIDAwIqwgLCwirCAwMAx786ggMDAgDFggMDAj+AQkLCwkB/wgMDBz+KAHYAukLEAwMEAv+OwsRCwsRC5ELEQsLEQuQDBAMDBAM/k4MEAwMEAx8CxAMDBALAlYMCP5OCAwMCAGyCAz+TgGKAAAAAAMAAP/wA0MDEQASABUAHgAAATQvASYvASEiBhURFBYzITI2NQMjNQERIRUUFjsBEQNCBI4FCQH+MAgMDAgCXggMPVL+MQGoCwl6AksGBbMFAQEMCP0ICAwMCAJZZ/1UAtCeCQv94gAAAwAA/+ED8gMfACgARwBuAAAlIREnNCc1Ji8BIisBJyYjByIHMQYPAgYWFxYzMj8BERQWMyEyNjQmEyYGDwERNCYjISIGFBYzIREXFBcxFh8BFjI/AjYmBTEyNjcbAR4BOwEyNjcTNi4BBgcLAS4BIzEiBgcLAS4BDgEXEx4BA5P87gEDAgICAQICAgIBAwMEBAICSAUFBwUGDAUiDAkDJgkMDEoIEAQiDAn82gkMDAkDEgEDAgICBQsHBUgFBf2gChEDW1IEEAsBChEDgAIHEBACd1IDEQsLEQNbfAIQEAgDhAQQCwJlAgMEAQQCAgECAgMCAgKACBAFAgo8/dUIDAwRDAEcBAQIPAInCA0NEQz9oAMDBAQCAgMFBoAHEYkMCwEY/usLDQwLAYkIDwUICP6TARULDQ0K/uYBcQkHBRAI/nYLDAAAAAUAAP/vA5oDEQAWACwAOABEAGAAAAEiBhURIRE0JiIGFREUFjMhMjY1ETQmAyEiBhURFBYyNjURIREUFjI2NRE0JgEzMjY0JisBIgYUFhMjIgYUFjsBMjY0JiU0LwImDgEWHwEjIgYUFjsBBw4BFjI/AjY3A4YIDP5GDBAMDAgB4ggMDAj+HggMDBAMAboMEAwM/pLlCAsLCOUIDAzt5QgMDAjlCAsL/mMDAWoGEQsCBkCuCAwMCK0/BgIMEAZoAgMBAxAMCP7vAREIDAwI/tsIDAwIASUIDP4tDAj+2wgMDAgBEf7vCAwMCAElCAwBSAwQDAwQDP4cCxELCxEL4QUEA1wFAQwRBTcMEAw1BRENBVgDAwIAAAACAAD/8APgAxAAMwA8AAAlJwcXNw4CBxEzNSM1PgE1NC4BIg4BFRQWFxUjFTMRLgInFzcnBxc3HgEXFjI3PgE3FwE0NjIWFAYiJgPfP4ARRBhokFJsbCUxHDE5MRwxJWxsUpBpF0URgD8iIxp6UlW9VVN5GyP9/yg3KCg3KO2APyMiTntIBAF7JoUHOyYdMB0dMB0mOweFJv6FBEh7TiIjP4ARRVmKJycoJoxZRwHKHCgoOCcnAAAABQAA/+4DrwMRABUAGAAzAEAAXwAAAS4CBgcDBh4BNj8BIRceATI3PgEnJRsBJSIGHQEuASMiDgEUHgEzMjY3FRQWMjY1ETQmAyIuATQ+ATIeARQOAQEwHQEWHwIWMjYmLwEhMjY0JiMhNz4BLgEPARUGFQF+BRMWEgXmAwYODwNLATRLAwkKBAcGA/5uiIoBtwgLF0ElLEwsLEwsJUEXCxAMDJgiOSIiOUQ5IiI5/uQBAgNmBRALAQY+AUMIDAwI/rw/BgEKEAZpAwIgCgwBDQv97AcPBwYIrq4GBgIDDwfGAT/+wWYLCCgcHyxLWUssIBsoCAsLCAEhCAv+4CE6RDkiIjlEOiECigECAgIEVgUNEAY0CxALNgUQDAIGWgIFBAAAAAUAAP/uA68DEQAVABgAMwBAAFwAAAEuAgYHAwYeATY/ASEXHgEyNz4BJyUbASUiBh0BLgEjIg4BFB4BMzI2NxUUFjI2NRE0JgMiLgE0PgEyHgEUDgEBIQcOARYyPwI2NzU0LwImDgEWHwEhIgYUFgF+BRMWEwTmAwYODwNLATRLAwkKBAcGA/5uiIoBtwgLF0ElLEwsLEwsJUEXCxAMDJgiOSIiOUQ5IiI5/vYBRD4GAQsQBWYCAwEDAWgGEAoBBj7+vAgLCwIgCgwBDQv97AcPBwYIrq4GBgIDDwfGAT/+wWYLCCgcHyxLWUssIBsoCAsLCAEhCAv+4CE6RDkiIjlEOiECezQGEA0FVgQCAggEBQJaBgIMEAU2CxALAAAAAAEAAAAAA8sBlAAMAAABISIGFBYzITI2NCYjA7j8kQkLCwkDbwgLCwkBkwsQCwsQCwAAAAAKAAD/8AOhAxAADwATABcAGwAvADMANwA8AEAAWwAAASEiBhURFBYzITI2NRE0JgMjNTMlIxEzAzMVIzczMjY0JisBESERIyIGFBY7ARUhJSMRMzUjNTMpARUhNSMVIzUBJgYPATU0JiIGHQEnLgEOAR8CNzY/ATYmJwON/OYIDAwIAxoIDAwcjY39m42NjY2NtWMIDAwIYwGIaggMDAhq/ngCPY2NjY39yQGC/ngojQG8BhEFEgwRCxQFEQwCBjgKCgYDNQYCBgMQDAj9CAgMDAgC+AgM/QiFKAF2/mKFhQwQDAF2/ooMEAyFrQF2KIWFhYWF/hYFAgYVrwgMDAiwFgcBCxEGQQUBAgQ/BxAFAAcAAP/wA6EDEAAPABMAGAAcACAAJAAoAAABISIGFREUFjMhMjY1ETQmByE1KQIVITUHMxUjExUjNREzFSMpAREhA4385ggMDAgDGggMDBz+9QEL/ckBBP72tY2NjY2NjQLy/cMCPQMQDAj9CAgMDAgC+AgMrYWFha3+AauFhf4t/QIjAAoAAP/wA6EDEAAPACQAKAAsADAANAA4AD0AQQBcAAABISIGFREUFjMhMjY1ETQmBTMVFBYyNj0BMxEjNTQmIgYdASERAyMRMwMzFSM3IRUhJTMVIxMjNTMpARUhNSMVIzUBMwcOARYyPwE2JzEmLwImDgEWHwEjIgYUFgON/OYIDAwIAxoIDAz+xWoMEAyNjQwQDP54KI2NjY2NtQGI/ngBsI2NjY2N/ckBgv54KI0Ba7AWBwEMEAZBBgEBAQNBBxALAQcVrwgMDAMQDAj9CAgMDAgC+AgM1WAIDAwIYP6KXwgMDAhfAXb+igF2/mKFhYWFhQJLhYWFhYX+hRQFEQ0FOQYJAwMFNwYCDBEFEgwRCwAAAAsAAP/wA6EDEAAPACMAJwArAC8AMwA3ADsAPwBDAE8AAAEhIgYVERQWMyEyNjURNCYBNTMyNjQmKwE1IRUjIgYUFjsBHQIhNQMzESMTNSEVFzMRIxMjNTMhFSM1ETMVIyE1MxUBIyIGFBY7ATI2NCYDjfzmCAwMCAMaCAwM/bBJCAwMCEkBdj0IDAwIPf6KvpaWvgF2KJaWlpaW/aSWlpYCXJb+tVAIDAwIUAkLCwMQDAj9CAgMDAgC+AgM/bWnDBAMp6cMEAynKIWFAZ7+igGehYUo/ooBnoWFhf21hYWFAXwMEAwMEAwAAAAACwAA//ADoQMQAA8AEwAnACsALwAzADcAOwA/AEMAUAAAASEiBhURFBYzITI2NRE0JgMVITU3NTQmIgYdASMRMxUUFjI2PQEzEQEzESMTNSEVFzMRIxMjNTMhFSM1ETMVIyE1MxUBIgYdARQWMjY9ATQmA4385ggMDAgDGggMDNr+is0LEQylpQwRC6n9zJaWvgF2KJaWlpaW/aSWlpYCXJb+hQgMDBELCwMQDAj9CAgMDAgC+AgM/Y6GhihLCAwMCEsBdjsIDAwIO/6KAXb+igGehIQo/ooBnoSEhP22hoaGAa0LCVAIDAwIUAkLAAAAEwAA/1UDgALzAAsAGwAfAC8AMwBDAEcAVwBbAGsAbwB/AIMAkwCXAKcAqwC7AL8AAAUhIiY0NjMhMhYUBgEjIgYdARQWOwEyNj0BNCYHIzUzFyMiBh0BFBY7ATI2PQE0JgcjNTMXIyIGHQEUFjsBMjY9ATQmByM1MwEjIgYdARQWOwEyNj0BNCYHIzUzFyMiBh0BFBY7ATI2PQE0JgcjNTMXIyIGHQEUFjsBMjY9ATQmByM1MwEjIgYdARQWOwEyNj0BNCYHIzUzFyMiBh0BFBY7ATI2PQE0JgcjNTMXIyIGHQEUFjsBMjY9ATQmByM1MwLn/UMICgoIAr0HCgr+W7QICgoItAcLCxmRkRK0CAoKCLQHCwsZkZEStAgKCgi0BwsLGZGRASS0CAoKCLQHCwsZkZEStAgKCgi0BwsLGZGRErQICgoItAcLCxmRkQEktAcLCwe0CAoKGZGREbQHCwsHtAgKChmRkRG0BwsLB7QICgoZkZGrCw4LCw4LA50KB6AHCgoHoAcKn3zdCgegBwoKB6AHCp983QoHoAcLCwegBwqffAIjCgegBwoKB6AHCp983QoHoAcKCgegBwqffN0KB6AHCwsHoAcKn3wCIwoHoAcKCgegBwqffN0KB6AHCgoHoAcKn3zdCgegBwsLB6AHCp98AAAACAAAAAADkQLhAA8AEwAXABsAHwAjACcANwAAASEiBhURFBYzITI2NRE0JgEjNTM1IzUzEyM1MzUjNTMTIzUzNSM1MzchIgYdARQWMyEyNj0BNCYDb/0iDhMTDgLeDRQT/euwsLCw8LCwsLDwsLCwsED88AMFBQMDEAMFBQIwEw3+MA0TEw0B0A0T/jigQKD+gKBAoP6AoECg+AUDUAMFBQNQAwUAAAAABAAA/6oD1gMrAAsAFwAjADwAAAEhIgYUFjMhMjY0JgUhIgYUFjMhMjY0JgUhIgYUFjMhMjY0JgUiBh0BJyYiBhQfARYyPwE2NCYiDwE1NCYDwPyrCQ0NCQNVCQwM/qL+AAkNDQkCAAkMDAFM/KsJDQ0JA1UJDAz+TAkMMQYSDAZVBhIGVgYMEgYxDQMrDRIMDBIN1gwSDAwSDNUMEg0NEgzVDQmhMAcNEgZVBgZVBhINBzChCQ0AAAQAAP+qA9YDKwALABcAIwA8AAAFISImNDYzITIWFAYlISImNDYzITIWFAYlISImNDYzITIWFAYlIiY9AQcGIiY0PwE2Mh8BFhQGIi8BFRQGA8D8qwkNDQkDVQkMDP6i/gAJDQ0JAgAJDAwBTPyrCQ0NCQNVCQwM/kwJDDEGEgwGVQYSBlYGDBIGMQ1VDBIMDBIM1QwSDQ0SDNUNEgwMEg3WDAmiMQYMEgZVBwdVBhIMBjGiCQwAAAAJAAAAAAOZAtUADwAfAC8AMAA5ADoAQwBEAE0AAAEhIgYdARQWMyEyNj0BNCYDISIGHQEUFjMhMjY9ATQmAyEiBh0BFBYzITI2PQE0JgEjFBYyNjQmIgYTIxQWMjY0JiIGEyMUFjI2NCYiBgOQ/bgDBQUDAkgDBQUD/bgDBQUDAkgDBQUD/bgDBQUDAkgDBQX9DTghLiEhLiE4OCEuISEuITg4IS4hIS4hAsAFAzgDBQUDOAMF/uQFAzgDBQUDOAMF/uQFAzgDBQUDOAMFAhQXISEuISH+zRchIS4hIf7NFyEhLiEhAAAABgAAAAADgAMAAAMADQAZACUAKQAtAAABIRUhJxUzFSM1MzUjNRE1MzUjNTMVIxUzFQcjNTM1IzUzFSM1MxMhFSEVIRUhAVUCK/3VgCuAKytVVYBVVStVVVWAgFWAAiv91QIr/dUC1VWAgCsrVSv+K2oWKmoWKusrFSurKwGAVtVVAAAAAwAAAAADgQMBAA8AGwAlAAABMhYVERQGIyEiJjURNDYzBSERMxUjESERIzUzJRcjETMHJzMRIwNVEhkZEv1WEhkZEgKA/aqrqwJWq6v+1YBVVYCAVVUDABkS/VYSGRkSAqoSGVX/AFb/AAEAVtWA/wCAgAEAAAAAAwAAAAADgQMBAA8AGwAlAAABMhYVERQGIyEiJjURNDYzBSERITUzFSERIRUjMxcHNSEVJzcVIQNVEhkZEv1WEhkZEgEq/wABAFYBAP8AVquAgP8AgIABAAMAGRL9VhIZGRICqhIZVf2qq6sCVquAgFVVgIBVAAAAAQAA/3UDqAOIADUAAAEnAQ4BHgI2NwE+AS4CBgcBBgcGFx4BFxY3NjcBJwEOAS4CNjcBPgEeAgYHAQYiJjQ3AppB/rsaExM1R0YbAYYsHx9Yd3Ys/mY+FhUVFntUUVJTPgEYQf7oLHZ1WB8fLAGaGkdHNRMTGv56DScaDQI5Qf67GkdHNRMTGgGGLHZ3WB8fLP5mPlRRUVR7FhUVFj4BGEH+6CwfH1h1diwBmhoTEzVHRxr+eg0bJg0AAAACAAAAAAPVAtQAIQBEAAABFSMvASYnIwcGDwEjNTM3JyM1Mx8BFhczNj8CMxUjBxcFFSEvATQ+BDU0JiMiBwYHJzY3NjIWFRQOAwczNTMCT5dhDwUCAQYGCV+dTnhxU6hVDgUCAQIFD1acTHB8Acj+xwMBHzA3LyAkGR8cCQ1AEBYxhVMqPT0tAo1NARZmmhkGBw0MD5hmsaZmixkGBwUIGYtmo7SFfRAcJ0EpJhwmFBceGAYROBcSJ0g9KEApIyoXMQAAEgAA/8IDvwNBAAYACgAOABIAFgAdACQAKAAsADAANAA6AD4AQgBGAEoATgBSAAATMzUiDgEVETM1IxMzNSMDMzUjJSMVMyUVMzQuASMBNSMUHgEzJzM1IwEjFTMTMzUjATM1IxEyPgE1IxEzNSMRMzUjAzM1IxEzNSMFESERAyERIUBjGy0bY2PHY2PHY2MB8WRkASpjGy0b/UhjGy0bY2NjASpjY2NkZAGOY2MbLRtjY2NjY8djY2Nj/nMB8GP+1gEqAt5jGy4a/nJj/hBjAfFjx2NjYxouG/yCYxsuGsZkAlRj/OVjASpj/hAaLhsB8WP+D2T+1mMCuGPH/g8B8f5zASoAAAAAAgAA//kD0wNIACEARgAAJRUjLwEmJyMHBg8BIzUzNycjNTMfARYXMzY/AjMVIwcXARUhJyY1ND4ENTQmIyIHBgcnNjc2MzIWFRQOBAczNQJPmGAPBQICBQYJX51OeHFTqFUOBQECAgUPVpxMcHwBx/7HAgMgMDYwICQZHxwJDUAPFzNAQ1MeLjYuIQKNYGaaGQYHDQwPmGaxpmaLGQYHBQgZi2ajtAGefhASCihAKSYcJhQXHhcHETgXEidIPSI5JCMbJBQxAAAHAAD/vwPBAyEAGQAoAD8ASABRAGYAdgAABSImJyY2NyURBwYuATY/ATYXFhURFAYHBQYjIiclLgE+ARcFHgEHDgEhIiY1ETQ2PwE2HgEGDwERNzYeAQYHBQEiJjQ2MhYUBiciBhQWMjY0JgMnJicmJyY1ND4BMh4BFRQHBgcGBwMiDgEVFBcWFzY3NjU0LgECigoRAgUMDAEAcwwZCgwMoAwRDQ0J/ukDBgcD/uoNCwkXDgEWDQsEBRL9zQYaDQlKDBkJCw026gsZCgwM/uoBdik3N1I3NykOEhIcEhIOFhYpOCQvPGd6ZzwvJDgpFhYsSSs2LD4+LDYrSUANCQwZBVYBfSYFDBgZBTMICw0N/kAKEANgAwNgBRcaDAVgBRcOCQ0PEQHAChADHQQLGBkFE/6DUAUMGBkFYAIgN1I3N1I3gBIcEhIcEv5wGhU0SD5TND1nPDxnPTRTPkg0FQH2K0ksKlZHSUlHViosSSsAAAQAAP+2A8oDbgARACYAKQA5AAAlMjY1NCcmJyYnJhUxBgcGFBYlFjI3ATY0JwEmIg8BBhQfAQcGFBclFyEBISIGHQEUFjMhMjY9ATQmAyMlNQ4LFA4RDhcXLTX+dwYRBgElBgb+fwMIAzcDA03uBgYBNMz+ZwMK/IAEBQUEA4AEBQV3NiYVHRgdFBURARkgQUw2MgYGASQHEQYBgAMDNwMJA03tBhIG3c3+SAYEWwQFBQRbBAYAAAAE////fwQAA4EADAA0AEQAVAAAEzIeARQOASIuATQ+ARcyNjQmKwEiJj0BNCYiBh0BFAYrASIGFBY7ATIWHQEUFjI2PQE0NjMlFB4BMj4BNRE0LgEiDgEVAxE0PgEyHgEVERQOASIuAdU6Yjo6YnRiOTlipREXFxE1BggXIRgHBjURFxcRNQYHGCEXCAYBoCI7RTsjIztFOyJWOmJ0Yjk5YnRiOgErOmJ0Yjk5YnRiOv4YIRcIBjURFxcRNQYIFyEYBwY1ERcXETUGBygiOyMjOyICViI7IyM7Iv2qAlY6Yjk5Yjr9qjpiOTliAAT///9/BAEDgQAMADQARABUAAABMh4BFA4BIi4BND4BFzI2NCYrASImPQE0JiIGHQEUBisBIgYUFjsBMhYdARQWMjY9ATQ2MyUUHgEyPgE1ETQuASIOARUDETQ+ATIeARURFA4BIi4BAys6Yjk5YnRiOjpipBEXFxE1BgcYIRcIBjURFxcRNQYIFyEYBwb89SM7RTsiIjtFOyNVOWJ0Yjo6YnRiOQErOmJ0Yjk5YnRiOv4YIRcIBjURFxcRNQYIFyEYBwY1ERcXETUGBygiOyMjOyICViI7IyM7Iv2qAlY6Yjk5Yjr9qjpiOTliAAAAAAT///+ABAEDgQAMADQARABUAAABMh4BFA4BIi4BND4BFzI2NCYrASImPQE0JiIGHQEUBisBIgYUFjsBMhYdARQWMjY9ATQ2MwEiDgEUHgEzITI+ATQuASMlITIeARQOASMhIi4BND4BAys6Yjk5YnRiOjpipBEXFxE1BgcYIRcIBjURFxcRNQYIFyEYBwb9dSI7IyM7IgJWIjsjIzsi/aoCVjpiOTliOv2qOmI5OWIDgDlidGI6OmJ0Yjn9FyEYBwY1ERcXETUGBxghFwgGNREXFxE1Bgj+UiI7RTsjIztFOyJWOmJ0Yjk5YnRiOgAAAAT///+ABAEDgAAMADQARABUAAABMh4BFA4BIi4BND4BFzI2NCYrASImPQE0JiIGHQEUBisBIgYUFjsBMhYdARQWMjY9ATQ2MwEiDgEUHgEzITI+ATQuASMlITIeARQOASMhIi4BND4BAys6Yjk5YnRiOjpipBEXFxE1BgcYIRcIBjURFxcRNQYIFyEYBwb9dSI7IyM7IgJWIjsjIzsi/aoCVjpiOTliOv2qOmI5OWIBKzpidGI5OWJ0Yjr+GCEXCAY1ERcXETUGCBchGAcGNREXFxE1BgcC/iM7RTsiIjtFOyNVOWJ0Yjo6YnRiOQAAAAMAAP97BAADgQAfACwAOAAABRYXBi4CNRE0PgEyHgEVEQYHETQuASIOARURFB4CATIeARQOASIuATQ+AQczMjY0JisBIgYUFgIbEx4xaVYxOWJ0YjkuJyI7RjsiGS05ASw6Yjk5YnRiOjpiMdURFxcR1REXFygpIRMNO140AlY6Yjk5Yjr+yQ4cAWEiOyMjOyL9qh00JQ0BWTpidGI5OWJ0Yjr+GCEXFyEYAAAF////fwQBA4EAEwApADYAQwBQAAA3FB4BMyEyPgE1ETQuASMhIg4BFQMRND4CMyEyHgEVERQOAiMhIi4BATIWHQEUBiImPQE0NhMyFh0BFAYiJj0BNDYTMhYdARQGIiY9ATQ2VSM7IgJWIjsjIzsi/aoiOyNVIDxPKgJWOmI5IDxPKv2qOmI5AgASGRkkGRkSEhkZJBkZEhIZGSQZGVUiOyMjOyICViI7IyM7Iv2qAlYqTzwgOWI6/aoqTzwgOWIBuhkRVhEZGRFWERn/ABkRgBIZGRKAERkCKxkSgBEZGRGAEhkAAAAABgAA/4cD9gN2AAsAGQAlAFUAeQCbAAABITI2NCYjISIGFBYBISIOARQeATMhMjY0JgMhIgYUFjMhMjY0JiUiBgcGHgI+Ax4BDgEjIgYUFjMyHgEOAS4DDgIXHgI+ASYnJjc+AS4BEzQmIgYVFBYyNjU0NjIWFRQPAQ4BHgE7ATI2NCYrASImPwE2AyMiJj0BNCYrASIGFBY7ATIWHQEUBisBIgYUFjsBMjY0JgFLAoARGRkR/YASGRkCkv2ADBQLCxQMAoARGRkR/YASGRkSAoARGRn8gh0uBwIEDBEQDQQOEAoBDAkNExMNCQwBChAOBAwREQwEAgcmMi4bAQ4EBA0DFyg/MkYyEhsTDBIMCVoGAggPCmoOEhIOEgYGBCMXCgsEByIYGw0TEw0LBAYGBAsNExMNaw0TEwLAGSMZGSMZ/usMFBYUDBkkGf6VGSMZGSMZYCMcCRAMBQUMEAkDDRAMEhsTCxANAwgRDAUFDBEJGCIHFSszFQYFFC8qGAEVJDIyJA0TEw0JDQ0JDwxxBxIRChMbEg0FKx4BEAYFkBgiEhsTBgSABQYTGhMTGhMAAwAA/4AEBQJWAB8ALAA4AAABBgchIi4BND4BMyEyHgIHJic2LgIjISIOARQeATMlMh4BFA4BIi4BND4BBzMyNjQmKwEiBhQWAjYcDv7JOmI5OWI6AlY0XjsNEyEpBg0lNB39qiI7IyM7IgJWOmI5OWJ0Yjo6YjHVERcXEdURFxcBACcuOWJ0YjkxVmkxHhMcOS0ZIjtGOyIrOmJ0Yjk5YnRiOv4YIRcXIRgAAAj///+ABAIDgQAMABgAPgBGAEoAUgBWAF4AAAEyHgEUDgEiLgE0PgEHMzI2NCYrASIGFBYnIxUzFhchIi4BNRE0PgIzITIeAR0BFgcVJic1IxUGBzUhETMGEzM1NC4BKwEHNSEVJyMiDgEdATMHETMRAxUUHgE7ATUDKzpiOTlidGI6OmIx1REXFxHVERcXo4ydFyb+ezpiOSA8TyoCVjpiOQICJTDWLif/ALYcu9YjOyJWVf8AVVYiOyPW1tbWIzsiVgErOmJ0Yjk5YnRiOv4YIRcXIRh+1jAlOWI6AlYqTzwgOWI6eQcI/SYXnYwOHLb/ACcBfFYiOyPW1tbWIzsiVlX/AAEA/qtWIjsj1gAACf///8AEAANBAAAADQAZABoAJwAzADQAQQBNAAATIxQeATI+ATQuASIOAQUhMjY0JiMhIgYUFgMjFB4BMj4BNC4BIg4BJSEiBhQWMyEyNjQmASMUHgEyPgE0LgEiDgElISIGFBYzITI2NCZrax0xOTIcHDI5MR0BawJqEhkZEv2WEhkZ7msdMTkyHBwyOTEdA9X9lhIZGRICahIZGfyEax0xOTIcHDI5MR0D1f2WEhkZEgJqEhkZAtUcMhwcMjkyHBwyRxkjGRkjGf7VHDIdHTI5MR0dMQ4ZJBkZJBn+gB0xHR0xOTIcHDIOGSMZGSMZAAAAAAEAAP+CA9IDfAAsAAABJgYPAQYnLgEGBw4CFhcWPgEmJy4BPgE3PgEXHgEPAQ4BHgEzITI2NRE0JgPFBg0FbgYHV8O+UWZ0AXFlEiwaBxJRWgJcUVnXZAUDBE8FAgUKBwEeCA0HA3kDAwRvBgQuFjA5SeD74UoNBiQsDTuzyLI6PxgoAgsETwUMDAgNCQEdBwsAAAAK////gAQCA4EABwALAA8AEwAbAB8AOwBDAEcATwAAJRUzMj4BPQEpARUhEzMRIwMRIREBMzU0LgErAQc1IRUBFRQOAiMhIi4BNRE0PgIzITIeAR0BFgcRFgEjIg4BHQEzBxEzEQMVFB4BOwE1AtVWIjsj/tX/AAEAVdbWVf8AAVXWIzsiVlX/AAKAIDxPKv2qOmI5IDxPKgJWOmI5AgIC/SlWIjsj1tbW1iM7Ilar1iM7IlbWASsBAP8AAQD/AAFVViI7I9bW1v55eSpPPCA5YjoCVipPPCA5Yjp5Bwj+uggCViM7IlZV/wABAP6rViI7I9YAAQAA/4QD1AN8ACsAAAEuAQYHBi8BLgEOARURFBYzITI+ASYvASY2NzYWFx4CBgcOAR4BNz4BLgEC91G+w1cHBm4FDQwHDQkBHQcLBQMEUAQDBWTXWVFcAlpREQUZKhJmcQF0At85MBctBAZvBAMFCwf+4wkNBwwNBU8ECwIoGT46ssizOw4qIggMSuH83wAABQAA/4AEAAOBABoAJgA0AD0AQAAAASIGFSMiBhURFBYzITUhESEVMzU0JisBNCYjByIGFBYzITI2NCYjFyIGFREUFjsBARE0JiMFIREjIgYdASM3MwcBQB0jwB0jIx0BgP6AAoBAIx3AIx3gDhISDgFADhISDiAdIyMdwAEAIx3+gAGAoB0joOBmZgOAIx0jHf1AHSNAAsDAwB0jHSPAEhwSEhwSwCMd/gAdIwEAAUAdI0D+4CMdoKBmAAADAAAAAAOBAwEAFQApADkAACU1NDYyFh0BFAYjISImPQE0NjIWHQEBBw4BLgI2NwE2MhYVERQGIiY1Ey4BPgIWHwEeAQ4CJicDKxkjGRkS/VYSGRkjGQEAtwgWFxAGBwgBAA0jGRkkGaAIBAcSFxYHawcFCBIXFgdVVhEZGRGAEhkZEoARGRkRVgIZtwgGBREWFggBAA0YE/4AERkZEQFlCRcVDwQICYAJFxYPAwgJAAMAAP/AA8ADIAANAC4AOwAAASEVHgEXMxUhNTM+ATcBNDc2NyEHNzMGBwYXMxEOAQcjFRQGIyEiJj0BIy4BJxEzISY3NjcjBzchBgcGA4D9AAEkG8ABAMAbJAH8/RAWPQGhD27TJQ4JA0YBSTaAEg7+wA4SgDZJAX0CfQMKBgxg3Rz+zycPDgHAwBskAcDAASQbAQBHOVFPRkZAYEBA/wA2SQGgDhISDqABSTYBAEVELimNjTk4MAAGAAAAAAOwAvIAFwAvADsARwBTAF8AAAEyNjQmIgc+ATc+ATU0JiMiBgcGFRQeASMyNjQmIgc+ATc+ATU0JiMiBgcGFRQeASUzMjY0JisBIgYUFhczMjY0JisBIgYUFgUhMjY0JiMhIgYUFhchMjY0JiMhIgYUFgHNKjoyThMKQS4NEBURMFMZGh815is5Mk4TCkEvDBAVEDBUGRofNgH38g4TEw7yDRMTDfIOExMO8g0TE/3hAx4NFBMO/OIOExMOAx4OExMO/OIOExMBtDRTMh4uOAEBEAwPDzIrLTUlOh80UzIeLjcCARAMDw8yKy01JTof/BMbExMbE+ASHBITGxLhExsTExsT4BIbFBQbEgAAAAAEAAD/qgOAAwEADAAYACgALAAAATIeARQOASIuATQ+ARcjFSMVMxUzNTM1IwEyFhURFAYjISImNRE0NjMXFSE1AgA6Yjk5YnRiOTliZVZVVVZVVQEqEhkZEv1WEhkZEioCVgFVOWJ0Yjk5YnRiOVVVVlVVVgJVGRL/ABEZGREBABIZVaurAAAABAAA//UDjQMLABsANwBSAHEAABMyNj0BFxYyNjQvATMyNjQmKwEiBwYHBh0BFBYFIgYdAScmIgYUHwEjIgYUFjsBMjc2NzY9ATYmJQc1NCYiBh0BFBcWFxY7ATI2NCYrATc2NCYGATQ1FSYnJisBIgYUFjsBBwYUFjI/ARUUFjI2PQEnJpUNE7wJHRMKvIcMFBQM1ggCDAgCFALiDRPJCRoTCcmJDBQUDNYIAg8CAwES/gbJExkUAggKBAbWDBQUDInJCRMXAgEHCwQG2AwUFAyJvAkSHgi8ExoTAgEB9RQMibwIEhkKvBMZFAIGDAQI1gwU6hQMickJExoJyRMZFAIICgQG2AwUIsmHDBQUDNYIAg8CAxQZE8kKGRMBAcABAQIOAwMUGRO8ChkTCbyHDBQUDNYFBAAABAAA//8DgQNWAA8AEwAgACwAAAEyFhURFAYjISImNRE0NjMFIRUhATIeARQOASIuATQ+ARcjFSMVMxUzNTM1IwNVEhkZEv1WEhkZEgKA/aoCVv7VOmI5OWJ0Yjk5YmVWVVVWVVUBVRkR/wASGRkSAQARGVWrAwA5YnRiOTlidGI5VVVWVVVWAAcAAP//A4EDAQAPABMAIwAnADMAPwBLAAABISImPQE0NjMhMhYdARQGJRUhNQEjIiY1ETQ2OwEyFhURFAYDETMRKQEiJjQ2MyEyFhQGByEiJjQ2MyEyFhQGByEiJjQ2MyEyFhQGAyv9qiMyMiMCViMyMv2HAlb+VasjMjIjqyMyMs6rAdX/ABMXFxMBABQXFxT/ABMXFxMBABQXFxT/ABMXFxMBABQXFwIAMiNWIzIyI1YjMqtWVv1VMiMBACQyMiT/ACMyAVX/AAEAGCYYGCYYqhcnFxcnF6sXJxcXJxcABwAAAAADgAMAAAMABwALAA8AEwAXABsAAAERIxE3IREhESE1IQUhFSEVIRUhFSEVIQUhFSEDK4DV/tUBK/0AAwD+gP6AAYD+gAGA/oABgAGA/QADAAIA/wABAFX+VgIAVatVVVZVVVZVAAAABwAAAAADgAMAAAMABwALAA8AEwAXABsAAAERIxE3IREhASE1IRUhFSEVIRUhFSEVIRUhFSEBVYDW/tUBKwHV/QADAP6AAYD+gAGA/oABgP0AAwACAP8AAQBV/lYCAFWrVVVWVVVWVQAKAAAAAAOAAwAAAwAHAAsADwATABcAGwAfACMAJwAAAREjETchESETITUhBSMVMxUjFTMVIxUzASMVMxUjFTMVIxUzFSEVIQJAgNX+1gEq6/0AAwD9lZWVlZWVlQJrlZWVlZWV/QADAAIA/wABAFX+VgIAVatVVVZVVQGqVVVWVVVWVQAEAAD//wOAAwEAIgAuADoARgAAAScmDwEGFjsBMhURFAYrASIGHwEWPwE2JisBIjURNDsBMjYXFRQzITI9ATQjISITITI9ATQjISIdARQXITI9ATQjISIdARQBrI8DA5ACAgNlBAICZQMCApADA48CAgNlBARlAwJ9BAFNBAT+swQEAU0EBP6zBAQBTQQE/rMEAm6PAwOPAgYE/jwCAgYCjwMDjwIGBAHEBAYbTQQETQT/AAVMBQVMBaoETQQETQQAAAAAAwAA/70DwwNDAA8AFAAoAAABISIGFREUFjMhMjY1ETYmAxEhESEFIgYUFjsBERQWMjY1ETMyNjQmIwN6/QweKyseAvQeKgErHv0MAvT90A8VFQ+SFR4Vkg8VFQ8DQyse/QweKioeAvQeK/49/oYC9LYWHhX+pg8VFQ8BWhUeFgAFAAD/kAPwA3AAGAAtADYAPwBTAAABIgcOAQcGFBceARcWMjc+ATc2NCcuAScmAyInJicmNDc2NzYyFxYXFhQHBgcGATI2NCYiBhQWITI2NCYiBhQWFw4BIiYnLgEOARceATI2NzYuAQYCAGVcWYkmJycmiVlcylxZiSYnJyaJWVxlbF5aNTc3NVpe2F5aNTc3NVpe/vQbJSU2JSUBWxslJTYlJSMfWGJYHw0nHwMMLX+Mfy0NBB8nA3AnJolZXMpcWYkmJycmiVlcylxZiSYn/IA3NVpe2F5aNTc3NVpe2F5aNTcBsCU2JSU2JSU2JSU2JZEmKSkmDwQaJxA2Ozs2ECcaBAAAAAAEAAD//wPWAwEACwAXACMALwAAKQEiJjQ2MyEyFhQGJyEiJjQ2MyEyFhQGAyEiJjQ2MyEyFhQGByEiJjQ2MyEyFhQGA6b8tBQbGxQDTBQbHBP8tBQbGxQDTBQbHBP8tBQbGxQDTBQbHBP8tBQbGxQDTBQbHB8uHx8uH9kfLh8fLh8Bux8uHx8tINkfLh8fLh8AAAAAAgAA/8gEBwMlAAkAFwAANwcnNxcTIRUhAzcTAyEXBycjFwczNxcHYEgBhiKPArj9j8DqnZgBnzpUIsxqZskhVDvgAVwCUwI6W/z/RQEKASWJJFHLrUomfwAAAAABAAAAAANAAjQABQAAJQEnCQEHAgABQDX+9f71Nc0BMzP/AAEAMwAAAwAAAAADgAMBABQAKQBGAAABIgcGBwYUFxYXFjI3Njc2NCcmJyYDIicmJyY0NzY3NjIXFhcWFAcGBwYTJiIPAScmIgYUHwEHBhQWMj8BFxYyNjQvATc2NAIAaFlXMzU1M1dZ0FlXMzU1M1dZaFhLSCorKypIS7BLSCorKypIS0gKGQpzcwoZFApzcwoUGQpzcwoZFApzcwoDADUzV1nQWVczNTUzV1nQWVczNf1AKypIS7BLSCorKypIS7BLSCorAeAKCnNzChQZCnNzChkUCnNzChQZCnNzChkAAAr///+uA7gDgQAkACwARQBVAF8AaQCKAJIAswC7AAABIiY1NC4BIyImNDYzMj4BNTQ2MhYVFB4BMzIWFAYjIg4BFRQGJxYXNjcmJwYBIiY0JiImNDYyNjQ2MhYUFjIWFAYiBhQGCQEmIg8BBhQXARYyPwE2NAE3NjIfAQcnJjQBBwYiJwE3ARYUASImNTQmIyImNDYzMjY1NDYyFhUUFjMyFhQGIyIGFRQGJxYXNjcmJwYTIiY1NCYjIiY0NjMyNjU0NjIWFRQWMzIWFAYjIgYVFAYnFhc2NyYnBgJNCw8iOyMKDw8KIzsiDxUPIzsiCw8PCyI7Iw9IJxcXJiYXF/4XCw8PFQ8PFQ8PFQ8PFg8PFg8PA0r94hZAFx4WFgIeF0AWHhf9ZR4HFQhKQ0kIAmgeCBUH/lBCAbAH/S8KDy0gCw8PCyAtDxUPLSAKDw8KIC0PJQ8LCw8PCwsLCg8tIAsPDwsgLQ8VDy0gCg8PCiAtDyUPCwsPDwsLAhoPCiM7Ig8VDyM7IgsPDwsiOyMPFQ8iOyMKD7MXJycXFyYm/pwPFQ8PFQ8PFg8PFg8PFQ8PFQ/+0AIeFhYeFz8X/eIWFh4XPwHzHgcHSkJKBxX94x4HBwGxQv5QCBUCcQ8LHy0PFg8tHwsPDwsfLQ8WDy0fCw+ACw8PCwsPD/11DwsfLQ8WDy0fCw8PCx8tDxYPLR8LD4ALDw8LCw8PAAAAAAMAAAAAA8gDSAASABcAGwAAASIHAQYUHwEWMyE1IwE2NCcBJgMjJwEXNyc3FwJaEw7+DAwNtg4SAiPRAUwNDf7BDoC+igEf9kD4Wv0DRw/93g0lDbYNWwFMDSYNAT8N/SiKATn2QPlj/QAAAAYAAAAABAACoAADAAcAEwAbACcALQAAGQEhEQUhESETETM1MxUzESMVIzUzFTMVMzUzNTMRMzUXNxUzESMHJzMRMzUjNQQA/EADgPyAYEAgQEAggCBAICBAICBAQCAgoIBAAqD9wAJAQP5AAWD/AGBgAQBgYEDAwED/AJUqKpUBACoq/wBAwAAIAAD/yQPcA4EACwAXACQAPQBVAGIAbgB6AAAlBwYiJjQ/ATYyFhQXFRQGIiY9ATQ2MhYnFAYrASImNDY7ATIWBRQPAQYiLwEmJzcXHgE/ATY0LwE3Fh8BFgEHJyYiDwEGFB8BByYvASY0PwE2Mh8BFgUUBisBIiY0NjsBMhYBFRQGIiY9ATQ2MhYXBwYiJjQ/ATYyFhQBH5IGDgsFkgYPC1sKEAsLEAqACgi3CAoKCLcICgLSMFQwiTC/DAyJnA8vEFQQEJ0KFAzAMP6giZwQLRFUEBCdChQMwDAwVDCJML8MAXUKCLcICgoItwgK/soLEAoKEAvokgYODAaSBg4LqpMFCw8GkgULDx23CAoKCLcICwt4CAoKEAsLUUQwUzAxvwwUC50PAQ9UEC0QnYkMDMAxAVoKnBAPVBAtEJyKDAzAMogvUzAxvwxECAoKEAoKAS+3CAoKCLcICgpfkgULDwWTBQsPAAAFAAAAAAORAuEADwAfAC8APwBLAAABITI2PQE0JiMhIgYdARQWBxQWMyEyNj0BNCYjISIGFQEhIgYdARQWMyEyNj0BNCYDISIGHQEUFjMhMjY9ATQmJTc2NC8BJgYdARQWAZgB4AMFBQP+IAMFBQUFAwHgAwUFA/4gAwUB+PzwAwUFAwMQAwUFA/zwAwUFAwMQAwUF/QOdAwOdBAoKAcYFAzgDBQUDOAMFzAMFBQM4AwUFAwGuBQM4AwUFAzgDBf2IBQM4AwUFAzgDBZZ7AwgDewQFBvYGBQAEAAAAAAORAuMADwAfAC8APwAAASEiBh0BFBYzITI2PQE0JgMhIgYdARQWMyEyNj0BNCYHISIGHQEUFjMhMjY9ATQmAyEiBh0BFBYzITI2PQE0JgOI/hADBQUDAfADBQUD/hADBQUDAfADBQUD/PADBQUDAxADBQUD/PADBQUDAxADBQUC4gUDOAMFBQM4AwX+WAUDOAMFBQM4AwXUBQM4AwUFAzgDBQGoBQM4AwUFAzgDBQAEAAAAAAORAuMADwAfAC8APwAAASEyNj0BNCYjISIGHQEUFgEyNj0BNCYjISIGHQEUFjMFISIGHQEUFjMhMjY9ATQmAyEiBh0BFBYzITI2PQE0JgEIAfADBQUD/hADBQUB8wMFBQP+EAMFBQMCgPzwAwUFAwMQAwUFA/zwAwUFAwMQAwUFApoFAzgDBQUDOAMF/lgFAzgDBQUDOAMFjAUDOAMFBQM4AwUBqAUDOAMFBQM4AwUAAAAABAAAAAADkQLjAA8AHwAvAD8AABMhMjY9ATQmIyEiBh0BFBYTITI2PQE0JiMhIgYdARQWBSEiBh0BFBYzITI2PQE0JgMhIgYdARQWMyEyNj0BNCZ4AfADBQUD/hADBQUDAfADBQUD/hADBQUDE/zwAwUFAwMQAwUFA/zwAwUFAwMQAwUFApoFAzgDBQUDOAMF/lgFAzgDBQUDOAMFjAUDOAMFBQM4AwUBqAUDOAMFBQM4AwUAAwAA//ADkQMRAA8AJwArAAAlISIGHQEUFjMhMjY9ATQmJTMyPwEzFxY7Aj4BJwMmKwEiBwMGFBYBMxMjA4j88AMFBQMDEAMFBf1zVQcCNts1AgdaAwQDAdADB2YHAtABBgEEBFStUAUDUAMFBQNQAwVQB6amBwIHBAJcBwf9pAEGBgIE/vgAAAMAAP+fA+EDXAAUAC4ARAAAAScmDgIVERQeATI/ATY3NjQnJicDIgcOAQcGFBceARcWMjc+ATc2NCcuAScmIxEiJyYnJjQ3Njc2MhcWFxYUBwYHBiMCmt0JFBMJChEVCN8LAwYFBAyYYVlVhSQmJiSFVVnCWVaFJCYmJIVWWWFxYl44OTk4X2HjYl44OTk4X2FyAY7PBQELEQv+bwoSCwXECgUJEwgFCwHOJiSFVVnCWVaFJCYmJIVWWcJZVYUkJvx/OThfYeNiXjg5OThfYeNhXzg5AAAAAAIAAP/HA7kDOQALAEcAACUhIgYUFjMhMjY0JgEzMhYVERQXFhcWMjc2NzY1ETQ2OwEyNjQmKwEiBhQWOwEyFhURFA4BIi4BNRE0NjsBMjY0JisBIgYUFgOK/OwTHBwTAxQTHBz86zMEBisqR0msSUcqKwYEMxMcHBPXExwcEzMEBjxmeGY7BQQzExwcE9cTHBwlGyccHCcbArYGA/7AVklIKSsrKUhJVgFAAwYbJxwcJxsGA/7APGY8PGY8AUADBhsnHBwnGwAABv///9EEAAMvABMAKAA3AEMAUABZAAABISIOARURFB4BMyEyPgE1ETQuAQUhMhYVESYjIgYHJicmIyIGBxE+AQM1Fz4BMzIXFhcWFyEuAQUjJic+ATMyFxUWBgMyPgE0LgEiDgEUHgE3MhYUBiImNDYDhvz0IjggIDgiAwwhOCEhOPzTAwwfKjEzP28kPFhcZ02NOgIsKwM0jkxiVFMzNQf9vh0qA1WaCCwaYDgzMQEqthsvHBwvNy8cHC8cFh8fLCAgAy4gOCL9mCI4ICA4IgJoIjggMSof/okWPTVQLzAzMQGIHyr9UaECNjwvLk5RXwErK2FMMz0buR8qAcsbLzcvHBwvNy8bmx8sHx8sHwABAAD/xwO5AzkAJQAAASEiBhQWOwEyFgcBBisBIgYUFjMhMjY0JisBIiY3ATY7ATI2NCYDiv7hExwcEykGBQP+VQULaxMcHBMBHxMcHBMpBgUDAasFC2sTHBwDORwnGwoE/WEJGyccHCcbCgUCngkbJxwAAAMAAP+xA88DTwAqADcAYgAAAQ4BFxYGDwEGIi8BJjQ/AT4BFxY+ASYnJgYPAQ4BFh8BHgE2PwE+AScuAQcWMjcBNjQmIgcBBhQBJy4BBg8BDgEXHgI+AiY2PwE2Mh8BFhQPAQ4BJyYOARYXFjY/AT4BJgIREA4HBQUJeRlGGVsZGXkJGQwRIA4OECRMG3khFxchWiFYWCF4HA8PByDXDSMMAUwMGSMM/rQNAllaIVhYIXgcDw8EEhcVDgMJBQl5GUYZWxkZeQkZDBEgDg4QJEwbeSEXFwEEByARDBkJeRkZWxlGGXkJBQUHDiEgBw8QG3ghWFghWiEXFyF4HEwkEA5ADAwBTAwjGQz+tAwjAeVaIRcXIXgcTCQKDgMIExYXGQl5GRlbGUYZeQkFBQcOISAHDxAbeCFYWAAAAAABAAD/xwO5AzkAXAAAATQmIyEiJyYnJicmJyY1NDc2MzYWFx4BBxUUFjI2PQE2JicmIyIOARUUFxYXFgYrASIGFBYzITIXHgEXFAcGBwYjIicuATc2LgEGBwYWFxYzMj4BNTQnJjY7ATI2A7kcE/6xBgUcNz0eJxIVMCEzHzsaCwkDGycbBRcZOH9EZjctI0YFBAfxExwcEwGcAwMhJgEiGy4dIGgnEQ0FAhgnHgIIGh5EkU52QiADBgXkExwBXBQbBBMiJhYeGx4kNxgRBA8SECcTDBMbGxMLJkodOS9WOUg7LS8EDRsnHAIWRCg3IRoLBywWNRoUHgQZEy9bJEs5ZkNANgUJHAADAAAAAAPYAv8AFQArACwAACUiJwEmNDcBNjIeAQcBBhQXAR4BDgEzIi4BNjcBNjQnASY+ATIXARYUBwEGEwGOFQ/+2BoaASgPKR0BDv7sBgYBFAoGDBnVDxkMBgoBFAYG/uwOAR0pDwEoGRn+2A/wAg8BMRpIGwEwDx0pD/7lBhAG/uULHhwQEBweCwEbBhAGARsPKR0P/tAbSBr+zw8BdwAAAAMAAP/HA1cDOQAgADAAQAAAAT4BLgEnISIGFBY7ATIWFREUBisBIgYUFjMhPgMuAQMeAhQOASsBIiY1ETQ2MxMjIiY1ETQ2OwEeAhQOAQLDMhw1dUf+vxMcHBMmBAYGBCYTHBwTAXY6ZkcaGUbXJj8lJT8mqgQGBgTf3wQGBgTfK0cqKkcBpzKLhFABHCcbBgP9XQQGGyccATJZcW9aAU4BJkBMQCcFBAEIAwb9SgYEASsEBQErSFZIKwAAAAASAN4AAQAAAAAAAAATAAAAAQAAAAAAAQANABMAAQAAAAAAAgAHACAAAQAAAAAAAwANACcAAQAAAAAABAANADQAAQAAAAAABQALAEEAAQAAAAAABgANAEwAAQAAAAAACgArAFkAAQAAAAAACwATAIQAAwABBAkAAAAmAJcAAwABBAkAAQAaAL0AAwABBAkAAgAOANcAAwABBAkAAwAaAOUAAwABBAkABAAaAP8AAwABBAkABQAWARkAAwABBAkABgAaAS8AAwABBAkACgBWAUkAAwABBAkACwAmAZ9DcmVhdGVkIGJ5IGljb25mb250ZWR1aS1pY29uZm9udFJlZ3VsYXJlZHVpLWljb25mb250ZWR1aS1pY29uZm9udFZlcnNpb24gMS4wZWR1aS1pY29uZm9udEdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQAZQBkAHUAaQAtAGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAGUAZAB1AGkALQBpAGMAbwBuAGYAbwBuAHQAZQBkAHUAaQAtAGkAYwBvAG4AZgBvAG4AdABWAGUAcgBzAGkAbwBuACAAMQAuADAAZQBkAHUAaQAtAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYgECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4BHwEgASEBIgEjASQBJQEmAScBKAEpASoBKwEsAS0BLgEvATABMQEyATMBNAE1ATYBNwE4ATkBOgE7ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZAVoBWwFcAV0BXgFfAWABYQFiAWMABXNvdW5kBXJpZ2h0D2ljX2ltYWdlX3VwbG9hZAVjaGVjawZpZnJhbWUQQmFja2dyb3VuZEVmZmVjdANsdHIDcnRsC2ZpbmRyZXBsYWNlCWljcHJldmlldwVyaXFpMgtldXJvLXN5bWJvbAVtdXNpYwRoZWxwCWhhbmRfZHJhdwVwcmludAR0aW1lBWJhaWR1C0dvb2dsZS1NYXBzCmltYWdlLW5vbmUMaW1hZ2UtY2VudGVyCmltYWdlLWxlZnQLaW1hZ2UtcmlnaHQJY2xlYXItZG9jC3dvcmQtaW1hZ2UxCnBhZ2UtYnJlYWsGYXV0aG9yC3RvdXBwZXJjYXNlC3RvbG93ZXJjYXNlCmhvcml6b250YWwPbWVyZ2UtZG93bi1jZWxsC21lcmdlLWNlbGxzEG1lcmdlLXJpZ2h0LWNlbGwNc3BsaXQtdG8tcm93cw1zcGxpdC10by1jb2xzDnNwbGl0LXRvLWNlbGxzDmluc2VydHJvd2Fib3ZlGjI0Z2wtcGFyYWdyYXBoTWFyZ2luQm90dG9tFzI0Z2wtcGFyYWdyYXBoTWFyZ2luVG9wDXVub3JkZXJlZGxpc3QMbGlzdC1vcmRlcmVkFHNwbGl0LWNlbGxzLXZlcnRpY2FsFnNwbGl0LWNlbGxzLWhvcml6b250YWwKYXR0YWNobWVudAlzdWJzY3JpcHQJc2VsZWN0YWxsC3N1cGVyc2NyaXB0A21hcAliZy1jb2xvcnMNYWRkX2NvbF9hZnRlcg5hZGRfY29sX2JlZm9yZQ1hZGRfcm93X2FmdGVyDmFkZF9yb3dfYmVmb3JlCmRlbGV0ZV9jb2wNY29tYmluZV9jZWxscwJvbApkZWxldGVfcm93DGRlbGV0ZV90YWJsZQJ1bARyZWRvBXRhYmxlBHVuZG8FcGFzdGUGdXBsb2FkBWJydXNoCnRleHRfcXVvdGURaW5zZXJ0LXJvdy1ib3R0b20RZnVsbHNjcmVlbi1leHBhbmQOaW5zZXJ0LXJvdy10b3AIdGVtcGxhdGUSZm9ybWF0LWltYWdlLXJpZ2h0EWZvcm1hdC1pbWFnZS1sZWZ0E2Zvcm1hdC1pbWFnZS1jZW50ZXILbGluZS1oZWlnaHQXQWZ0ZXJjbGFzc1RleHQtT3V0bGluZWQFc21pbGUNYWxpZ24tanVzdGlmeQdmb3JtdWxhCmFuZ2xlLWRvd24FY2xvc2UKbWFnaWMtd2FuZAZlcmFzZXIEaHRtbAZ1bmxpbmsGaW5kZW50C2FsaWduLXJpZ2h0DGFsaWduLWNlbnRlcgphbGlnbi1sZWZ0C2ZvbnQtY29sb3JzBHBsYXkJdW5kZXJsaW5lBWltYWdlBml0YWxpYwRsaW5rBnN0cmlrZQRjb2RlBGJvbGQAAAAAAA==") format('truetype'); +} +.edui-default { + accent-color: #333; +} +/* common layer */ +.edui-default .edui-box { + border: none; + padding: 0; + margin: 0; + overflow: hidden; + line-height: 30px; +} +.edui-default a.edui-box { + display: block; + text-decoration: none; + color: black; +} +.edui-default a.edui-box:hover { + text-decoration: none; +} +.edui-default a.edui-box:active { + text-decoration: none; +} +.edui-default table.edui-box { + border-collapse: collapse; +} +.edui-default ul.edui-box { + list-style-type: none; +} +div.edui-box { + position: relative; + display: -moz-inline-box !important; + display: inline-block !important; + vertical-align: middle; +} +.edui-default .edui-clearfix { + zoom: 1; +} +.edui-default .edui-clearfix:after { + content: '\20'; + display: block; + clear: both; +} +* html div.edui-box { + display: inline !important; +} +*:first-child + html div.edui-box { + display: inline !important; +} +/* control layout */ +.edui-default .edui-button-body, +.edui-splitbutton-body, +.edui-menubutton-body, +.edui-combox-body { + position: relative; +} +.edui-default .edui-popup { + position: absolute; + -webkit-user-select: none; + -moz-user-select: none; +} +.edui-default .edui-popup .edui-shadow { + position: absolute; + z-index: -1; +} +.edui-default .edui-popup .edui-bordereraser { + position: absolute; + overflow: hidden; +} +.edui-default .edui-tablepicker .edui-canvas { + position: relative; +} +.edui-default .edui-tablepicker .edui-canvas .edui-overlay { + position: absolute; +} +.edui-default .edui-dialog-modalmask, +.edui-dialog-dragmask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; +} +.edui-default .edui-toolbar { + position: relative; +} +/* + * default theme + */ +.edui-default .edui-label { + cursor: pointer; +} +.edui-default span.edui-clickable { + color: #666; + cursor: pointer; + text-decoration: none; +} +.edui-default span.edui-clickable:hover { + color: #333; +} +.edui-default span.edui-unclickable { + color: gray; + cursor: default; +} +.edui-default span.edui-popup-action-item { + margin-right: 5px; +} +.edui-default span.edui-popup-action-item:last-child { + margin-right: 0; +} + +/* 工具栏 */ +.edui-default .edui-toolbar { + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + padding: 1px; + overflow: hidden; /*全屏下单独一行不占位*/ + zoom: 1; + width:auto; + height:auto; +} + +.edui-default .edui-toolbar .edui-button, +.edui-default .edui-toolbar .edui-splitbutton, +.edui-default .edui-toolbar .edui-menubutton, +.edui-default .edui-toolbar .edui-combox { + margin: 1px; +} +/*UI工具栏、编辑区域、底部*/ +.edui-default .edui-editor { + border: 1px solid var(--edui-color-border); + background-color: white; + position: relative; + overflow: visible; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.edui-editor div{ + width:auto; + height:auto; +} +.edui-default .edui-editor-toolbarbox { + position: relative; + zoom: 1; + /*-webkit-box-shadow:0 1px 4px rgba(204, 204, 204, 0.6);*/ + /*-moz-box-shadow:0 1px 4px rgba(204, 204, 204, 0.6);*/ + /*box-shadow:0 1px 4px rgba(204, 204, 204, 0.6);*/ + border-top-left-radius:2px; + border-top-right-radius:2px; +} + +.edui-default .edui-editor-toolbarboxouter { + border-bottom: 1px solid var(--edui-color-border); + background-color: var(--edui-bg-toolbar); + /*background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);*/ + /*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));*/ + /*background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);*/ + /*background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);*/ + /*background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);*/ + /*background-repeat: repeat-x;*/ + /*border: 1px solid #d4d4d4;*/ + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; + /*filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);*/ + /**zoom: 1;*/ + /*-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);*/ + /*-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);*/ + /*box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);*/ +} + +.edui-default .edui-editor-toolbarboxinner { + padding: 2px; +} + +.edui-default .edui-editor-iframeholder { + position: relative; + /*for fix ie6 toolbarmsg under iframe bug. relative -> static */ + /*_position: static !important;* +} + +.edui-default .edui-editor-iframeholder textarea { + font-family: consolas, "Courier New", "lucida console", monospace; + font-size: 12px; + line-height: 18px; +} + +.edui-default .edui-editor-bottombar { + /*border-top: 1px solid #ccc;*/ + /*height: 20px;*/ + /*width: 40%;*/ + /*float: left;*/ + /*overflow: hidden;*/ +} + +.edui-default .edui-editor-bottomContainer { + overflow: hidden; +} + +.edui-default .edui-editor-bottomContainer table { + width: 100%; + height: 0; + overflow: hidden; + border-spacing: 0; +} + +.edui-default .edui-editor-bottomContainer td { + white-space: nowrap; + border-top: 1px solid var(--edui-color-border); + line-height: 20px; + font-size: 12px; + font-family: Arial, Helvetica, Tahoma, Verdana, Sans-Serif; + padding:0 5px; + color:var(--edui-color-muted); +} + +.edui-default .edui-editor-wordcount { + text-align: right; + margin-right: 5px; + color: #aaa; +} +.edui-default .edui-editor-scale { + width: 12px; +} +.edui-default .edui-editor-scale .edui-editor-icon { + float: right; + width: 100%; + height: 12px; + margin-top: 10px; + background: url(../images/scale.png) no-repeat; + cursor: se-resize; +} +.edui-default .edui-editor-breadcrumb { + margin: 2px 0 0 3px; + color: var(--edui-color-muted); +} + +.edui-default .edui-editor-breadcrumb span { + cursor: pointer; + color: var(--edui-color-muted); + line-height: 16px; + display: inline-block; +} + +.edui-default .edui-toolbar .edui-for-fullscreen { + float: right; +} + +.edui-default .edui-bubble .edui-popup-content { + font-size: 13px; + box-shadow: 0 0 10px #0000001f; + transition: .25s; + color: #666; + background-color: #FFF; + padding: 10px; + border-radius: 5px; +} + +.edui-default .edui-bubble .edui-shadow { + /*box-shadow: 1px 1px 3px #818181;*/ + /*-webkit-box-shadow: 2px 2px 3px #818181;*/ + /*-moz-box-shadow: 2px 2px 3px #818181;*/ + /*filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '2', MakeShadow = 'true', ShadowOpacity = '0.5');*/ +} + +.edui-default .edui-editor-toolbarmsg { + background-color: #FFF6D9; + border-bottom: 1px solid #ccc; + position: absolute; + bottom: -25px; + left: 0; + z-index: 1009; + width: 99.9%; +} + +.edui-default .edui-editor-toolbarmsg-upload { + font-size: 14px; + color: blue; + width: 100px; + height: 16px; + line-height: 16px; + cursor: pointer; + position: absolute; + top: 5px; + left: 350px; +} + +.edui-default .edui-editor-toolbarmsg-label { + font-size: 12px; + line-height: 16px; + padding: 4px; +} + +.edui-default .edui-editor-toolbarmsg-close { + float: right; + width: 20px; + height: 16px; + line-height: 16px; + cursor: pointer; + color: red; +} + +/*可选中菜单按钮*/ +.edui-default .edui-list .edui-bordereraser { + display: none; +} + +.edui-default .edui-listitem { + padding: 1px; + white-space: nowrap; + cursor: pointer; +} + +.edui-default .edui-list .edui-state-hover { + position: relative; + background-color: #EEE; + border: 1px solid #EEE; + padding: 0; + border-radius: 3px; +} + +.edui-default .edui-for-fontfamily .edui-listitem-label { + min-width: 130px; + _width: 120px; + font-size: 12px; + height: 22px; + line-height: 22px; + padding-left: 5px; +} +.edui-default .edui-for-insertcode .edui-listitem-label { + min-width: 120px; + _width: 120px; + font-size: 12px; + height: 22px; + line-height: 22px; + padding-left: 5px; +} +.edui-default .edui-for-underline .edui-listitem-label { + min-width: 120px; + _width: 120px; + padding: 3px 5px; + font-size: 12px; +} + +.edui-default .edui-for-fontsize .edui-listitem-label { + min-width: 120px; + _width: 120px; + padding: 3px 5px; + cursor: pointer; +} + +.edui-default .edui-for-paragraph .edui-listitem-label { + min-width: 200px; + _width: 200px; + padding: 2px 5px; +} + +.edui-default .edui-for-rowspacingtop .edui-listitem-label, +.edui-default .edui-for-rowspacingbottom .edui-listitem-label { + min-width: 53px; + _width: 53px; + padding: 2px 5px; +} + +.edui-default .edui-for-lineheight .edui-listitem-label { + min-width: 53px; + _width: 53px; + padding: 2px 5px; +} + +.edui-default .edui-for-customstyle .edui-listitem-label { + min-width: 200px; + _width: 200px; + width: 200px !important; + padding: 2px 5px; +} + +/* 可选中按钮弹出菜单*/ +.edui-default .edui-menu { + z-index: 3000; +} + +.edui-default .edui-menu .edui-popup-content { + padding: 3px; +} + +.edui-default .edui-menu-body { + _width: 150px; + min-width: 170px; + background: url("../images/sparator_v.png") repeat-y 25px; +} + +.edui-default .edui-menuitem-body { +} + +.edui-default .edui-menuitem { + height: 24px; + line-height: 22px; + cursor: default; + vertical-align: top; +} + +.edui-default .edui-menuitem .edui-icon { + width: 20px !important; + height: 20px !important; + /*background: url(../images/icons.png) 0 -4000px;*/ + /*background: url(../images/icons.gif) 0 -4000px\9;*/ + font-family: 'edui-iconfont'; + font-size: 12px; + line-height: 20px; + text-align: center; +} + +.edui-default .edui-menuitem .edui-menuitem-body .edui-icon:before{ + display:none; +} + +.edui-default .edui-contextmenu .edui-popup-content .edui-menuitem-body .edui-icon:before{ + display: inline-block; +} + +.edui-default .edui-menuitem .edui-label { + font-size: 12px; + line-height: 20px; + height: 20px; + padding-left: 10px; +} + +.edui-default .edui-state-checked .edui-menuitem-body .edui-icon{ + line-height:20px; + text-align:center; +} +.edui-default .edui-state-checked .edui-menuitem-body .edui-icon:before{ + content: "\e7fc"; + font-size: 10px; + display:inline-block; +} + +.edui-default .edui-state-disabled .edui-menuitem-label { + color: gray; +} + + +/*不可选中菜单按钮 */ +.edui-default .edui-toolbar .edui-combox-body .edui-button-body { + width: 60px; + font-size: 12px; + height: 30px; + line-height: 30px; + padding-left: 5px; + white-space: nowrap; + margin: 0 3px 0 0; + cursor: pointer; +} + +.edui-default .edui-toolbar .edui-combox-body .edui-arrow { + height: 30px; + width: 13px; + cursor: pointer; +} + +.edui-default .edui-toolbar .edui-combox-body .edui-arrow:before{ + content: "\e9f0"; + font-family: "edui-iconfont"; + font-size: 8px; +} + +.edui-default .edui-toolbar .edui-combox .edui-combox-body { + border: 1px solid var(--edui-color-border); + background-color: white; + border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; +} + +.edui-default .edui-toolbar .edui-combox .edui-combox-body > div { + vertical-align: top; +} + +.edui-default .edui-toolbar .edui-combox-body .edui-splitborder { + display: none; +} + +.edui-default .edui-toolbar .edui-combox-body .edui-arrow { + border-left: 1px solid var(--edui-color-border); +} + +.edui-default .edui-toolbar .edui-state-hover .edui-combox-body { + /*background-color: #fff5d4;*/ + /*border: 1px solid #dcac6c;*/ +} + +.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow { + /*border-left: 1px solid #dcac6c;*/ +} + +.edui-default .edui-toolbar .edui-state-checked .edui-combox-body { + background-color: #FFE69F; + border: 1px solid #DCAC6C; +} + +.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow { + border-left: 1px solid #DCAC6C; +} + +.edui-toolbar .edui-state-disabled .edui-combox-body { + background-color: #F0F0EE; + opacity: 0.3; +} + +.edui-toolbar .edui-state-opened .edui-combox-body { + background-color: white; + border: 1px solid gray; +} + +/*普通按钮样式及状态*/ +.edui-default .edui-toolbar .edui-button .edui-icon, +.edui-default .edui-toolbar .edui-menubutton .edui-icon, +.edui-default .edui-toolbar .edui-splitbutton .edui-icon { + height: 30px !important; + width: 30px !important; + /*background-image: url(../images/icons.png);*/ + /*background-image: url(../images/icons.gif) \9;*/ + background-position: center; + background-repeat: no-repeat; + font-family: "edui-iconfont"; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 16px; + text-align: center; + cursor: pointer; +} + +.edui-default .edui-toolbar .edui-button .edui-button-wrap { + padding: 1px; + position: relative; + border-radius: 3px; +} + +.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap { + background-color: #EEE; + border: 1px solid #EEE; + padding: 0; +} + +.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap { + background-color: #F0F0EE; + padding: 0; + border: 1px solid #EEE; + border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; +} + +.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap { + background-color: #F0F0EE; + padding: 0; + border: 1px solid var(--edui-color-border); +} +.edui-default .edui-toolbar .edui-state-disabled .edui-label { + color: #ccc; +} +.edui-default .edui-toolbar .edui-state-disabled .edui-icon { + opacity: 0.3; + filter: alpha(opacity = 30); +} + +.edui-default .edui-toolbar-button-custom{ + display: inline-block !important; + line-height: 30px; + vertical-align: middle; + padding: 0 10px; + border-radius: 3px; + margin: 0 5px; +} + +.edui-default .edui-toolbar-button-custom:hover{ + background: #EEE; +} + +/* toolbar icons */ +.edui-default .edui-for-undo .edui-icon:before { + content: "\e60f"; +} + +.edui-default .edui-for-redo .edui-icon:before { + content: "\e60c"; +} + +.edui-default .edui-for-bold .edui-icon:before { + content: "\e628"; +} + +.edui-default .edui-for-italic .edui-icon:before { + content: "\e62a"; +} + +.edui-default .edui-for-fontborder .edui-icon:before { + content: '\e62d'; +} +.edui-default .edui-for-underline .edui-icon:before { + content: "\e63e"; +} + +.edui-default .edui-for-strikethrough .edui-icon:before { + content: "\e64a"; +} + +.edui-default .edui-for-subscript .edui-icon:before { + content: "\ece9"; +} + +.edui-default .edui-for-superscript .edui-icon:before { + content: "\e83e"; +} + +.edui-default .edui-for-blockquote .edui-icon:before { + content: "\e6d8"; +} + +.edui-default .edui-for-forecolor .edui-icon:before { + content: "\e7f8"; +} + +.edui-default .edui-for-backcolor .edui-icon:before { + content: "\e71a"; +} + +.edui-default .edui-for-inserttable .edui-icon:before { + content: "\e60d"; +} + +.edui-default .edui-for-autotypeset .edui-icon:before { + content: "\e662"; +} + +.edui-default .edui-for-justifyleft .edui-icon:before { + content: "\e7f7"; +} + +.edui-default .edui-for-justifycenter .edui-icon:before { + content: "\e7f6"; +} + +.edui-default .edui-for-justifyright .edui-icon:before { + content: "\e7f5"; +} + +.edui-default .edui-for-justifyjustify .edui-icon:before { + content: "\e87c"; +} + +.edui-default .edui-for-insertorderedlist .edui-icon:before { + content: "\e737"; +} + +.edui-default .edui-for-insertunorderedlist .edui-icon:before { + content: "\e7f4"; +} + +.edui-default .edui-for-lineheight .edui-icon:before { + content: "\e638"; +} + +.edui-default .edui-for-rowspacingbottom .edui-icon:before { + content: '\eb09'; +} + +.edui-default .edui-for-rowspacingtop .edui-icon:before { + content: '\eb0a'; +} + +.edui-default .edui-for-horizontal .edui-icon:before { + content: "\e617"; +} + +.edui-default .edui-for-link .edui-icon:before { + content: "\e648"; +} + +.edui-default .edui-for-code .edui-icon:before { + background-position: -440px -40px; +} + +.edui-default .edui-for-insertimage .edui-icon:before { + content: "\e605"; +} + +.edui-default .edui-for-insertframe .edui-icon:before { + content: "\e6c0"; +} + +.edui-default .edui-for-emoticon .edui-icon:before { + content: "\e60e"; +} + +.edui-default .edui-for-spechars .edui-icon:before { + content: "\e891"; +} + +.edui-default .edui-for-help .edui-icon:before { + content: "\e752"; +} + +.edui-default .edui-for-print .edui-icon:before { + content: "\e67a"; +} + +.edui-default .edui-for-preview .edui-icon:before { + content: "\e644"; +} + +.edui-default .edui-for-selectall .edui-icon:before { + content: '\e62f'; +} + +.edui-default .edui-for-searchreplace .edui-icon:before { + content: "\eb6c"; +} + +.edui-default .edui-for-map .edui-icon:before { + content: "\e649"; +} + +.edui-default .edui-for-insertvideo .edui-icon:before { + content: "\e636"; +} + +.edui-default .edui-for-insertaudio .edui-icon:before { + content: "\e77b"; +} + +.edui-default .edui-for-time .edui-icon:before { + content: "\e680"; +} + +.edui-default .edui-for-date .edui-icon:before { + content: "\e697"; +} + +.edui-default .edui-for-cut .edui-icon:before { + background-position: -680px 0; +} + +.edui-default .edui-for-copy .edui-icon:before { + background-position: -700px 0; +} + +.edui-default .edui-for-paste .edui-icon:before { + background-position: -560px 0; +} + +.edui-default .edui-for-formatmatch .edui-icon:before { + content: "\e637"; +} + +.edui-default .edui-for-pasteplain .edui-icon:before { + content: '\edfb'; +} + +.edui-default .edui-for-directionalityltr .edui-icon:before { + content: "\e623"; +} + +.edui-default .edui-for-directionalityrtl .edui-icon:before { + content: "\e7bc"; +} + +.edui-default .edui-for-source .edui-icon:before { + content: "\e608"; +} + +.edui-default .edui-for-removeformat .edui-icon:before { + content: "\e782"; +} + +.edui-default .edui-for-unlink .edui-icon:before { + content: "\e92b"; +} + +.edui-default .edui-for-touppercase .edui-icon:before { + content: "\e619"; +} + +.edui-default .edui-for-tolowercase .edui-icon:before { + content: "\e61a"; +} + +.edui-default .edui-for-insertrow .edui-icon:before { + content: "\e603"; +} + +.edui-default .edui-for-insertrownext .edui-icon:before { + content: "\e602"; +} + +.edui-default .edui-for-insertcol .edui-icon:before { + content: "\e601"; +} + +.edui-default .edui-for-insertcolnext .edui-icon:before { + content: "\e600"; +} + +.edui-default .edui-for-mergeright .edui-icon:before { + content: "\e615"; +} + +.edui-default .edui-for-mergedown .edui-icon:before { + content: "\e613"; +} + +.edui-default .edui-for-splittorows .edui-icon:before { + content: "\e610"; +} + +.edui-default .edui-for-splittocols .edui-icon:before { + content: "\e611"; +} + +.edui-default .edui-for-insertparagraphbeforetable .edui-icon:before { + content: '\e901'; +} + +.edui-default .edui-for-deleterow .edui-icon:before { + content: "\e609"; +} + +.edui-default .edui-for-deletecol .edui-icon:before { + content: "\e604"; +} + +.edui-default .edui-for-splittocells .edui-icon:before { + content: "\e612"; +} + +.edui-default .edui-for-mergecells .edui-icon:before { + content: "\e606"; +} + +.edui-default .edui-for-deletetable .edui-icon:before { + content: "\e60a"; +} + +.edui-default .edui-for-cleardoc .edui-icon:before { + content: "\e61e"; +} + +.edui-default .edui-for-fullscreen .edui-icon:before { + content: "\e675"; +} + +.edui-default .edui-for-anchor .edui-icon:before { + content: "\e61b"; +} + +.edui-default .edui-for-pagebreak .edui-icon:before { + content: "\e61d"; +} + +.edui-default .edui-for-imagenone .edui-icon:before { + content: "\e61f"; +} + +.edui-default .edui-for-imageleft .edui-icon:before { + content: "\e621"; +} + +.edui-default .edui-for-wordimage .edui-icon:before { + content: "\e618"; +} + +.edui-default .edui-for-imageright .edui-icon:before { + content: "\e622"; +} + +.edui-default .edui-for-imagecenter .edui-icon:before { + content: "\e620"; +} + +.edui-default .edui-for-indent .edui-icon:before { + content: "\e7f3"; +} + +.edui-default .edui-for-outdent .edui-icon:before { + background-position: -540px 0; +} + +.edui-default .edui-for-table .edui-icon:before { + background-position: -580px -20px; +} + +.edui-default .edui-for-edittable .edui-icon:before { + background-position: -420px -40px; +} + +.edui-default .edui-for-template .edui-icon:before { + content: "\e6ad"; +} + +.edui-default .edui-for-delete .edui-icon:before { + background-position: -360px -40px; +} + +.edui-default .edui-for-attachment .edui-icon:before { + content: "\e704"; +} + +.edui-default .edui-for-edittd .edui-icon:before { + background-position: -700px -40px; +} + +.edui-default .edui-for-scrawl .edui-icon:before { + content: "\e70b"; +} + +.edui-default .edui-for-background .edui-icon:before { + content: "\e624"; +} + +.edui-default .edui-for-formula .edui-icon:before { + content: "\e616"; +} + +.edui-default .edui-for-aligntd .edui-icon:before { + background-position: -236px -76px; +} + +.edui-default .edui-for-insertparagraphtrue .edui-icon:before { + background-position: -625px -76px; +} + +.edui-default .edui-for-insertparagraph .edui-icon:before { + background-position: -602px -76px; +} + +.edui-default .edui-for-insertcaption .edui-icon:before { + background-position: -336px -76px; +} + +.edui-default .edui-for-deletecaption .edui-icon:before { + background-position: -362px -76px; +} + +.edui-default .edui-for-inserttitle .edui-icon:before { + background-position: -286px -76px; +} + +.edui-default .edui-for-deletetitle .edui-icon:before { + background-position: -311px -76px; +} + +.edui-default .edui-for-aligntable .edui-icon:before { + background-position: -440px 0; +} + +.edui-default .edui-for-tablealignment-left .edui-icon:before { + background-position: -460px 0; +} + +.edui-default .edui-for-tablealignment-center .edui-icon:before { + background-position: -420px 0; +} + +.edui-default .edui-for-tablealignment-right .edui-icon:before { + background-position: -480px 0; +} + +.edui-default .edui-for-inserttitlecol .edui-icon:before { + background-position: -673px -76px; +} + +.edui-default .edui-for-deletetitlecol .edui-icon:before { + background-position: -698px -76px; +} + +.edui-default .edui-for-simpleupload .edui-icon:before { + content: "\edfc"; +} + +/*splitbutton*/ +.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow, +.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow { + height: 30px; + width: 13px; + cursor: pointer; +} +.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow:before, +.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow:before { + content: "\e9f0"; + font-family: "edui-iconfont"; + font-size: 8px; +} + +.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body, +.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body { + padding: 1px; + border-radius: 3px; +} + +.edui-default .edui-toolbar .edui-splitborder { + /*width: 1px;*/ + width: 0px; + height: 30px; +} + +.edui-default .edui-toolbar .edui-state-hover .edui-splitborder { + /*width: 1px;*/ + border-left: 0px solid #dcac6c; +} + +.edui-default .edui-toolbar .edui-state-active .edui-splitborder { + width: 0; + /*border-left: 1px solid #EEE;*/ +} + +.edui-default .edui-toolbar .edui-state-opened .edui-splitborder { + /*width: 1px;*/ + border: 0; +} + +.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body, +.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body { + background-color: #EEE; + border: 1px solid #EEE; + padding: 0; +} + +.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body, +.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body { + background-color: #ffffff; + border: 1px solid #EEE; + padding: 0; +} + +.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body, +.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body { + background-color: #ffffff; + border: 1px solid #EEE; + padding: 0; +} + +.edui-default .edui-state-disabled .edui-arrow { + opacity: 0.3; + _filter: alpha(opacity = 30); +} + +.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body, +.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body { + background-color: white; + border: 1px solid #EEE; + padding: 0; +} + +.edui-default .edui-for-insertorderedlist .edui-bordereraser, +.edui-default .edui-for-lineheight .edui-bordereraser, +.edui-default .edui-for-rowspacingtop .edui-bordereraser, +.edui-default .edui-for-rowspacingbottom .edui-bordereraser, +.edui-default .edui-for-insertunorderedlist .edui-bordereraser { + background-color: white; +} + +/* 解决嵌套导致的图标问题 */ +.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon, +.edui-default .edui-for-lineheight .edui-popup-body .edui-icon, +.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon, +.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon, +.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon { + /*background-position: 0 -40px;*/ + background-image: none ; +} + +/* 弹出菜单 */ +.edui-default .edui-popup { + z-index: 3000; + background-color: #ffffff; + width:auto; + height:auto; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + margin-top:1px; +} + +.edui-default .edui-popup .edui-shadow { + left: 0; + top: 0; + width: 100%; + height: 100%; +} + +.edui-default .edui-popup-content { + font-size: 13px; + box-shadow: 0 0 10px rgba(0,0,0,0.2); + transition: .25s; + color: #333; + background-color: #FFF; + padding: 10px; + border-radius: 5px; +} + +.edui-default .edui-popup .edui-bordereraser { + background-color: transparent; + height: 3px; +} + +.edui-default .edui-menu .edui-bordereraser { + height: 3px; +} + +.edui-default .edui-anchor-topleft .edui-bordereraser { + left: 1px; + top: -2px; +} + +.edui-default .edui-anchor-topright .edui-bordereraser { + right: 1px; + top: -2px; +} + +.edui-default .edui-anchor-bottomleft .edui-bordereraser { + left: 0; + bottom: -6px; + height: 7px; + border-left: 1px solid gray; + border-right: 1px solid gray; +} + +.edui-default .edui-anchor-bottomright .edui-bordereraser { + right: 0; + bottom: -6px; + height: 7px; + border-left: 1px solid gray; + border-right: 1px solid gray; +} + +.edui-popup div{ + width:auto; + height:auto; +} + +.edui-default .edui-editor-messageholder { + display: block; + width: 150px; + height: auto; + border: 0; + margin: 0; + padding: 0; + position: absolute; + top: 28px; + right: 3px; +} + +.edui-default .edui-message{ + min-height: 10px; + text-shadow: 0 1px 0 rgba(255,255,255,0.5); + padding: 0; + margin-bottom: 3px; + position: relative; +} +.edui-default .edui-message-body{ + border-radius: 3px; + padding: 8px 15px 8px 8px; + color: #c09853; + background-color: #fcf8e3; + border: 1px solid #fbeed5; +} +.edui-default .edui-message-type-info{ + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1 +} +.edui-default .edui-message-type-success{ + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6 +} +.edui-default .edui-message-type-danger, +.edui-default .edui-message-type-error{ + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7 +} +.edui-default .edui-message .edui-message-closer { + display: block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 0; + right: 0; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + float: right; + font-size: 20px; + font-weight: bold; + color: #999; + text-shadow: 0 1px 0 #fff; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; +} +.edui-default .edui-message .edui-message-content { + font-size: 10pt; + word-wrap: break-word; + word-break: normal; +} +/* 弹出对话框按钮和对话框大小 */ +.edui-default .edui-dialog { + z-index: 2000; + position: absolute; + +} + +.edui-dialog div { + width: auto; +} + +.edui-default .edui-dialog-wrap { + margin-right: 6px; + margin-bottom: 6px; +} + +.edui-default .edui-dialog-fullscreen-flag { + margin-right: 0; + margin-bottom: 0; +} + +.edui-default .edui-dialog-body { + position: relative; + /*padding:2px 0 0 2px;*/ + /*_zoom: 1;*/ +} + +.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body { + padding: 0; +} + +.edui-default .edui-dialog-shadow { + position: absolute; + z-index: -1; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: #ffffff; + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 3px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.edui-default .edui-dialog-foot { + background-color: white; + border-radius: 0 0 5px 5px; + height: 40px; +} + +.edui-default .edui-dialog-titlebar { + height: 30px; + background: #FFF; + position: relative; + cursor: move; + border-radius: 5px 5px 0 0; +} + +.edui-default .edui-dialog-caption { + font-weight: bold; + font-size: 14px; + line-height: 30px; + padding-left: 5px; +} + +.edui-default .edui-dialog-draghandle { + height: 30px; + padding: 5px; +} + +.edui-default .edui-dialog-closebutton { + position: absolute !important; + right: 10px; + top: 10px; +} + +.edui-default .edui-dialog-closebutton .edui-button-body { + height: 20px; + width: 20px; + cursor: pointer; +} + +.edui-default .edui-dialog-closebutton .edui-button-body .edui-icon { + width: 20px; + height: 20px; + font-family: 'edui-iconfont'; + line-height: 20px; + font-size: 20px; + text-align: center; + color: #999; + vertical-align: top; +} + +.edui-default .edui-dialog-closebutton .edui-button-body .edui-icon:before { + content: "\e6a7"; +} + +.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body .edui-icon { + color: #333; +} + +.edui-default .edui-dialog-buttons { + position: absolute; + right: 0; +} + +.edui-default .edui-dialog-buttons .edui-button { + margin-right: 10px; +} + +.edui-default .edui-dialog-buttons .edui-button .edui-button-body .edui-icon { + display: none !important; +} + +.edui-default .edui-dialog-buttons .edui-button .edui-button-body { + height: 30px; + font-size: 12px; + line-height: 28px; + cursor: pointer; + border-radius: 4px; + text-align: center; + background-color: #F8F8F8; + border: 1px solid #EEE; + padding: 0 15px; +} + +.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body { + +} + +.edui-default .edui-dialog iframe { + border: 0; + padding: 0; + margin: 0; + vertical-align: top; +} + +.edui-default .edui-dialog-modalmask { + opacity: 0.3; + filter: alpha(opacity=30); + background-color: #ccc; + position: absolute; + /*z-index: 1999;*/ +} + +.edui-default .edui-dialog-dragmask { + position: absolute; + /*z-index: 2001;*/ + background-color: transparent; + cursor: move; +} + +.edui-default .edui-dialog-content { + position: relative; +} + +.edui-default .dialogcontmask { + cursor: move; + visibility: hidden; + display: block; + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + filter: alpha(opacity=0); +} + +/*link-dialog*/ +.edui-default .edui-for-link .edui-dialog-content { + width: 420px; + height: 200px; + overflow: hidden; +} + +/*background-dialog*/ +.edui-default .edui-for-background .edui-dialog-content { + width: 440px; + height: 280px; + overflow: hidden; +} + +/*template-dialog*/ +.edui-default .edui-for-template .edui-dialog-content { + width: 630px; + height: 390px; + overflow: hidden; +} + +/*scrawl-dialog*/ +.edui-default .edui-for-scrawl .edui-dialog-content { + width: 515px; + *width: 506px; + height: 360px; +} + +/*spechars-dialog*/ +.edui-default .edui-for-spechars .edui-dialog-content { + width: 620px; + height: 500px; + *width: 630px; + *height: 570px; +} + +/*image-dialog*/ +.edui-default .edui-for-insertimage .edui-dialog-content { + width: 650px; + height: 400px; + overflow: hidden; +} + +/*image-insertframe*/ +.edui-default .edui-for-insertframe .edui-dialog-content { + width: 350px; + height: 230px; + overflow: hidden; +} + +/*wordImage-dialog*/ +.edui-default .edui-for-wordimage .edui-dialog-content { + width: 620px; + height: 380px; + overflow: hidden; +} + +/*formula-dialog*/ +.edui-default .edui-for-formula .edui-dialog-content { + width: 800px; + height: 400px; + overflow: hidden; +} + +/*attachment-dialog*/ +.edui-default .edui-for-attachment .edui-dialog-content { + width: 650px; + height: 400px; + overflow: hidden; +} + + +/*map-dialog*/ +.edui-default .edui-for-map .edui-dialog-content { + width: 550px; + height: 400px; +} + +/*video-dialog*/ +.edui-default .edui-for-insertvideo .edui-dialog-content { + width: 590px; + height: 420px; +} + +/*audio-dialog*/ +.edui-default .edui-for-insertaudio .edui-dialog-content { + width: 590px; + height: 420px; +} + +/*anchor-dialog*/ +.edui-default .edui-for-anchor .edui-dialog-content { + width: 320px; + height: 60px; + overflow: hidden; +} + +/*searchreplace-dialog*/ +.edui-default .edui-for-searchreplace .edui-dialog-content { + width: 400px; + height: 220px; +} + +/*help-dialog*/ +.edui-default .edui-for-help .edui-dialog-content { + width: 400px; + height: 420px; +} + +/*edittable-dialog*/ +.edui-default .edui-for-edittable .edui-dialog-content { + width: 540px; + _width: 590px; + height: 335px; +} + +/*edittip-dialog*/ +.edui-default .edui-for-edittip .edui-dialog-content { + width: 225px; + height: 60px; +} + +/*edittd-dialog*/ +.edui-default .edui-for-edittd .edui-dialog-content { + width: 240px; + height: 50px; +} + +/*段落弹出菜单*/ +.edui-default .edui-for-paragraph .edui-listitem-label { + font-family: Tahoma, Verdana, Arial, Helvetica; +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p { + font-size: 22px; + line-height: 27px; +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1 { + font-weight: bolder; + font-size: 32px; + line-height: 36px; +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2 { + font-weight: bolder; + font-size: 27px; + line-height: 29px; +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3 { + font-weight: bolder; + font-size: 19px; + line-height: 23px; +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4 { + font-weight: bolder; + font-size: 16px; + line-height: 19px +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5 { + font-weight: bolder; + font-size: 13px; + line-height: 16px; +} + +.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6 { + font-weight: bolder; + font-size: 12px; + line-height: 14px; +} +/* 表格弹出菜单 */ +.edui-default .edui-for-inserttable .edui-splitborder { + display: none +} +.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow { + width: 0 +} +.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{ + border-left: 1px solid transparent; +} +.edui-default .edui-tablepicker .edui-infoarea { + height: 14px; + line-height: 14px; + font-size: 12px; + width: 220px; + margin-bottom: 3px; + clear: both; +} + +.edui-default .edui-tablepicker .edui-infoarea .edui-label { + float: left; +} + +.edui-default .edui-dialog-buttons .edui-label { + line-height: 30px; +} + +.edui-default .edui-tablepicker .edui-infoarea .edui-clickable { + float: right; +} + +.edui-default .edui-tablepicker .edui-pickarea { + background: url("../images/unhighlighted.gif") repeat; + height: 220px; + width: 220px; +} + +.edui-default .edui-tablepicker .edui-pickarea .edui-overlay { + background: url("../images/highlighted.gif") repeat; +} + +/* 颜色弹出菜单 */ +.edui-default .edui-colorpicker-topbar { + height: 27px; + width: 200px; + /*border-bottom: 1px gray dashed;*/ +} + +.edui-default .edui-colorpicker-preview { + height: 20px; + border: 1px inset black; + margin-left: 1px; + width: 128px; + float: left; + border-radius:3px; + position: relative; +} + +.edui-default .edui-colorpicker-preview input{ + padding: 0; + left: 0; + border: 0; + position: absolute; + top: 0; + width: 100%; + height: 100%; + border-radius: 3px; + opacity: 0; + cursor: pointer; +} + +.edui-default .edui-colorpicker-nocolor { + float: right; + margin-right: 1px; + font-size: 12px; + line-height: 20px; + height: 20px; + border: 1px solid #333; + padding: 0 5px; + cursor: pointer; + border-radius: 3px; + box-sizing: content-box; +} + +.edui-default .edui-colorpicker-tablefirstrow { + height: 30px; +} + +.edui-default .edui-colorpicker-colorcell { + width: 14px; + height: 14px; + display: block; + margin: 0; + cursor: pointer; + border-radius:2px; +} + +.edui-default .edui-colorpicker-colorcell:hover { + width: 14px; + height: 14px; + margin: 0; +} +.edui-default .edui-colorpicker-advbtn{ + display: block; + text-align: center; + cursor: pointer; + height:20px; +} +.arrow_down{ + background: white url('../images/arrow_down.png') no-repeat center; +} +.arrow_up{ + background: white url('../images/arrow_up.png') no-repeat center; +} +/*高级的样式*/ +.edui-colorpicker-adv{ + position: relative; + overflow: hidden; + height: 180px; + display: none; +} +.edui-colorpicker-plant, .edui-colorpicker-hue { + border: solid 1px #666; +} +.edui-colorpicker-pad { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: red; + overflow: hidden; + cursor: crosshair; +} +.edui-colorpicker-cover{ + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url("../images/tangram-colorpicker.png") -160px -200px; +} +.edui-colorpicker-padDot{ + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../images/tangram-colorpicker.png) 0px -200px repeat-x; + z-index: 1000; + +} +.edui-colorpicker-sliderMain { + position: absolute; + left: 171px; + top: 13px; + width: 19px; + height: 152px; + background: url(../images/tangram-colorpicker.png) -179px -12px no-repeat; + +} +.edui-colorpicker-slider { + width: 100%; + height: 100%; + cursor: pointer; +} +.edui-colorpicker-thumb{ + position: absolute; + top: 0; + cursor: pointer; + height: 3px; + left: -1px; + right: -1px; + border: 1px solid black; + background: white; + opacity: .8; +} + +/*自动排版弹出菜单*/ +.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body { + font-size: 12px; + margin-bottom: 3px; + clear: both; +} + +.edui-default .edui-autotypesetpicker-body table { + border-collapse: separate; + border-spacing: 2px; +} + +.edui-default .edui-autotypesetpicker-body td { + font-size: 12px; + word-wrap: break-word; +} + +.edui-default .edui-autotypesetpicker-body td input { + margin: 3px 3px 3px 4px; + *margin: 1px 0 0 0; +} + +.edui-default .edui-autotypesetpicker-body td button { + border: none; + padding: 5px 10px; + font-size: 13px; + line-height: 1.5; + border-radius: 4rem; + -webkit-appearance: none; + cursor: pointer; + margin-bottom: 5px; + background-color: #EEE; +} + +/*自动排版弹出菜单*/ +.edui-default .edui-cellalignpicker .edui-cellalignpicker-body { + width: 70px; + font-size: 12px; + cursor: default; +} + +.edui-default .edui-cellalignpicker-body table { + border-collapse: separate; + border-spacing: 0; +} +.edui-default .edui-cellalignpicker-body td{ + padding: 1px; +} +.edui-default .edui-cellalignpicker-body .edui-icon{ + height: 20px; + width: 20px; + padding: 1px; + background-image: url(../images/table-cell-align.png); +} + +.edui-default .edui-cellalignpicker-body .edui-left{ + background-position: 0 0; +} + +.edui-default .edui-cellalignpicker-body .edui-center{ + background-position: -25px 0; +} +.edui-default .edui-cellalignpicker-body .edui-right{ + background-position: -51px 0; +} + +.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{ + background-position: -73px 0; +} + +.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{ + background-position: -98px 0; +} + +.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{ + background-position: -124px 0; +} + +.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left { + background-position: -146px 0; + background-color: #f1f4f5; +} + +.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center { + background-position: -245px 0; +} + +.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right { + background-position: -271px 0; +} +/*分隔线*/ +.edui-default .edui-toolbar .edui-separator { + width: 1px; + height: 20px; + margin: 5px 5px; + background: var(--edui-color-border); +} + +/*颜色按钮 */ +.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump { + position: absolute; + overflow: hidden; + bottom: 1px; + left: 5px; + width: 20px; + height: 4px; +} + +/*表情按钮及弹出菜单*/ +/*去除了表情的下拉箭头*/ +.edui-default .edui-for-emotion .edui-icon:before { + content: "\e60e"; +} +.edui-default .edui-for-emotion .edui-popup-content iframe +{ + width: 514px; + height: 380px; + overflow: hidden; +} +.edui-default .edui-for-emotion .edui-popup-content +{ + position: relative; + z-index: 555 +} + +.edui-default .edui-for-emotion .edui-splitborder { + display: none +} + +.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow +{ + width: 0 +} +.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder +{ + border-left: 1px solid transparent; +} + +/*contextmenu*/ +.edui-default .edui-hassubmenu .edui-arrow { + height: 20px; + width: 20px; + float: right; + /*background: url("../images/icons-all.gif") no-repeat 10px -233px;*/ + font-family: 'edui-iconfont'; + font-size:12px; + line-height:20px; + text-align:center; +} + +.edui-default .edui-hassubmenu .edui-arrow:before{ + content: "\e665"; +} + +.edui-default .edui-menu-body .edui-menuitem { + padding: 1px; +} + +.edui-default .edui-menuseparator { + margin: 2px 0; + height: 1px; + overflow: hidden; +} + +.edui-default .edui-menuseparator-inner { + border-bottom: 1px solid #e2e3e3; + margin-left: 29px; + margin-right: 1px; +} + +.edui-default .edui-menu-body .edui-state-hover { + padding: 0 !important; + background-color: var(--edui-color-active-bg); + border-radius:3px; + border:1px solid var(--edui-color-active-bg); +} + +/*弹出菜单*/ +.edui-default .edui-shortcutmenu { + padding: 2px; + /*width: 300px;*/ + white-space: nowrap; + height: auto; + background-color: #fff; + /*border: 1px solid var(--edui-color-border);*/ + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); +} + +/*粘贴弹出菜单*/ +.edui-default .edui-wordpastepop .edui-popup-content{ + border: none; + padding: 0; + width: 54px; + height: 21px; +} +.edui-default .edui-pasteicon { + width: 100%; + height: 100%; + background-image: url('../images/wordpaste.png'); + background-position: 0 0; +} + +.edui-default .edui-pasteicon.edui-state-opened { + background-position: 0 -34px; +} + +.edui-default .edui-pastecontainer { + position: relative; + visibility: hidden; + width: 97px; + background: #fff; + border: 1px solid #ccc; +} + +.edui-default .edui-pastecontainer .edui-title { + font-weight: bold; + background: #F8F8FF; + height: 25px; + line-height: 25px; + font-size: 12px; + padding-left: 5px; +} + +.edui-default .edui-pastecontainer .edui-button { + overflow: hidden; + margin: 3px 0; +} + +.edui-default .edui-pastecontainer .edui-button .edui-richtxticon, +.edui-default .edui-pastecontainer .edui-button .edui-tagicon, +.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{ + float: left; + cursor: pointer; + width: 29px; + height: 29px; + margin-left: 5px; + background-image: url('../images/wordpaste.png'); + background-repeat: no-repeat; +} +.edui-default .edui-pastecontainer .edui-button .edui-richtxticon { + margin-left: 0; + background-position: -109px 0; +} +.edui-default .edui-pastecontainer .edui-button .edui-tagicon { + background-position: -148px 1px; +} + +.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon { + background-position: -72px 0; +} + +.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon { + background-position: -109px -34px; +} +.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{ + background-position: -148px -34px; +} +.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{ + background-position: -72px -34px; +} +.edui-quick-operate { + position: relative; + margin: -10px; + /*width: 40px;*/ + height: 40px; + background: #FFF; + width: 50px !important; + border-radius: 4px; +} + +.edui-quick-operate:hover .edui-quick-operate-menu { + display: block; +} + +.edui-quick-operate-status { + display: flex; +} + +.edui-quick-operate-icon { + display: inline-block; + line-height: 30px !important; + width: 30px !important; + text-align: center; + cursor: pointer; + color: #2A57FE; +} + +.edui-quick-operate-icon:last-child { + width: 20px !important; + font-size: 0; + color: #999; +} + +.edui-quick-operate-icon:last-child svg { + vertical-align: middle; +} + +.edui-quick-operate-menu { + border: 1px solid #CCC; + border-radius: 5px; + box-shadow: 0 0 10px #CCC; + position: absolute; + left: 50px; + top: 0; + background: #FFF; + width: 100px !important; + display: none; +} + +.edui-quick-operate-menu .item { + height: 30px; + line-height: 30px; + padding: 0 10px; + cursor: pointer; +} + +.edui-quick-operate-menu .item:hover { + background: #F5F5F5; +} + +.edui-quick-operate-menu .item i { + display: inline-block; + width: 2em; +} + +.edui-quick-operate .icon { + font-family: "edui-iconfont"; + font-style: normal; + -webkit-font-smoothing: antialiased; +} + +.edui-quick-operate .icon.icon-image:before { + content: "\e605"; +} + +.edui-quick-operate .icon.icon-list:before { + content: "\e87c"; +} +.edui-quick-operate .icon.icon-trash:before { + content: "\e87c"; +} diff --git a/public/static/plugs/ueditor/themes/default/dialogbase.css b/public/static/plugs/ueditor/themes/default/dialogbase.css new file mode 100644 index 0000000..6b78254 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/dialogbase.css @@ -0,0 +1,101 @@ +/*弹出对话框页面样式组件 +*/ + +/*reset +*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + outline: 0; + font-size: 100%; +} + +body { + line-height: 1; +} + +ol, ul { + list-style: none; +} + +blockquote, q { + quotes: none; +} + +ins { + text-decoration: none; +} + +del { + text-decoration: line-through; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +/*module +*/ +body { + background-color: #fff; + font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA; + color: #646464; +} + +/*tab*/ +.tabhead { + position: relative; + z-index: 10; +} + +.tabhead span { + display: inline-block; + padding: 0 5px; + height: 30px; + border: 1px solid #ccc; + background: #EEE; + text-align: center; + line-height: 30px; + cursor: pointer; + *margin-right: 5px; + border-radius: 3px 3px 0 0; +} + +.tabhead span.focus { + height: 31px; + border-bottom: none; + background: #fff; +} + +.tabbody { + position: relative; + top: -1px; + margin: 0 auto; + border: 1px solid #ccc; +} + +/*button*/ +a.button { + display: block; + text-align: center; + line-height: 24px; + text-decoration: none; + height: 24px; + width: 95px; + border: 0; + color: #838383; + background: url(../../themes/default/images/icons-all.gif) no-repeat; +} + +a.button:hover { + background-position: 0 -30px; +} diff --git a/public/static/plugs/ueditor/themes/default/exts/doc.svg b/public/static/plugs/ueditor/themes/default/exts/doc.svg new file mode 100644 index 0000000..e659bcb --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/doc.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/docx.svg b/public/static/plugs/ueditor/themes/default/exts/docx.svg new file mode 100644 index 0000000..e659bcb --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/docx.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/gif.svg b/public/static/plugs/ueditor/themes/default/exts/gif.svg new file mode 100644 index 0000000..4ac397e --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/gif.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/jpeg.svg b/public/static/plugs/ueditor/themes/default/exts/jpeg.svg new file mode 100644 index 0000000..91c03d7 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/jpeg.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/jpg.svg b/public/static/plugs/ueditor/themes/default/exts/jpg.svg new file mode 100644 index 0000000..c01dc2d --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/jpg.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/mp3.svg b/public/static/plugs/ueditor/themes/default/exts/mp3.svg new file mode 100644 index 0000000..a707727 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/mp3.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/mp4.svg b/public/static/plugs/ueditor/themes/default/exts/mp4.svg new file mode 100644 index 0000000..9ea1542 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/mp4.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/pdf.svg b/public/static/plugs/ueditor/themes/default/exts/pdf.svg new file mode 100644 index 0000000..b6e9ac7 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/pdf.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/png.svg b/public/static/plugs/ueditor/themes/default/exts/png.svg new file mode 100644 index 0000000..88052f3 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/png.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/ppt.svg b/public/static/plugs/ueditor/themes/default/exts/ppt.svg new file mode 100644 index 0000000..91c8ad5 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/ppt.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/pptx.svg b/public/static/plugs/ueditor/themes/default/exts/pptx.svg new file mode 100644 index 0000000..91c8ad5 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/pptx.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/rar.svg b/public/static/plugs/ueditor/themes/default/exts/rar.svg new file mode 100644 index 0000000..aefca9d --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/rar.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/torrent.svg b/public/static/plugs/ueditor/themes/default/exts/torrent.svg new file mode 100644 index 0000000..5ac15bb --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/torrent.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/txt.svg b/public/static/plugs/ueditor/themes/default/exts/txt.svg new file mode 100644 index 0000000..2f28948 --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/txt.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/unknown.svg b/public/static/plugs/ueditor/themes/default/exts/unknown.svg new file mode 100644 index 0000000..1e9926b --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/unknown.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/xls.svg b/public/static/plugs/ueditor/themes/default/exts/xls.svg new file mode 100644 index 0000000..26d50ca --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/xls.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/xlsx.svg b/public/static/plugs/ueditor/themes/default/exts/xlsx.svg new file mode 100644 index 0000000..26d50ca --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/xlsx.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/exts/zip.svg b/public/static/plugs/ueditor/themes/default/exts/zip.svg new file mode 100644 index 0000000..aefca9d --- /dev/null +++ b/public/static/plugs/ueditor/themes/default/exts/zip.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/static/plugs/ueditor/themes/default/images/anchor.gif b/public/static/plugs/ueditor/themes/default/images/anchor.gif new file mode 100644 index 0000000..5aa797b Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/anchor.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/arrow.png b/public/static/plugs/ueditor/themes/default/images/arrow.png new file mode 100644 index 0000000..d900886 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/arrow.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/arrow_down.png b/public/static/plugs/ueditor/themes/default/images/arrow_down.png new file mode 100644 index 0000000..e9257e8 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/arrow_down.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/arrow_up.png b/public/static/plugs/ueditor/themes/default/images/arrow_up.png new file mode 100644 index 0000000..74277af Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/arrow_up.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/button-bg.gif b/public/static/plugs/ueditor/themes/default/images/button-bg.gif new file mode 100644 index 0000000..ec7fa2e Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/button-bg.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/cancelbutton.gif b/public/static/plugs/ueditor/themes/default/images/cancelbutton.gif new file mode 100644 index 0000000..df4bc2c Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/cancelbutton.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/charts.png b/public/static/plugs/ueditor/themes/default/images/charts.png new file mode 100644 index 0000000..713965c Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/charts.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/cursor_h.gif b/public/static/plugs/ueditor/themes/default/images/cursor_h.gif new file mode 100644 index 0000000..d7c3e7e Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/cursor_h.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/cursor_h.png b/public/static/plugs/ueditor/themes/default/images/cursor_h.png new file mode 100644 index 0000000..2088fc2 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/cursor_h.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/cursor_v.gif b/public/static/plugs/ueditor/themes/default/images/cursor_v.gif new file mode 100644 index 0000000..bb508db Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/cursor_v.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/cursor_v.png b/public/static/plugs/ueditor/themes/default/images/cursor_v.png new file mode 100644 index 0000000..6f39ca3 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/cursor_v.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/dialog-title-bg.png b/public/static/plugs/ueditor/themes/default/images/dialog-title-bg.png new file mode 100644 index 0000000..f744f26 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/dialog-title-bg.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/filescan.png b/public/static/plugs/ueditor/themes/default/images/filescan.png new file mode 100644 index 0000000..1d27158 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/filescan.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/highlighted.gif b/public/static/plugs/ueditor/themes/default/images/highlighted.gif new file mode 100644 index 0000000..9272b49 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/highlighted.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/icons-all.gif b/public/static/plugs/ueditor/themes/default/images/icons-all.gif new file mode 100644 index 0000000..21915e5 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/icons-all.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/icons.gif b/public/static/plugs/ueditor/themes/default/images/icons.gif new file mode 100644 index 0000000..7abd30a Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/icons.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/icons.png b/public/static/plugs/ueditor/themes/default/images/icons.png new file mode 100644 index 0000000..c015e3a Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/icons.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/img-cracked.png b/public/static/plugs/ueditor/themes/default/images/img-cracked.png new file mode 100644 index 0000000..3b1d389 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/img-cracked.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/loaderror.png b/public/static/plugs/ueditor/themes/default/images/loaderror.png new file mode 100644 index 0000000..35ff333 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/loaderror.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/loading.gif b/public/static/plugs/ueditor/themes/default/images/loading.gif new file mode 100644 index 0000000..b713e27 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/loading.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/lock.gif b/public/static/plugs/ueditor/themes/default/images/lock.gif new file mode 100644 index 0000000..b4e6d78 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/lock.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/neweditor-tab-bg.png b/public/static/plugs/ueditor/themes/default/images/neweditor-tab-bg.png new file mode 100644 index 0000000..8f398b0 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/neweditor-tab-bg.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/pagebreak.gif b/public/static/plugs/ueditor/themes/default/images/pagebreak.gif new file mode 100644 index 0000000..8d1cffd Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/pagebreak.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/scale.png b/public/static/plugs/ueditor/themes/default/images/scale.png new file mode 100644 index 0000000..f45adb5 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/scale.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/sortable.png b/public/static/plugs/ueditor/themes/default/images/sortable.png new file mode 100644 index 0000000..1bca649 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/sortable.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/spacer.gif b/public/static/plugs/ueditor/themes/default/images/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/spacer.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/sparator_v.png b/public/static/plugs/ueditor/themes/default/images/sparator_v.png new file mode 100644 index 0000000..8cf5662 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/sparator_v.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/table-cell-align.png b/public/static/plugs/ueditor/themes/default/images/table-cell-align.png new file mode 100644 index 0000000..ddf4285 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/table-cell-align.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/tangram-colorpicker.png b/public/static/plugs/ueditor/themes/default/images/tangram-colorpicker.png new file mode 100644 index 0000000..738e500 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/tangram-colorpicker.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/toolbar_bg.png b/public/static/plugs/ueditor/themes/default/images/toolbar_bg.png new file mode 100644 index 0000000..7ab685f Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/toolbar_bg.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/unhighlighted.gif b/public/static/plugs/ueditor/themes/default/images/unhighlighted.gif new file mode 100644 index 0000000..7ad0b67 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/unhighlighted.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/upload.png b/public/static/plugs/ueditor/themes/default/images/upload.png new file mode 100644 index 0000000..08d4d92 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/upload.png differ diff --git a/public/static/plugs/ueditor/themes/default/images/videologo.gif b/public/static/plugs/ueditor/themes/default/images/videologo.gif new file mode 100644 index 0000000..555af74 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/videologo.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/word.gif b/public/static/plugs/ueditor/themes/default/images/word.gif new file mode 100644 index 0000000..9ef5d09 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/word.gif differ diff --git a/public/static/plugs/ueditor/themes/default/images/wordpaste.png b/public/static/plugs/ueditor/themes/default/images/wordpaste.png new file mode 100644 index 0000000..9367758 Binary files /dev/null and b/public/static/plugs/ueditor/themes/default/images/wordpaste.png differ diff --git a/public/static/plugs/ueditor/themes/iframe.css b/public/static/plugs/ueditor/themes/iframe.css new file mode 100644 index 0000000..0131ced --- /dev/null +++ b/public/static/plugs/ueditor/themes/iframe.css @@ -0,0 +1,63 @@ +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + font-size: 14px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +a { + color: #09f; + text-decoration: none; +} + +a:hover, +a:focus { + color: #09f; + text-decoration: none; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 18px; + border-left: 5px solid #EEE; +} + +img + br { + display: block; + padding: 4px 0; + content: ' '; +} + +body p { + margin-bottom: 1em; +} + +iframe { + border: none; +} + +img { + max-width: 100%; +} + +img[data-word-image] { + cursor: pointer; +} + +pre { + margin: .5em 0; + padding: .4em .6em; + border-radius: 8px; + background: #f8f8f8; + line-height: 1.5; +} + +/*交互操作*/ +img { + cursor: pointer; +} + +.edui-quick-operate-active { + background: #E6ECFF; +} diff --git a/public/static/plugs/ueditor/third-party/SyntaxHighlighter/shCore.js b/public/static/plugs/ueditor/third-party/SyntaxHighlighter/shCore.js new file mode 100644 index 0000000..3249184 --- /dev/null +++ b/public/static/plugs/ueditor/third-party/SyntaxHighlighter/shCore.js @@ -0,0 +1,3655 @@ +// XRegExp 1.5.1 +// (c) 2007-2012 Steven Levithan +// MIT License +// +// Provides an augmented, extensible, cross-browser implementation of regular expressions, +// including support for additional syntax, flags, and methods + +var XRegExp; + +if (XRegExp) { + // Avoid running twice, since that would break references to native globals + throw Error("can't load XRegExp twice in the same frame"); +} + +// Run within an anonymous function to protect variables and avoid new globals +(function (undefined) { + + //--------------------------------- + // Constructor + //--------------------------------- + + // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native + // regular expression in that additional syntax and flags are supported and cross-browser + // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and + // converts to type XRegExp + XRegExp = function (pattern, flags) { + var output = [], + currScope = XRegExp.OUTSIDE_CLASS, + pos = 0, + context, tokenResult, match, chr, regex; + + if (XRegExp.isRegExp(pattern)) { + if (flags !== undefined) + throw TypeError("can't supply flags when constructing one RegExp from another"); + return clone(pattern); + } + // Tokens become part of the regex construction process, so protect against infinite + // recursion when an XRegExp is constructed within a token handler or trigger + if (isInsideConstructor) + throw Error("can't call the XRegExp constructor within token definition functions"); + + flags = flags || ""; + context = { // `this` object for custom tokens + hasNamedCapture: false, + captureNames: [], + hasFlag: function (flag) {return flags.indexOf(flag) > -1;}, + setFlag: function (flag) {flags += flag;} + }; + + while (pos < pattern.length) { + // Check for custom tokens at the current position + tokenResult = runTokens(pattern, pos, currScope, context); + + if (tokenResult) { + output.push(tokenResult.output); + pos += (tokenResult.match[0].length || 1); + } else { + // Check for native multicharacter metasequences (excluding character classes) at + // the current position + if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) { + output.push(match[0]); + pos += match[0].length; + } else { + chr = pattern.charAt(pos); + if (chr === "[") + currScope = XRegExp.INSIDE_CLASS; + else if (chr === "]") + currScope = XRegExp.OUTSIDE_CLASS; + // Advance position one character + output.push(chr); + pos++; + } + } + } + + regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, "")); + regex._xregexp = { + source: pattern, + captureNames: context.hasNamedCapture ? context.captureNames : null + }; + return regex; + }; + + + //--------------------------------- + // Public properties + //--------------------------------- + + XRegExp.version = "1.5.1"; + + // Token scope bitflags + XRegExp.INSIDE_CLASS = 1; + XRegExp.OUTSIDE_CLASS = 2; + + + //--------------------------------- + // Private variables + //--------------------------------- + + var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, + flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags + quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, + isInsideConstructor = false, + tokens = [], + // Copy native globals for reference ("native" is an ES3 reserved keyword) + nativ = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split + }, + compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups + compliantLastIndexIncrement = function () { + var x = /^/g; + nativ.test.call(x, ""); + return !x.lastIndex; + }(), + hasNativeY = RegExp.prototype.sticky !== undefined, + nativeTokens = {}; + + // `nativeTokens` match native multicharacter metasequences only (including deprecated octals, + // excluding character classes) + nativeTokens[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/; + nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/; + + + //--------------------------------- + // Public methods + //--------------------------------- + + // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by + // the XRegExp library and can be used to create XRegExp plugins. This function is intended for + // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can + // be disabled by `XRegExp.freezeTokens` + XRegExp.addToken = function (regex, handler, scope, trigger) { + tokens.push({ + pattern: clone(regex, "g" + (hasNativeY ? "y" : "")), + handler: handler, + scope: scope || XRegExp.OUTSIDE_CLASS, + trigger: trigger || null + }); + }; + + // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag + // combination has previously been cached, the cached copy is returned; otherwise the newly + // created regex is cached + XRegExp.cache = function (pattern, flags) { + var key = pattern + "/" + (flags || ""); + return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags)); + }; + + // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh + // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global` + // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve + // special properties required for named capture + XRegExp.copyAsGlobal = function (regex) { + return clone(regex, "g"); + }; + + // Accepts a string; returns the string with regex metacharacters escaped. The returned string + // can safely be used at any point within a regex to match the provided literal string. Escaped + // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace + XRegExp.escape = function (str) { + return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }; + + // Accepts a string to search, regex to search with, position to start the search within the + // string (default: 0), and an optional Boolean indicating whether matches must start at-or- + // after the position or at the specified position only. This function ignores the `lastIndex` + // of the provided regex in its own handling, but updates the property for compatibility + XRegExp.execAt = function (str, regex, pos, anchored) { + var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")), + match; + r2.lastIndex = pos = pos || 0; + match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (anchored && match && match.index !== pos) + match = null; + if (regex.global) + regex.lastIndex = match ? r2.lastIndex : 0; + return match; + }; + + // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing + // syntax and flag changes. Should be run after XRegExp and any plugins are loaded + XRegExp.freezeTokens = function () { + XRegExp.addToken = function () { + throw Error("can't run addToken after freezeTokens"); + }; + }; + + // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object. + // Note that this is also `true` for regex literals and regexes created by the `XRegExp` + // constructor. This works correctly for variables created in another frame, when `instanceof` + // and `constructor` checks would fail to work as intended + XRegExp.isRegExp = function (o) { + return Object.prototype.toString.call(o) === "[object RegExp]"; + }; + + // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to + // iterate over regex matches compared to the traditional approaches of subverting + // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop + XRegExp.iterate = function (str, regex, callback, context) { + var r2 = clone(regex, "g"), + i = -1, match; + while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (regex.global) + regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback` + callback.call(context, match, ++i, str, regex); + if (r2.lastIndex === match.index) + r2.lastIndex++; + } + if (regex.global) + regex.lastIndex = 0; + }; + + // Accepts a string and an array of regexes; returns the result of using each successive regex + // to search within the matches of the previous regex. The array of regexes can also contain + // objects with `regex` and `backref` properties, in which case the named or numbered back- + // references specified are passed forward to the next regex or returned. E.g.: + // var xregexpImgFileNames = XRegExp.matchChain(html, [ + // {regex: /]+)>/i, backref: 1}, // tag attributes + // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values + // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths + // /[^\/]+$/ // filenames (strip directory paths) + // ]); + XRegExp.matchChain = function (str, chain) { + return function recurseChain (values, level) { + var item = chain[level].regex ? chain[level] : {regex: chain[level]}, + regex = clone(item.regex, "g"), + matches = [], i; + for (i = 0; i < values.length; i++) { + XRegExp.iterate(values[i], regex, function (match) { + matches.push(item.backref ? (match[item.backref] || "") : match[0]); + }); + } + return ((level === chain.length - 1) || !matches.length) ? + matches : recurseChain(matches, level + 1); + }([str], 0); + }; + + + //--------------------------------- + // New RegExp prototype methods + //--------------------------------- + + // Accepts a context object and arguments array; returns the result of calling `exec` with the + // first value in the arguments array. the context is ignored but is accepted for congruity + // with `Function.prototype.apply` + RegExp.prototype.apply = function (context, args) { + return this.exec(args[0]); + }; + + // Accepts a context object and string; returns the result of calling `exec` with the provided + // string. the context is ignored but is accepted for congruity with `Function.prototype.call` + RegExp.prototype.call = function (context, str) { + return this.exec(str); + }; + + + //--------------------------------- + // Overriden native methods + //--------------------------------- + + // Adds named capture support (with backreferences returned as `result.name`), and fixes two + // cross-browser issues per ES3: + // - Captured values for nonparticipating capturing groups should be returned as `undefined`, + // rather than the empty string. + // - `lastIndex` should not be incremented after zero-length matches. + RegExp.prototype.exec = function (str) { + var match, name, r2, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.apply(this, arguments); + if (match) { + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { + r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", "")); + // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed + // matching due to characters outside the match + nativ.replace.call((str + "").slice(match.index), r2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) + match[i] = undefined; + } + }); + } + // Attach named capture properties + if (this._xregexp && this._xregexp.captureNames) { + for (var i = 1; i < match.length; i++) { + name = this._xregexp.captureNames[i - 1]; + if (name) + match[name] = match[i]; + } + } + // Fix browsers that increment `lastIndex` after zero-length matches + if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + } + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return match; + }; + + // Fix browser bugs in native method + RegExp.prototype.test = function (str) { + // Use the native `exec` to skip some processing overhead, even though the altered + // `exec` would take care of the `lastIndex` fixes + var match, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.call(this, str); + // Fix browsers that increment `lastIndex` after zero-length matches + if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return !!match; + }; + + // Adds named capture support and fixes browser bugs in native method + String.prototype.match = function (regex) { + if (!XRegExp.isRegExp(regex)) + regex = RegExp(regex); // Native `RegExp` + if (regex.global) { + var result = nativ.match.apply(this, arguments); + regex.lastIndex = 0; // Fix IE bug + return result; + } + return regex.exec(this); // Run the altered `exec` + }; + + // Adds support for `${n}` tokens for named and numbered backreferences in replacement text, + // and provides named backreferences to replacement functions as `arguments[0].name`. Also + // fixes cross-browser differences in replacement text syntax when performing a replacement + // using a nonregex search value, and the value of replacement regexes' `lastIndex` property + // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary + // third (`flags`) parameter + String.prototype.replace = function (search, replacement) { + var isRegex = XRegExp.isRegExp(search), + captureNames, result, str, origLastIndex; + + // There are too many combinations of search/replacement types/values and browser bugs that + // preclude passing to native `replace`, so don't try + //if (...) + // return nativ.replace.apply(this, arguments); + + if (isRegex) { + if (search._xregexp) + captureNames = search._xregexp.captureNames; // Array or `null` + if (!search.global) + origLastIndex = search.lastIndex; + } else { + search = search + ""; // Type conversion + } + + if (Object.prototype.toString.call(replacement) === "[object Function]") { + result = nativ.replace.call(this + "", search, function () { + if (captureNames) { + // Change the `arguments[0]` string primitive to a String object which can store properties + arguments[0] = new String(arguments[0]); + // Store named backreferences on `arguments[0]` + for (var i = 0; i < captureNames.length; i++) { + if (captureNames[i]) + arguments[0][captureNames[i]] = arguments[i + 1]; + } + } + // Update `lastIndex` before calling `replacement` (fix browsers) + if (isRegex && search.global) + search.lastIndex = arguments[arguments.length - 2] + arguments[0].length; + return replacement.apply(null, arguments); + }); + } else { + str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`) + result = nativ.replace.call(str, search, function () { + var args = arguments; // Keep this function's `arguments` available through closure + return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) { + // Numbered backreference (without delimiters) or special variable + if ($1) { + switch ($1) { + case "$": return "$"; + case "&": return args[0]; + case "`": return args[args.length - 1].slice(0, args[args.length - 2]); + case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + // Numbered backreference + default: + // What does "$10" mean? + // - Backreference 10, if 10 or more capturing groups exist + // - Backreference 1 followed by "0", if 1-9 capturing groups exist + // - Otherwise, it's the string "$10" + // Also note: + // - Backreferences cannot be more than two digits (enforced by `replacementToken`) + // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01" + // - There is no "$0" token ("$&" is the entire match) + var literalNumbers = ""; + $1 = +$1; // Type conversion; drop leading zero + if (!$1) // `$1` was "0" or "00" + return $0; + while ($1 > args.length - 3) { + literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers; + $1 = Math.floor($1 / 10); // Drop the last digit + } + return ($1 ? args[$1] || "" : "$") + literalNumbers; + } + // Named backreference or delimited numbered backreference + } else { + // What does "${n}" mean? + // - Backreference to numbered capture n. Two differences from "$n": + // - n can be more than two digits + // - Backreference 0 is allowed, and is the entire match + // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture + // - Otherwise, it's the string "${n}" + var n = +$2; // Type conversion; drop leading zeros + if (n <= args.length - 3) + return args[n]; + n = captureNames ? indexOf(captureNames, $2) : -1; + return n > -1 ? args[n + 1] : $0; + } + }); + }); + } + + if (isRegex) { + if (search.global) + search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows) + else + search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + } + + return result; + }; + + // A consistent cross-browser, ES3 compliant `split` + String.prototype.split = function (s /* separator */, limit) { + // If separator `s` is not a regex, use the native `split` + if (!XRegExp.isRegExp(s)) + return nativ.split.apply(this, arguments); + + var str = this + "", // Type conversion + output = [], + lastLastIndex = 0, + match, lastLength; + + // Behavior for `limit`: if it's... + // - `undefined`: No limit + // - `NaN` or zero: Return an empty array + // - A positive number: Use `Math.floor(limit)` + // - A negative number: No limit + // - Other: Type-convert, then use the above rules + if (limit === undefined || +limit < 0) { + limit = Infinity; + } else { + limit = Math.floor(+limit); + if (!limit) + return []; + } + + // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero + // and restore it to its original value when we're done using the regex + s = XRegExp.copyAsGlobal(s); + + while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (s.lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + + if (match.length > 1 && match.index < str.length) + Array.prototype.push.apply(output, match.slice(1)); + + lastLength = match[0].length; + lastLastIndex = s.lastIndex; + + if (output.length >= limit) + break; + } + + if (s.lastIndex === match.index) + s.lastIndex++; + } + + if (lastLastIndex === str.length) { + if (!nativ.test.call(s, "") || lastLength) + output.push(""); + } else { + output.push(str.slice(lastLastIndex)); + } + + return output.length > limit ? output.slice(0, limit) : output; + }; + + + //--------------------------------- + // Private helper functions + //--------------------------------- + + // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp` + // instance with a fresh `lastIndex` (set to zero), preserving properties required for named + // capture. Also allows adding new flags in the process of copying the regex + function clone (regex, additionalFlags) { + if (!XRegExp.isRegExp(regex)) + throw TypeError("type RegExp expected"); + var x = regex._xregexp; + regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || "")); + if (x) { + regex._xregexp = { + source: x.source, + captureNames: x.captureNames ? x.captureNames.slice(0) : null + }; + } + return regex; + } + + function getNativeFlags (regex) { + return (regex.global ? "g" : "") + + (regex.ignoreCase ? "i" : "") + + (regex.multiline ? "m" : "") + + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 + (regex.sticky ? "y" : ""); + } + + function runTokens (pattern, index, scope, context) { + var i = tokens.length, + result, match, t; + // Protect against constructing XRegExps within token handler and trigger functions + isInsideConstructor = true; + // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws + try { + while (i--) { // Run in reverse order + t = tokens[i]; + if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) { + t.pattern.lastIndex = index; + match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc. + if (match && match.index === index) { + result = { + output: t.handler.call(context, match, scope), + match: match + }; + break; + } + } + } + } catch (err) { + throw err; + } finally { + isInsideConstructor = false; + } + return result; + } + + function indexOf (array, item, from) { + if (Array.prototype.indexOf) // Use the native array method if available + return array.indexOf(item, from); + for (var i = from || 0; i < array.length; i++) { + if (array[i] === item) + return i; + } + return -1; + } + + + //--------------------------------- + // Built-in tokens + //--------------------------------- + + // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the + // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS` + + // Comment pattern: (?# ) + XRegExp.addToken( + /\(\?#[^)]*\)/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + } + ); + + // Capturing group (match the opening parenthesis only). + // Required for support of named capturing groups + XRegExp.addToken( + /\((?!\?)/, + function () { + this.captureNames.push(null); + return "("; + } + ); + + // Named capturing group (match the opening delimiter only): (? + XRegExp.addToken( + /\(\?<([$\w]+)>/, + function (match) { + this.captureNames.push(match[1]); + this.hasNamedCapture = true; + return "("; + } + ); + + // Named backreference: \k + XRegExp.addToken( + /\\k<([\w$]+)>/, + function (match) { + var index = indexOf(this.captureNames, match[1]); + // Keep backreferences separate from subsequent literal numbers. Preserve back- + // references to named groups that are undefined at this point as literal strings + return index > -1 ? + "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") : + match[0]; + } + ); + + // Empty character class: [] or [^] + XRegExp.addToken( + /\[\^?]/, + function (match) { + // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. + // (?!) should work like \b\B, but is unreliable in Firefox + return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; + } + ); + + // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx) + // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc. + XRegExp.addToken( + /^\(\?([imsx]+)\)/, + function (match) { + this.setFlag(match[1]); + return ""; + } + ); + + // Whitespace and comments, in free-spacing (aka extended) mode only + XRegExp.addToken( + /(?:\s+|#.*)+/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + }, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("x");} + ); + + // Dot, in dotall (aka singleline) mode only + XRegExp.addToken( + /\./, + function () {return "[\\s\\S]";}, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("s");} + ); + + + //--------------------------------- + // Backward compatibility + //--------------------------------- + + // Uncomment the following block for compatibility with XRegExp 1.0-1.2: + /* + XRegExp.matchWithinChain = XRegExp.matchChain; + RegExp.prototype.addFlags = function (s) {return clone(this, s);}; + RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;}; + RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);}; + RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;}; + */ + +})(); + +// +// Begin anonymous function. This is used to contain local scope variables without polutting global scope. +// +if (typeof(SyntaxHighlighter) == 'undefined') var SyntaxHighlighter = function() { + +// CommonJS + if (typeof(require) != 'undefined' && typeof(XRegExp) == 'undefined') + { + XRegExp = require('XRegExp').XRegExp; + } + +// Shortcut object which will be assigned to the SyntaxHighlighter variable. +// This is a shorthand for local reference in order to avoid long namespace +// references to SyntaxHighlighter.whatever... + var sh = { + defaults : { + /** Additional CSS class names to be added to highlighter elements. */ + 'class-name' : '', + + /** First line number. */ + 'first-line' : 1, + + /** + * Pads line numbers. Possible values are: + * + * false - don't pad line numbers. + * true - automaticaly pad numbers with minimum required number of leading zeroes. + * [int] - length up to which pad line numbers. + */ + 'pad-line-numbers' : false, + + /** Lines to highlight. */ + 'highlight' : false, + + /** Title to be displayed above the code block. */ + 'title' : null, + + /** Enables or disables smart tabs. */ + 'smart-tabs' : true, + + /** Gets or sets tab size. */ + 'tab-size' : 4, + + /** Enables or disables gutter. */ + 'gutter' : true, + + /** Enables or disables toolbar. */ + 'toolbar' : true, + + /** Enables quick code copy and paste from double click. */ + 'quick-code' : true, + + /** Forces code view to be collapsed. */ + 'collapse' : false, + + /** Enables or disables automatic links. */ + 'auto-links' : false, + + /** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */ + 'light' : false, + + 'unindent' : true, + + 'html-script' : false + }, + + config : { + space : ' ', + + /** Enables use of + * + * ``` + */ + findParent: function (node, filterFn, includeSelf) { + if (node && !domUtils.isBody(node)) { + node = includeSelf ? node : node.parentNode; + while (node) { + if (!filterFn || filterFn(node) || domUtils.isBody(node)) { + return filterFn && !filterFn(node) && domUtils.isBody(node) + ? null + : node; + } + node = node.parentNode; + } + } + return null; + }, + /** + * 查找node的节点名为tagName的第一个祖先节点, 查找的起点是node节点的父节点。 + * @method findParentByTagName + * @param { Node } node 需要查找的节点对象 + * @param { Array } tagNames 需要查找的父节点的名称数组 + * @warning 查找的终点是到body节点为止 + * @return { Node | NULL } 如果找到符合条件的节点, 则返回该节点, 否则返回NULL + * @example + * ```javascript + * var node = UE.dom.domUtils.findParentByTagName( document.getElementsByTagName("div")[0], [ "BODY" ] ); + * //output: BODY + * console.log( node.tagName ); + * ``` + */ + + /** + * 查找node的节点名为tagName的祖先节点, 如果includeSelf的值为true,则查找的起点是给定的节点node, + * 否则, 起点是node的父节点。 + * @method findParentByTagName + * @param { Node } node 需要查找的节点对象 + * @param { Array } tagNames 需要查找的父节点的名称数组 + * @param { Boolean } includeSelf 查找过程是否包含node节点自身 + * @warning 查找的终点是到body节点为止 + * @return { Node | NULL } 如果找到符合条件的节点, 则返回该节点, 否则返回NULL + * @example + * ```javascript + * var queryTarget = document.getElementsByTagName("div")[0]; + * var node = UE.dom.domUtils.findParentByTagName( queryTarget, [ "DIV" ], true ); + * //output: true + * console.log( queryTarget === node ); + * ``` + */ + findParentByTagName: function (node, tagNames, includeSelf, excludeFn) { + tagNames = utils.listToMap(utils.isArray(tagNames) ? tagNames : [tagNames]); + return domUtils.findParent( + node, + function (node) { + return tagNames[node.tagName] && !(excludeFn && excludeFn(node)); + }, + includeSelf + ); + }, + /** + * 查找节点node的祖先节点集合, 查找的起点是给定节点的父节点,结果集中不包含给定的节点。 + * @method findParents + * @param { Node } node 需要查找的节点对象 + * @return { Array } 给定节点的祖先节点数组 + * @grammar UE.dom.domUtils.findParents(node) => Array //返回一个祖先节点数组集合,不包含自身 + * @grammar UE.dom.domUtils.findParents(node,includeSelf) => Array //返回一个祖先节点数组集合,includeSelf指定是否包含自身 + * @grammar UE.dom.domUtils.findParents(node,includeSelf,filterFn) => Array //返回一个祖先节点数组集合,filterFn指定过滤条件,返回true的node将被选取 + * @grammar UE.dom.domUtils.findParents(node,includeSelf,filterFn,closerFirst) => Array //返回一个祖先节点数组集合,closerFirst为true的话,node的直接父亲节点是数组的第0个 + */ + + /** + * 查找节点node的祖先节点集合, 如果includeSelf的值为true, + * 则返回的结果集中允许出现当前给定的节点, 否则, 该节点不会出现在其结果集中。 + * @method findParents + * @param { Node } node 需要查找的节点对象 + * @param { Boolean } includeSelf 查找的结果中是否允许包含当前查找的节点对象 + * @return { Array } 给定节点的祖先节点数组 + */ + findParents: function (node, includeSelf, filterFn, closerFirst) { + var parents = includeSelf && ((filterFn && filterFn(node)) || !filterFn) + ? [node] + : []; + while ((node = domUtils.findParent(node, filterFn))) { + parents.push(node); + } + return closerFirst ? parents : parents.reverse(); + }, + + /** + * 在节点node后面插入新节点newNode + * @method insertAfter + * @param { Node } node 目标节点 + * @param { Node } newNode 新插入的节点, 该节点将置于目标节点之后 + * @return { Node } 新插入的节点 + */ + insertAfter: function (node, newNode) { + return node.nextSibling + ? node.parentNode.insertBefore(newNode, node.nextSibling) + : node.parentNode.appendChild(newNode); + }, + + /** + * 删除节点node及其下属的所有节点 + * @method remove + * @param { Node } node 需要删除的节点对象 + * @return { Node } 返回刚删除的节点对象 + * @example + * ```html + *
              + *
              你好
              + *
              + * + * ``` + */ + + /** + * 删除节点node,并根据keepChildren的值决定是否保留子节点 + * @method remove + * @param { Node } node 需要删除的节点对象 + * @param { Boolean } keepChildren 是否需要保留子节点 + * @return { Node } 返回刚删除的节点对象 + * @example + * ```html + *
              + *
              你好
              + *
              + * + * ``` + */ + remove: function (node, keepChildren) { + var parent = node.parentNode, + child; + if (parent) { + if (keepChildren && node.hasChildNodes()) { + while ((child = node.firstChild)) { + parent.insertBefore(child, node); + } + } + parent.removeChild(node); + } + return node; + }, + + /** + * 取得node节点的下一个兄弟节点, 如果该节点其后没有兄弟节点, 则递归查找其父节点之后的第一个兄弟节点, + * 直到找到满足条件的节点或者递归到BODY节点之后才会结束。 + * @method getNextDomNode + * @param { Node } node 需要获取其后的兄弟节点的节点对象 + * @return { Node | NULL } 如果找满足条件的节点, 则返回该节点, 否则返回NULL + * @example + * ```html + * + *
              + * + *
              + * xxx + * + * + * ``` + * @example + * ```html + * + *
              + * + * xxx + *
              + * xxx + * + * + * ``` + */ + + /** + * 取得node节点的下一个兄弟节点, 如果startFromChild的值为ture,则先获取其子节点, + * 如果有子节点则直接返回第一个子节点;如果没有子节点或者startFromChild的值为false, + * 则执行getNextDomNode(Node node)的查找过程。 + * @method getNextDomNode + * @param { Node } node 需要获取其后的兄弟节点的节点对象 + * @param { Boolean } startFromChild 查找过程是否从其子节点开始 + * @return { Node | NULL } 如果找满足条件的节点, 则返回该节点, 否则返回NULL + * @see UE.dom.domUtils.getNextDomNode(Node) + */ + getNextDomNode: function (node, startFromChild, filterFn, guard) { + return getDomNode( + node, + "firstChild", + "nextSibling", + startFromChild, + filterFn, + guard + ); + }, + getPreDomNode: function (node, startFromChild, filterFn, guard) { + return getDomNode( + node, + "lastChild", + "previousSibling", + startFromChild, + filterFn, + guard + ); + }, + /** + * 检测节点node是否属是UEditor定义的bookmark节点 + * @method isBookmarkNode + * @private + * @param { Node } node 需要检测的节点对象 + * @return { Boolean } 是否是bookmark节点 + * @example + * ```html + * + * + * ``` + */ + isBookmarkNode: function (node) { + return node.nodeType == 1 && node.id && /^_baidu_bookmark_/i.test(node.id); + }, + /** + * 获取节点node所属的window对象 + * @method getWindow + * @param { Node } node 节点对象 + * @return { Window } 当前节点所属的window对象 + * @example + * ```javascript + * //output: true + * console.log( UE.dom.domUtils.getWindow( document.body ) === window ); + * ``` + */ + getWindow: function (node) { + var doc = node.ownerDocument || node; + return doc.defaultView || doc.parentWindow; + }, + /** + * 获取离nodeA与nodeB最近的公共的祖先节点 + * @method getCommonAncestor + * @param { Node } nodeA 第一个节点 + * @param { Node } nodeB 第二个节点 + * @remind 如果给定的两个节点是同一个节点, 将直接返回该节点。 + * @return { Node | NULL } 如果未找到公共节点, 返回NULL, 否则返回最近的公共祖先节点。 + * @example + * ```javascript + * var commonAncestor = UE.dom.domUtils.getCommonAncestor( document.body, document.body.firstChild ); + * //output: true + * console.log( commonAncestor.tagName.toLowerCase() === 'body' ); + * ``` + */ + getCommonAncestor: function (nodeA, nodeB) { + if (nodeA === nodeB) return nodeA; + var parentsA = [nodeA], + parentsB = [nodeB], + parent = nodeA, + i = -1; + while ((parent = parent.parentNode)) { + if (parent === nodeB) { + return parent; + } + parentsA.push(parent); + } + parent = nodeB; + while ((parent = parent.parentNode)) { + if (parent === nodeA) return parent; + parentsB.push(parent); + } + parentsA.reverse(); + parentsB.reverse(); + while ((i++, parentsA[i] === parentsB[i])) { + } + return i == 0 ? null : parentsA[i - 1]; + }, + /** + * 清除node节点左右连续为空的兄弟inline节点 + * @method clearEmptySibling + * @param { Node } node 执行的节点对象, 如果该节点的左右连续的兄弟节点是空的inline节点, + * 则这些兄弟节点将被删除 + * @grammar UE.dom.domUtils.clearEmptySibling(node,ignoreNext) //ignoreNext指定是否忽略右边空节点 + * @grammar UE.dom.domUtils.clearEmptySibling(node,ignoreNext,ignorePre) //ignorePre指定是否忽略左边空节点 + * @example + * ```html + * + *
              + * + * + * + * xxx + * + * + * + * ``` + */ + + /** + * 清除node节点左右连续为空的兄弟inline节点, 如果ignoreNext的值为true, + * 则忽略对右边兄弟节点的操作。 + * @method clearEmptySibling + * @param { Node } node 执行的节点对象, 如果该节点的左右连续的兄弟节点是空的inline节点, + * @param { Boolean } ignoreNext 是否忽略忽略对右边的兄弟节点的操作 + * 则这些兄弟节点将被删除 + * @see UE.dom.domUtils.clearEmptySibling(Node) + */ + + /** + * 清除node节点左右连续为空的兄弟inline节点, 如果ignoreNext的值为true, + * 则忽略对右边兄弟节点的操作, 如果ignorePre的值为true,则忽略对左边兄弟节点的操作。 + * @method clearEmptySibling + * @param { Node } node 执行的节点对象, 如果该节点的左右连续的兄弟节点是空的inline节点, + * @param { Boolean } ignoreNext 是否忽略忽略对右边的兄弟节点的操作 + * @param { Boolean } ignorePre 是否忽略忽略对左边的兄弟节点的操作 + * 则这些兄弟节点将被删除 + * @see UE.dom.domUtils.clearEmptySibling(Node) + */ + clearEmptySibling: function (node, ignoreNext, ignorePre) { + function clear(next, dir) { + var tmpNode; + while ( + next && + !domUtils.isBookmarkNode(next) && + (domUtils.isEmptyInlineElement(next) || + //这里不能把空格算进来会吧空格干掉,出现文字间的空格丢掉了 + !new RegExp("[^\t\n\r" + domUtils.fillChar + "]").test( + next.nodeValue + )) + ) { + tmpNode = next[dir]; + domUtils.remove(next); + next = tmpNode; + } + } + + !ignoreNext && clear(node.nextSibling, "nextSibling"); + !ignorePre && clear(node.previousSibling, "previousSibling"); + }, + /** + * 将一个文本节点textNode拆分成两个文本节点,offset指定拆分位置 + * @method split + * @param { Node } textNode 需要拆分的文本节点对象 + * @param { int } offset 需要拆分的位置, 位置计算从0开始 + * @return { Node } 拆分后形成的新节点 + * @example + * ```html + *
              abcdef
              + * + * ``` + */ + split: function (node, offset) { + var doc = node.ownerDocument; + if (browser.ie && offset == node.nodeValue.length) { + var next = doc.createTextNode(""); + return domUtils.insertAfter(node, next); + } + var retval = node.splitText(offset); + //ie8下splitText不会跟新childNodes,我们手动触发他的更新 + if (browser.ie8) { + var tmpNode = doc.createTextNode(""); + domUtils.insertAfter(retval, tmpNode); + domUtils.remove(tmpNode); + } + return retval; + }, + + /** + * 检测文本节点textNode是否为空节点(包括空格、换行、占位符等字符) + * @method isWhitespace + * @param { Node } node 需要检测的节点对象 + * @return { Boolean } 检测的节点是否为空 + * @example + * ```html + *
              + * + *
              + * + * ``` + */ + isWhitespace: function (node) { + return !new RegExp("[^ \t\n\r" + domUtils.fillChar + "]").test( + node.nodeValue + ); + }, + /** + * 获取元素element相对于viewport的位置坐标 + * @method getXY + * @param { Node } element 需要计算位置的节点对象 + * @return { Object } 返回形如{x:left,y:top}的一个key-value映射对象, 其中键x代表水平偏移距离, + * y代表垂直偏移距离。 + * + * @example + * ```javascript + * var location = UE.dom.domUtils.getXY( document.getElementById("test") ); + * //output: test的坐标为: 12, 24 + * console.log( 'test的坐标为: ', location.x, ',', location.y ); + * ``` + */ + getXY: function (element) { + var x = 0, + y = 0; + while (element.offsetParent) { + y += element.offsetTop; + x += element.offsetLeft; + element = element.offsetParent; + } + return {x: x, y: y}; + }, + /** + * 为元素element绑定原生DOM事件,type为事件类型,handler为处理函数 + * @method on + * @param { Node } element 需要绑定事件的节点对象 + * @param { String } type 绑定的事件类型 + * @param { Function } handler 事件处理器 + * @example + * ```javascript + * UE.dom.domUtils.on(document.body,"click",function(e){ + * //e为事件对象,this为被点击元素对戏那个 + * }); + * ``` + */ + + /** + * 为元素element绑定原生DOM事件,type为事件类型,handler为处理函数 + * @method on + * @param { Node } element 需要绑定事件的节点对象 + * @param {string} type 绑定的事件类型数组 + * @param { Function } handler 事件处理器 + * @example + * ```javascript + * UE.dom.domUtils.on(document.body,["click","mousedown"],function(evt){ + * //evt为事件对象,this为被点击元素对象 + * }); + * ``` + */ + on: function (element, type, handler) { + var types = utils.isArray(type) ? type : utils.trim(type).split(/\s+/), + k = types.length; + if (k) + while (k--) { + type = types[k]; + if (element.addEventListener) { + element.addEventListener(type, handler, false); + } else { + if (!handler._d) { + handler._d = { + els: [] + }; + } + var key = type + handler.toString(), + index = utils.indexOf(handler._d.els, element); + if (!handler._d[key] || index == -1) { + if (index == -1) { + handler._d.els.push(element); + } + if (!handler._d[key]) { + handler._d[key] = function (evt) { + return handler.call(evt.srcElement, evt || window.event); + }; + } + + element.attachEvent("on" + type, handler._d[key]); + } + } + } + element = null; + }, + /** + * 解除DOM事件绑定 + * @method un + * @param { Node } element 需要解除事件绑定的节点对象 + * @param { String } type 需要接触绑定的事件类型 + * @param { Function } handler 对应的事件处理器 + * @example + * ```javascript + * UE.dom.domUtils.un(document.body,"click",function(evt){ + * //evt为事件对象,this为被点击元素对象 + * }); + * ``` + */ + + /** + * 解除DOM事件绑定 + * @method un + * @param { Node } element 需要解除事件绑定的节点对象 + * @param { Array } type 需要接触绑定的事件类型数组 + * @param { Function } handler 对应的事件处理器 + * @example + * ```javascript + * UE.dom.domUtils.un(document.body, ["click","mousedown"],function(evt){ + * //evt为事件对象,this为被点击元素对象 + * }); + * ``` + */ + un: function (element, type, handler) { + var types = utils.isArray(type) ? type : utils.trim(type).split(/\s+/), + k = types.length; + if (k) + while (k--) { + type = types[k]; + if (element.removeEventListener) { + element.removeEventListener(type, handler, false); + } else { + var key = type + handler.toString(); + try { + element.detachEvent( + "on" + type, + handler._d ? handler._d[key] : handler + ); + } catch (e) { + } + if (handler._d && handler._d[key]) { + var index = utils.indexOf(handler._d.els, element); + if (index != -1) { + handler._d.els.splice(index, 1); + } + handler._d.els.length == 0 && delete handler._d[key]; + } + } + } + }, + + /** + * 比较节点nodeA与节点nodeB是否具有相同的标签名、属性名以及属性值 + * @method isSameElement + * @param { Node } nodeA 需要比较的节点 + * @param { Node } nodeB 需要比较的节点 + * @return { Boolean } 两个节点是否具有相同的标签名、属性名以及属性值 + * @example + * ```html + * ssss + * bbbbb + * ssss + * bbbbb + * + * + * ``` + */ + isSameElement: function (nodeA, nodeB) { + if (nodeA.tagName != nodeB.tagName) { + return false; + } + var thisAttrs = nodeA.attributes, + otherAttrs = nodeB.attributes; + if (!ie && thisAttrs.length != otherAttrs.length) { + return false; + } + var attrA, + attrB, + al = 0, + bl = 0; + for (var i = 0; (attrA = thisAttrs[i++]);) { + if (attrA.nodeName == "style") { + if (attrA.specified) { + al++; + } + if (domUtils.isSameStyle(nodeA, nodeB)) { + continue; + } else { + return false; + } + } + if (ie) { + if (attrA.specified) { + al++; + attrB = otherAttrs.getNamedItem(attrA.nodeName); + } else { + continue; + } + } else { + attrB = nodeB.attributes[attrA.nodeName]; + } + if (!attrB.specified || attrA.nodeValue != attrB.nodeValue) { + return false; + } + } + // 有可能attrB的属性包含了attrA的属性之外还有自己的属性 + if (ie) { + for (i = 0; (attrB = otherAttrs[i++]);) { + if (attrB.specified) { + bl++; + } + } + if (al != bl) { + return false; + } + } + return true; + }, + + /** + * 判断节点nodeA与节点nodeB的元素的style属性是否一致 + * @method isSameStyle + * @param { Node } nodeA 需要比较的节点 + * @param { Node } nodeB 需要比较的节点 + * @return { Boolean } 两个节点是否具有相同的style属性值 + * @example + * ```html + * ssss + * bbbbb + * ssss + * bbbbb + * + * + * ``` + */ + isSameStyle: function (nodeA, nodeB) { + var styleA = nodeA.style.cssText + .replace(/( ?; ?)/g, ";") + .replace(/( ?: ?)/g, ":"), + styleB = nodeB.style.cssText + .replace(/( ?; ?)/g, ";") + .replace(/( ?: ?)/g, ":"); + if (browser.opera) { + styleA = nodeA.style; + styleB = nodeB.style; + if (styleA.length != styleB.length) return false; + for (var p in styleA) { + if (/^(\d+|csstext)$/i.test(p)) { + continue; + } + if (styleA[p] != styleB[p]) { + return false; + } + } + return true; + } + if (!styleA || !styleB) { + return styleA == styleB; + } + styleA = styleA.split(";"); + styleB = styleB.split(";"); + if (styleA.length != styleB.length) { + return false; + } + for (var i = 0, ci; (ci = styleA[i++]);) { + if (utils.indexOf(styleB, ci) == -1) { + return false; + } + } + return true; + }, + /** + * 检查节点node是否为block元素 + * @method isBlockElm + * @param { Node } node 需要检测的节点对象 + * @return { Boolean } 是否是block元素节点 + * @warning 该方法的判断规则如下: 如果该元素原本是block元素, 则不论该元素当前的css样式是什么都会返回true; + * 否则,检测该元素的css样式, 如果该元素当前是block元素, 则返回true。 其余情况下都返回false。 + * @example + * ```html + * + * + *
              + * + * + * ``` + */ + isBlockElm: function (node) { + return ( + node.nodeType == 1 && + (dtd.$block[node.tagName] || + styleBlock[domUtils.getComputedStyle(node, "display")]) && + !dtd.$nonChild[node.tagName] + ); + }, + /** + * 检测node节点是否为body节点 + * @method isBody + * @param { Element } node 需要检测的dom元素 + * @return { Boolean } 给定的元素是否是body元素 + * @example + * ```javascript + * //output: true + * console.log( UE.dom.domUtils.isBody( document.body ) ); + * ``` + */ + isBody: function (node) { + return node && node.nodeType == 1 && node.tagName.toLowerCase() == "body"; + }, + /** + * 以node节点为分界,将该节点的指定祖先节点parent拆分成两个独立的节点, + * 拆分形成的两个节点之间是node节点 + * @method breakParent + * @param { Node } node 作为分界的节点对象 + * @param { Node } parent 该节点必须是node节点的祖先节点, 且是block节点。 + * @return { Node } 给定的node分界节点 + * @example + * ```javascript + * + * var node = document.createElement("span"), + * wrapNode = document.createElement( "div" ), + * parent = document.createElement("p"); + * + * parent.appendChild( node ); + * wrapNode.appendChild( parent ); + * + * //拆分前 + * //output:

              + * console.log( wrapNode.innerHTML ); + * + * + * UE.dom.domUtils.breakParent( node, parent ); + * //拆分后 + * //output:

              + * console.log( wrapNode.innerHTML ); + * + * ``` + */ + breakParent: function (node, parent) { + var tmpNode, + parentClone = node, + clone = node, + leftNodes, + rightNodes; + do { + parentClone = parentClone.parentNode; + if (leftNodes) { + tmpNode = parentClone.cloneNode(false); + tmpNode.appendChild(leftNodes); + leftNodes = tmpNode; + tmpNode = parentClone.cloneNode(false); + tmpNode.appendChild(rightNodes); + rightNodes = tmpNode; + } else { + leftNodes = parentClone.cloneNode(false); + rightNodes = leftNodes.cloneNode(false); + } + while ((tmpNode = clone.previousSibling)) { + leftNodes.insertBefore(tmpNode, leftNodes.firstChild); + } + while ((tmpNode = clone.nextSibling)) { + rightNodes.appendChild(tmpNode); + } + clone = parentClone; + } while (parent !== parentClone); + tmpNode = parent.parentNode; + tmpNode.insertBefore(leftNodes, parent); + tmpNode.insertBefore(rightNodes, parent); + tmpNode.insertBefore(node, rightNodes); + domUtils.remove(parent); + return node; + }, + /** + * 检查节点node是否是空inline节点 + * @method isEmptyInlineElement + * @param { Node } node 需要检测的节点对象 + * @return { Number } 如果给定的节点是空的inline节点, 则返回1, 否则返回0。 + * @example + * ```html + * => 1 + * => 1 + * => 1 + * xx => 0 + * ``` + */ + isEmptyInlineElement: function (node) { + if (node.nodeType != 1 || !dtd.$removeEmpty[node.tagName]) { + return 0; + } + node = node.firstChild; + while (node) { + //如果是创建的bookmark就跳过 + if (domUtils.isBookmarkNode(node)) { + return 0; + } + if ( + (node.nodeType == 1 && !domUtils.isEmptyInlineElement(node)) || + (node.nodeType == 3 && !domUtils.isWhitespace(node)) + ) { + return 0; + } + node = node.nextSibling; + } + return 1; + }, + + /** + * 删除node节点下首尾两端的空白文本子节点 + * @method trimWhiteTextNode + * @param { Element } node 需要执行删除操作的元素对象 + * @example + * ```javascript + * var node = document.createElement("div"); + * + * node.appendChild( document.createTextNode( "" ) ); + * + * node.appendChild( document.createElement("div") ); + * + * node.appendChild( document.createTextNode( "" ) ); + * + * //3 + * console.log( node.childNodes.length ); + * + * UE.dom.domUtils.trimWhiteTextNode( node ); + * + * //1 + * console.log( node.childNodes.length ); + * ``` + */ + trimWhiteTextNode: function (node) { + function remove(dir) { + var child; + while ( + (child = node[dir]) && + child.nodeType == 3 && + domUtils.isWhitespace(child) + ) { + node.removeChild(child); + } + } + + remove("firstChild"); + remove("lastChild"); + }, + + /** + * 合并node节点下相同的子节点 + * @name mergeChild + * @desc + * UE.dom.domUtils.mergeChild(node,tagName) //tagName要合并的子节点的标签 + * @example + *

              xxaaxx

              + * ==> UE.dom.domUtils.mergeChild(node,'span') + *

              xxaaxx

              + */ + mergeChild: function (node, tagName, attrs) { + var list = domUtils.getElementsByTagName(node, node.tagName.toLowerCase()); + for (var i = 0, ci; (ci = list[i++]);) { + if (!ci.parentNode || domUtils.isBookmarkNode(ci)) { + continue; + } + //span单独处理 + if (ci.tagName.toLowerCase() == "span") { + if (node === ci.parentNode) { + domUtils.trimWhiteTextNode(node); + if (node.childNodes.length == 1) { + node.style.cssText = ci.style.cssText + ";" + node.style.cssText; + domUtils.remove(ci, true); + continue; + } + } + ci.style.cssText = node.style.cssText + ";" + ci.style.cssText; + if (attrs) { + var style = attrs.style; + if (style) { + style = style.split(";"); + for (var j = 0, s; (s = style[j++]);) { + ci.style[utils.cssStyleToDomStyle(s.split(":")[0])] = s.split( + ":" + )[1]; + } + } + } + if (domUtils.isSameStyle(ci, node)) { + domUtils.remove(ci, true); + } + continue; + } + if (domUtils.isSameElement(node, ci)) { + domUtils.remove(ci, true); + } + } + }, + + /** + * 原生方法getElementsByTagName的封装 + * @method getElementsByTagName + * @param { Node } node 目标节点对象 + * @param { String } tagName 需要查找的节点的tagName, 多个tagName以空格分割 + * @return { Array } 符合条件的节点集合 + */ + getElementsByTagName: function (node, tagName, filter) { + if (filter && utils.isString(filter)) { + var className = filter; + filter = function (node) { + return domUtils.hasClass(node, className); + }; + } + tagName = utils.trim(tagName).replace(/[ ]{2,}/g, " ").split(" "); + var arr = []; + for (var n = 0, ni; (ni = tagName[n++]);) { + var list = node.getElementsByTagName(ni); + for (var i = 0, ci; (ci = list[i++]);) { + if (!filter || filter(ci)) arr.push(ci); + } + } + + return arr; + }, + /** + * 将节点node提取到父节点上 + * @method mergeToParent + * @param { Element } node 需要提取的元素对象 + * @example + * ```html + *
              + *
              + * + *
              + *
              + * + * + * ``` + */ + mergeToParent: function (node) { + var parent = node.parentNode; + while (parent && dtd.$removeEmpty[parent.tagName]) { + if (parent.tagName == node.tagName || parent.tagName == "A") { + //针对a标签单独处理 + domUtils.trimWhiteTextNode(parent); + //span需要特殊处理 不处理这样的情况 xxxxxxxxx + if ( + (parent.tagName == "SPAN" && !domUtils.isSameStyle(parent, node)) || + (parent.tagName == "A" && node.tagName == "SPAN") + ) { + if (parent.childNodes.length > 1 || parent !== node.parentNode) { + node.style.cssText = + parent.style.cssText + ";" + node.style.cssText; + parent = parent.parentNode; + continue; + } else { + parent.style.cssText += ";" + node.style.cssText; + //trace:952 a标签要保持下划线 + if (parent.tagName == "A") { + parent.style.textDecoration = "underline"; + } + } + } + if (parent.tagName != "A") { + parent === node.parentNode && domUtils.remove(node, true); + break; + } + } + parent = parent.parentNode; + } + }, + /** + * 合并节点node的左右兄弟节点 + * @method mergeSibling + * @param { Element } node 需要合并的目标节点 + * @example + * ```html + * xxxxoooxxxx + * + * + * ``` + */ + + /** + * 合并节点node的左右兄弟节点, 可以根据给定的条件选择是否忽略合并左节点。 + * @method mergeSibling + * @param { Element } node 需要合并的目标节点 + * @param { Boolean } ignorePre 是否忽略合并左节点 + * @example + * ```html + * xxxxoooxxxx + * + * + * ``` + */ + + /** + * 合并节点node的左右兄弟节点,可以根据给定的条件选择是否忽略合并左右节点。 + * @method mergeSibling + * @param { Element } node 需要合并的目标节点 + * @param { Boolean } ignorePre 是否忽略合并左节点 + * @param { Boolean } ignoreNext 是否忽略合并右节点 + * @remind 如果同时忽略左右节点, 则该操作什么也不会做 + * @example + * ```html + * xxxxoooxxxx + * + * + * ``` + */ + mergeSibling: function (node, ignorePre, ignoreNext) { + function merge(rtl, start, node) { + var next; + if ( + (next = node[rtl]) && + !domUtils.isBookmarkNode(next) && + next.nodeType == 1 && + domUtils.isSameElement(node, next) + ) { + while (next.firstChild) { + if (start == "firstChild") { + node.insertBefore(next.lastChild, node.firstChild); + } else { + node.appendChild(next.firstChild); + } + } + domUtils.remove(next); + } + } + + !ignorePre && merge("previousSibling", "firstChild", node); + !ignoreNext && merge("nextSibling", "lastChild", node); + }, + + /** + * 设置节点node及其子节点不会被选中 + * @method unSelectable + * @param { Element } node 需要执行操作的dom元素 + * @remind 执行该操作后的节点, 将不能被鼠标选中 + * @example + * ```javascript + * UE.dom.domUtils.unSelectable( document.body ); + * ``` + */ + unSelectable: (ie && browser.ie9below) || browser.opera + ? function (node) { + //for ie9 + node.onselectstart = function () { + return false; + }; + node.onclick = node.onkeyup = node.onkeydown = function () { + return false; + }; + node.unselectable = "on"; + node.setAttribute("unselectable", "on"); + for (var i = 0, ci; (ci = node.all[i++]);) { + switch (ci.tagName.toLowerCase()) { + case "iframe": + case "textarea": + case "input": + case "select": + break; + default: + ci.unselectable = "on"; + node.setAttribute("unselectable", "on"); + } + } + } + : function (node) { + node.style.MozUserSelect = node.style.webkitUserSelect = node.style.msUserSelect = node.style.KhtmlUserSelect = + "none"; + }, + /** + * 删除节点node上的指定属性名称的属性 + * @method removeAttributes + * @param { Node } node 需要删除属性的节点对象 + * @param { String } attrNames 可以是空格隔开的多个属性名称,该操作将会依次删除相应的属性 + * @example + * ```html + *
              + * xxxxx + *
              + * + * + * ``` + */ + + /** + * 删除节点node上的指定属性名称的属性 + * @method removeAttributes + * @param { Node } node 需要删除属性的节点对象 + * @param { Array } attrNames 需要删除的属性名数组 + * @example + * ```html + *
              + * xxxxx + *
              + * + * + * ``` + */ + removeAttributes: function (node, attrNames) { + attrNames = utils.isArray(attrNames) + ? attrNames + : utils.trim(attrNames).replace(/[ ]{2,}/g, " ").split(" "); + for (var i = 0, ci; (ci = attrNames[i++]);) { + ci = attrFix[ci] || ci; + switch (ci) { + case "className": + node[ci] = ""; + break; + case "style": + node.style.cssText = ""; + var val = node.getAttributeNode("style"); + !browser.ie && val && node.removeAttributeNode(val); + } + node.removeAttribute(ci); + } + }, + /** + * 在doc下创建一个标签名为tag,属性为attrs的元素 + * @method createElement + * @param { DomDocument } doc 新创建的元素属于该document节点创建 + * @param { String } tagName 需要创建的元素的标签名 + * @param { Object } attrs 新创建的元素的属性key-value集合 + * @return { Element } 新创建的元素对象 + * @example + * ```javascript + * var ele = UE.dom.domUtils.createElement( document, 'div', { + * id: 'test' + * } ); + * + * //output: DIV + * console.log( ele.tagName ); + * + * //output: test + * console.log( ele.id ); + * + * ``` + */ + createElement: function (doc, tag, attrs) { + return domUtils.setAttributes(doc.createElement(tag), attrs); + }, + /** + * 为节点node添加属性attrs,attrs为属性键值对 + * @method setAttributes + * @param { Element } node 需要设置属性的元素对象 + * @param { Object } attrs 需要设置的属性名-值对 + * @return { Element } 设置属性的元素对象 + * @example + * ```html + * + * + * + * + */ + setAttributes: function (node, attrs) { + for (var attr in attrs) { + if ('_propertyDelete' === attr) { + for (var j = 0; j < attrs[attr].length; j++) { + if (node.hasAttribute(attrs[attr][j])) { + node.removeAttribute(attrs[attr][j]); + } + } + continue; + } + if (attrs.hasOwnProperty(attr)) { + var value = attrs[attr]; + switch (attr) { + case "class": + //ie下要这样赋值,setAttribute不起作用 + node.className = value; + break; + case "style": + node.style.cssText = node.style.cssText + ";" + value; + break; + case "innerHTML": + node[attr] = value; + break; + case "value": + node.value = value; + break; + default: + node.setAttribute(attrFix[attr] || attr, value); + } + } + } + return node; + }, + + /** + * 获取元素element经过计算后的样式值 + * @method getComputedStyle + * @param { Element } element 需要获取样式的元素对象 + * @param { String } styleName 需要获取的样式名 + * @return { String } 获取到的样式值 + * @example + * ```html + * + * + * + * + * + * ``` + */ + getComputedStyle: function (element, styleName) { + //以下的属性单独处理 + var pros = "width height top left"; + + if (pros.indexOf(styleName) > -1) { + return ( + element[ + "offset" + + styleName.replace(/^\w/, function (s) { + return s.toUpperCase(); + }) + ] + "px" + ); + } + //忽略文本节点 + if (element.nodeType === 3) { + element = element.parentNode; + } + //ie下font-size若body下定义了font-size,则从currentStyle里会取到这个font-size. 取不到实际值,故此修改. + if ( + browser.ie && + browser.version < 9 && + styleName === "font-size" && + !element.style.fontSize && + !dtd.$empty[element.tagName] && + !dtd.$nonChild[element.tagName] + ) { + var span = element.ownerDocument.createElement("span"); + span.style.cssText = "padding:0;border:0;font-family:simsun;"; + span.innerHTML = "."; + element.appendChild(span); + var result = span.offsetHeight; + element.removeChild(span); + span = null; + return result + "px"; + } + try { + var value = + domUtils.getStyle(element, styleName) || + (window.getComputedStyle + ? domUtils + .getWindow(element) + .getComputedStyle(element, "") + .getPropertyValue(styleName) + : (element.currentStyle || element.style)[ + utils.cssStyleToDomStyle(styleName) + ]); + } catch (e) { + return ""; + } + return utils.transUnitToPx(utils.fixColor(styleName, value)); + }, + /** + * 删除元素element指定的className + * @method removeClasses + * @param { Element } ele 需要删除class的元素节点 + * @param { String } classNames 需要删除的className, 多个className之间以空格分开 + * @example + * ```html + * xxx + * + * + * ``` + */ + + /** + * 删除元素element指定的className + * @method removeClasses + * @param { Element } ele 需要删除class的元素节点 + * @param { Array } classNames 需要删除的className数组 + * @example + * ```html + * xxx + * + * + * ``` + */ + removeClasses: function (elm, classNames) { + classNames = utils.isArray(classNames) + ? classNames + : utils.trim(classNames).replace(/[ ]{2,}/g, " ").split(" "); + for (var i = 0, ci, cls = elm.className; (ci = classNames[i++]);) { + cls = cls.replace(new RegExp("\\b" + ci + "\\b"), ""); + } + cls = utils.trim(cls).replace(/[ ]{2,}/g, " "); + if (cls) { + elm.className = cls; + } else { + domUtils.removeAttributes(elm, ["class"]); + } + }, + /** + * 给元素element添加className + * @method addClass + * @param { Node } ele 需要增加className的元素 + * @param { String } classNames 需要添加的className, 多个className之间以空格分割 + * @remind 相同的类名不会被重复添加 + * @example + * ```html + * + * + * + * ``` + */ + + /** + * 判断元素element是否包含给定的样式类名className + * @method hasClass + * @param { Node } ele 需要检测的元素 + * @param { Array } classNames 需要检测的className数组 + * @return { Boolean } 元素是否包含所有给定的className + * @example + * ```html + * + * + * + * ``` + */ + hasClass: function (element, className) { + if (utils.isRegExp(className)) { + return className.test(element.className); + } + className = utils.trim(className).replace(/[ ]{2,}/g, " ").split(" "); + for (var i = 0, ci, cls = element.className; (ci = className[i++]);) { + if (!new RegExp("\\b" + ci + "\\b", "i").test(cls)) { + return false; + } + } + return i - 1 == className.length; + }, + + /** + * 阻止事件默认行为 + * @method preventDefault + * @param { Event } evt 需要阻止默认行为的事件对象 + * @example + * ```javascript + * UE.dom.domUtils.preventDefault( evt ); + * ``` + */ + preventDefault: function (evt) { + evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); + }, + /** + * 删除元素element指定的样式 + * @method removeStyle + * @param { Element } element 需要删除样式的元素 + * @param { String } styleName 需要删除的样式名 + * @example + * ```html + * + * + * + * ``` + */ + removeStyle: function (element, name) { + if (browser.ie) { + //针对color先单独处理一下 + if (name == "color") { + name = "(^|;)" + name; + } + element.style.cssText = element.style.cssText.replace( + new RegExp(name + "[^:]*:[^;]+;?", "ig"), + "" + ); + } else { + if (element.style.removeProperty) { + element.style.removeProperty(name); + } else { + element.style.removeAttribute(utils.cssStyleToDomStyle(name)); + } + } + + if (!element.style.cssText) { + domUtils.removeAttributes(element, ["style"]); + } + }, + /** + * 获取元素element的style属性的指定值 + * @method getStyle + * @param { Element } element 需要获取属性值的元素 + * @param { String } styleName 需要获取的style的名称 + * @warning 该方法仅获取元素style属性中所标明的值 + * @return { String } 该元素包含指定的style属性值 + * @example + * ```html + *
              + * + * + * ``` + */ + getStyle: function (element, name) { + var value = element.style[utils.cssStyleToDomStyle(name)]; + return utils.fixColor(name, value); + }, + /** + * 为元素element设置样式属性值 + * @method setStyle + * @param { Element } element 需要设置样式的元素 + * @param { String } styleName 样式名 + * @param { String } styleValue 样式值 + * @example + * ```html + *
              + * + * + * ``` + */ + setStyle: function (element, name, value) { + element.style[utils.cssStyleToDomStyle(name)] = value; + if (!utils.trim(element.style.cssText)) { + this.removeAttributes(element, "style"); + } + }, + /** + * 为元素element设置多个样式属性值 + * @method setStyles + * @param { Element } element 需要设置样式的元素 + * @param { Object } styles 样式名值对 + * @example + * ```html + *
              + * + * + * ``` + */ + setStyles: function (element, styles) { + for (var name in styles) { + if (styles.hasOwnProperty(name)) { + domUtils.setStyle(element, name, styles[name]); + } + } + }, + /** + * 删除_moz_dirty属性 + * @private + * @method removeDirtyAttr + */ + removeDirtyAttr: function (node) { + for ( + var i = 0, ci, nodes = node.getElementsByTagName("*"); + (ci = nodes[i++]); + ) { + ci.removeAttribute("_moz_dirty"); + } + node.removeAttribute("_moz_dirty"); + }, + /** + * 获取子节点的数量 + * @method getChildCount + * @param { Element } node 需要检测的元素 + * @return { Number } 给定的node元素的子节点数量 + * @example + * ```html + *
              + * + *
              + * + * + * ``` + */ + + /** + * 根据给定的过滤规则, 获取符合条件的子节点的数量 + * @method getChildCount + * @param { Element } node 需要检测的元素 + * @param { Function } fn 过滤器, 要求对符合条件的子节点返回true, 反之则要求返回false + * @return { Number } 符合过滤条件的node元素的子节点数量 + * @example + * ```html + *
              + * + *
              + * + * + * ``` + */ + getChildCount: function (node, fn) { + var count = 0, + first = node.firstChild; + fn = + fn || + function () { + return 1; + }; + while (first) { + if (fn(first)) { + count++; + } + first = first.nextSibling; + } + return count; + }, + + /** + * 判断给定节点是否为空节点 + * @method isEmptyNode + * @param { Node } node 需要检测的节点对象 + * @return { Boolean } 节点是否为空 + * @example + * ```javascript + * UE.dom.domUtils.isEmptyNode( document.body ); + * ``` + */ + isEmptyNode: function (node) { + return ( + !node.firstChild || + domUtils.getChildCount(node, function (node) { + return ( + !domUtils.isBr(node) && + !domUtils.isBookmarkNode(node) && + !domUtils.isWhitespace(node) + ); + }) == 0 + ); + }, + clearSelectedArr: function (nodes) { + var node; + while ((node = nodes.pop())) { + domUtils.removeAttributes(node, ["class"]); + } + }, + /** + * 将显示区域滚动到指定节点的位置 + * @method scrollToView + * @param {Node} node 节点 + * @param {window} win window对象 + * @param {Number} offsetTop 距离上方的偏移量 + */ + scrollToView: function (node, win, offsetTop) { + offsetTop = offsetTop || 0 + var getViewPaneSize = function () { + var doc = win.document, + mode = doc.compatMode == "CSS1Compat"; + return { + width: + (mode ? doc.documentElement.clientWidth : doc.body.clientWidth) || 0, + height: + (mode ? doc.documentElement.clientHeight : doc.body.clientHeight) || 0 + }; + }, + getScrollPosition = function (win) { + if ("pageXOffset" in win) { + return { + x: win.pageXOffset || 0, + y: win.pageYOffset || 0 + }; + } else { + var doc = win.document; + return { + x: doc.documentElement.scrollLeft || doc.body.scrollLeft || 0, + y: doc.documentElement.scrollTop || doc.body.scrollTop || 0 + }; + } + }; + var winHeight = getViewPaneSize().height, + offset = winHeight * -1 + offsetTop; + offset += node.offsetHeight || 0; + var elementPosition = domUtils.getXY(node); + offset += elementPosition.y; + var currentScroll = getScrollPosition(win).y; + // console.log({currentScroll,winHeight,offset,y:elementPosition.y}); + // offset += 50; + if (offset > currentScroll || offset < currentScroll - winHeight) { + win.scrollTo({ + top: offset + (offset < 0 ? -20 : 20), + behavior: "smooth" + }); + } + }, + /** + * 判断给定节点是否为br + * @method isBr + * @param { Node } node 需要判断的节点对象 + * @return { Boolean } 给定的节点是否是br节点 + */ + isBr: function (node) { + return node.nodeType == 1 && node.tagName == "BR"; + }, + /** + * 判断给定的节点是否是一个“填充”节点 + * @private + * @method isFillChar + * @param { Node } node 需要判断的节点 + * @param { Boolean } isInStart 是否从节点内容的开始位置匹配 + * @returns { Boolean } 节点是否是填充节点 + */ + isFillChar: function (node, isInStart) { + if (node.nodeType != 3) return false; + var text = node.nodeValue; + if (isInStart) { + return new RegExp("^" + domUtils.fillChar).test(text); + } + return !text.replace(new RegExp(domUtils.fillChar, "g"), "").length; + }, + isStartInblock: function (range) { + var tmpRange = range.cloneRange(), + flag = 0, + start = tmpRange.startContainer, + tmp; + if (start.nodeType == 1 && start.childNodes[tmpRange.startOffset]) { + start = start.childNodes[tmpRange.startOffset]; + var pre = start.previousSibling; + while (pre && domUtils.isFillChar(pre)) { + start = pre; + pre = pre.previousSibling; + } + } + if (this.isFillChar(start, true) && tmpRange.startOffset == 1) { + tmpRange.setStartBefore(start); + start = tmpRange.startContainer; + } + + while (start && domUtils.isFillChar(start)) { + tmp = start; + start = start.previousSibling; + } + if (tmp) { + tmpRange.setStartBefore(tmp); + start = tmpRange.startContainer; + } + if ( + start.nodeType == 1 && + domUtils.isEmptyNode(start) && + tmpRange.startOffset == 1 + ) { + tmpRange.setStart(start, 0).collapse(true); + } + while (!tmpRange.startOffset) { + start = tmpRange.startContainer; + if (domUtils.isBlockElm(start) || domUtils.isBody(start)) { + flag = 1; + break; + } + var pre = tmpRange.startContainer.previousSibling, + tmpNode; + if (!pre) { + tmpRange.setStartBefore(tmpRange.startContainer); + } else { + while (pre && domUtils.isFillChar(pre)) { + tmpNode = pre; + pre = pre.previousSibling; + } + if (tmpNode) { + tmpRange.setStartBefore(tmpNode); + } else { + tmpRange.setStartBefore(tmpRange.startContainer); + } + } + } + return flag && !domUtils.isBody(tmpRange.startContainer) ? 1 : 0; + }, + + /** + * 判断给定的元素是否是一个空元素 + * @method isEmptyBlock + * @param { Element } node 需要判断的元素 + * @return { Boolean } 是否是空元素 + * @example + * ```html + *
              + * + * + * ``` + */ + + /** + * 根据指定的判断规则判断给定的元素是否是一个空元素 + * @method isEmptyBlock + * @param { Element } node 需要判断的元素 + * @param { RegExp } reg 对内容执行判断的正则表达式对象 + * @return { Boolean } 是否是空元素 + */ + isEmptyBlock: function (node, reg) { + if (node.nodeType != 1) return 0; + reg = reg || new RegExp("[ \xa0\t\r\n" + domUtils.fillChar + "]", "g"); + + if ( + node[browser.ie ? "innerText" : "textContent"].replace(reg, "").length > 0 + ) { + return 0; + } + for (var n in dtd.$isNotEmpty) { + if (node.getElementsByTagName(n).length) { + return 0; + } + } + return 1; + }, + + /** + * 移动元素使得该元素的位置移动指定的偏移量的距离 + * @method setViewportOffset + * @param { Element } element 需要设置偏移量的元素 + * @param { Object } offset 偏移量, 形如{ left: 100, top: 50 }的一个键值对, 表示该元素将在 + * 现有的位置上向水平方向偏移offset.left的距离, 在竖直方向上偏移 + * offset.top的距离 + * @example + * ```html + *
              + * + * + * ``` + */ + setViewportOffset: function (element, offset) { + var left = parseInt(element.style.left) | 0; + var top = parseInt(element.style.top) | 0; + var rect = element.getBoundingClientRect(); + var offsetLeft = offset.left - rect.left; + var offsetTop = offset.top - rect.top; + if (offsetLeft) { + element.style.left = left + offsetLeft + "px"; + } + if (offsetTop) { + element.style.top = top + offsetTop + "px"; + } + }, + + /** + * 用“填充字符”填充节点 + * @method fillNode + * @private + * @param { DomDocument } doc 填充的节点所在的docment对象 + * @param { Node } node 需要填充的节点对象 + * @example + * ```html + *
              + * + * + * ``` + */ + fillNode: function (doc, node) { + var tmpNode = browser.ie + ? doc.createTextNode(domUtils.fillChar) + : doc.createElement("br"); + node.innerHTML = ""; + node.appendChild(tmpNode); + }, + + /** + * 把节点src的所有子节点追加到另一个节点tag上去 + * @method moveChild + * @param { Node } src 源节点, 该节点下的所有子节点将被移除 + * @param { Node } tag 目标节点, 从源节点移除的子节点将被追加到该节点下 + * @example + * ```html + *
              + * + *
              + *
              + *
              + *
              + * + * + * ``` + */ + + /** + * 把节点src的所有子节点移动到另一个节点tag上去, 可以通过dir参数控制附加的行为是“追加”还是“插入顶部” + * @method moveChild + * @param { Node } src 源节点, 该节点下的所有子节点将被移除 + * @param { Node } tag 目标节点, 从源节点移除的子节点将被附加到该节点下 + * @param { Boolean } dir 附加方式, 如果为true, 则附加进去的节点将被放到目标节点的顶部, 反之,则放到末尾 + * @example + * ```html + *
              + * + *
              + *
              + *
              + *
              + * + * + * ``` + */ + moveChild: function (src, tag, dir) { + while (src.firstChild) { + if (dir && tag.firstChild) { + tag.insertBefore(src.lastChild, tag.firstChild); + } else { + tag.appendChild(src.firstChild); + } + } + }, + + /** + * 判断节点的标签上是否不存在任何属性 + * @method hasNoAttributes + * @private + * @param { Node } node 需要检测的节点对象 + * @return { Boolean } 节点是否不包含任何属性 + * @example + * ```html + *
              xxxx
              + * + * + * ``` + */ + hasNoAttributes: function (node) { + return browser.ie + ? /^<\w+\s*?>/.test(node.outerHTML) + : node.attributes.length == 0; + }, + + /** + * 检测节点是否是UEditor所使用的辅助节点 + * @method isCustomeNode + * @private + * @param { Node } node 需要检测的节点 + * @remind 辅助节点是指编辑器要完成工作临时添加的节点, 在输出的时候将会从编辑器内移除, 不会影响最终的结果。 + * @return { Boolean } 给定的节点是否是一个辅助节点 + */ + isCustomeNode: function (node) { + return node.nodeType == 1 && node.getAttribute("_ue_custom_node_"); + }, + + /** + * 检测节点的标签是否是给定的标签 + * @method isTagNode + * @param { Node } node 需要检测的节点对象 + * @param { String } tagName 标签 + * @return { Boolean } 节点的标签是否是给定的标签 + * @example + * ```html + *
              + * + * + * ``` + */ + isTagNode: function (node, tagNames) { + return ( + node.nodeType == 1 && + new RegExp("\\b" + node.tagName + "\\b", "i").test(tagNames) + ); + }, + + /** + * 给定一个节点数组,在通过指定的过滤器过滤后, 获取其中满足过滤条件的第一个节点 + * @method filterNodeList + * @param { Array } nodeList 需要过滤的节点数组 + * @param { Function } fn 过滤器, 对符合条件的节点, 执行结果返回true, 反之则返回false + * @return { Node | NULL } 如果找到符合过滤条件的节点, 则返回该节点, 否则返回NULL + * @example + * ```javascript + * var divNodes = document.getElementsByTagName("div"); + * divNodes = [].slice.call( divNodes, 0 ); + * + * //output: null + * console.log( UE.dom.domUtils.filterNodeList( divNodes, function ( node ) { + * return node.tagName.toLowerCase() !== 'div'; + * } ) ); + * ``` + */ + + /** + * 给定一个节点数组nodeList和一组标签名tagNames, 获取其中能够匹配标签名的节点集合中的第一个节点 + * @method filterNodeList + * @param { Array } nodeList 需要过滤的节点数组 + * @param { String } tagNames 需要匹配的标签名, 多个标签名之间用空格分割 + * @return { Node | NULL } 如果找到标签名匹配的节点, 则返回该节点, 否则返回NULL + * @example + * ```javascript + * var divNodes = document.getElementsByTagName("div"); + * divNodes = [].slice.call( divNodes, 0 ); + * + * //output: null + * console.log( UE.dom.domUtils.filterNodeList( divNodes, 'a span' ) ); + * ``` + */ + + /** + * 给定一个节点数组,在通过指定的过滤器过滤后, 如果参数forAll为true, 则会返回所有满足过滤 + * 条件的节点集合, 否则, 返回满足条件的节点集合中的第一个节点 + * @method filterNodeList + * @param { Array } nodeList 需要过滤的节点数组 + * @param { Function } fn 过滤器, 对符合条件的节点, 执行结果返回true, 反之则返回false + * @param { Boolean } forAll 是否返回整个节点数组, 如果该参数为false, 则返回节点集合中的第一个节点 + * @return { Array | Node | NULL } 如果找到符合过滤条件的节点, 则根据参数forAll的值决定返回满足 + * 过滤条件的节点数组或第一个节点, 否则返回NULL + * @example + * ```javascript + * var divNodes = document.getElementsByTagName("div"); + * divNodes = [].slice.call( divNodes, 0 ); + * + * //output: 3(假定有3个div) + * console.log( divNodes.length ); + * + * var nodes = UE.dom.domUtils.filterNodeList( divNodes, function ( node ) { + * return node.tagName.toLowerCase() === 'div'; + * }, true ); + * + * //output: 3 + * console.log( nodes.length ); + * + * var node = UE.dom.domUtils.filterNodeList( divNodes, function ( node ) { + * return node.tagName.toLowerCase() === 'div'; + * }, false ); + * + * //output: div + * console.log( node.nodeName ); + * ``` + */ + filterNodeList: function (nodelist, filter, forAll) { + var results = []; + if (!utils.isFunction(filter)) { + var str = filter; + filter = function (n) { + return ( + utils.indexOf( + utils.isArray(str) ? str : str.split(" "), + n.tagName.toLowerCase() + ) != -1 + ); + }; + } + utils.each(nodelist, function (n) { + filter(n) && results.push(n); + }); + return results.length == 0 + ? null + : results.length == 1 || !forAll ? results[0] : results; + }, + + /** + * 查询给定的range选区是否在给定的node节点内,且在该节点的最末尾 + * @method isInNodeEndBoundary + * @param { UE.dom.Range } rng 需要判断的range对象, 该对象的startContainer不能为NULL + * @param node 需要检测的节点对象 + * @return { Number } 如果给定的选取range对象是在node内部的最末端, 则返回1, 否则返回0 + */ + isInNodeEndBoundary: function (rng, node) { + var start = rng.startContainer; + if (start.nodeType == 3 && rng.startOffset != start.nodeValue.length) { + return 0; + } + if (start.nodeType == 1 && rng.startOffset != start.childNodes.length) { + return 0; + } + while (start !== node) { + if (start.nextSibling) { + return 0; + } + start = start.parentNode; + } + return 1; + }, + isBoundaryNode: function (node, dir) { + var tmp; + while (!domUtils.isBody(node)) { + tmp = node; + node = node.parentNode; + if (tmp !== node[dir]) { + return false; + } + } + return true; + }, + fillHtml: browser.ie11below ? " " : "
              ", + loadScript: function (url, cb) { + var script; + script = document.createElement('script'); + script.src = url; + script.onload = function () { + cb && cb({isNew: true}) + }; + document.getElementsByTagName('head')[0].appendChild(script); + } + }); + var fillCharReg = new RegExp(domUtils.fillChar, "g"); + + +// core/Range.js + /** + * Range封装 + * @file + * @module UE.dom + * @class Range + * @since 1.2.6.1 + */ + + /** + * dom操作封装 + * @unfile + * @module UE.dom + */ + + /** + * Range实现类,本类是UEditor底层核心类,封装不同浏览器之间的Range操作。 + * @unfile + * @module UE.dom + * @class Range + */ + + (function () { + var guid = 0, + fillChar = domUtils.fillChar, + fillData; + + /** + * 更新range的collapse状态 + * @param {Range} range range对象 + */ + function updateCollapse(range) { + range.collapsed = + range.startContainer && + range.endContainer && + range.startContainer === range.endContainer && + range.startOffset === range.endOffset; + } + + function selectOneNode(rng) { + return ( + !rng.collapsed && + rng.startContainer.nodeType === 1 && + rng.startContainer === rng.endContainer && + rng.endOffset - rng.startOffset === 1 + ); + } + + function setEndPoint(toStart, node, offset, range) { + //如果node是自闭合标签要处理 + if ( + node.nodeType === 1 && + (dtd.$empty[node.tagName] || dtd.$nonChild[node.tagName]) + ) { + offset = domUtils.getNodeIndex(node) + (toStart ? 0 : 1); + node = node.parentNode; + } + if (toStart) { + range.startContainer = node; + range.startOffset = offset; + if (!range.endContainer) { + range.collapse(true); + } + } else { + range.endContainer = node; + range.endOffset = offset; + if (!range.startContainer) { + range.collapse(false); + } + } + updateCollapse(range); + return range; + } + + function execContentsAction(range, action) { + //调整边界 + //range.includeBookmark(); + var start = range.startContainer, + end = range.endContainer, + startOffset = range.startOffset, + endOffset = range.endOffset, + doc = range.document, + frag = doc.createDocumentFragment(), + tmpStart, + tmpEnd; + if (start.nodeType == 1) { + start = + start.childNodes[startOffset] || + (tmpStart = start.appendChild(doc.createTextNode(""))); + } + if (end.nodeType == 1) { + end = + end.childNodes[endOffset] || + (tmpEnd = end.appendChild(doc.createTextNode(""))); + } + if (start === end && start.nodeType == 3) { + frag.appendChild( + doc.createTextNode( + start.substringData(startOffset, endOffset - startOffset) + ) + ); + //is not clone + if (action) { + start.deleteData(startOffset, endOffset - startOffset); + range.collapse(true); + } + return frag; + } + var current, + currentLevel, + clone = frag, + startParents = domUtils.findParents(start, true), + endParents = domUtils.findParents(end, true); + for (var i = 0; startParents[i] == endParents[i];) { + i++; + } + for (var j = i, si; (si = startParents[j]); j++) { + current = si.nextSibling; + if (si == start) { + if (!tmpStart) { + if (range.startContainer.nodeType == 3) { + clone.appendChild( + doc.createTextNode(start.nodeValue.slice(startOffset)) + ); + //is not clone + if (action) { + start.deleteData( + startOffset, + start.nodeValue.length - startOffset + ); + } + } else { + clone.appendChild(!action ? start.cloneNode(true) : start); + } + } + } else { + currentLevel = si.cloneNode(false); + clone.appendChild(currentLevel); + } + while (current) { + if (current === end || current === endParents[j]) { + break; + } + si = current.nextSibling; + clone.appendChild(!action ? current.cloneNode(true) : current); + current = si; + } + clone = currentLevel; + } + clone = frag; + if (!startParents[i]) { + clone.appendChild(startParents[i - 1].cloneNode(false)); + clone = clone.firstChild; + } + for (var j = i, ei; (ei = endParents[j]); j++) { + current = ei.previousSibling; + if (ei == end) { + if (!tmpEnd && range.endContainer.nodeType == 3) { + clone.appendChild( + doc.createTextNode(end.substringData(0, endOffset)) + ); + //is not clone + if (action) { + end.deleteData(0, endOffset); + } + } + } else { + currentLevel = ei.cloneNode(false); + clone.appendChild(currentLevel); + } + //如果两端同级,右边第一次已经被开始做了 + if (j != i || !startParents[i]) { + while (current) { + if (current === start) { + break; + } + ei = current.previousSibling; + clone.insertBefore( + !action ? current.cloneNode(true) : current, + clone.firstChild + ); + current = ei; + } + } + clone = currentLevel; + } + if (action) { + range + .setStartBefore( + !endParents[i] + ? endParents[i - 1] + : !startParents[i] ? startParents[i - 1] : endParents[i] + ) + .collapse(true); + } + tmpStart && domUtils.remove(tmpStart); + tmpEnd && domUtils.remove(tmpEnd); + return frag; + } + + /** + * 创建一个跟document绑定的空的Range实例 + * @constructor + * @param { Document } document 新建的选区所属的文档对象 + */ + + /** + * @property { Node } startContainer 当前Range的开始边界的容器节点, 可以是一个元素节点或者是文本节点 + */ + + /** + * @property { Node } startOffset 当前Range的开始边界容器节点的偏移量, 如果是元素节点, + * 该值就是childNodes中的第几个节点, 如果是文本节点就是文本内容的第几个字符 + */ + + /** + * @property { Node } endContainer 当前Range的结束边界的容器节点, 可以是一个元素节点或者是文本节点 + */ + + /** + * @property { Node } endOffset 当前Range的结束边界容器节点的偏移量, 如果是元素节点, + * 该值就是childNodes中的第几个节点, 如果是文本节点就是文本内容的第几个字符 + */ + + /** + * @property { Boolean } collapsed 当前Range是否闭合 + * @default true + * @remind Range是闭合的时候, startContainer === endContainer && startOffset === endOffset + */ + + /** + * @property { Document } document 当前Range所属的Document对象 + * @remind 不同range的的document属性可以是不同的 + */ + var Range = (dom.Range = function (document) { + var me = this; + me.startContainer = me.startOffset = me.endContainer = me.endOffset = null; + me.document = document; + me.collapsed = true; + }); + + /** + * 删除fillData + * @param doc + * @param excludeNode + */ + function removeFillData(doc, excludeNode) { + try { + if (fillData && domUtils.inDoc(fillData, doc)) { + if (!fillData.nodeValue.replace(fillCharReg, "").length) { + var tmpNode = fillData.parentNode; + domUtils.remove(fillData); + while ( + tmpNode && + domUtils.isEmptyInlineElement(tmpNode) && + //safari的contains有bug + (browser.safari + ? !( + domUtils.getPosition(tmpNode, excludeNode) & + domUtils.POSITION_CONTAINS + ) + : !tmpNode.contains(excludeNode)) + ) { + fillData = tmpNode.parentNode; + domUtils.remove(tmpNode); + tmpNode = fillData; + } + } else { + fillData.nodeValue = fillData.nodeValue.replace(fillCharReg, ""); + } + } + } catch (e) { + } + } + + /** + * @param node + * @param dir + */ + function mergeSibling(node, dir) { + var tmpNode; + node = node[dir]; + while (node && domUtils.isFillChar(node)) { + tmpNode = node[dir]; + domUtils.remove(node); + node = tmpNode; + } + } + + Range.prototype = { + /** + * 克隆选区的内容到一个DocumentFragment里 + * @method cloneContents + * @return { DocumentFragment | NULL } 如果选区是闭合的将返回null, 否则, 返回包含所clone内容的DocumentFragment元素 + * @example + * ```html + * + * + * xx[xxx]x + * + * + * + * ``` + */ + cloneContents: function () { + return this.collapsed ? null : execContentsAction(this, 0); + }, + + /** + * 删除当前选区范围中的所有内容 + * @method deleteContents + * @remind 执行完该操作后, 当前Range对象变成了闭合状态 + * @return { UE.dom.Range } 当前操作的Range对象 + * @example + * ```html + * + * + * xx[xxx]x + * + * + * + * ``` + */ + deleteContents: function () { + var txt; + if (!this.collapsed) { + execContentsAction(this, 1); + } + if (browser.webkit) { + txt = this.startContainer; + if (txt.nodeType == 3 && !txt.nodeValue.length) { + this.setStartBefore(txt).collapse(true); + domUtils.remove(txt); + } + } + return this; + }, + + /** + * 将当前选区的内容提取到一个DocumentFragment里 + * @method extractContents + * @remind 执行该操作后, 选区将变成闭合状态 + * @warning 执行该操作后, 原来选区所选中的内容将从dom树上剥离出来 + * @return { DocumentFragment } 返回包含所提取内容的DocumentFragment对象 + * @example + * ```html + * + * + * xx[xxx]x + * + * + * + */ + extractContents: function () { + return this.collapsed ? null : execContentsAction(this, 2); + }, + + /** + * 设置Range的开始容器节点和偏移量 + * @method setStart + * @remind 如果给定的节点是元素节点,那么offset指的是其子元素中索引为offset的元素, + * 如果是文本节点,那么offset指的是其文本内容的第offset个字符 + * @remind 如果提供的容器节点是一个不能包含子元素的节点, 则该选区的开始容器将被设置 + * 为该节点的父节点, 此时, 其距离开始容器的偏移量也变成了该节点在其父节点 + * 中的索引 + * @param { Node } node 将被设为当前选区开始边界容器的节点对象 + * @param { int } offset 选区的开始位置偏移量 + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * xxxxxxxxxxxxx[xxx] + * + * + * ``` + * @example + * ```html + * + * xxx[xx]x + * + * + * ``` + */ + setStart: function (node, offset) { + return setEndPoint(true, node, offset, this); + }, + + /** + * 设置Range的结束容器和偏移量 + * @method setEnd + * @param { Node } node 作为当前选区结束边界容器的节点对象 + * @param { int } offset 结束边界的偏移量 + * @see UE.dom.Range:setStart(Node,int) + * @return { UE.dom.Range } 当前range对象 + */ + setEnd: function (node, offset) { + return setEndPoint(false, node, offset, this); + }, + + /** + * 将Range开始位置设置到node节点之后 + * @method setStartAfter + * @remind 该操作将会把给定节点的父节点作为range的开始容器, 且偏移量是该节点在其父节点中的位置索引+1 + * @param { Node } node 选区的开始边界将紧接着该节点之后 + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * xxxxxxx[xxxx] + * + * + * ``` + */ + setStartAfter: function (node) { + return this.setStart(node.parentNode, domUtils.getNodeIndex(node) + 1); + }, + + /** + * 将Range开始位置设置到node节点之前 + * @method setStartBefore + * @remind 该操作将会把给定节点的父节点作为range的开始容器, 且偏移量是该节点在其父节点中的位置索引 + * @param { Node } node 新的选区开始位置在该节点之前 + * @see UE.dom.Range:setStartAfter(Node) + * @return { UE.dom.Range } 当前range对象 + */ + setStartBefore: function (node) { + return this.setStart(node.parentNode, domUtils.getNodeIndex(node)); + }, + + /** + * 将Range结束位置设置到node节点之后 + * @method setEndAfter + * @remind 该操作将会把给定节点的父节点作为range的结束容器, 且偏移量是该节点在其父节点中的位置索引+1 + * @param { Node } node 目标节点 + * @see UE.dom.Range:setStartAfter(Node) + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * [xxxxxxx]xxxx + * + * + * ``` + */ + setEndAfter: function (node) { + return this.setEnd(node.parentNode, domUtils.getNodeIndex(node) + 1); + }, + + /** + * 将Range结束位置设置到node节点之前 + * @method setEndBefore + * @remind 该操作将会把给定节点的父节点作为range的结束容器, 且偏移量是该节点在其父节点中的位置索引 + * @param { Node } node 目标节点 + * @see UE.dom.Range:setEndAfter(Node) + * @return { UE.dom.Range } 当前range对象 + */ + setEndBefore: function (node) { + return this.setEnd(node.parentNode, domUtils.getNodeIndex(node)); + }, + + /** + * 设置Range的开始位置到node节点内的第一个子节点之前 + * @method setStartAtFirst + * @remind 选区的开始容器将变成给定的节点, 且偏移量为0 + * @remind 如果给定的节点是元素节点, 则该节点必须是允许包含子节点的元素。 + * @param { Node } node 目标节点 + * @see UE.dom.Range:setStartBefore(Node) + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * xxxxx[xx]xxxx + * + * + * ``` + */ + setStartAtFirst: function (node) { + return this.setStart(node, 0); + }, + + /** + * 设置Range的开始位置到node节点内的最后一个节点之后 + * @method setStartAtLast + * @remind 选区的开始容器将变成给定的节点, 且偏移量为该节点的子节点数 + * @remind 如果给定的节点是元素节点, 则该节点必须是允许包含子节点的元素。 + * @param { Node } node 目标节点 + * @see UE.dom.Range:setStartAtFirst(Node) + * @return { UE.dom.Range } 当前range对象 + */ + setStartAtLast: function (node) { + return this.setStart( + node, + node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length + ); + }, + + /** + * 设置Range的结束位置到node节点内的第一个节点之前 + * @method setEndAtFirst + * @param { Node } node 目标节点 + * @remind 选区的结束容器将变成给定的节点, 且偏移量为0 + * @remind node必须是一个元素节点, 且必须是允许包含子节点的元素。 + * @see UE.dom.Range:setStartAtFirst(Node) + * @return { UE.dom.Range } 当前range对象 + */ + setEndAtFirst: function (node) { + return this.setEnd(node, 0); + }, + + /** + * 设置Range的结束位置到node节点内的最后一个节点之后 + * @method setEndAtLast + * @param { Node } node 目标节点 + * @remind 选区的结束容器将变成给定的节点, 且偏移量为该节点的子节点数量 + * @remind node必须是一个元素节点, 且必须是允许包含子节点的元素。 + * @see UE.dom.Range:setStartAtFirst(Node) + * @return { UE.dom.Range } 当前range对象 + */ + setEndAtLast: function (node) { + return this.setEnd( + node, + node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length + ); + }, + + /** + * 选中给定节点 + * @method selectNode + * @remind 此时, 选区的开始容器和结束容器都是该节点的父节点, 其startOffset是该节点在父节点中的位置索引, + * 而endOffset为startOffset+1 + * @param { Node } node 需要选中的节点 + * @return { UE.dom.Range } 当前range对象,此时的range仅包含当前给定的节点对象 + * @example + * ```html + * + * xxxxx[xx]xxxx + * + * + * ``` + */ + selectNode: function (node) { + return this.setStartBefore(node).setEndAfter(node); + }, + + /** + * 选中给定节点内部的所有节点 + * @method selectNodeContents + * @remind 此时, 选区的开始容器和结束容器都是该节点, 其startOffset为0, + * 而endOffset是该节点的子节点数。 + * @param { Node } node 目标节点, 当前range将包含该节点内的所有节点 + * @return { UE.dom.Range } 当前range对象, 此时range仅包含给定节点的所有子节点 + * @example + * ```html + * + * xxxxx[xx]xxxx + * + * + * ``` + */ + selectNodeContents: function (node) { + return this.setStart(node, 0).setEndAtLast(node); + }, + + /** + * clone当前Range对象 + * @method cloneRange + * @remind 返回的range是一个全新的range对象, 其内部所有属性与当前被clone的range相同。 + * @return { UE.dom.Range } 当前range对象的一个副本 + */ + cloneRange: function () { + var me = this; + return new Range(me.document) + .setStart(me.startContainer, me.startOffset) + .setEnd(me.endContainer, me.endOffset); + }, + + /** + * 向当前选区的结束处闭合选区 + * @method collapse + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * xxxxx[xx]xxxx + * + * + * ``` + */ + + /** + * 闭合当前选区,根据给定的toStart参数项决定是向当前选区开始处闭合还是向结束处闭合, + * 如果toStart的值为true,则向开始位置闭合, 反之,向结束位置闭合。 + * @method collapse + * @param { Boolean } toStart 是否向选区开始处闭合 + * @return { UE.dom.Range } 当前range对象,此时range对象处于闭合状态 + * @see UE.dom.Range:collapse() + * @example + * ```html + * + * xxxxx[xx]xxxx + * + * + * ``` + */ + collapse: function (toStart) { + var me = this; + if (toStart) { + me.endContainer = me.startContainer; + me.endOffset = me.startOffset; + } else { + me.startContainer = me.endContainer; + me.startOffset = me.endOffset; + } + me.collapsed = true; + return me; + }, + + /** + * 调整range的开始位置和结束位置,使其"收缩"到最小的位置 + * @method shrinkBoundary + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * xxxx[xxxxx] => xxxx[xxxxx] + * ``` + * + * @example + * ```html + * + * x[xx]xxx + * + * + * ``` + * + * @example + * ```html + * [xxxxxxxxxxx] => [xxxxxxxxxxx] + * ``` + */ + + /** + * 调整range的开始位置和结束位置,使其"收缩"到最小的位置, + * 如果ignoreEnd的值为true,则忽略对结束位置的调整 + * @method shrinkBoundary + * @param { Boolean } ignoreEnd 是否忽略对结束位置的调整 + * @return { UE.dom.Range } 当前range对象 + * @see UE.dom.domUtils.Range:shrinkBoundary() + */ + shrinkBoundary: function (ignoreEnd) { + var me = this, + child, + collapsed = me.collapsed; + + function check(node) { + return ( + node.nodeType == 1 && + !domUtils.isBookmarkNode(node) && + !dtd.$empty[node.tagName] && + !dtd.$nonChild[node.tagName] + ); + } + + while ( + me.startContainer.nodeType == 1 && //是element + (child = me.startContainer.childNodes[me.startOffset]) && //子节点也是element + check(child) + ) { + me.setStart(child, 0); + } + if (collapsed) { + return me.collapse(true); + } + if (!ignoreEnd) { + while ( + me.endContainer.nodeType == 1 && //是element + me.endOffset > 0 && //如果是空元素就退出 endOffset=0那么endOffst-1为负值,childNodes[endOffset]报错 + (child = me.endContainer.childNodes[me.endOffset - 1]) && //子节点也是element + check(child) + ) { + me.setEnd(child, child.childNodes.length); + } + } + return me; + }, + + /** + * 获取离当前选区内包含的所有节点最近的公共祖先节点, + * @method getCommonAncestor + * @remind 返回的公共祖先节点一定不是range自身的容器节点, 但有可能是一个文本节点 + * @return { Node } 当前range对象内所有节点的公共祖先节点 + * @example + * ```html + * //选区示例 + * xxxx[xxx]xxxxxx + * + * ``` + */ + + /** + * 获取当前选区所包含的所有节点的公共祖先节点, 可以根据给定的参数 includeSelf 决定获取到 + * 的公共祖先节点是否可以是当前选区的startContainer或endContainer节点, 如果 includeSelf + * 的取值为true, 则返回的节点可以是自身的容器节点, 否则, 则不能是容器节点 + * @method getCommonAncestor + * @param { Boolean } includeSelf 是否允许获取到的公共祖先节点是当前range对象的容器节点 + * @return { Node } 当前range对象内所有节点的公共祖先节点 + * @see UE.dom.Range:getCommonAncestor() + * @example + * ```html + * + * + * + * xxxxxxxxx[xxx]xxxxxxxx + * + * + * + * + * ``` + */ + + /** + * 获取当前选区所包含的所有节点的公共祖先节点, 可以根据给定的参数 includeSelf 决定获取到 + * 的公共祖先节点是否可以是当前选区的startContainer或endContainer节点, 如果 includeSelf + * 的取值为true, 则返回的节点可以是自身的容器节点, 否则, 则不能是容器节点; 同时可以根据 + * ignoreTextNode 参数的取值决定是否忽略类型为文本节点的祖先节点。 + * @method getCommonAncestor + * @param { Boolean } includeSelf 是否允许获取到的公共祖先节点是当前range对象的容器节点 + * @param { Boolean } ignoreTextNode 获取祖先节点的过程中是否忽略类型为文本节点的祖先节点 + * @return { Node } 当前range对象内所有节点的公共祖先节点 + * @see UE.dom.Range:getCommonAncestor() + * @see UE.dom.Range:getCommonAncestor(Boolean) + * @example + * ```html + * + * + * + * xxxxxxxx[x]xxxxxxxxxxx + * + * + * + * + * ``` + */ + getCommonAncestor: function (includeSelf, ignoreTextNode) { + var me = this, + start = me.startContainer, + end = me.endContainer; + if (start === end) { + if (includeSelf && selectOneNode(this)) { + start = start.childNodes[me.startOffset]; + if (start.nodeType == 1) return start; + } + //只有在上来就相等的情况下才会出现是文本的情况 + return ignoreTextNode && start.nodeType == 3 ? start.parentNode : start; + } + return domUtils.getCommonAncestor(start, end); + }, + + /** + * 调整当前Range的开始和结束边界容器,如果是容器节点是文本节点,就调整到包含该文本节点的父节点上 + * @method trimBoundary + * @remind 该操作有可能会引起文本节点被切开 + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * //选区示例 + * xxx[xxxxx]xxx + * + * + * ``` + */ + + /** + * 调整当前Range的开始和结束边界容器,如果是容器节点是文本节点,就调整到包含该文本节点的父节点上, + * 可以根据 ignoreEnd 参数的值决定是否调整对结束边界的调整 + * @method trimBoundary + * @param { Boolean } ignoreEnd 是否忽略对结束边界的调整 + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * //选区示例 + * xxx[xxxxx]xxx + * + * + * ``` + */ + trimBoundary: function (ignoreEnd) { + this.txtToElmBoundary(); + var start = this.startContainer, + offset = this.startOffset, + collapsed = this.collapsed, + end = this.endContainer; + if (start.nodeType == 3) { + if (offset == 0) { + this.setStartBefore(start); + } else { + if (offset >= start.nodeValue.length) { + this.setStartAfter(start); + } else { + var textNode = domUtils.split(start, offset); + //跟新结束边界 + if (start === end) { + this.setEnd(textNode, this.endOffset - offset); + } else if (start.parentNode === end) { + this.endOffset += 1; + } + this.setStartBefore(textNode); + } + } + if (collapsed) { + return this.collapse(true); + } + } + if (!ignoreEnd) { + offset = this.endOffset; + end = this.endContainer; + if (end.nodeType == 3) { + if (offset == 0) { + this.setEndBefore(end); + } else { + offset < end.nodeValue.length && domUtils.split(end, offset); + this.setEndAfter(end); + } + } + } + return this; + }, + + /** + * 如果选区在文本的边界上,就扩展选区到文本的父节点上, 如果当前选区是闭合的, 则什么也不做 + * @method txtToElmBoundary + * @remind 该操作不会修改dom节点 + * @return { UE.dom.Range } 当前range对象 + */ + + /** + * 如果选区在文本的边界上,就扩展选区到文本的父节点上, 如果当前选区是闭合的, 则根据参数项 + * ignoreCollapsed 的值决定是否执行该调整 + * @method txtToElmBoundary + * @param { Boolean } ignoreCollapsed 是否忽略选区的闭合状态, 如果该参数取值为true, 则 + * 不论选区是否闭合, 都会执行该操作, 反之, 则不会对闭合的选区执行该操作 + * @return { UE.dom.Range } 当前range对象 + */ + txtToElmBoundary: function (ignoreCollapsed) { + function adjust(r, c) { + var container = r[c + "Container"], + offset = r[c + "Offset"]; + if (container.nodeType == 3) { + if (!offset) { + r[ + "set" + + c.replace(/(\w)/, function (a) { + return a.toUpperCase(); + }) + + "Before" + ](container); + } else if (offset >= container.nodeValue.length) { + r[ + "set" + + c.replace(/(\w)/, function (a) { + return a.toUpperCase(); + }) + + "After" + ](container); + } + } + } + + if (ignoreCollapsed || !this.collapsed) { + adjust(this, "start"); + adjust(this, "end"); + } + return this; + }, + + /** + * 在当前选区的开始位置前插入节点,新插入的节点会被该range包含 + * @method insertNode + * @param { Node } node 需要插入的节点 + * @remind 插入的节点可以是一个DocumentFragment依次插入多个节点 + * @return { UE.dom.Range } 当前range对象 + */ + insertNode: function (node) { + var first = node, + length = 1; + if (node.nodeType == 11) { + first = node.firstChild; + length = node.childNodes.length; + } + this.trimBoundary(true); + var start = this.startContainer, + offset = this.startOffset; + var nextNode = start.childNodes[offset]; + if (nextNode) { + start.insertBefore(node, nextNode); + } else { + start.appendChild(node); + } + if (first.parentNode === this.endContainer) { + this.endOffset = this.endOffset + length; + } + return this.setStartBefore(first); + }, + + /** + * 闭合选区到当前选区的开始位置, 并且定位光标到闭合后的位置 + * @method setCursor + * @return { UE.dom.Range } 当前range对象 + * @see UE.dom.Range:collapse() + */ + + /** + * 闭合选区,可以根据参数toEnd的值控制选区是向前闭合还是向后闭合, 并且定位光标到闭合后的位置。 + * @method setCursor + * @param { Boolean } toEnd 是否向后闭合, 如果为true, 则闭合选区时, 将向结束容器方向闭合, + * 反之,则向开始容器方向闭合 + * @return { UE.dom.Range } 当前range对象 + * @see UE.dom.Range:collapse(Boolean) + */ + setCursor: function (toEnd, noFillData) { + return this.collapse(!toEnd).select(noFillData); + }, + + /** + * 创建当前range的一个书签,记录下当前range的位置,方便当dom树改变时,还能找回原来的选区位置 + * @method createBookmark + * @param { Boolean } serialize 控制返回的标记位置是对当前位置的引用还是ID,如果该值为true,则 + * 返回标记位置的ID, 反之则返回标记位置节点的引用 + * @return { Object } 返回一个书签记录键值对, 其包含的key有: start => 开始标记的ID或者引用, + * end => 结束标记的ID或引用, id => 当前标记的类型, 如果为true,则表示 + * 返回的记录的类型为ID, 反之则为引用 + */ + createBookmark: function (serialize, same) { + var endNode, + startNode = this.document.createElement("span"); + startNode.style.cssText = "display:none;line-height:0px;"; + startNode.appendChild(this.document.createTextNode("\u200D")); + startNode.id = "_baidu_bookmark_start_" + (same ? "" : guid++); + + if (!this.collapsed) { + endNode = startNode.cloneNode(true); + endNode.id = "_baidu_bookmark_end_" + (same ? "" : guid++); + } + this.insertNode(startNode); + if (endNode) { + this.collapse().insertNode(endNode).setEndBefore(endNode); + } + this.setStartAfter(startNode); + return { + start: serialize ? startNode.id : startNode, + end: endNode ? (serialize ? endNode.id : endNode) : null, + id: serialize + }; + }, + + /** + * 调整当前range的边界到书签位置,并删除该书签对象所标记的位置内的节点 + * @method moveToBookmark + * @param { BookMark } bookmark createBookmark所创建的标签对象 + * @return { UE.dom.Range } 当前range对象 + * @see UE.dom.Range:createBookmark(Boolean) + */ + moveToBookmark: function (bookmark) { + var start = bookmark.id + ? this.document.getElementById(bookmark.start) + : bookmark.start, + end = bookmark.end && bookmark.id + ? this.document.getElementById(bookmark.end) + : bookmark.end; + this.setStartBefore(start); + domUtils.remove(start); + if (end) { + this.setEndBefore(end); + domUtils.remove(end); + } else { + this.collapse(true); + } + return this; + }, + + /** + * 调整range的边界,使其"放大"到最近的父节点 + * @method enlarge + * @remind 会引起选区的变化 + * @return { UE.dom.Range } 当前range对象 + */ + + /** + * 调整range的边界,使其"放大"到最近的父节点,根据参数 toBlock 的取值, 可以 + * 要求扩大之后的父节点是block节点 + * @method enlarge + * @param { Boolean } toBlock 是否要求扩大之后的父节点必须是block节点 + * @return { UE.dom.Range } 当前range对象 + */ + enlarge: function (toBlock, stopFn) { + var isBody = domUtils.isBody, + pre, + node, + tmp = this.document.createTextNode(""); + if (toBlock) { + node = this.startContainer; + if (node.nodeType == 1) { + if (node.childNodes[this.startOffset]) { + pre = node = node.childNodes[this.startOffset]; + } else { + node.appendChild(tmp); + pre = node = tmp; + } + } else { + pre = node; + } + while (1) { + if (domUtils.isBlockElm(node)) { + node = pre; + while ((pre = node.previousSibling) && !domUtils.isBlockElm(pre)) { + node = pre; + } + this.setStartBefore(node); + break; + } + pre = node; + node = node.parentNode; + } + node = this.endContainer; + if (node.nodeType == 1) { + if ((pre = node.childNodes[this.endOffset])) { + node.insertBefore(tmp, pre); + } else { + node.appendChild(tmp); + } + pre = node = tmp; + } else { + pre = node; + } + while (1) { + if (domUtils.isBlockElm(node)) { + node = pre; + while ((pre = node.nextSibling) && !domUtils.isBlockElm(pre)) { + node = pre; + } + this.setEndAfter(node); + break; + } + pre = node; + node = node.parentNode; + } + if (tmp.parentNode === this.endContainer) { + this.endOffset--; + } + domUtils.remove(tmp); + } + + // 扩展边界到最大 + if (!this.collapsed) { + while (this.startOffset == 0) { + if (stopFn && stopFn(this.startContainer)) { + break; + } + if (isBody(this.startContainer)) { + break; + } + this.setStartBefore(this.startContainer); + } + while ( + this.endOffset == + (this.endContainer.nodeType == 1 + ? this.endContainer.childNodes.length + : this.endContainer.nodeValue.length) + ) { + if (stopFn && stopFn(this.endContainer)) { + break; + } + if (isBody(this.endContainer)) { + break; + } + this.setEndAfter(this.endContainer); + } + } + return this; + }, + enlargeToBlockElm: function (ignoreEnd) { + while (!domUtils.isBlockElm(this.startContainer)) { + this.setStartBefore(this.startContainer); + } + if (!ignoreEnd) { + while (!domUtils.isBlockElm(this.endContainer)) { + this.setEndAfter(this.endContainer); + } + } + return this; + }, + /** + * 调整Range的边界,使其"缩小"到最合适的位置 + * @method adjustmentBoundary + * @return { UE.dom.Range } 当前range对象 + * @see UE.dom.Range:shrinkBoundary() + */ + adjustmentBoundary: function () { + if (!this.collapsed) { + while ( + !domUtils.isBody(this.startContainer) && + this.startOffset == + this.startContainer[ + this.startContainer.nodeType == 3 ? "nodeValue" : "childNodes" + ].length && + this.startContainer[ + this.startContainer.nodeType == 3 ? "nodeValue" : "childNodes" + ].length + ) { + this.setStartAfter(this.startContainer); + } + while ( + !domUtils.isBody(this.endContainer) && + !this.endOffset && + this.endContainer[ + this.endContainer.nodeType == 3 ? "nodeValue" : "childNodes" + ].length + ) { + this.setEndBefore(this.endContainer); + } + } + return this; + }, + + /** + * 给range选区中的内容添加给定的inline标签 + * @method applyInlineStyle + * @param { String } tagName 需要添加的标签名 + * @example + * ```html + *

              xxxx[xxxx]x

              ==> range.applyInlineStyle("strong") ==>

              xxxx[xxxx]x

              + * ``` + */ + + /** + * 给range选区中的内容添加给定的inline标签, 并且为标签附加上一些初始化属性。 + * @method applyInlineStyle + * @param { String } tagName 需要添加的标签名 + * @param { Object } attrs 跟随新添加的标签的属性 + * @return { UE.dom.Range } 当前选区 + * @example + * ```html + *

              xxxx[xxxx]x

              + * + * ==> + * + * + * range.applyInlineStyle("strong",{"style":"font-size:12px"}) + * + * ==> + * + *

              xxxx[xxxx]x

              + * ``` + */ + applyInlineStyle: function (tagName, attrs, list) { + if (this.collapsed) return this; + this.trimBoundary() + .enlarge(false, function (node) { + return node.nodeType == 1 && domUtils.isBlockElm(node); + }) + .adjustmentBoundary(); + var bookmark = this.createBookmark(), + end = bookmark.end, + filterFn = function (node) { + return node.nodeType == 1 + ? node.tagName.toLowerCase() != "br" + : !domUtils.isWhitespace(node); + }, + current = domUtils.getNextDomNode(bookmark.start, false, filterFn), + node, + pre, + range = this.cloneRange(); + while ( + current && + domUtils.getPosition(current, end) & domUtils.POSITION_PRECEDING + ) { + if (current.nodeType == 3 || dtd[tagName][current.tagName]) { + range.setStartBefore(current); + node = current; + while ( + node && + (node.nodeType == 3 || dtd[tagName][node.tagName]) && + node !== end + ) { + pre = node; + node = domUtils.getNextDomNode( + node, + node.nodeType == 1, + null, + function (parent) { + return dtd[tagName][parent.tagName]; + } + ); + } + var frag = range.setEndAfter(pre).extractContents(), + elm; + if (list && list.length > 0) { + var level, top; + top = level = list[0].cloneNode(false); + for (var i = 1, ci; (ci = list[i++]);) { + level.appendChild(ci.cloneNode(false)); + level = level.firstChild; + } + elm = level; + } else { + elm = range.document.createElement(tagName); + } + if (attrs) { + domUtils.setAttributes(elm, attrs); + } + elm.appendChild(frag); + //针对嵌套span的全局样式指定,做容错处理 + if (elm.tagName == "SPAN" && attrs && attrs.style) { + utils.each(elm.getElementsByTagName("span"), function (s) { + s.style.cssText = s.style.cssText + ";" + attrs.style; + }); + } + range.insertNode(list ? top : elm); + //处理下滑线在a上的情况 + var aNode; + if ( + tagName == "span" && + attrs.style && + /text\-decoration/.test(attrs.style) && + (aNode = domUtils.findParentByTagName(elm, "a", true)) + ) { + domUtils.setAttributes(aNode, attrs); + domUtils.remove(elm, true); + elm = aNode; + } else { + domUtils.mergeSibling(elm); + domUtils.clearEmptySibling(elm); + } + //去除子节点相同的 + domUtils.mergeChild(elm, attrs); + current = domUtils.getNextDomNode(elm, false, filterFn); + domUtils.mergeToParent(elm); + if (node === end) { + break; + } + } else { + current = domUtils.getNextDomNode(current, true, filterFn); + } + } + return this.moveToBookmark(bookmark); + }, + + /** + * 移除当前选区内指定的inline标签,但保留其中的内容 + * @method removeInlineStyle + * @param { String } tagName 需要移除的标签名 + * @return { UE.dom.Range } 当前的range对象 + * @example + * ```html + * xx[xxxxyyyzz]z => range.removeInlineStyle(["em"]) => xx[xxxxyyyzz]z + * ``` + */ + + /** + * 移除当前选区内指定的一组inline标签,但保留其中的内容 + * @method removeInlineStyle + * @param { Array } tagNameArr 需要移除的标签名的数组 + * @return { UE.dom.Range } 当前的range对象 + * @see UE.dom.Range:removeInlineStyle(String) + */ + removeInlineStyle: function (tagNames) { + if (this.collapsed) return this; + tagNames = utils.isArray(tagNames) ? tagNames : [tagNames]; + this.shrinkBoundary().adjustmentBoundary(); + var start = this.startContainer, + end = this.endContainer; + while (1) { + if (start.nodeType == 1) { + if (utils.indexOf(tagNames, start.tagName.toLowerCase()) > -1) { + break; + } + if (start.tagName.toLowerCase() == "body") { + start = null; + break; + } + } + start = start.parentNode; + } + while (1) { + if (end.nodeType == 1) { + if (utils.indexOf(tagNames, end.tagName.toLowerCase()) > -1) { + break; + } + if (end.tagName.toLowerCase() == "body") { + end = null; + break; + } + } + end = end.parentNode; + } + var bookmark = this.createBookmark(), + frag, + tmpRange; + if (start) { + tmpRange = this.cloneRange() + .setEndBefore(bookmark.start) + .setStartBefore(start); + frag = tmpRange.extractContents(); + tmpRange.insertNode(frag); + domUtils.clearEmptySibling(start, true); + start.parentNode.insertBefore(bookmark.start, start); + } + if (end) { + tmpRange = this.cloneRange() + .setStartAfter(bookmark.end) + .setEndAfter(end); + frag = tmpRange.extractContents(); + tmpRange.insertNode(frag); + domUtils.clearEmptySibling(end, false, true); + end.parentNode.insertBefore(bookmark.end, end.nextSibling); + } + var current = domUtils.getNextDomNode(bookmark.start, false, function ( + node + ) { + return node.nodeType == 1; + }), + next; + while (current && current !== bookmark.end) { + next = domUtils.getNextDomNode(current, true, function (node) { + return node.nodeType == 1; + }); + if (utils.indexOf(tagNames, current.tagName.toLowerCase()) > -1) { + domUtils.remove(current, true); + } + current = next; + } + return this.moveToBookmark(bookmark); + }, + + /** + * 获取当前选中的自闭合的节点 + * @method getClosedNode + * @return { Node | NULL } 如果当前选中的是自闭合节点, 则返回该节点, 否则返回NULL + */ + getClosedNode: function () { + var node; + if (!this.collapsed) { + var range = this.cloneRange().adjustmentBoundary().shrinkBoundary(); + if (selectOneNode(range)) { + var child = range.startContainer.childNodes[range.startOffset]; + if ( + child && + child.nodeType === 1 && + (dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName]) + ) { + node = child; + } + } + } + return node; + }, + + /** + * 在页面上高亮range所表示的选区 + * @method select + * @return { UE.dom.Range } 返回当前Range对象 + */ + //这里不区分ie9以上,trace:3824 + select: browser.ie + ? function (noFillData, textRange) { + var nativeRange; + if (!this.collapsed) this.shrinkBoundary(); + var node = this.getClosedNode(); + if (node && !textRange) { + try { + nativeRange = this.document.body.createControlRange(); + nativeRange.addElement(node); + nativeRange.select(); + } catch (e) { + } + return this; + } + var bookmark = this.createBookmark(), + start = bookmark.start, + end; + nativeRange = this.document.body.createTextRange(); + nativeRange.moveToElementText(start); + nativeRange.moveStart("character", 1); + if (!this.collapsed) { + var nativeRangeEnd = this.document.body.createTextRange(); + end = bookmark.end; + nativeRangeEnd.moveToElementText(end); + nativeRange.setEndPoint("EndToEnd", nativeRangeEnd); + } else { + if (!noFillData && this.startContainer.nodeType != 3) { + //使用|x固定住光标 + var tmpText = this.document.createTextNode(fillChar), + tmp = this.document.createElement("span"); + tmp.appendChild(this.document.createTextNode(fillChar)); + start.parentNode.insertBefore(tmp, start); + start.parentNode.insertBefore(tmpText, start); + //当点b,i,u时,不能清除i上边的b + removeFillData(this.document, tmpText); + fillData = tmpText; + mergeSibling(tmp, "previousSibling"); + mergeSibling(start, "nextSibling"); + nativeRange.moveStart("character", -1); + nativeRange.collapse(true); + } + } + this.moveToBookmark(bookmark); + tmp && domUtils.remove(tmp); + //IE在隐藏状态下不支持range操作,catch一下 + try { + nativeRange.select(); + } catch (e) { + } + return this; + } + : function (notInsertFillData) { + function checkOffset(rng) { + function check(node, offset, dir) { + if (node.nodeType == 3 && node.nodeValue.length < offset) { + rng[dir + "Offset"] = node.nodeValue.length; + } + } + + check(rng.startContainer, rng.startOffset, "start"); + check(rng.endContainer, rng.endOffset, "end"); + } + + var win = domUtils.getWindow(this.document), + sel = win.getSelection(), + txtNode; + //FF下关闭自动长高时滚动条在关闭dialog时会跳 + //ff下如果不body.focus将不能定位闭合光标到编辑器内 + browser.gecko ? this.document.body.focus() : win.focus(); + if (sel) { + sel.removeAllRanges(); + // trace:870 chrome/safari后边是br对于闭合得range不能定位 所以去掉了判断 + // this.startContainer.nodeType != 3 &&! ((child = this.startContainer.childNodes[this.startOffset]) && child.nodeType == 1 && child.tagName == 'BR' + if (this.collapsed && !notInsertFillData) { + // //opear如果没有节点接着,原生的不能够定位,不能在body的第一级插入空白节点 + // if (notInsertFillData && browser.opera && !domUtils.isBody(this.startContainer) && this.startContainer.nodeType == 1) { + // var tmp = this.document.createTextNode(''); + // this.insertNode(tmp).setStart(tmp, 0).collapse(true); + // } + // + //处理光标落在文本节点的情况 + //处理以下的情况 + //|xxxx + //xxxx|xxxx + //xxxx| + var start = this.startContainer, + child = start; + if (start.nodeType == 1) { + child = start.childNodes[this.startOffset]; + } + if ( + !(start.nodeType == 3 && this.startOffset) && + (child + ? !child.previousSibling || + child.previousSibling.nodeType != 3 + : !start.lastChild || start.lastChild.nodeType != 3) + ) { + txtNode = this.document.createTextNode(fillChar); + //跟着前边走 + this.insertNode(txtNode); + removeFillData(this.document, txtNode); + mergeSibling(txtNode, "previousSibling"); + mergeSibling(txtNode, "nextSibling"); + fillData = txtNode; + this.setStart(txtNode, browser.webkit ? 1 : 0).collapse(true); + } + } + var nativeRange = this.document.createRange(); + if ( + this.collapsed && + browser.opera && + this.startContainer.nodeType == 1 + ) { + var child = this.startContainer.childNodes[this.startOffset]; + if (!child) { + //往前靠拢 + child = this.startContainer.lastChild; + if (child && domUtils.isBr(child)) { + this.setStartBefore(child).collapse(true); + } + } else { + //向后靠拢 + while (child && domUtils.isBlockElm(child)) { + if (child.nodeType == 1 && child.childNodes[0]) { + child = child.childNodes[0]; + } else { + break; + } + } + child && this.setStartBefore(child).collapse(true); + } + } + //是createAddress最后一位算的不准,现在这里进行微调 + checkOffset(this); + nativeRange.setStart(this.startContainer, this.startOffset); + nativeRange.setEnd(this.endContainer, this.endOffset); + sel.addRange(nativeRange); + } + return this; + }, + + /** + * 滚动到当前range开始的位置 + * @method scrollToView + * @param { Window } win 当前range对象所属的window对象 + * @return { UE.dom.Range } 当前Range对象 + */ + + /** + * 滚动到距离当前range开始位置 offset 的位置处 + * @method scrollToView + * @param { Window } win 当前range对象所属的window对象 + * @param { Number } offset 距离range开始位置处的偏移量, 如果为正数, 则向下偏移, 反之, 则向上偏移 + * @return { UE.dom.Range } 当前Range对象 + */ + scrollToView: function (win, offset) { + win = win ? window : domUtils.getWindow(this.document); + offset = offset || (win.innerHeight - 100); + // console.log('xxx',win, offset); + var me = this, + span = me.document.createElement("span"); + //trace:717 + span.innerHTML = " "; + me.cloneRange().insertNode(span); + domUtils.scrollToView(span, win, offset); + domUtils.remove(span); + return me; + }, + + /** + * 判断当前选区内容是否占位符 + * @private + * @method inFillChar + * @return { Boolean } 如果是占位符返回true,否则返回false + */ + inFillChar: function () { + var start = this.startContainer; + if ( + this.collapsed && + start.nodeType == 3 && + start.nodeValue.replace(new RegExp("^" + domUtils.fillChar), "") + .length + + 1 == + start.nodeValue.length + ) { + return true; + } + return false; + }, + + /** + * 保存 + * @method createAddress + * @private + * @return { Boolean } 返回开始和结束的位置 + * @example + * ```html + * + *

              + * aaaa + * + * + * bbbb + * + * + *

              + * + * + * + * ``` + */ + createAddress: function (ignoreEnd, ignoreTxt) { + var addr = {}, + me = this; + + function getAddress(isStart) { + var node = isStart ? me.startContainer : me.endContainer; + var parents = domUtils.findParents(node, true, function (node) { + return !domUtils.isBody(node); + }), + addrs = []; + for (var i = 0, ci; (ci = parents[i++]);) { + addrs.push(domUtils.getNodeIndex(ci, ignoreTxt)); + } + var firstIndex = 0; + + if (ignoreTxt) { + if (node.nodeType == 3) { + var tmpNode = node.previousSibling; + while (tmpNode && tmpNode.nodeType == 3) { + firstIndex += tmpNode.nodeValue.replace(fillCharReg, "").length; + tmpNode = tmpNode.previousSibling; + } + firstIndex += isStart ? me.startOffset : me.endOffset; // - (fillCharReg.test(node.nodeValue) ? 1 : 0 ) + } else { + node = node.childNodes[isStart ? me.startOffset : me.endOffset]; + if (node) { + firstIndex = domUtils.getNodeIndex(node, ignoreTxt); + } else { + node = isStart ? me.startContainer : me.endContainer; + var first = node.firstChild; + while (first) { + if (domUtils.isFillChar(first)) { + first = first.nextSibling; + continue; + } + firstIndex++; + if (first.nodeType == 3) { + while (first && first.nodeType == 3) { + first = first.nextSibling; + } + } else { + first = first.nextSibling; + } + } + } + } + } else { + firstIndex = isStart + ? domUtils.isFillChar(node) ? 0 : me.startOffset + : me.endOffset; + } + if (firstIndex < 0) { + firstIndex = 0; + } + addrs.push(firstIndex); + return addrs; + } + + addr.startAddress = getAddress(true); + if (!ignoreEnd) { + addr.endAddress = me.collapsed + ? [].concat(addr.startAddress) + : getAddress(); + } + return addr; + }, + + /** + * 保存 + * @method createAddress + * @private + * @return { Boolean } 返回开始和结束的位置 + * @example + * ```html + * + *

              + * aaaa + * + * + * bbbb + * + * + *

              + * + * + * + * ``` + */ + moveToAddress: function (addr, ignoreEnd) { + var me = this; + + function getNode(address, isStart) { + var tmpNode = me.document.body, + parentNode, + offset; + for (var i = 0, ci, l = address.length; i < l; i++) { + ci = address[i]; + parentNode = tmpNode; + tmpNode = tmpNode.childNodes[ci]; + if (!tmpNode) { + offset = ci; + break; + } + } + if (isStart) { + if (tmpNode) { + me.setStartBefore(tmpNode); + } else { + me.setStart(parentNode, offset); + } + } else { + if (tmpNode) { + me.setEndBefore(tmpNode); + } else { + me.setEnd(parentNode, offset); + } + } + } + + getNode(addr.startAddress, true); + !ignoreEnd && addr.endAddress && getNode(addr.endAddress); + return me; + }, + + /** + * 判断给定的Range对象是否和当前Range对象表示的是同一个选区 + * @method equals + * @param { UE.dom.Range } 需要判断的Range对象 + * @return { Boolean } 如果给定的Range对象与当前Range对象表示的是同一个选区, 则返回true, 否则返回false + */ + equals: function (rng) { + for (var p in this) { + if (this.hasOwnProperty(p)) { + if (this[p] !== rng[p]) return false; + } + } + return true; + }, + + /** + * 遍历range内的节点。每当遍历一个节点时, 都会执行参数项 doFn 指定的函数, 该函数的接受当前遍历的节点 + * 作为其参数。 + * @method traversal + * @param { Function } doFn 对每个遍历的节点要执行的方法, 该方法接受当前遍历的节点作为其参数 + * @return { UE.dom.Range } 当前range对象 + * @example + * ```html + * + * + * + * + * + * + * + * + * + * + * ``` + */ + + /** + * 遍历range内的节点。 + * 每当遍历一个节点时, 都会执行参数项 doFn 指定的函数, 该函数的接受当前遍历的节点 + * 作为其参数。 + * 可以通过参数项 filterFn 来指定一个过滤器, 只有符合该过滤器过滤规则的节点才会触 + * 发doFn函数的执行 + * @method traversal + * @param { Function } doFn 对每个遍历的节点要执行的方法, 该方法接受当前遍历的节点作为其参数 + * @param { Function } filterFn 过滤器, 该函数接受当前遍历的节点作为参数, 如果该节点满足过滤 + * 规则, 请返回true, 该节点会触发doFn, 否则, 请返回false, 则该节点不 + * 会触发doFn。 + * @return { UE.dom.Range } 当前range对象 + * @see UE.dom.Range:traversal(Function) + * @example + * ```html + * + * + * + * + * + * + * + * + * + * + * ``` + */ + traversal: function (doFn, filterFn) { + if (this.collapsed) return this; + var bookmark = this.createBookmark(), + end = bookmark.end, + current = domUtils.getNextDomNode(bookmark.start, false, filterFn); + while ( + current && + current !== end && + domUtils.getPosition(current, end) & domUtils.POSITION_PRECEDING + ) { + var tmpNode = domUtils.getNextDomNode(current, false, filterFn); + doFn(current); + current = tmpNode; + } + return this.moveToBookmark(bookmark); + } + }; + })(); + + +// core/Selection.js + /** + * 选集 + * @file + * @module UE.dom + * @class Selection + * @since 1.2.6.1 + */ + + /** + * 选区集合 + * @unfile + * @module UE.dom + * @class Selection + */ + (function () { + function getBoundaryInformation(range, start) { + var getIndex = domUtils.getNodeIndex; + range = range.duplicate(); + range.collapse(start); + var parent = range.parentElement(); + //如果节点里没有子节点,直接退出 + if (!parent.hasChildNodes()) { + return {container: parent, offset: 0}; + } + var siblings = parent.children, + child, + testRange = range.duplicate(), + startIndex = 0, + endIndex = siblings.length - 1, + index = -1, + distance; + while (startIndex <= endIndex) { + index = Math.floor((startIndex + endIndex) / 2); + child = siblings[index]; + testRange.moveToElementText(child); + var position = testRange.compareEndPoints("StartToStart", range); + if (position > 0) { + endIndex = index - 1; + } else if (position < 0) { + startIndex = index + 1; + } else { + //trace:1043 + return {container: parent, offset: getIndex(child)}; + } + } + if (index == -1) { + testRange.moveToElementText(parent); + testRange.setEndPoint("StartToStart", range); + distance = testRange.text.replace(/(\r\n|\r)/g, "\n").length; + siblings = parent.childNodes; + if (!distance) { + child = siblings[siblings.length - 1]; + return {container: child, offset: child.nodeValue.length}; + } + + var i = siblings.length; + while (distance > 0) { + distance -= siblings[--i].nodeValue.length; + } + return {container: siblings[i], offset: -distance}; + } + testRange.collapse(position > 0); + testRange.setEndPoint(position > 0 ? "StartToStart" : "EndToStart", range); + distance = testRange.text.replace(/(\r\n|\r)/g, "\n").length; + if (!distance) { + return dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName] + ? { + container: parent, + offset: getIndex(child) + (position > 0 ? 0 : 1) + } + : { + container: child, + offset: position > 0 ? 0 : child.childNodes.length + }; + } + while (distance > 0) { + try { + var pre = child; + child = child[position > 0 ? "previousSibling" : "nextSibling"]; + distance -= child.nodeValue.length; + } catch (e) { + return {container: parent, offset: getIndex(pre)}; + } + } + return { + container: child, + offset: position > 0 ? -distance : child.nodeValue.length + distance + }; + } + + /** + * 将ieRange转换为Range对象 + * @param {Range} ieRange ieRange对象 + * @param {Range} range Range对象 + * @return {Range} range 返回转换后的Range对象 + */ + function transformIERangeToRange(ieRange, range) { + if (ieRange.item) { + range.selectNode(ieRange.item(0)); + } else { + var bi = getBoundaryInformation(ieRange, true); + range.setStart(bi.container, bi.offset); + if (ieRange.compareEndPoints("StartToEnd", ieRange) != 0) { + bi = getBoundaryInformation(ieRange, false); + range.setEnd(bi.container, bi.offset); + } + } + return range; + } + + /** + * 获得ieRange + * @param {Selection} sel Selection对象 + * @return {ieRange} 得到ieRange + */ + function _getIERange(sel) { + var ieRange; + //ie下有可能报错 + try { + ieRange = sel.getNative().createRange(); + } catch (e) { + return null; + } + var el = ieRange.item ? ieRange.item(0) : ieRange.parentElement(); + if ((el.ownerDocument || el) === sel.document) { + return ieRange; + } + return null; + } + + var Selection = (dom.Selection = function (doc) { + var me = this, + iframe; + me.document = doc; + if (browser.ie9below) { + iframe = domUtils.getWindow(doc).frameElement; + domUtils.on(iframe, "beforedeactivate", function () { + me._bakIERange = me.getIERange(); + }); + domUtils.on(iframe, "activate", function () { + try { + if (!_getIERange(me) && me._bakIERange) { + me._bakIERange.select(); + } + } catch (ex) { + } + me._bakIERange = null; + }); + } + iframe = doc = null; + }); + + Selection.prototype = { + rangeInBody: function (rng, txtRange) { + var node = browser.ie9below || txtRange + ? rng.item ? rng.item() : rng.parentElement() + : rng.startContainer; + + return node === this.document.body || domUtils.inDoc(node, this.document); + }, + + /** + * 获取原生seleciton对象 + * @method getNative + * @return { Object } 获得selection对象 + * @example + * ```javascript + * editor.selection.getNative(); + * ``` + */ + getNative: function () { + var doc = this.document; + try { + return !doc + ? null + : browser.ie9below + ? doc.selection + : domUtils.getWindow(doc).getSelection(); + } catch (e) { + return null; + } + }, + + /** + * 获得ieRange + * @method getIERange + * @return { Object } 返回ie原生的Range + * @example + * ```javascript + * editor.selection.getIERange(); + * ``` + */ + getIERange: function () { + var ieRange = _getIERange(this); + if (!ieRange) { + if (this._bakIERange) { + return this._bakIERange; + } + } + return ieRange; + }, + + /** + * 缓存当前选区的range和选区的开始节点 + * @method cache + */ + cache: function () { + this.clear(); + this._cachedRange = this.getRange(); + this._cachedStartElement = this.getStart(); + this._cachedStartElementPath = this.getStartElementPath(); + }, + + /** + * 获取选区开始位置的父节点到body + * @method getStartElementPath + * @return { Array } 返回父节点集合 + * @example + * ```javascript + * editor.selection.getStartElementPath(); + * ``` + */ + getStartElementPath: function () { + if (this._cachedStartElementPath) { + return this._cachedStartElementPath; + } + var start = this.getStart(); + if (start) { + return domUtils.findParents(start, true, null, true); + } + return []; + }, + + /** + * 清空缓存 + * @method clear + */ + clear: function () { + this._cachedStartElementPath = this._cachedRange = this._cachedStartElement = null; + }, + + /** + * 编辑器是否得到了选区 + * @method isFocus + */ + isFocus: function () { + try { + if (browser.ie9below) { + var nativeRange = _getIERange(this); + return !!(nativeRange && this.rangeInBody(nativeRange)); + } else { + return !!this.getNative().rangeCount; + } + } catch (e) { + return false; + } + }, + + /** + * 获取选区对应的Range + * @method getRange + * @return { Object } 得到Range对象 + * @example + * ```javascript + * editor.selection.getRange(); + * ``` + */ + getRange: function () { + var me = this; + + function optimze(range) { + var child = me.document.body.firstChild, + collapsed = range.collapsed; + while (child && child.firstChild) { + range.setStart(child, 0); + child = child.firstChild; + } + if (!range.startContainer) { + range.setStart(me.document.body, 0); + } + if (collapsed) { + range.collapse(true); + } + } + + if (me._cachedRange != null) { + return this._cachedRange; + } + var range = new baidu.editor.dom.Range(me.document); + + if (browser.ie9below) { + var nativeRange = me.getIERange(); + if (nativeRange) { + //备份的_bakIERange可能已经实效了,dom树发生了变化比如从源码模式切回来,所以try一下,实效就放到body开始位置 + try { + transformIERangeToRange(nativeRange, range); + } catch (e) { + optimze(range); + } + } else { + optimze(range); + } + } else { + var sel = me.getNative(); + if (sel && sel.rangeCount) { + var firstRange = sel.getRangeAt(0); + var lastRange = sel.getRangeAt(sel.rangeCount - 1); + range + .setStart(firstRange.startContainer, firstRange.startOffset) + .setEnd(lastRange.endContainer, lastRange.endOffset); + if ( + range.collapsed && + domUtils.isBody(range.startContainer) && + !range.startOffset + ) { + optimze(range); + } + } else { + //trace:1734 有可能已经不在dom树上了,标识的节点 + if ( + this._bakRange && + domUtils.inDoc(this._bakRange.startContainer, this.document) + ) { + return this._bakRange; + } + optimze(range); + } + } + return (this._bakRange = range); + }, + + /** + * 获取开始元素,用于状态反射 + * @method getStart + * @return { Element } 获得开始元素 + * @example + * ```javascript + * editor.selection.getStart(); + * ``` + */ + getStart: function () { + if (this._cachedStartElement) { + return this._cachedStartElement; + } + var range = browser.ie9below ? this.getIERange() : this.getRange(), + tmpRange, + start, + tmp, + parent; + if (browser.ie9below) { + if (!range) { + //todo 给第一个值可能会有问题 + return this.document.body.firstChild; + } + //control元素 + if (range.item) { + return range.item(0); + } + tmpRange = range.duplicate(); + //修正ie下x[xx] 闭合后 x|xx + tmpRange.text.length > 0 && tmpRange.moveStart("character", 1); + tmpRange.collapse(1); + start = tmpRange.parentElement(); + parent = tmp = range.parentElement(); + while ((tmp = tmp.parentNode)) { + if (tmp == start) { + start = parent; + break; + } + } + } else { + range.shrinkBoundary(); + start = range.startContainer; + if (start.nodeType == 1 && start.hasChildNodes()) { + start = + start.childNodes[ + Math.min(start.childNodes.length - 1, range.startOffset) + ]; + } + if (start.nodeType == 3) { + return start.parentNode; + } + } + return start; + }, + + /** + * 得到选区中的文本 + * @method getText + * @return { String } 选区中包含的文本 + * @example + * ```javascript + * editor.selection.getText(); + * ``` + */ + getText: function () { + var nativeSel, nativeRange; + if (this.isFocus() && (nativeSel = this.getNative())) { + nativeRange = browser.ie9below + ? nativeSel.createRange() + : nativeSel.getRangeAt(0); + return browser.ie9below ? nativeRange.text : nativeRange.toString(); + } + return ""; + }, + + /** + * 清除选区 + * @method clearRange + * @example + * ```javascript + * editor.selection.clearRange(); + * ``` + */ + clearRange: function () { + this.getNative()[browser.ie9below ? "empty" : "removeAllRanges"](); + } + }; + })(); + + +// core/Editor.js + /** + * 编辑器主类,包含编辑器提供的大部分公用接口 + * @file + * @module UE + * @class Editor + * @since 1.2.6.1 + */ + + /** + * UEditor公用空间,UEditor所有的功能都挂载在该空间下 + * @unfile + * @module UE + */ + + /** + * UEditor的核心类,为用户提供与编辑器交互的接口。 + * @unfile + * @module UE + * @class Editor + */ + + (function () { + var uid = 0, + _selectionChangeTimer; + + /** + * 获取编辑器的html内容,赋值到编辑器所在表单的textarea文本域里面 + * @private + * @method setValue + * @param { UE.Editor } editor 编辑器事例 + */ + function setValue(form, editor) { + if (!editor.options.textarea) { + return; + } + var textarea; + textarea = editor.textarea; + if (!textarea) { + textarea = domUtils.getElementsByTagName(form, "textarea", function (node) { + return node.id === 'ueditor_textarea_' + editor.options.textarea; + })[0]; + } + if (!textarea) { + textarea = domUtils.getElementsByTagName(form, "textarea", function (node) { + return node.name === editor.options.textarea; + })[0]; + } + if (!textarea) { + form.appendChild( + (textarea = domUtils.createElement(document, "textarea", { + name: editor.options.textarea, + id: "ueditor_textarea_" + editor.options.textarea, + style: "display:none" + })) + ); + } + if (textarea && !editor.textarea) { + editor.textarea = textarea; + } + !textarea.getAttribute("name") && + textarea.setAttribute("name", editor.options.textarea); + textarea.value = editor.hasContents() + ? editor.options.allHtmlEnabled + ? editor.getAllHtml() + : editor.getContent(null, null, true) + : ""; + } + + function loadPlugins(me) { + //初始化插件 + for (var pi in UE.plugins) { + UE.plugins[pi].call(me); + } + } + + function checkCurLang(I18N) { + for (var lang in I18N) { + return lang; + } + } + + function langReadied(me) { + me.langIsReady = true; + + me.fireEvent("langReady"); + } + + /** + * 编辑器准备就绪后会触发该事件 + * @module UE + * @class Editor + * @event ready + * @remind render方法执行完成之后,会触发该事件 + * @remind + * @example + * ```javascript + * editor.addListener( 'ready', function( editor ) { + * editor.execCommand( 'focus' ); //编辑器家在完成后,让编辑器拿到焦点 + * } ); + * ``` + */ + /** + * 执行destroy方法,会触发该事件 + * @module UE + * @class Editor + * @event destroy + * @see UE.Editor:destroy() + */ + /** + * 执行reset方法,会触发该事件 + * @module UE + * @class Editor + * @event reset + * @see UE.Editor:reset() + */ + /** + * 执行focus方法,会触发该事件 + * @module UE + * @class Editor + * @event focus + * @see UE.Editor:focus(Boolean) + */ + /** + * 语言加载完成会触发该事件 + * @module UE + * @class Editor + * @event langReady + */ + /** + * 运行命令之后会触发该命令 + * @module UE + * @class Editor + * @event beforeExecCommand + */ + /** + * 运行命令之后会触发该命令 + * @module UE + * @class Editor + * @event afterExecCommand + */ + /** + * 运行命令之前会触发该命令 + * @module UE + * @class Editor + * @event firstBeforeExecCommand + */ + /** + * 在getContent方法执行之前会触发该事件 + * @module UE + * @class Editor + * @event beforeGetContent + * @see UE.Editor:getContent() + */ + /** + * 在getContent方法执行之后会触发该事件 + * @module UE + * @class Editor + * @event afterGetContent + * @see UE.Editor:getContent() + */ + /** + * 在getAllHtml方法执行时会触发该事件 + * @module UE + * @class Editor + * @event getAllHtml + * @see UE.Editor:getAllHtml() + */ + /** + * 在setContent方法执行之前会触发该事件 + * @module UE + * @class Editor + * @event beforeSetContent + * @see UE.Editor:setContent(String) + */ + /** + * 在setContent方法执行之后会触发该事件 + * @module UE + * @class Editor + * @event afterSetContent + * @see UE.Editor:setContent(String) + */ + /** + * 每当编辑器内部选区发生改变时,将触发该事件 + * @event selectionchange + * @warning 该事件的触发非常频繁,不建议在该事件的处理过程中做重量级的处理 + * @example + * ```javascript + * editor.addListener( 'selectionchange', function( editor ) { + * console.log('选区发生改变'); + * } + */ + /** + * 在所有selectionchange的监听函数执行之前,会触发该事件 + * @module UE + * @class Editor + * @event beforeSelectionChange + * @see UE.Editor:selectionchange + */ + /** + * 在所有selectionchange的监听函数执行完之后,会触发该事件 + * @module UE + * @class Editor + * @event afterSelectionChange + * @see UE.Editor:selectionchange + */ + /** + * 编辑器内容发生改变时会触发该事件 + * @module UE + * @class Editor + * @event contentChange + */ + + /** + * 以默认参数构建一个编辑器实例 + * @constructor + * @remind 通过 改构造方法实例化的编辑器,不带ui层.需要render到一个容器,编辑器实例才能正常渲染到页面 + * @example + * ```javascript + * var editor = new UE.Editor(); + * editor.execCommand('blod'); + * ``` + * @see UE.Config + */ + + /** + * 以给定的参数集合创建一个编辑器实例,对于未指定的参数,将应用默认参数。 + * @constructor + * @remind 通过 改构造方法实例化的编辑器,不带ui层.需要render到一个容器,编辑器实例才能正常渲染到页面 + * @param { Object } setting 创建编辑器的参数 + * @example + * ```javascript + * var editor = new UE.Editor(); + * editor.execCommand('blod'); + * ``` + * @see UE.Config + */ + var Editor = (UE.Editor = function (options) { + var me = this; + me.uid = uid++; + EventBase.call(me); + me.commands = {}; + me.options = utils.extend(utils.clone(options || {}), UEDITOR_CONFIG, true); + me.shortcutkeys = {}; + me.inputRules = []; + me.outputRules = []; + //设置默认的常用属性 + me.setOpt(Editor.defaultOptions(me)); + + /* 尝试异步加载后台配置 */ + me.loadServerConfig(); + + if (!utils.isEmptyObject(UE.I18N)) { + //修改默认的语言类型 + me.options.lang = checkCurLang(UE.I18N); + UE.plugin.load(me); + langReadied(me); + } else { + utils.loadFile( + document, + { + src: + me.options.langPath + + me.options.lang + + "/" + + me.options.lang + + ".js?7a537435", + tag: "script", + type: "text/javascript", + defer: "defer" + }, + function () { + UE.plugin.load(me); + langReadied(me); + } + ); + } + + UE.instants["ueditorInstant" + me.uid] = me; + }); + Editor.prototype = { + registerCommand: function (name, obj) { + this.commands[name] = obj; + }, + /** + * 编辑器对外提供的监听ready事件的接口, 通过调用该方法,达到的效果与监听ready事件是一致的 + * @method ready + * @param { Function } fn 编辑器ready之后所执行的回调, 如果在注册事件之前编辑器已经ready,将会 + * 立即触发该回调。 + * @remind 需要等待编辑器加载完成后才能执行的代码,可以使用该方法传入 + * @example + * ```javascript + * editor.ready( function( editor ) { + * editor.setContent('初始化完毕'); + * } ); + * ``` + * @see UE.Editor.event:ready + */ + ready: function (fn) { + var me = this; + if (fn) { + me.isReady ? fn.apply(me) : me.addListener("ready", fn); + } + }, + + /** + * 该方法是提供给插件里面使用,设置配置项默认值 + * @method setOpt + * @warning 三处设置配置项的优先级: 实例化时传入参数 > setOpt()设置 > config文件里设置 + * @warning 该方法仅供编辑器插件内部和编辑器初始化时调用,其他地方不能调用。 + * @param { String } key 编辑器的可接受的选项名称 + * @param { * } val 该选项可接受的值 + * @example + * ```javascript + * editor.setOpt( 'initContent', '欢迎使用编辑器' ); + * ``` + */ + + /** + * 该方法是提供给插件里面使用,以{key:value}集合的方式设置插件内用到的配置项默认值 + * @method setOpt + * @warning 三处设置配置项的优先级: 实例化时传入参数 > setOpt()设置 > config文件里设置 + * @warning 该方法仅供编辑器插件内部和编辑器初始化时调用,其他地方不能调用。 + * @param { Object } options 将要设置的选项的键值对对象 + * @example + * ```javascript + * editor.setOpt( { + * 'initContent': '欢迎使用编辑器' + * } ); + * ``` + */ + setOpt: function (key, val) { + var obj = {}; + if (utils.isString(key)) { + obj[key] = val; + } else { + obj = key; + } + utils.extend(this.options, obj, true); + }, + getOpt: function (key) { + return this.options[key]; + }, + /** + * 销毁编辑器实例,使用textarea代替 + * @method destroy + * @example + * ```javascript + * editor.destroy(); + * ``` + */ + destroy: function () { + var me = this; + me.fireEvent("destroy"); + var container = me.container.parentNode; + var textarea = me.textarea; + if (!textarea) { + textarea = document.createElement("textarea"); + container.parentNode.insertBefore(textarea, container); + } else { + textarea.style.display = ""; + } + + textarea.style.width = me.iframe.offsetWidth + "px"; + textarea.style.height = me.iframe.offsetHeight + "px"; + textarea.value = me.getContent(); + textarea.id = me.key; + container.innerHTML = ""; + domUtils.remove(container); + var key = me.key; + //trace:2004 + for (var p in me) { + if (me.hasOwnProperty(p)) { + delete this[p]; + } + } + UE.delEditor(key); + }, + + /** + * 渲染编辑器的DOM到指定容器 + * @method render + * @param { String } containerId 指定一个容器ID + * @remind 执行该方法,会触发ready事件 + * @warning 必须且只能调用一次 + */ + + /** + * 渲染编辑器的DOM到指定容器 + * @method render + * @param { Element } containerDom 直接指定容器对象 + * @remind 执行该方法,会触发ready事件 + * @warning 必须且只能调用一次 + */ + render: function (container) { + var me = this, + options = me.options, + getStyleValue = function (attr) { + return parseInt(domUtils.getComputedStyle(container, attr)); + }; + if (utils.isString(container)) { + container = document.getElementById(container); + } + if (container) { + if (options.initialFrameWidth) { + options.minFrameWidth = options.initialFrameWidth; + } else { + options.minFrameWidth = options.initialFrameWidth = + container.offsetWidth; + } + if (options.initialFrameHeight) { + options.minFrameHeight = options.initialFrameHeight; + } else { + options.initialFrameHeight = options.minFrameHeight = + container.offsetHeight; + } + + container.style.width = /%$/.test(options.initialFrameWidth) + ? "100%" + : options.initialFrameWidth - + getStyleValue("padding-left") - + getStyleValue("padding-right") + + "px"; + container.style.height = /%$/.test(options.initialFrameHeight) + ? "100%" + : options.initialFrameHeight - + getStyleValue("padding-top") - + getStyleValue("padding-bottom") + + "px"; + + container.style.zIndex = options.zIndex; + var additionCssHtml = []; + for (var i in options.iframeCssUrlsAddition) { + additionCssHtml.push("") + } + var html = + (ie && browser.version < 9 ? "" : "") + + "" + + "" + + "" + + (options.iframeCssUrl + ? "" + : "") + + (options.initialStyle + ? "" + : "") + + additionCssHtml.join("") + + "" + + "" + + "" + + (options.iframeJsUrl + ? "" + : "") + + ""; + + container.appendChild( + domUtils.createElement(document, "iframe", { + id: "ueditor_" + me.uid, + width: "100%", + height: "100%", + frameborder: "0", + //先注释掉了,加的原因忘记了,但开启会直接导致全屏模式下内容多时不会出现滚动条 + // scrolling :'no', + src: + "javascript:void(function(){document.open();" + + (options.customDomain && document.domain != location.hostname + ? 'document.domain="' + document.domain + '";' + : "") + + 'document.write("' + + html + + '");document.close();}())' + }) + ); + container.style.overflow = "hidden"; + //解决如果是给定的百分比,会导致高度算不对的问题 + setTimeout(function () { + if (/%$/.test(options.initialFrameWidth)) { + options.minFrameWidth = options.initialFrameWidth = + container.offsetWidth; + //如果这里给定宽度,会导致ie在拖动窗口大小时,编辑区域不随着变化 + // container.style.width = options.initialFrameWidth + 'px'; + } + if (/%$/.test(options.initialFrameHeight)) { + options.minFrameHeight = options.initialFrameHeight = + container.offsetHeight; + container.style.height = options.initialFrameHeight + "px"; + } + }); + } + }, + + /** + * 编辑器初始化 + * @method _setup + * @private + * @param { Element } doc 编辑器Iframe中的文档对象 + */ + _setup: function (doc) { + var me = this, + options = me.options; + if (ie) { + doc.body.disabled = true; + doc.body.contentEditable = true; + doc.body.disabled = false; + } else { + doc.body.contentEditable = true; + } + doc.body.spellcheck = false; + me.document = doc; + me.window = doc.defaultView || doc.parentWindow; + me.iframe = me.window.frameElement; + me.body = doc.body; + me.selection = new dom.Selection(doc); + //gecko初始化就能得到range,无法判断isFocus了 + var geckoSel; + if (browser.gecko && (geckoSel = this.selection.getNative())) { + geckoSel.removeAllRanges(); + } + this._initEvents(); + //为form提交提供一个隐藏的textarea + for ( + var form = this.iframe.parentNode; + !domUtils.isBody(form); + form = form.parentNode + ) { + if (form.tagName === "FORM") { + me.form = form; + if (me.options.autoSyncData) { + domUtils.on(me.window, "blur", function () { + setValue(form, me); + }); + domUtils.on(form, "submit", function () { + me.fireEvent("beforesubmit"); + }); + } else { + domUtils.on(form, "submit", function () { + setValue(this, me); + me.fireEvent("beforesubmit"); + }); + } + break; + } + } + if (options.initialContent) { + if (options.autoClearinitialContent) { + var oldExecCommand = me.execCommand; + me.execCommand = function () { + me.fireEvent("firstBeforeExecCommand"); + return oldExecCommand.apply(me, arguments); + }; + this._setDefaultContent(options.initialContent); + } else this.setContent(options.initialContent, false, true); + } + + //编辑器不能为空内容 + + if (domUtils.isEmptyNode(me.body)) { + me.body.innerHTML = "

              " + (browser.ie ? "" : "
              ") + "

              "; + } + //如果要求focus, 就把光标定位到内容开始 + if (options.focus) { + setTimeout(function () { + me.focus(me.options.focusInEnd); + //如果自动清除开着,就不需要做selectionchange; + !me.options.autoClearinitialContent && me._selectionChange(); + }, 0); + } + if (!me.container) { + me.container = this.iframe.parentNode; + } + if (options.fullscreen && me.ui) { + me.ui.setFullScreen(true); + } + + try { + me.document.execCommand("2D-position", false, false); + } catch (e) { + } + try { + me.document.execCommand("enableInlineTableEditing", false, false); + } catch (e) { + } + try { + me.document.execCommand("enableObjectResizing", false, false); + } catch (e) { + } + + //挂接快捷键 + me._bindshortcutKeys(); + me.isReady = 1; + me.fireEvent("ready"); + options.onready && options.onready.call(me); + if (!browser.ie9below) { + domUtils.on(me.window, ["blur", "focus"], function (e) { + //chrome下会出现alt+tab切换时,导致选区位置不对 + if (e.type == "blur") { + me._bakRange = me.selection.getRange(); + try { + me._bakNativeRange = me.selection.getNative().getRangeAt(0); + me.selection.getNative().removeAllRanges(); + } catch (e) { + me._bakNativeRange = null; + } + } else { + try { + me._bakRange && me._bakRange.select(); + } catch (e) { + } + } + }); + } + //trace:1518 ff3.6body不够寛,会导致点击空白处无法获得焦点 + if (browser.gecko && browser.version <= 10902) { + //修复ff3.6初始化进来,不能点击获得焦点 + me.body.contentEditable = false; + setTimeout(function () { + me.body.contentEditable = true; + }, 100); + setInterval(function () { + me.body.style.height = me.iframe.offsetHeight - 20 + "px"; + }, 100); + } + + !options.isShow && me.setHide(); + options.readonly && me.setDisabled(); + }, + + /** + * 同步数据到编辑器所在的form + * 从编辑器的容器节点向上查找form元素,若找到,就同步编辑内容到找到的form里,为提交数据做准备,主要用于是手动提交的情况 + * 后台取得数据的键值,使用你容器上的name属性,如果没有就使用参数里的textarea项 + * @method sync + * @example + * ```javascript + * editor.sync(); + * form.sumbit(); //form变量已经指向了form元素 + * ``` + */ + + /** + * 根据传入的formId,在页面上查找要同步数据的表单,若找到,就同步编辑内容到找到的form里,为提交数据做准备 + * 后台取得数据的键值,该键值默认使用给定的编辑器容器的name属性,如果没有name属性则使用参数项里给定的“textarea”项 + * @method sync + * @param { String } formID 指定一个要同步数据的form的id,编辑器的数据会同步到你指定form下 + */ + sync: function (formId) { + var me = this, + form = formId + ? document.getElementById(formId) + : domUtils.findParent( + me.iframe.parentNode, + function (node) { + return node.tagName === "FORM"; + }, + true + ); + form && setValue(form, me); + }, + + /** + * 手动触发更新按钮栏状态 + */ + syncCommandState: function () { + this.fireEvent("selectionchange"); + }, + + /** + * 设置编辑器宽度 + * @param width + */ + setWidth: function (width) { + if (width !== parseInt(this.iframe.parentNode.parentNode.style.width)) { + this.iframe.parentNode.parentNode.style.width = width + "px"; + } + }, + + /** + * 设置编辑器高度 + * @method setHeight + * @remind 当配置项autoHeightEnabled为真时,该方法无效 + * @param { Number } number 设置的高度值,纯数值,不带单位 + * @example + * ```javascript + * editor.setHeight(number); + * ``` + */ + setHeight: function (height, notSetHeight) { + if (height !== parseInt(this.iframe.parentNode.style.height)) { + this.iframe.parentNode.style.height = height + "px"; + } + !notSetHeight && + (this.options.minFrameHeight = this.options.initialFrameHeight = height); + this.body.style.height = height + "px"; + !notSetHeight && this.trigger("setHeight"); + }, + + /** + * 为编辑器的编辑命令提供快捷键 + * 这个接口是为插件扩展提供的接口,主要是为新添加的插件,如果需要添加快捷键,所提供的接口 + * @method addshortcutkey + * @param { Object } keyset 命令名和快捷键键值对对象,多个按钮的快捷键用“+”分隔 + * @example + * ```javascript + * editor.addshortcutkey({ + * "Bold" : "ctrl+66",//^B + * "Italic" : "ctrl+73", //^I + * }); + * ``` + */ + /** + * 这个接口是为插件扩展提供的接口,主要是为新添加的插件,如果需要添加快捷键,所提供的接口 + * @method addshortcutkey + * @param { String } cmd 触发快捷键时,响应的命令 + * @param { String } keys 快捷键的字符串,多个按钮用“+”分隔 + * @example + * ```javascript + * editor.addshortcutkey("Underline", "ctrl+85"); //^U + * ``` + */ + addshortcutkey: function (cmd, keys) { + var obj = {}; + if (keys) { + obj[cmd] = keys; + } else { + obj = cmd; + } + utils.extend(this.shortcutkeys, obj); + }, + + /** + * 对编辑器设置keydown事件监听,绑定快捷键和命令,当快捷键组合触发成功,会响应对应的命令 + * @method _bindshortcutKeys + * @private + */ + _bindshortcutKeys: function () { + var me = this, + shortcutkeys = this.shortcutkeys; + me.addListener("keydown", function (type, e) { + var keyCode = e.keyCode || e.which; + for (var i in shortcutkeys) { + var tmp = shortcutkeys[i].split(","); + for (var t = 0, ti; (ti = tmp[t++]);) { + ti = ti.split(":"); + var key = ti[0], + param = ti[1]; + if ( + /^(ctrl)(\+shift)?\+(\d+)$/.test(key.toLowerCase()) || + /^(\d+)$/.test(key) + ) { + if ( + ((RegExp.$1 == "ctrl" ? e.ctrlKey || e.metaKey : 0) && + (RegExp.$2 != "" ? e[RegExp.$2.slice(1) + "Key"] : 1) && + keyCode == RegExp.$3) || + keyCode == RegExp.$1 + ) { + if (me.queryCommandState(i, param) != -1) + me.execCommand(i, param); + domUtils.preventDefault(e); + } + } + } + } + }); + }, + + /** + * 获取编辑器的内容 + * @method getContent + * @warning 该方法获取到的是经过编辑器内置的过滤规则进行过滤后得到的内容 + * @return { String } 编辑器的内容字符串, 如果编辑器的内容为空,或者是空的标签内容(如:”<p><br/></p>“), 则返回空字符串 + * @example + * ```javascript + * //编辑器html内容:

              123456

              + * var content = editor.getContent(); //返回值:

              123456

              + * ``` + */ + + /** + * 获取编辑器的内容。 可以通过参数定义编辑器内置的判空规则 + * @method getContent + * @param { Function } fn 自定的判空规则, 要求该方法返回一个boolean类型的值, + * 代表当前编辑器的内容是否空, + * 如果返回true, 则该方法将直接返回空字符串;如果返回false,则编辑器将返回 + * 经过内置过滤规则处理后的内容。 + * @remind 该方法在处理包含有初始化内容的时候能起到很好的作用。 + * @warning 该方法获取到的是经过编辑器内置的过滤规则进行过滤后得到的内容 + * @return { String } 编辑器的内容字符串 + * @example + * ```javascript + * // editor 是一个编辑器的实例 + * var content = editor.getContent( function ( editor ) { + * return editor.body.innerHTML === '欢迎使用UEditor'; //返回空字符串 + * } ); + * ``` + */ + getContent: function (cmd, fn, notSetCursor, ignoreBlank, formatter) { + var me = this; + if (cmd && utils.isFunction(cmd)) { + fn = cmd; + cmd = ""; + } + if (fn ? !fn() : !this.hasContents()) { + return ""; + } + me.fireEvent("beforegetcontent"); + var root = UE.htmlparser(me.body.innerHTML, ignoreBlank); + me.filterOutputRule(root); + me.fireEvent("aftergetcontent", cmd, root); + return root.toHtml(formatter); + }, + + /** + * 取得完整的html代码,可以直接显示成完整的html文档 + * @method getAllHtml + * @return { String } 编辑器的内容html文档字符串 + * @eaxmple + * ```javascript + * editor.getAllHtml(); //返回格式大致是: ...... + * ``` + */ + getAllHtml: function () { + var me = this, + headHtml = [], + html = ""; + me.fireEvent("getAllHtml", headHtml); + if (browser.ie && browser.version > 8) { + var headHtmlForIE9 = ""; + utils.each(me.document.styleSheets, function (si) { + headHtmlForIE9 += si.href + ? '' + : ""; + }); + utils.each(me.document.getElementsByTagName("script"), function (si) { + headHtmlForIE9 += si.outerHTML; + }); + } + return ( + "" + + (me.options.charset + ? '' + : "") + + (headHtmlForIE9 || + me.document.getElementsByTagName("head")[0].innerHTML) + + headHtml.join("\n") + + "" + + "" + + me.getContent(null, null, true) + + "" + ); + }, + + /** + * 得到编辑器的纯文本内容,但会保留段落格式 + * @method getPlainTxt + * @return { String } 编辑器带段落格式的纯文本内容字符串 + * @example + * ```javascript + * //编辑器html内容:

              1

              2

              + * console.log(editor.getPlainTxt()); //输出:"1\n2\n + * ``` + */ + getPlainTxt: function () { + var reg = new RegExp(domUtils.fillChar, "g"), + html = this.body.innerHTML.replace(/[\n\r]/g, ""); //ie要先去了\n在处理 + html = html + .replace(/<(p|div)[^>]*>(| )<\/\1>/gi, "\n") + .replace(//gi, "\n") + .replace(/<[^>/]+>/g, "") + .replace(/(\n)?<\/([^>]+)>/g, function (a, b, c) { + return dtd.$block[c] ? "\n" : b ? b : ""; + }); + //取出来的空格会有c2a0会变成乱码,处理这种情况\u00a0 + return html + .replace(reg, "") + .replace(/\u00a0/g, " ") + .replace(/ /g, " "); + }, + + /** + * 获取编辑器中的纯文本内容,没有段落格式 + * @method getContentTxt + * @return { String } 编辑器不带段落格式的纯文本内容字符串 + * @example + * ```javascript + * //编辑器html内容:

              1

              2

              + * console.log(editor.getPlainTxt()); //输出:"12 + * ``` + */ + getContentTxt: function () { + var reg = new RegExp(domUtils.fillChar, "g"); + //取出来的空格会有c2a0会变成乱码,处理这种情况\u00a0 + return this.body[browser.ie ? "innerText" : "textContent"] + .replace(reg, "") + .replace(/\u00a0/g, " "); + }, + + /** + * 设置编辑器的内容,可修改编辑器当前的html内容 + * @method setContent + * @warning 通过该方法插入的内容,是经过编辑器内置的过滤规则进行过滤后得到的内容 + * @warning 该方法会触发selectionchange事件 + * @param { String } html 要插入的html内容 + * @example + * ```javascript + * editor.getContent('

              test

              '); + * ``` + */ + + /** + * 设置编辑器的内容,可修改编辑器当前的html内容 + * @method setContent + * @warning 通过该方法插入的内容,是经过编辑器内置的过滤规则进行过滤后得到的内容 + * @warning 该方法会触发selectionchange事件 + * @param { String } html 要插入的html内容 + * @param { Boolean } isAppendTo 若传入true,不清空原来的内容,在最后插入内容,否则,清空内容再插入 + * @param { Boolean } notFireSelectionchange 是否阻止触发选区变化,true为阻止,false为不阻止 + * @example + * ```javascript + * //假设设置前的编辑器内容是

              old text

              + * editor.setContent('

              new text

              ', true); //插入的结果是

              old text

              new text

              + * ``` + */ + setContent: function (html, isAppendTo, notFireSelectionchange) { + var me = this; + + me.fireEvent("beforesetcontent", html); + var root = UE.htmlparser(html); + me.filterInputRule(root); + html = root.toHtml(); + + me.body.innerHTML = (isAppendTo ? me.body.innerHTML : "") + html; + + function isCdataDiv(node) { + return node.tagName == "DIV" && node.getAttribute("cdata_tag"); + } + + //给文本或者inline节点套p标签 + if (me.options.enterTag == "p") { + var child = this.body.firstChild, + tmpNode; + if ( + !child || + (child.nodeType == 1 && + (dtd.$cdata[child.tagName] || + isCdataDiv(child) || + domUtils.isCustomeNode(child)) && + child === this.body.lastChild) + ) { + this.body.innerHTML = + "

              " + + (browser.ie ? " " : "
              ") + + "

              " + + this.body.innerHTML; + } else { + var p = me.document.createElement("p"); + while (child) { + while ( + child && + (child.nodeType == 3 || + (child.nodeType == 1 && + dtd.p[child.tagName] && + !dtd.$cdata[child.tagName])) + ) { + tmpNode = child.nextSibling; + p.appendChild(child); + child = tmpNode; + } + if (p.firstChild) { + if (!child) { + me.body.appendChild(p); + break; + } else { + child.parentNode.insertBefore(p, child); + p = me.document.createElement("p"); + } + } + child = child.nextSibling; + } + } + } + me.fireEvent("aftersetcontent"); + me.fireEvent("contentchange"); + + !notFireSelectionchange && me._selectionChange(); + //清除保存的选区 + me._bakRange = me._bakIERange = me._bakNativeRange = null; + //trace:1742 setContent后gecko能得到焦点问题 + var geckoSel; + if (browser.gecko && (geckoSel = this.selection.getNative())) { + geckoSel.removeAllRanges(); + } + if (me.options.autoSyncData) { + me.form && setValue(me.form, me); + } + }, + + /** + * 让编辑器获得焦点,默认focus到编辑器头部 + * @method focus + * @example + * ```javascript + * editor.focus() + * ``` + */ + + /** + * 让编辑器获得焦点,toEnd确定focus位置 + * @method focus + * @param { Boolean } toEnd 默认focus到编辑器头部,toEnd为true时focus到内容尾部 + * @example + * ```javascript + * editor.focus(true) + * ``` + */ + focus: function (toEnd) { + try { + var me = this, + rng = me.selection.getRange(); + if (toEnd) { + var node = me.body.lastChild; + if (node && node.nodeType == 1 && !dtd.$empty[node.tagName]) { + if (domUtils.isEmptyBlock(node)) { + rng.setStartAtFirst(node); + } else { + rng.setStartAtLast(node); + } + rng.collapse(true); + } + rng.setCursor(true); + } else { + if ( + !rng.collapsed && + domUtils.isBody(rng.startContainer) && + rng.startOffset == 0 + ) { + var node = me.body.firstChild; + if (node && node.nodeType == 1 && !dtd.$empty[node.tagName]) { + rng.setStartAtFirst(node).collapse(true); + } + } + + rng.select(true); + } + this.fireEvent("focus selectionchange"); + } catch (e) { + } + }, + isFocus: function () { + return this.selection.isFocus(); + }, + blur: function () { + var sel = this.selection.getNative(); + if (sel.empty && browser.ie) { + var nativeRng = document.body.createTextRange(); + nativeRng.moveToElementText(document.body); + nativeRng.collapse(true); + nativeRng.select(); + sel.empty(); + } else { + sel.removeAllRanges(); + } + + //this.fireEvent('blur selectionchange'); + }, + /** + * 初始化UE事件及部分事件代理 + * @method _initEvents + * @private + */ + _initEvents: function () { + var me = this, + doc = me.document, + win = me.window; + me._proxyDomEvent = utils.bind(me._proxyDomEvent, me); + domUtils.on( + doc, + [ + "click", + "contextmenu", + "mousedown", + "keydown", + "keyup", + "keypress", + "mouseup", + "mouseover", + "mouseout", + "selectstart" + ], + me._proxyDomEvent + ); + domUtils.on(win, ["focus", "blur"], me._proxyDomEvent); + domUtils.on(me.body, "drop", function (e) { + //阻止ff下默认的弹出新页面打开图片 + if (browser.gecko && e.stopPropagation) { + e.stopPropagation(); + } + me.fireEvent("contentchange"); + }); + // 当内容最末尾为非字符时,比较难以在最后插入字符,所以在点击时,自动添加一个空的p标签 + domUtils.on(me.body, "dblclick", function (e) { + try { + var node = me.body.lastChild; + if (!node) { + return; + } + var rect = node.getBoundingClientRect(); + if (e.clientY > rect.top + rect.height) { + var p = document.createElement('p'); + p.innerHTML = '
              '; + me.body.appendChild(p); + setTimeout(function () { + me.focus(true); + }, 100); + } + } catch (e) { + console.error('auto insert p at end', e); + } + }); + domUtils.on(doc, ["mouseup", "keydown"], function (evt) { + //特殊键不触发selectionchange + if ( + evt.type === "keydown" && + (evt.ctrlKey || evt.metaKey || evt.shiftKey || evt.altKey) + ) { + return; + } + if (evt.button === 2) return; + me._selectionChange(250, evt); + }); + }, + /** + * 触发事件代理 + * @method _proxyDomEvent + * @private + * @return { * } fireEvent的返回值 + * @see UE.EventBase:fireEvent(String) + */ + _proxyDomEvent: function (evt) { + if ( + this.fireEvent("before" + evt.type.replace(/^on/, "").toLowerCase()) === + false + ) { + return false; + } + if (this.fireEvent(evt.type.replace(/^on/, ""), evt) === false) { + return false; + } + return this.fireEvent( + "after" + evt.type.replace(/^on/, "").toLowerCase() + ); + }, + /** + * 变化选区 + * @method _selectionChange + * @private + */ + _selectionChange: function (delay, evt) { + var me = this; + //有光标才做selectionchange 为了解决未focus时点击source不能触发更改工具栏状态的问题(source命令notNeedUndo=1) + // if ( !me.selection.isFocus() ){ + // return; + // } + + var hackForMouseUp = false; + var mouseX, mouseY; + if (browser.ie && browser.version < 9 && evt && evt.type == "mouseup") { + var range = this.selection.getRange(); + if (!range.collapsed) { + hackForMouseUp = true; + mouseX = evt.clientX; + mouseY = evt.clientY; + } + } + clearTimeout(_selectionChangeTimer); + _selectionChangeTimer = setTimeout(function () { + if (!me.selection || !me.selection.getNative()) { + return; + } + //修复一个IE下的bug: 鼠标点击一段已选择的文本中间时,可能在mouseup后的一段时间内取到的range是在selection的type为None下的错误值. + //IE下如果用户是拖拽一段已选择文本,则不会触发mouseup事件,所以这里的特殊处理不会对其有影响 + var ieRange; + if (hackForMouseUp && me.selection.getNative().type == "None") { + ieRange = me.document.body.createTextRange(); + try { + ieRange.moveToPoint(mouseX, mouseY); + } catch (ex) { + ieRange = null; + } + } + var bakGetIERange; + if (ieRange) { + bakGetIERange = me.selection.getIERange; + me.selection.getIERange = function () { + return ieRange; + }; + } + me.selection.cache(); + if (bakGetIERange) { + me.selection.getIERange = bakGetIERange; + } + if (me.selection._cachedRange && me.selection._cachedStartElement) { + me.fireEvent("beforeselectionchange"); + // 第二个参数causeByUi为true代表由用户交互造成的selectionchange. + me.fireEvent("selectionchange", !!evt); + me.fireEvent("afterselectionchange"); + me.selection.clear(); + } + }, delay || 50); + }, + + /** + * 执行编辑命令 + * @method _callCmdFn + * @private + * @param { String } fnName 函数名称 + * @param { * } args 传给命令函数的参数 + * @return { * } 返回命令函数运行的返回值 + */ + _callCmdFn: function (fnName, args) { + var cmdName = args[0].toLowerCase(), + cmd, + cmdFn; + cmd = this.commands[cmdName] || UE.commands[cmdName]; + cmdFn = cmd && cmd[fnName]; + //没有querycommandstate或者没有command的都默认返回0 + if ((!cmd || !cmdFn) && fnName == "queryCommandState") { + return 0; + } else if (cmdFn) { + return cmdFn.apply(this, args); + } + }, + + /** + * 执行编辑命令cmdName,完成富文本编辑效果 + * @method execCommand + * @param { String } cmdName 需要执行的命令 + * @remind 具体命令的使用请参考命令列表 + * @return { * } 返回命令函数运行的返回值 + * @example + * ```javascript + * editor.execCommand(cmdName); + * ``` + */ + execCommand: function (cmdName) { + cmdName = cmdName.toLowerCase(); + var me = this, + result, + cmd = me.commands[cmdName] || UE.commands[cmdName]; + if (!cmd || !cmd.execCommand) { + return null; + } + if (!cmd.notNeedUndo && !me.__hasEnterExecCommand) { + me.__hasEnterExecCommand = true; + if (me.queryCommandState.apply(me, arguments) != -1) { + me.fireEvent("saveScene"); + me.fireEvent.apply( + me, + ["beforeexeccommand", cmdName].concat(arguments) + ); + result = this._callCmdFn("execCommand", arguments); + //保存场景时,做了内容对比,再看是否进行contentchange触发,这里多触发了一次,去掉 + // (!cmd.ignoreContentChange && !me._ignoreContentChange) && me.fireEvent('contentchange'); + me.fireEvent.apply( + me, + ["afterexeccommand", cmdName].concat(arguments) + ); + me.fireEvent("saveScene"); + } + me.__hasEnterExecCommand = false; + } else { + result = this._callCmdFn("execCommand", arguments); + !me.__hasEnterExecCommand && + !cmd.ignoreContentChange && + !me._ignoreContentChange && + me.fireEvent("contentchange"); + } + !me.__hasEnterExecCommand && + !cmd.ignoreContentChange && + !me._ignoreContentChange && + me._selectionChange(); + return result; + }, + + /** + * 根据传入的command命令,查选编辑器当前的选区,返回命令的状态 + * @method queryCommandState + * @param { String } cmdName 需要查询的命令名称 + * @remind 具体命令的使用请参考命令列表 + * @return { Number } number 返回放前命令的状态,返回值三种情况:(-1|0|1) + * @example + * ```javascript + * editor.queryCommandState(cmdName) => (-1|0|1) + * ``` + * @see COMMAND.LIST + */ + queryCommandState: function (cmdName) { + return this._callCmdFn("queryCommandState", arguments); + }, + + /** + * 根据传入的command命令,查选编辑器当前的选区,根据命令返回相关的值 + * @method queryCommandValue + * @param { String } cmdName 需要查询的命令名称 + * @remind 具体命令的使用请参考命令列表 + * @remind 只有部分插件有此方法 + * @return { * } 返回每个命令特定的当前状态值 + * @grammar editor.queryCommandValue(cmdName) => {*} + * @see COMMAND.LIST + */ + queryCommandValue: function (cmdName) { + return this._callCmdFn("queryCommandValue", arguments); + }, + + /** + * 检查编辑区域中是否有内容 + * @method hasContents + * @remind 默认有文本内容,或者有以下节点都不认为是空 + * table,ul,ol,dl,iframe,area,base,col,hr,img,embed,input,link,meta,param + * @return { Boolean } 检查有内容返回true,否则返回false + * @example + * ```javascript + * editor.hasContents() + * ``` + */ + + /** + * 检查编辑区域中是否有内容,若包含参数tags中的节点类型,直接返回true + * @method hasContents + * @param { Array } tags 传入数组判断时用到的节点类型 + * @return { Boolean } 若文档中包含tags数组里对应的tag,返回true,否则返回false + * @example + * ```javascript + * editor.hasContents(['span']); + * ``` + */ + hasContents: function (tags) { + if (tags) { + for (var i = 0, ci; (ci = tags[i++]);) { + if (this.document.getElementsByTagName(ci).length > 0) { + return true; + } + } + } + if (!domUtils.isEmptyBlock(this.body)) { + return true; + } + // 随时添加,定义的特殊标签如果存在,不能认为是空 + tags = ["div"]; + for (i = 0; (ci = tags[i++]);) { + var nodes = domUtils.getElementsByTagName(this.document, ci); + for (var n = 0, cn; (cn = nodes[n++]);) { + if (domUtils.isCustomeNode(cn)) { + return true; + } + } + } + // 部分如媒体标签,不能认为为空 + tags = ["video", "iframe"] + for (i = 0; (ci = tags[i++]);) { + var nodes = domUtils.getElementsByTagName(this.document, ci); + for (var n = 0, cn; (cn = nodes[n++]);) { + return true; + } + } + return false; + }, + + /** + * 重置编辑器,可用来做多个tab 使用同一个编辑器实例 + * @method reset + * @remind 此方法会清空编辑器内容,清空回退列表,会触发reset事件 + * @example + * ```javascript + * editor.reset() + * ``` + */ + reset: function () { + this.clear(); + this.fireEvent("reset"); + }, + + /** + * 清空编辑器内容 + * @method clear + * @remind 此方法会清空编辑器内容 + * @example + * ```javascript + * editor.clear() + * ``` + */ + clear: function () { + this.setContent(""); + }, + + /** + * 设置当前编辑区域可以编辑 + * @method setEnabled + * @example + * ```javascript + * editor.setEnabled() + * ``` + */ + setEnabled: function () { + var me = this, + range; + if (me.body.contentEditable === "false") { + me.body.contentEditable = true; + range = me.selection.getRange(); + //有可能内容丢失了 + try { + range.moveToBookmark(me.lastBk); + delete me.lastBk; + } catch (e) { + range.setStartAtFirst(me.body).collapse(true); + } + range.select(true); + if (me.bkqueryCommandState) { + me.queryCommandState = me.bkqueryCommandState; + delete me.bkqueryCommandState; + } + if (me.bkqueryCommandValue) { + me.queryCommandValue = me.bkqueryCommandValue; + delete me.bkqueryCommandValue; + } + me.fireEvent("selectionchange"); + } + }, + enable: function () { + return this.setEnabled(); + }, + + /** 设置当前编辑区域不可编辑 + * @method setDisabled + */ + + /** 设置当前编辑区域不可编辑,except中的命令除外 + * @method setDisabled + * @param { String } except 例外命令的字符串 + * @remind 即使设置了disable,此处配置的例外命令仍然可以执行 + * @example + * ```javascript + * editor.setDisabled('bold'); //禁用工具栏中除加粗之外的所有功能 + * ``` + */ + + /** 设置当前编辑区域不可编辑,except中的命令除外 + * @method setDisabled + * @param { Array } except 例外命令的字符串数组,数组中的命令仍然可以执行 + * @remind 即使设置了disable,此处配置的例外命令仍然可以执行 + * @example + * ```javascript + * editor.setDisabled(['bold','insertimage']); //禁用工具栏中除加粗和插入图片之外的所有功能 + * ``` + */ + setDisabled: function (except) { + var me = this; + except = except ? (utils.isArray(except) ? except : [except]) : []; + if (me.body.contentEditable == "true") { + if (!me.lastBk) { + me.lastBk = me.selection.getRange().createBookmark(true); + } + me.body.contentEditable = false; + me.bkqueryCommandState = me.queryCommandState; + me.bkqueryCommandValue = me.queryCommandValue; + me.queryCommandState = function (type) { + if (utils.indexOf(except, type) != -1) { + return me.bkqueryCommandState.apply(me, arguments); + } + return -1; + }; + me.queryCommandValue = function (type) { + if (utils.indexOf(except, type) != -1) { + return me.bkqueryCommandValue.apply(me, arguments); + } + return null; + }; + me.fireEvent("selectionchange"); + } + }, + disable: function (except) { + return this.setDisabled(except); + }, + + /** + * 设置默认内容 + * @method _setDefaultContent + * @private + * @param { String } cont 要存入的内容 + */ + _setDefaultContent: (function () { + function clear() { + var me = this; + if (me.document.getElementById("initContent")) { + me.body.innerHTML = "

              " + (ie ? "" : "
              ") + "

              "; + me.removeListener("firstBeforeExecCommand focus", clear); + setTimeout(function () { + me.focus(); + me._selectionChange(); + }, 0); + } + } + + return function (cont) { + var me = this; + me.body.innerHTML = '

              ' + cont + "

              "; + + me.addListener("firstBeforeExecCommand focus", clear); + }; + })(), + + /** + * 显示编辑器 + * @method setShow + * @example + * ```javascript + * editor.setShow() + * ``` + */ + setShow: function () { + var me = this, + range = me.selection.getRange(); + if (me.container.style.display == "none") { + //有可能内容丢失了 + try { + range.moveToBookmark(me.lastBk); + delete me.lastBk; + } catch (e) { + range.setStartAtFirst(me.body).collapse(true); + } + //ie下focus实效,所以做了个延迟 + setTimeout(function () { + range.select(true); + }, 100); + me.container.style.display = ""; + } + }, + show: function () { + return this.setShow(); + }, + /** + * 隐藏编辑器 + * @method setHide + * @example + * ```javascript + * editor.setHide() + * ``` + */ + setHide: function () { + var me = this; + if (!me.lastBk) { + me.lastBk = me.selection.getRange().createBookmark(true); + } + me.container.style.display = "none"; + }, + hide: function () { + return this.setHide(); + }, + + /** + * 根据指定的路径,获取对应的语言资源 + * @method getLang + * @param { String } path 路径根据的是lang目录下的语言文件的路径结构 + * @return { Object | String } 根据路径返回语言资源的Json格式对象或者语言字符串 + * @example + * ```javascript + * editor.getLang('contextMenu.delete'); //如果当前是中文,那返回是的是'删除' + * ``` + */ + getLang: function (path) { + var lang = UE.I18N[this.options.lang]; + if (!lang) { + throw Error("not import language file"); + } + path = (path || "").split("."); + for (var i = 0, ci; (ci = path[i++]);) { + lang = lang[ci]; + if (!lang) break; + } + return lang; + }, + + /** + * 计算编辑器html内容字符串的长度 + * @method getContentLength + * @return { Number } 返回计算的长度 + * @example + * ```javascript + * //编辑器html内容

              132

              + * editor.getContentLength() //返回27 + * ``` + */ + /** + * 计算编辑器当前纯文本内容的长度 + * @method getContentLength + * @param { Boolean } ingoneHtml 传入true时,只按照纯文本来计算 + * @return { Number } 返回计算的长度,内容中有hr/img/iframe标签,长度加1 + * @example + * ```javascript + * //编辑器html内容

              132

              + * editor.getContentLength() //返回3 + * ``` + */ + getContentLength: function (ingoneHtml, tagNames) { + var count = this.getContent(false, false, true).length; + if (ingoneHtml) { + tagNames = (tagNames || []).concat(["hr", "img", "iframe"]); + count = this.getContentTxt().replace(/[\t\r\n]+/g, "").length; + for (var i = 0, ci; (ci = tagNames[i++]);) { + count += this.document.getElementsByTagName(ci).length; + } + } + return count; + }, + + getScrollTop: function () { + return Math.max(this.document.documentElement.scrollTop, this.document.body.scrollTop); + }, + getScrollLeft: function () { + return Math.max(this.document.documentElement.scrollLeft, this.document.body.scrollLeft); + }, + + /** + * 注册输入过滤规则 + * @method addInputRule + * @param { Function } rule 要添加的过滤规则 + * @example + * ```javascript + * editor.addInputRule(function(root){ + * $.each(root.getNodesByTagName('div'),function(i,node){ + * node.tagName="p"; + * }); + * }); + * ``` + */ + addInputRule: function (rule) { + this.inputRules.push(rule); + }, + + /** + * 执行注册的过滤规则 + * @method filterInputRule + * @param { UE.uNode } root 要过滤的uNode节点 + * @remind 执行editor.setContent方法和执行'inserthtml'命令后,会运行该过滤函数 + * @example + * ```javascript + * editor.filterInputRule(editor.body); + * ``` + * @see UE.Editor:addInputRule + */ + filterInputRule: function (root) { + for (var i = 0, ci; (ci = this.inputRules[i++]);) { + ci.call(this, root); + } + }, + + /** + * 注册输出过滤规则 + * @method addOutputRule + * @param { Function } rule 要添加的过滤规则 + * @example + * ```javascript + * editor.addOutputRule(function(root){ + * $.each(root.getNodesByTagName('p'),function(i,node){ + * node.tagName="div"; + * }); + * }); + * ``` + */ + addOutputRule: function (rule) { + this.outputRules.push(rule); + }, + + /** + * 根据输出过滤规则,过滤编辑器内容 + * @method filterOutputRule + * @remind 执行editor.getContent方法的时候,会先运行该过滤函数 + * @param { UE.uNode } root 要过滤的uNode节点 + * @example + * ```javascript + * editor.filterOutputRule(editor.body); + * ``` + * @see UE.Editor:addOutputRule + */ + filterOutputRule: function (root) { + for (var i = 0, ci; (ci = this.outputRules[i++]);) { + ci.call(this, root); + } + }, + + /** + * 根据action名称获取请求的路径 + * @method getActionUrl + * @remind 假如没有设置serverUrl,会根据imageUrl设置默认的controller路径 + * @param { String } action action名称 + * @example + * ```javascript + * editor.getActionUrl('config'); //返回 "/ueditor/php/controller.php?action=config" + * editor.getActionUrl('image'); //返回 "/ueditor/php/controller.php?action=uplaodimage" + * editor.getActionUrl('scrawl'); //返回 "/ueditor/php/controller.php?action=uplaodscrawl" + * editor.getActionUrl('imageManager'); //返回 "/ueditor/php/controller.php?action=listimage" + * ``` + */ + getActionUrl: function (action) { + var serverUrl = this.getOpt("serverUrl") + if (!action) { + return serverUrl; + } + var actionName = this.getOpt(action) || action, + imageUrl = this.getOpt("imageUrl"); + + if (!serverUrl && imageUrl) { + serverUrl = imageUrl.replace(/^(.*[\/]).+([\.].+)$/, "$1controller$2"); + } + if (serverUrl) { + serverUrl = + serverUrl + + (serverUrl.indexOf("?") === -1 ? "?" : "&") + + "action=" + + (actionName || ""); + return utils.formatUrl(serverUrl); + } else { + return ""; + } + } + }; + utils.inherits(Editor, EventBase); + })(); + + +// core/Editor.defaultoptions.js +//维护编辑器一下默认的不在插件中的配置项 + UE.Editor.defaultOptions = function (editor) { + var _url = editor.options.UEDITOR_HOME_URL; + return { + isShow: true, + initialContent: "", + initialStyle: "", + autoClearinitialContent: false, + iframeCssUrl: _url + "themes/iframe.css?c20ec247", + iframeCssUrlsAddition: [], + textarea: '', + focus: false, + focusInEnd: true, + autoClearEmptyNode: true, + fullscreen: false, + readonly: false, + zIndex: 999, + imagePopup: true, + enterTag: "p", + customDomain: false, + lang: "zh-cn", + langPath: _url + "lang/", + theme: "default", + themePath: _url + "themes/", + allHtmlEnabled: false, + scaleEnabled: false, + tableNativeEditInFF: false, + autoSyncData: true, + fileNameFormat: "{time}{rand:6}" + }; + }; + + +// core/loadconfig.js + (function () { + UE.Editor.prototype.loadServerConfig = function () { + var me = this; + setTimeout(function () { + + if(me.options.loadConfigFromServer===false){ + return; + } + + try { + me.options.imageUrl && + me.setOpt( + "serverUrl", + me.options.imageUrl.replace( + /^(.*[\/]).+([\.].+)$/, + "$1controller$2" + ) + ); + + var configUrl = me.getActionUrl("config"), + isJsonp = utils.isCrossDomainUrl(configUrl); + + /* 发出ajax请求 */ + me._serverConfigLoaded = false; + + configUrl && + UE.ajax.request(configUrl, { + method: "GET", + dataType: isJsonp ? "jsonp" : "", + headers: me.options.serverHeaders || {}, + onsuccess: function (r) { + try { + var config = isJsonp ? r : eval("(" + r.responseText + ")"); + config = me.options.serverResponsePrepare( config ) + // console.log('me.options.before', me.options.audioConfig); + me.options = utils.merge(me.options, config); + // console.log('server.config', config.audioConfig); + // console.log('me.options.after', me.options.audioConfig); + me.fireEvent("serverConfigLoaded"); + me._serverConfigLoaded = true; + } catch (e) { + showErrorMsg(me.getLang("loadconfigFormatError")); + } + }, + onerror: function () { + showErrorMsg(me.getLang("loadconfigHttpError")); + } + }); + + + } catch (e) { + showErrorMsg(me.getLang("loadconfigError")); + } + }); + + function showErrorMsg(msg) { + console && console.error(msg); + //me.fireEvent('showMessage', { + // 'title': msg, + // 'type': 'error' + //}); + } + }; + + UE.Editor.prototype.isServerConfigLoaded = function () { + var me = this; + return me._serverConfigLoaded || false; + }; + + UE.Editor.prototype.afterConfigReady = function (handler) { + if (!handler || !utils.isFunction(handler)) return; + var me = this; + var readyHandler = function () { + handler.apply(me, arguments); + me.removeListener("serverConfigLoaded", readyHandler); + }; + + if (me.isServerConfigLoaded()) { + handler.call(me, "serverConfigLoaded"); + } else { + me.addListener("serverConfigLoaded", readyHandler); + } + }; + })(); + + +// core/ajax.js + /** + * @file + * @module UE.ajax + * @since 1.2.6.1 + */ + + /** + * 提供对ajax请求的支持 + * @module UE.ajax + */ + UE.ajax = (function () { + //创建一个ajaxRequest对象 + var fnStr = "XMLHttpRequest()"; + try { + new ActiveXObject("Msxml2.XMLHTTP"); + fnStr = "ActiveXObject('Msxml2.XMLHTTP')"; + } catch (e) { + try { + new ActiveXObject("Microsoft.XMLHTTP"); + fnStr = "ActiveXObject('Microsoft.XMLHTTP')"; + } catch (e) { + } + } + var creatAjaxRequest = new Function("return new " + fnStr); + + /** + * 将json参数转化成适合ajax提交的参数列表 + * @param json + */ + function json2str(json) { + var strArr = []; + for (var i in json) { + //忽略默认的几个参数 + if ( + i == "method" || + i == "timeout" || + i == "async" || + i == "dataType" || + i == "callback" + ) + continue; + //忽略控制 + if (json[i] == undefined || json[i] == null) continue; + //传递过来的对象和函数不在提交之列 + if ( + !( + (typeof json[i]).toLowerCase() == "function" || + (typeof json[i]).toLowerCase() == "object" + ) + ) { + strArr.push(encodeURIComponent(i) + "=" + encodeURIComponent(json[i])); + } else if (utils.isArray(json[i])) { + //支持传数组内容 + for (var j = 0; j < json[i].length; j++) { + strArr.push( + encodeURIComponent(i) + "[]=" + encodeURIComponent(json[i][j]) + ); + } + } + } + return strArr.join("&"); + } + + function doAjax(url, ajaxOptions) { + var xhr = creatAjaxRequest(), + //是否超时 + timeIsOut = false, + //默认参数 + defaultAjaxOptions = { + method: "POST", + timeout: 5000, + async: true, + headers: {}, + data: {}, //需要传递对象的话只能覆盖 + onsuccess: function () { + }, + onerror: function () { + } + }; + + if (typeof url === "object") { + ajaxOptions = url; + url = ajaxOptions.url; + } + if (!xhr || !url) return; + var ajaxOpts = ajaxOptions + ? utils.extend(defaultAjaxOptions, ajaxOptions) + : defaultAjaxOptions; + + // console.log('ajaxOpts',ajaxOpts); + + var submitStr = json2str(ajaxOpts); // { name:"Jim",city:"Beijing" } --> "name=Jim&city=Beijing" + //如果用户直接通过data参数传递json对象过来,则也要将此json对象转化为字符串 + if (!utils.isEmptyObject(ajaxOpts.data)) { + submitStr += (submitStr ? "&" : "") + json2str(ajaxOpts.data); + } + //超时检测 + var timerID = setTimeout(function () { + if (xhr.readyState !== 4) { + timeIsOut = true; + xhr.abort(); + clearTimeout(timerID); + } + }, ajaxOpts.timeout); + + var method = ajaxOpts.method.toUpperCase(); + var str = + url + + (url.indexOf("?") === -1 ? "?" : "&") + + (method === "POST" ? "" : submitStr + "&noCache=" + +new Date()); + xhr.open(method, str, ajaxOpts.async); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + if (!timeIsOut && xhr.status === 200) { + ajaxOpts.onsuccess(xhr); + } else { + ajaxOpts.onerror(xhr); + } + } + }; + if (ajaxOpts.headers) { + for (var key in ajaxOpts.headers) { + xhr.setRequestHeader(key, ajaxOpts.headers[key]); + } + } + if (method === "POST") { + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + xhr.send(submitStr); + } else { + xhr.send(null); + } + } + + function doJsonp(url, opts) { + var successhandler = opts.onsuccess || function () { + }, + scr = document.createElement("SCRIPT"), + options = opts || {}, + charset = options["charset"], + callbackField = options["jsonp"] || "callback", + callbackFnName, + timeOut = options["timeOut"] || 0, + timer, + reg = new RegExp("(\\?|&)" + callbackField + "=([^&]*)"), + matches; + + if (utils.isFunction(successhandler)) { + callbackFnName = + "bd__editor__" + Math.floor(Math.random() * 2147483648).toString(36); + window[callbackFnName] = getCallBack(0); + } else if (utils.isString(successhandler)) { + callbackFnName = successhandler; + } else { + if ((matches = reg.exec(url))) { + callbackFnName = matches[2]; + } + } + + url = url.replace(reg, "\x241" + callbackField + "=" + callbackFnName); + + if (url.search(reg) < 0) { + url += + (url.indexOf("?") < 0 ? "?" : "&") + + callbackField + + "=" + + callbackFnName; + } + + var queryStr = json2str(opts); // { name:"Jim",city:"Beijing" } --> "name=Jim&city=Beijing" + //如果用户直接通过data参数传递json对象过来,则也要将此json对象转化为字符串 + if (!utils.isEmptyObject(opts.data)) { + queryStr += (queryStr ? "&" : "") + json2str(opts.data); + } + if (queryStr) { + url = url.replace(/\?/, "?" + queryStr + "&"); + } + + scr.onerror = getCallBack(1); + if (timeOut) { + timer = setTimeout(getCallBack(1), timeOut); + } + createScriptTag(scr, url, charset); + + function createScriptTag(scr, url, charset) { + scr.setAttribute("type", "text/javascript"); + scr.setAttribute("defer", "defer"); + charset && scr.setAttribute("charset", charset); + scr.setAttribute("src", url); + document.getElementsByTagName("head")[0].appendChild(scr); + } + + function getCallBack(onTimeOut) { + return function () { + try { + if (onTimeOut) { + options.onerror && options.onerror(); + } else { + try { + clearTimeout(timer); + successhandler.apply(window, arguments); + } catch (e) { + } + } + } catch (exception) { + options.onerror && options.onerror.call(window, exception); + } finally { + options.oncomplete && options.oncomplete.apply(window, arguments); + scr.parentNode && scr.parentNode.removeChild(scr); + window[callbackFnName] = null; + try { + delete window[callbackFnName]; + } catch (e) { + } + } + }; + } + } + + return { + /** + * 根据给定的参数项,向指定的url发起一个ajax请求。 ajax请求完成后,会根据请求结果调用相应回调: 如果请求 + * 成功, 则调用onsuccess回调, 失败则调用 onerror 回调 + * @method request + * @param { URLString } url ajax请求的url地址 + * @param { Object } ajaxOptions ajax请求选项的键值对,支持的选项如下: + * @example + * ```javascript + * //向sayhello.php发起一个异步的Ajax GET请求, 请求超时时间为10s, 请求完成后执行相应的回调。 + * UE.ajax.requeset( 'sayhello.php', { + * + * //请求方法。可选值: 'GET', 'POST',默认值是'POST' + * method: 'GET', + * + * //超时时间。 默认为5000, 单位是ms + * timeout: 10000, + * + * //是否是异步请求。 true为异步请求, false为同步请求 + * async: true, + * + * //请求携带的数据。如果请求为GET请求, data会经过stringify后附加到请求url之后。 + * data: { + * name: 'ueditor' + * }, + * + * //请求成功后的回调, 该回调接受当前的XMLHttpRequest对象作为参数。 + * onsuccess: function ( xhr ) { + * console.log( xhr.responseText ); + * }, + * + * //请求失败或者超时后的回调。 + * onerror: function ( xhr ) { + * alert( 'Ajax请求失败' ); + * } + * + * } ); + * ``` + */ + + /** + * 根据给定的参数项发起一个ajax请求, 参数项里必须包含一个url地址。 ajax请求完成后,会根据请求结果调用相应回调: 如果请求 + * 成功, 则调用onsuccess回调, 失败则调用 onerror 回调。 + * @method request + * @warning 如果在参数项里未提供一个key为“url”的地址值,则该请求将直接退出。 + * @param { Object } ajaxOptions ajax请求选项的键值对,支持的选项如下: + * @example + * ```javascript + * + * //向sayhello.php发起一个异步的Ajax POST请求, 请求超时时间为5s, 请求完成后不执行任何回调。 + * UE.ajax.requeset( 'sayhello.php', { + * + * //请求的地址, 该项是必须的。 + * url: 'sayhello.php' + * + * } ); + * ``` + */ + request: function (url, opts) { + if (opts && opts.dataType === "jsonp") { + doJsonp(url, opts); + } else { + doAjax(url, opts); + } + }, + getJSONP: function (url, data, fn) { + var opts = { + data: data, + oncomplete: fn + }; + doJsonp(url, opts); + } + }; + })(); + + +// core/api.js + UE.api = (function () { + // axios import + var axios = null; + !function (e, t) { + axios = t() + }(this, (function () { + "use strict"; + + function e(t) { + return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { + return typeof e + } : function (e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e + }, e(t) + } + + function t(e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + } + + function n(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) + } + } + + function r(e, t, r) { + return t && n(e.prototype, t), r && n(e, r), Object.defineProperty(e, "prototype", {writable: !1}), e + } + + function o(e, t) { + return function (e) { + if (Array.isArray(e)) return e + }(e) || function (e, t) { + var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; + if (null == n) return; + var r, o, i = [], a = !0, s = !1; + try { + for (n = n.call(e); !(a = (r = n.next()).done) && (i.push(r.value), !t || i.length !== t); a = !0) ; + } catch (e) { + s = !0, o = e + } finally { + try { + a || null == n.return || n.return() + } finally { + if (s) throw o + } + } + return i + }(e, t) || function (e, t) { + if (!e) return; + if ("string" == typeof e) return i(e, t); + var n = Object.prototype.toString.call(e).slice(8, -1); + "Object" === n && e.constructor && (n = e.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(e); + if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return i(e, t) + }(e, t) || function () { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }() + } + + function i(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; + return r + } + + function a(e, t) { + return function () { + return e.apply(t, arguments) + } + } + + var s, u = Object.prototype.toString, c = Object.getPrototypeOf, f = (s = Object.create(null), function (e) { + var t = u.call(e); + return s[t] || (s[t] = t.slice(8, -1).toLowerCase()) + }), l = function (e) { + return e = e.toLowerCase(), function (t) { + return f(t) === e + } + }, d = function (t) { + return function (n) { + return e(n) === t + } + }, p = Array.isArray, h = d("undefined"); + var m = l("ArrayBuffer"); + var y = d("string"), v = d("function"), b = d("number"), g = function (t) { + return null !== t && "object" === e(t) + }, w = function (e) { + if ("object" !== f(e)) return !1; + var t = c(e); + return !(null !== t && t !== Object.prototype && null !== Object.getPrototypeOf(t) || Symbol.toStringTag in e || Symbol.iterator in e) + }, E = l("Date"), O = l("File"), S = l("Blob"), R = l("FileList"), A = l("URLSearchParams"); + + function T(t, n) { + var r, o, i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, a = i.allOwnKeys, + s = void 0 !== a && a; + if (null != t) if ("object" !== e(t) && (t = [t]), p(t)) for (r = 0, o = t.length; r < o; r++) n.call(null, t[r], r, t); else { + var u, c = s ? Object.getOwnPropertyNames(t) : Object.keys(t), f = c.length; + for (r = 0; r < f; r++) u = c[r], n.call(null, t[u], u, t) + } + } + + function j(e, t) { + t = t.toLowerCase(); + for (var n, r = Object.keys(e), o = r.length; o-- > 0;) if (t === (n = r[o]).toLowerCase()) return n; + return null + } + + var N = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : global, + C = function (e) { + return !h(e) && e !== N + }; + var x, P = (x = "undefined" != typeof Uint8Array && c(Uint8Array), function (e) { + return x && e instanceof x + }), k = l("HTMLFormElement"), U = function (e) { + var t = Object.prototype.hasOwnProperty; + return function (e, n) { + return t.call(e, n) + } + }(), _ = l("RegExp"), F = function (e, t) { + var n = Object.getOwnPropertyDescriptors(e), r = {}; + T(n, (function (n, o) { + !1 !== t(n, o, e) && (r[o] = n) + })), Object.defineProperties(e, r) + }, B = "abcdefghijklmnopqrstuvwxyz", L = "0123456789", + D = {DIGIT: L, ALPHA: B, ALPHA_DIGIT: B + B.toUpperCase() + L}; + var I = l("AsyncFunction"), q = { + isArray: p, + isArrayBuffer: m, + isBuffer: function (e) { + return null !== e && !h(e) && null !== e.constructor && !h(e.constructor) && v(e.constructor.isBuffer) && e.constructor.isBuffer(e) + }, + isFormData: function (e) { + var t; + return e && ("function" == typeof FormData && e instanceof FormData || v(e.append) && ("formdata" === (t = f(e)) || "object" === t && v(e.toString) && "[object FormData]" === e.toString())) + }, + isArrayBufferView: function (e) { + return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && m(e.buffer) + }, + isString: y, + isNumber: b, + isBoolean: function (e) { + return !0 === e || !1 === e + }, + isObject: g, + isPlainObject: w, + isUndefined: h, + isDate: E, + isFile: O, + isBlob: S, + isRegExp: _, + isFunction: v, + isStream: function (e) { + return g(e) && v(e.pipe) + }, + isURLSearchParams: A, + isTypedArray: P, + isFileList: R, + forEach: T, + merge: function e() { + for (var t = C(this) && this || {}, n = t.caseless, r = {}, o = function (t, o) { + var i = n && j(r, o) || o; + w(r[i]) && w(t) ? r[i] = e(r[i], t) : w(t) ? r[i] = e({}, t) : p(t) ? r[i] = t.slice() : r[i] = t + }, i = 0, a = arguments.length; i < a; i++) arguments[i] && T(arguments[i], o); + return r + }, + extend: function (e, t, n) { + var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, o = r.allOwnKeys; + return T(t, (function (t, r) { + n && v(t) ? e[r] = a(t, n) : e[r] = t + }), {allOwnKeys: o}), e + }, + trim: function (e) { + return e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") + }, + stripBOM: function (e) { + return 65279 === e.charCodeAt(0) && (e = e.slice(1)), e + }, + inherits: function (e, t, n, r) { + e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {value: t.prototype}), n && Object.assign(e.prototype, n) + }, + toFlatObject: function (e, t, n, r) { + var o, i, a, s = {}; + if (t = t || {}, null == e) return t; + do { + for (i = (o = Object.getOwnPropertyNames(e)).length; i-- > 0;) a = o[i], r && !r(a, e, t) || s[a] || (t[a] = e[a], s[a] = !0); + e = !1 !== n && c(e) + } while (e && (!n || n(e, t)) && e !== Object.prototype); + return t + }, + kindOf: f, + kindOfTest: l, + endsWith: function (e, t, n) { + e = String(e), (void 0 === n || n > e.length) && (n = e.length), n -= t.length; + var r = e.indexOf(t, n); + return -1 !== r && r === n + }, + toArray: function (e) { + if (!e) return null; + if (p(e)) return e; + var t = e.length; + if (!b(t)) return null; + for (var n = new Array(t); t-- > 0;) n[t] = e[t]; + return n + }, + forEachEntry: function (e, t) { + for (var n, r = (e && e[Symbol.iterator]).call(e); (n = r.next()) && !n.done;) { + var o = n.value; + t.call(e, o[0], o[1]) + } + }, + matchAll: function (e, t) { + for (var n, r = []; null !== (n = e.exec(t));) r.push(n); + return r + }, + isHTMLForm: k, + hasOwnProperty: U, + hasOwnProp: U, + reduceDescriptors: F, + freezeMethods: function (e) { + F(e, (function (t, n) { + if (v(e) && -1 !== ["arguments", "caller", "callee"].indexOf(n)) return !1; + var r = e[n]; + v(r) && (t.enumerable = !1, "writable" in t ? t.writable = !1 : t.set || (t.set = function () { + throw Error("Can not rewrite read-only method '" + n + "'") + })) + })) + }, + toObjectSet: function (e, t) { + var n = {}, r = function (e) { + e.forEach((function (e) { + n[e] = !0 + })) + }; + return p(e) ? r(e) : r(String(e).split(t)), n + }, + toCamelCase: function (e) { + return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, (function (e, t, n) { + return t.toUpperCase() + n + })) + }, + noop: function () { + }, + toFiniteNumber: function (e, t) { + return e = +e, Number.isFinite(e) ? e : t + }, + findKey: j, + global: N, + isContextDefined: C, + ALPHABET: D, + generateString: function () { + for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 16, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : D.ALPHA_DIGIT, n = "", r = t.length; e--;) n += t[Math.random() * r | 0]; + return n + }, + isSpecCompliantForm: function (e) { + return !!(e && v(e.append) && "FormData" === e[Symbol.toStringTag] && e[Symbol.iterator]) + }, + toJSONObject: function (e) { + var t = new Array(10); + return function e(n, r) { + if (g(n)) { + if (t.indexOf(n) >= 0) return; + if (!("toJSON" in n)) { + t[r] = n; + var o = p(n) ? [] : {}; + return T(n, (function (t, n) { + var i = e(t, r + 1); + !h(i) && (o[n] = i) + })), t[r] = void 0, o + } + } + return n + }(e, 0) + }, + isAsyncFn: I, + isThenable: function (e) { + return e && (g(e) || v(e)) && v(e.then) && v(e.catch) + } + }; + + function M(e, t, n, r, o) { + Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (new Error).stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o) + } + + q.inherits(M, Error, { + toJSON: function () { + return { + message: this.message, + name: this.name, + description: this.description, + number: this.number, + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + config: q.toJSONObject(this.config), + code: this.code, + status: this.response && this.response.status ? this.response.status : null + } + } + }); + var z = M.prototype, H = {}; + ["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach((function (e) { + H[e] = {value: e} + })), Object.defineProperties(M, H), Object.defineProperty(z, "isAxiosError", {value: !0}), M.from = function (e, t, n, r, o, i) { + var a = Object.create(z); + return q.toFlatObject(e, a, (function (e) { + return e !== Error.prototype + }), (function (e) { + return "isAxiosError" !== e + })), M.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, i && Object.assign(a, i), a + }; + + function J(e) { + return q.isPlainObject(e) || q.isArray(e) + } + + function W(e) { + return q.endsWith(e, "[]") ? e.slice(0, -2) : e + } + + function K(e, t, n) { + return e ? e.concat(t).map((function (e, t) { + return e = W(e), !n && t ? "[" + e + "]" : e + })).join(n ? "." : "") : t + } + + var V = q.toFlatObject(q, {}, null, (function (e) { + return /^is[A-Z]/.test(e) + })); + + function G(t, n, r) { + if (!q.isObject(t)) throw new TypeError("target must be an object"); + n = n || new FormData; + var o = (r = q.toFlatObject(r, {metaTokens: !0, dots: !1, indexes: !1}, !1, (function (e, t) { + return !q.isUndefined(t[e]) + }))).metaTokens, i = r.visitor || f, a = r.dots, s = r.indexes, + u = (r.Blob || "undefined" != typeof Blob && Blob) && q.isSpecCompliantForm(n); + if (!q.isFunction(i)) throw new TypeError("visitor must be a function"); + + function c(e) { + if (null === e) return ""; + if (q.isDate(e)) return e.toISOString(); + if (!u && q.isBlob(e)) throw new M("Blob is not supported. Use a Buffer instead."); + return q.isArrayBuffer(e) || q.isTypedArray(e) ? u && "function" == typeof Blob ? new Blob([e]) : Buffer.from(e) : e + } + + function f(t, r, i) { + var u = t; + if (t && !i && "object" === e(t)) if (q.endsWith(r, "{}")) r = o ? r : r.slice(0, -2), t = JSON.stringify(t); else if (q.isArray(t) && function (e) { + return q.isArray(e) && !e.some(J) + }(t) || (q.isFileList(t) || q.endsWith(r, "[]")) && (u = q.toArray(t))) return r = W(r), u.forEach((function (e, t) { + !q.isUndefined(e) && null !== e && n.append(!0 === s ? K([r], t, a) : null === s ? r : r + "[]", c(e)) + })), !1; + return !!J(t) || (n.append(K(i, r, a), c(t)), !1) + } + + var l = [], d = Object.assign(V, {defaultVisitor: f, convertValue: c, isVisitable: J}); + if (!q.isObject(t)) throw new TypeError("data must be an object"); + return function e(t, r) { + if (!q.isUndefined(t)) { + if (-1 !== l.indexOf(t)) throw Error("Circular reference detected in " + r.join(".")); + l.push(t), q.forEach(t, (function (t, o) { + !0 === (!(q.isUndefined(t) || null === t) && i.call(n, t, q.isString(o) ? o.trim() : o, r, d)) && e(t, r ? r.concat(o) : [o]) + })), l.pop() + } + }(t), n + } + + function $(e) { + var t = {"!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0"}; + return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, (function (e) { + return t[e] + })) + } + + function X(e, t) { + this._pairs = [], e && G(e, this, t) + } + + var Q = X.prototype; + + function Z(e) { + return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]") + } + + function Y(e, t, n) { + if (!t) return e; + var r, o = n && n.encode || Z, i = n && n.serialize; + if (r = i ? i(t, n) : q.isURLSearchParams(t) ? t.toString() : new X(t, n).toString(o)) { + var a = e.indexOf("#"); + -1 !== a && (e = e.slice(0, a)), e += (-1 === e.indexOf("?") ? "?" : "&") + r + } + return e + } + + Q.append = function (e, t) { + this._pairs.push([e, t]) + }, Q.toString = function (e) { + var t = e ? function (t) { + return e.call(this, t, $) + } : $; + return this._pairs.map((function (e) { + return t(e[0]) + "=" + t(e[1]) + }), "").join("&") + }; + var ee, te = function () { + function e() { + t(this, e), this.handlers = [] + } + + return r(e, [{ + key: "use", value: function (e, t, n) { + return this.handlers.push({ + fulfilled: e, + rejected: t, + synchronous: !!n && n.synchronous, + runWhen: n ? n.runWhen : null + }), this.handlers.length - 1 + } + }, { + key: "eject", value: function (e) { + this.handlers[e] && (this.handlers[e] = null) + } + }, { + key: "clear", value: function () { + this.handlers && (this.handlers = []) + } + }, { + key: "forEach", value: function (e) { + q.forEach(this.handlers, (function (t) { + null !== t && e(t) + })) + } + }]), e + }(), ne = {silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1}, re = { + isBrowser: !0, + classes: { + URLSearchParams: "undefined" != typeof URLSearchParams ? URLSearchParams : X, + FormData: "undefined" != typeof FormData ? FormData : null, + Blob: "undefined" != typeof Blob ? Blob : null + }, + isStandardBrowserEnv: ("undefined" == typeof navigator || "ReactNative" !== (ee = navigator.product) && "NativeScript" !== ee && "NS" !== ee) && "undefined" != typeof window && "undefined" != typeof document, + isStandardBrowserWebWorkerEnv: "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && "function" == typeof self.importScripts, + protocols: ["http", "https", "file", "blob", "url", "data"] + }; + + function oe(e) { + function t(e, n, r, o) { + var i = e[o++], a = Number.isFinite(+i), s = o >= e.length; + return i = !i && q.isArray(r) ? r.length : i, s ? (q.hasOwnProp(r, i) ? r[i] = [r[i], n] : r[i] = n, !a) : (r[i] && q.isObject(r[i]) || (r[i] = []), t(e, n, r[i], o) && q.isArray(r[i]) && (r[i] = function (e) { + var t, n, r = {}, o = Object.keys(e), i = o.length; + for (t = 0; t < i; t++) r[n = o[t]] = e[n]; + return r + }(r[i])), !a) + } + + if (q.isFormData(e) && q.isFunction(e.entries)) { + var n = {}; + return q.forEachEntry(e, (function (e, r) { + t(function (e) { + return q.matchAll(/\w+|\[(\w*)]/g, e).map((function (e) { + return "[]" === e[0] ? "" : e[1] || e[0] + })) + }(e), r, n, 0) + })), n + } + return null + } + + var ie = {"Content-Type": void 0}; + var ae = { + transitional: ne, + adapter: ["xhr", "http"], + transformRequest: [function (e, t) { + var n, r = t.getContentType() || "", o = r.indexOf("application/json") > -1, i = q.isObject(e); + if (i && q.isHTMLForm(e) && (e = new FormData(e)), q.isFormData(e)) return o && o ? JSON.stringify(oe(e)) : e; + if (q.isArrayBuffer(e) || q.isBuffer(e) || q.isStream(e) || q.isFile(e) || q.isBlob(e)) return e; + if (q.isArrayBufferView(e)) return e.buffer; + if (q.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); + if (i) { + if (r.indexOf("application/x-www-form-urlencoded") > -1) return function (e, t) { + return G(e, new re.classes.URLSearchParams, Object.assign({ + visitor: function (e, t, n, r) { + return re.isNode && q.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments) + } + }, t)) + }(e, this.formSerializer).toString(); + if ((n = q.isFileList(e)) || r.indexOf("multipart/form-data") > -1) { + var a = this.env && this.env.FormData; + return G(n ? {"files[]": e} : e, a && new a, this.formSerializer) + } + } + return i || o ? (t.setContentType("application/json", !1), function (e, t, n) { + if (q.isString(e)) try { + return (t || JSON.parse)(e), q.trim(e) + } catch (e) { + if ("SyntaxError" !== e.name) throw e + } + return (n || JSON.stringify)(e) + }(e)) : e + }], + transformResponse: [function (e) { + var t = this.transitional || ae.transitional, n = t && t.forcedJSONParsing, + r = "json" === this.responseType; + if (e && q.isString(e) && (n && !this.responseType || r)) { + var o = !(t && t.silentJSONParsing) && r; + try { + return JSON.parse(e) + } catch (e) { + if (o) { + if ("SyntaxError" === e.name) throw M.from(e, M.ERR_BAD_RESPONSE, this, null, this.response); + throw e + } + } + } + return e + }], + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: {FormData: re.classes.FormData, Blob: re.classes.Blob}, + validateStatus: function (e) { + return e >= 200 && e < 300 + }, + headers: {common: {Accept: "application/json, text/plain, */*"}} + }; + q.forEach(["delete", "get", "head"], (function (e) { + ae.headers[e] = {} + })), q.forEach(["post", "put", "patch"], (function (e) { + ae.headers[e] = q.merge(ie) + })); + var se = ae, + ue = q.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]), + ce = Symbol("internals"); + + function fe(e) { + return e && String(e).trim().toLowerCase() + } + + function le(e) { + return !1 === e || null == e ? e : q.isArray(e) ? e.map(le) : String(e) + } + + function de(e, t, n, r, o) { + return q.isFunction(r) ? r.call(this, t, n) : (o && (t = n), q.isString(t) ? q.isString(r) ? -1 !== t.indexOf(r) : q.isRegExp(r) ? r.test(t) : void 0 : void 0) + } + + var pe = function (e, n) { + function i(e) { + t(this, i), e && this.set(e) + } + + return r(i, [{ + key: "set", value: function (e, t, n) { + var r = this; + + function o(e, t, n) { + var o = fe(t); + if (!o) throw new Error("header name must be a non-empty string"); + var i = q.findKey(r, o); + (!i || void 0 === r[i] || !0 === n || void 0 === n && !1 !== r[i]) && (r[i || t] = le(e)) + } + + var i, a, s, u, c, f = function (e, t) { + return q.forEach(e, (function (e, n) { + return o(e, n, t) + })) + }; + return q.isPlainObject(e) || e instanceof this.constructor ? f(e, t) : q.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()) ? f((c = {}, (i = e) && i.split("\n").forEach((function (e) { + u = e.indexOf(":"), a = e.substring(0, u).trim().toLowerCase(), s = e.substring(u + 1).trim(), !a || c[a] && ue[a] || ("set-cookie" === a ? c[a] ? c[a].push(s) : c[a] = [s] : c[a] = c[a] ? c[a] + ", " + s : s) + })), c), t) : null != e && o(t, e, n), this + } + }, { + key: "get", value: function (e, t) { + if (e = fe(e)) { + var n = q.findKey(this, e); + if (n) { + var r = this[n]; + if (!t) return r; + if (!0 === t) return function (e) { + for (var t, n = Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; t = r.exec(e);) n[t[1]] = t[2]; + return n + }(r); + if (q.isFunction(t)) return t.call(this, r, n); + if (q.isRegExp(t)) return t.exec(r); + throw new TypeError("parser must be boolean|regexp|function") + } + } + } + }, { + key: "has", value: function (e, t) { + if (e = fe(e)) { + var n = q.findKey(this, e); + return !(!n || void 0 === this[n] || t && !de(0, this[n], n, t)) + } + return !1 + } + }, { + key: "delete", value: function (e, t) { + var n = this, r = !1; + + function o(e) { + if (e = fe(e)) { + var o = q.findKey(n, e); + !o || t && !de(0, n[o], o, t) || (delete n[o], r = !0) + } + } + + return q.isArray(e) ? e.forEach(o) : o(e), r + } + }, { + key: "clear", value: function (e) { + for (var t = Object.keys(this), n = t.length, r = !1; n--;) { + var o = t[n]; + e && !de(0, this[o], o, e, !0) || (delete this[o], r = !0) + } + return r + } + }, { + key: "normalize", value: function (e) { + var t = this, n = {}; + return q.forEach(this, (function (r, o) { + var i = q.findKey(n, o); + if (i) return t[i] = le(r), void delete t[o]; + var a = e ? function (e) { + return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (function (e, t, n) { + return t.toUpperCase() + n + })) + }(o) : String(o).trim(); + a !== o && delete t[o], t[a] = le(r), n[a] = !0 + })), this + } + }, { + key: "concat", value: function () { + for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; + return (e = this.constructor).concat.apply(e, [this].concat(n)) + } + }, { + key: "toJSON", value: function (e) { + var t = Object.create(null); + return q.forEach(this, (function (n, r) { + null != n && !1 !== n && (t[r] = e && q.isArray(n) ? n.join(", ") : n) + })), t + } + }, { + key: Symbol.iterator, value: function () { + return Object.entries(this.toJSON())[Symbol.iterator]() + } + }, { + key: "toString", value: function () { + return Object.entries(this.toJSON()).map((function (e) { + var t = o(e, 2); + return t[0] + ": " + t[1] + })).join("\n") + } + }, { + key: Symbol.toStringTag, get: function () { + return "AxiosHeaders" + } + }], [{ + key: "from", value: function (e) { + return e instanceof this ? e : new this(e) + } + }, { + key: "concat", value: function (e) { + for (var t = new this(e), n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o]; + return r.forEach((function (e) { + return t.set(e) + })), t + } + }, { + key: "accessor", value: function (e) { + var t = (this[ce] = this[ce] = {accessors: {}}).accessors, n = this.prototype; + + function r(e) { + var r = fe(e); + t[r] || (!function (e, t) { + var n = q.toCamelCase(" " + t); + ["get", "set", "has"].forEach((function (r) { + Object.defineProperty(e, r + n, { + value: function (e, n, o) { + return this[r].call(this, t, e, n, o) + }, configurable: !0 + }) + })) + }(n, e), t[r] = !0) + } + + return q.isArray(e) ? e.forEach(r) : r(e), this + } + }]), i + }(); + pe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), q.freezeMethods(pe.prototype), q.freezeMethods(pe); + var he = pe; + + function me(e, t) { + var n = this || se, r = t || n, o = he.from(r.headers), i = r.data; + return q.forEach(e, (function (e) { + i = e.call(n, i, o.normalize(), t ? t.status : void 0) + })), o.normalize(), i + } + + function ye(e) { + return !(!e || !e.__CANCEL__) + } + + function ve(e, t, n) { + M.call(this, null == e ? "canceled" : e, M.ERR_CANCELED, t, n), this.name = "CanceledError" + } + + q.inherits(ve, M, {__CANCEL__: !0}); + var be = re.isStandardBrowserEnv ? { + write: function (e, t, n, r, o, i) { + var a = []; + a.push(e + "=" + encodeURIComponent(t)), q.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), q.isString(r) && a.push("path=" + r), q.isString(o) && a.push("domain=" + o), !0 === i && a.push("secure"), document.cookie = a.join("; ") + }, read: function (e) { + var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); + return t ? decodeURIComponent(t[3]) : null + }, remove: function (e) { + this.write(e, "", Date.now() - 864e5) + } + } : { + write: function () { + }, read: function () { + return null + }, remove: function () { + } + }; + + function ge(e, t) { + return e && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t) ? function (e, t) { + return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e + }(e, t) : t + } + + var we = re.isStandardBrowserEnv ? function () { + var e, t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a"); + + function r(e) { + var r = e; + return t && (n.setAttribute("href", r), r = n.href), n.setAttribute("href", r), { + href: n.href, + protocol: n.protocol ? n.protocol.replace(/:$/, "") : "", + host: n.host, + search: n.search ? n.search.replace(/^\?/, "") : "", + hash: n.hash ? n.hash.replace(/^#/, "") : "", + hostname: n.hostname, + port: n.port, + pathname: "/" === n.pathname.charAt(0) ? n.pathname : "/" + n.pathname + } + } + + return e = r(window.location.href), function (t) { + var n = q.isString(t) ? r(t) : t; + return n.protocol === e.protocol && n.host === e.host + } + }() : function () { + return !0 + }; + + function Ee(e, t) { + var n = 0, r = function (e, t) { + e = e || 10; + var n, r = new Array(e), o = new Array(e), i = 0, a = 0; + return t = void 0 !== t ? t : 1e3, function (s) { + var u = Date.now(), c = o[a]; + n || (n = u), r[i] = s, o[i] = u; + for (var f = a, l = 0; f !== i;) l += r[f++], f %= e; + if ((i = (i + 1) % e) === a && (a = (a + 1) % e), !(u - n < t)) { + var d = c && u - c; + return d ? Math.round(1e3 * l / d) : void 0 + } + } + }(50, 250); + return function (o) { + var i = o.loaded, a = o.lengthComputable ? o.total : void 0, s = i - n, u = r(s); + n = i; + var c = { + loaded: i, + total: a, + progress: a ? i / a : void 0, + bytes: s, + rate: u || void 0, + estimated: u && a && i <= a ? (a - i) / u : void 0, + event: o + }; + c[t ? "download" : "upload"] = !0, e(c) + } + } + + var Oe = { + http: null, xhr: "undefined" != typeof XMLHttpRequest && function (e) { + return new Promise((function (t, n) { + var r, o = e.data, i = he.from(e.headers).normalize(), a = e.responseType; + + function s() { + e.cancelToken && e.cancelToken.unsubscribe(r), e.signal && e.signal.removeEventListener("abort", r) + } + + q.isFormData(o) && (re.isStandardBrowserEnv || re.isStandardBrowserWebWorkerEnv ? i.setContentType(!1) : i.setContentType("multipart/form-data;", !1)); + var u = new XMLHttpRequest; + if (e.auth) { + var c = e.auth.username || "", + f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : ""; + i.set("Authorization", "Basic " + btoa(c + ":" + f)) + } + var l = ge(e.baseURL, e.url); + + function d() { + if (u) { + var r = he.from("getAllResponseHeaders" in u && u.getAllResponseHeaders()); + !function (e, t, n) { + var r = n.config.validateStatus; + n.status && r && !r(n.status) ? t(new M("Request failed with status code " + n.status, [M.ERR_BAD_REQUEST, M.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n)) : e(n) + }((function (e) { + t(e), s() + }), (function (e) { + n(e), s() + }), { + data: a && "text" !== a && "json" !== a ? u.response : u.responseText, + status: u.status, + statusText: u.statusText, + headers: r, + config: e, + request: u + }), u = null + } + } + + if (u.open(e.method.toUpperCase(), Y(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout, "onloadend" in u ? u.onloadend = d : u.onreadystatechange = function () { + u && 4 === u.readyState && (0 !== u.status || u.responseURL && 0 === u.responseURL.indexOf("file:")) && setTimeout(d) + }, u.onabort = function () { + u && (n(new M("Request aborted", M.ECONNABORTED, e, u)), u = null) + }, u.onerror = function () { + n(new M("Network Error", M.ERR_NETWORK, e, u)), u = null + }, u.ontimeout = function () { + var t = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded", + r = e.transitional || ne; + e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(new M(t, r.clarifyTimeoutError ? M.ETIMEDOUT : M.ECONNABORTED, e, u)), u = null + }, re.isStandardBrowserEnv) { + var p = (e.withCredentials || we(l)) && e.xsrfCookieName && be.read(e.xsrfCookieName); + p && i.set(e.xsrfHeaderName, p) + } + void 0 === o && i.setContentType(null), "setRequestHeader" in u && q.forEach(i.toJSON(), (function (e, t) { + u.setRequestHeader(t, e) + })), q.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), a && "json" !== a && (u.responseType = e.responseType), "function" == typeof e.onDownloadProgress && u.addEventListener("progress", Ee(e.onDownloadProgress, !0)), "function" == typeof e.onUploadProgress && u.upload && u.upload.addEventListener("progress", Ee(e.onUploadProgress)), (e.cancelToken || e.signal) && (r = function (t) { + u && (n(!t || t.type ? new ve(null, e, u) : t), u.abort(), u = null) + }, e.cancelToken && e.cancelToken.subscribe(r), e.signal && (e.signal.aborted ? r() : e.signal.addEventListener("abort", r))); + var h, m = (h = /^([-+\w]{1,25})(:?\/\/|:)/.exec(l)) && h[1] || ""; + m && -1 === re.protocols.indexOf(m) ? n(new M("Unsupported protocol " + m + ":", M.ERR_BAD_REQUEST, e)) : u.send(o || null) + })) + } + }; + q.forEach(Oe, (function (e, t) { + if (e) { + try { + Object.defineProperty(e, "name", {value: t}) + } catch (e) { + } + Object.defineProperty(e, "adapterName", {value: t}) + } + })); + var Se = function (e) { + for (var t, n, r = (e = q.isArray(e) ? e : [e]).length, o = 0; o < r && (t = e[o], !(n = q.isString(t) ? Oe[t.toLowerCase()] : t)); o++) ; + if (!n) { + if (!1 === n) throw new M("Adapter ".concat(t, " is not supported by the environment"), "ERR_NOT_SUPPORT"); + throw new Error(q.hasOwnProp(Oe, t) ? "Adapter '".concat(t, "' is not available in the build") : "Unknown adapter '".concat(t, "'")) + } + if (!q.isFunction(n)) throw new TypeError("adapter is not a function"); + return n + }; + + function Re(e) { + if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new ve(null, e) + } + + function Ae(e) { + return Re(e), e.headers = he.from(e.headers), e.data = me.call(e, e.transformRequest), -1 !== ["post", "put", "patch"].indexOf(e.method) && e.headers.setContentType("application/x-www-form-urlencoded", !1), Se(e.adapter || se.adapter)(e).then((function (t) { + return Re(e), t.data = me.call(e, e.transformResponse, t), t.headers = he.from(t.headers), t + }), (function (t) { + return ye(t) || (Re(e), t && t.response && (t.response.data = me.call(e, e.transformResponse, t.response), t.response.headers = he.from(t.response.headers))), Promise.reject(t) + })) + } + + var Te = function (e) { + return e instanceof he ? e.toJSON() : e + }; + + function je(e, t) { + t = t || {}; + var n = {}; + + function r(e, t, n) { + return q.isPlainObject(e) && q.isPlainObject(t) ? q.merge.call({caseless: n}, e, t) : q.isPlainObject(t) ? q.merge({}, t) : q.isArray(t) ? t.slice() : t + } + + function o(e, t, n) { + return q.isUndefined(t) ? q.isUndefined(e) ? void 0 : r(void 0, e, n) : r(e, t, n) + } + + function i(e, t) { + if (!q.isUndefined(t)) return r(void 0, t) + } + + function a(e, t) { + return q.isUndefined(t) ? q.isUndefined(e) ? void 0 : r(void 0, e) : r(void 0, t) + } + + function s(n, o, i) { + return i in t ? r(n, o) : i in e ? r(void 0, n) : void 0 + } + + var u = { + url: i, + method: i, + data: i, + baseURL: a, + transformRequest: a, + transformResponse: a, + paramsSerializer: a, + timeout: a, + timeoutMessage: a, + withCredentials: a, + adapter: a, + responseType: a, + xsrfCookieName: a, + xsrfHeaderName: a, + onUploadProgress: a, + onDownloadProgress: a, + decompress: a, + maxContentLength: a, + maxBodyLength: a, + beforeRedirect: a, + transport: a, + httpAgent: a, + httpsAgent: a, + cancelToken: a, + socketPath: a, + responseEncoding: a, + validateStatus: s, + headers: function (e, t) { + return o(Te(e), Te(t), !0) + } + }; + return q.forEach(Object.keys(Object.assign({}, e, t)), (function (r) { + var i = u[r] || o, a = i(e[r], t[r], r); + q.isUndefined(a) && i !== s || (n[r] = a) + })), n + } + + var Ne = "1.4.0", Ce = {}; + ["object", "boolean", "number", "function", "string", "symbol"].forEach((function (t, n) { + Ce[t] = function (r) { + return e(r) === t || "a" + (n < 1 ? "n " : " ") + t + } + })); + var xe = {}; + Ce.transitional = function (e, t, n) { + function r(e, t) { + return "[Axios v1.4.0] Transitional option '" + e + "'" + t + (n ? ". " + n : "") + } + + return function (n, o, i) { + if (!1 === e) throw new M(r(o, " has been removed" + (t ? " in " + t : "")), M.ERR_DEPRECATED); + return t && !xe[o] && (xe[o] = !0, console.warn(r(o, " has been deprecated since v" + t + " and will be removed in the near future"))), !e || e(n, o, i) + } + }; + var Pe = { + assertOptions: function (t, n, r) { + if ("object" !== e(t)) throw new M("options must be an object", M.ERR_BAD_OPTION_VALUE); + for (var o = Object.keys(t), i = o.length; i-- > 0;) { + var a = o[i], s = n[a]; + if (s) { + var u = t[a], c = void 0 === u || s(u, a, t); + if (!0 !== c) throw new M("option " + a + " must be " + c, M.ERR_BAD_OPTION_VALUE) + } else if (!0 !== r) throw new M("Unknown option " + a, M.ERR_BAD_OPTION) + } + }, validators: Ce + }, ke = Pe.validators, Ue = function () { + function e(n) { + t(this, e), this.defaults = n, this.interceptors = {request: new te, response: new te} + } + + return r(e, [{ + key: "request", value: function (e, t) { + "string" == typeof e ? (t = t || {}).url = e : t = e || {}; + var n, r = t = je(this.defaults, t), o = r.transitional, i = r.paramsSerializer, a = r.headers; + void 0 !== o && Pe.assertOptions(o, { + silentJSONParsing: ke.transitional(ke.boolean), + forcedJSONParsing: ke.transitional(ke.boolean), + clarifyTimeoutError: ke.transitional(ke.boolean) + }, !1), null != i && (q.isFunction(i) ? t.paramsSerializer = {serialize: i} : Pe.assertOptions(i, { + encode: ke.function, + serialize: ke.function + }, !0)), t.method = (t.method || this.defaults.method || "get").toLowerCase(), (n = a && q.merge(a.common, a[t.method])) && q.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (function (e) { + delete a[e] + })), t.headers = he.concat(n, a); + var s = [], u = !0; + this.interceptors.request.forEach((function (e) { + "function" == typeof e.runWhen && !1 === e.runWhen(t) || (u = u && e.synchronous, s.unshift(e.fulfilled, e.rejected)) + })); + var c, f = []; + this.interceptors.response.forEach((function (e) { + f.push(e.fulfilled, e.rejected) + })); + var l, d = 0; + if (!u) { + var p = [Ae.bind(this), void 0]; + for (p.unshift.apply(p, s), p.push.apply(p, f), l = p.length, c = Promise.resolve(t); d < l;) c = c.then(p[d++], p[d++]); + return c + } + l = s.length; + var h = t; + for (d = 0; d < l;) { + var m = s[d++], y = s[d++]; + try { + h = m(h) + } catch (e) { + y.call(this, e); + break + } + } + try { + c = Ae.call(this, h) + } catch (e) { + return Promise.reject(e) + } + for (d = 0, l = f.length; d < l;) c = c.then(f[d++], f[d++]); + return c + } + }, { + key: "getUri", value: function (e) { + return Y(ge((e = je(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer) + } + }]), e + }(); + q.forEach(["delete", "get", "head", "options"], (function (e) { + Ue.prototype[e] = function (t, n) { + return this.request(je(n || {}, {method: e, url: t, data: (n || {}).data})) + } + })), q.forEach(["post", "put", "patch"], (function (e) { + function t(t) { + return function (n, r, o) { + return this.request(je(o || {}, { + method: e, + headers: t ? {"Content-Type": "multipart/form-data"} : {}, + url: n, + data: r + })) + } + } + + Ue.prototype[e] = t(), Ue.prototype[e + "Form"] = t(!0) + })); + var _e = Ue, Fe = function () { + function e(n) { + if (t(this, e), "function" != typeof n) throw new TypeError("executor must be a function."); + var r; + this.promise = new Promise((function (e) { + r = e + })); + var o = this; + this.promise.then((function (e) { + if (o._listeners) { + for (var t = o._listeners.length; t-- > 0;) o._listeners[t](e); + o._listeners = null + } + })), this.promise.then = function (e) { + var t, n = new Promise((function (e) { + o.subscribe(e), t = e + })).then(e); + return n.cancel = function () { + o.unsubscribe(t) + }, n + }, n((function (e, t, n) { + o.reason || (o.reason = new ve(e, t, n), r(o.reason)) + })) + } + + return r(e, [{ + key: "throwIfRequested", value: function () { + if (this.reason) throw this.reason + } + }, { + key: "subscribe", value: function (e) { + this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e] + } + }, { + key: "unsubscribe", value: function (e) { + if (this._listeners) { + var t = this._listeners.indexOf(e); + -1 !== t && this._listeners.splice(t, 1) + } + } + }], [{ + key: "source", value: function () { + var t; + return { + token: new e((function (e) { + t = e + })), cancel: t + } + } + }]), e + }(); + var Be = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511 + }; + Object.entries(Be).forEach((function (e) { + var t = o(e, 2), n = t[0], r = t[1]; + Be[r] = n + })); + var Le = Be; + var De = function e(t) { + var n = new _e(t), r = a(_e.prototype.request, n); + return q.extend(r, _e.prototype, n, {allOwnKeys: !0}), q.extend(r, n, null, {allOwnKeys: !0}), r.create = function (n) { + return e(je(t, n)) + }, r + }(se); + return De.Axios = _e, De.CanceledError = ve, De.CancelToken = Fe, De.isCancel = ye, De.VERSION = Ne, De.toFormData = G, De.AxiosError = M, De.Cancel = De.CanceledError, De.all = function (e) { + return Promise.all(e) + }, De.spread = function (e) { + return function (t) { + return e.apply(null, t) + } + }, De.isAxiosError = function (e) { + return q.isObject(e) && !0 === e.isAxiosError + }, De.mergeConfig = je, De.AxiosHeaders = he, De.formToJSON = function (e) { + return oe(q.isHTMLForm(e) ? new FormData(e) : e) + }, De.HttpStatusCode = Le, De.default = De, De + })); + return { + requestAction: function (me, action, config) { + // config.url = me.getOpt('serverUrl'); + config.url = me.getActionUrl(); + config.method = 'post'; + config.params = config.params || {}; + config.params = Object.assign(config.params, me.getOpt('serverparam')); + config.params.action = action; + return this.request(me, config); + }, + request: function (me, config) { + config.headers = config.headers || {}; + var customHeaders = me.getOpt('serverHeaders'); + if (customHeaders) { + for (var key in customHeaders) { + config.headers[key] = customHeaders[key]; + } + } + return axios(config); + } + } + })(); + + +// core/image.js + UE.image = (function () { + // import browser-image-compression + // https://www.npmjs.com/package/browser-image-compression + var imageCompression = null; + !function (e, t) { + imageCompression = t(); + }(this, (function () { + "use strict"; + + function _mergeNamespaces(e, t) { + return t.forEach((function (t) { + t && "string" != typeof t && !Array.isArray(t) && Object.keys(t).forEach((function (r) { + if ("default" !== r && !(r in e)) { + var i = Object.getOwnPropertyDescriptor(t, r); + Object.defineProperty(e, r, i.get ? i : { + enumerable: !0, get: function () { + return t[r] + } + }) + } + })) + })), Object.freeze(e) + } + + function copyExifWithoutOrientation(e, t) { + return new Promise((function (r, i) { + let o; + return getApp1Segment(e).then((function (e) { + try { + return o = e, r(new Blob([t.slice(0, 2), o, t.slice(2)], {type: "image/jpeg"})) + } catch (e) { + return i(e) + } + }), i) + })) + } + + const getApp1Segment = e => new Promise(((t, r) => { + const i = new FileReader; + i.addEventListener("load", (({target: {result: e}}) => { + const i = new DataView(e); + let o = 0; + if (65496 !== i.getUint16(o)) return r("not a valid JPEG"); + for (o += 2; ;) { + const a = i.getUint16(o); + if (65498 === a) break; + const s = i.getUint16(o + 2); + if (65505 === a && 1165519206 === i.getUint32(o + 4)) { + const a = o + 10; + let f; + switch (i.getUint16(a)) { + case 18761: + f = !0; + break; + case 19789: + f = !1; + break; + default: + return r("TIFF header contains invalid endian") + } + if (42 !== i.getUint16(a + 2, f)) return r("TIFF header contains invalid version"); + const l = i.getUint32(a + 4, f), c = a + l + 2 + 12 * i.getUint16(a + l, f); + for (let e = a + l + 2; e < c; e += 12) { + if (274 == i.getUint16(e, f)) { + if (3 !== i.getUint16(e + 2, f)) return r("Orientation data type is invalid"); + if (1 !== i.getUint32(e + 4, f)) return r("Orientation data count is invalid"); + i.setUint16(e + 8, 1, f); + break + } + } + return t(e.slice(o, o + 2 + s)) + } + o += 2 + s + } + return t(new Blob) + })), i.readAsArrayBuffer(e) + })); + var e = {}; + !function (e) { + var t, r, UZIP = {}; + e.exports = UZIP, UZIP.parse = function (e, t) { + for (var r = UZIP.bin.readUshort, i = UZIP.bin.readUint, o = 0, a = {}, s = new Uint8Array(e), f = s.length - 4; 101010256 != i(s, f);) f--; + o = f; + o += 4; + var l = r(s, o += 4); + r(s, o += 2); + var c = i(s, o += 2), u = i(s, o += 4); + o += 4, o = u; + for (var h = 0; h < l; h++) { + i(s, o), o += 4, o += 4, o += 4, i(s, o += 4); + c = i(s, o += 4); + var d = i(s, o += 4), A = r(s, o += 4), g = r(s, o + 2), p = r(s, o + 4); + o += 6; + var m = i(s, o += 8); + o += 4, o += A + g + p, UZIP._readLocal(s, m, a, c, d, t) + } + return a + }, UZIP._readLocal = function (e, t, r, i, o, a) { + var s = UZIP.bin.readUshort, f = UZIP.bin.readUint; + f(e, t), s(e, t += 4), s(e, t += 2); + var l = s(e, t += 2); + f(e, t += 2), f(e, t += 4), t += 4; + var c = s(e, t += 8), u = s(e, t += 2); + t += 2; + var h = UZIP.bin.readUTF8(e, t, c); + if (t += c, t += u, a) r[h] = {size: o, csize: i}; else { + var d = new Uint8Array(e.buffer, t); + if (0 == l) r[h] = new Uint8Array(d.buffer.slice(t, t + i)); else { + if (8 != l) throw"unknown compression method: " + l; + var A = new Uint8Array(o); + UZIP.inflateRaw(d, A), r[h] = A + } + } + }, UZIP.inflateRaw = function (e, t) { + return UZIP.F.inflate(e, t) + }, UZIP.inflate = function (e, t) { + return e[0], e[1], UZIP.inflateRaw(new Uint8Array(e.buffer, e.byteOffset + 2, e.length - 6), t) + }, UZIP.deflate = function (e, t) { + null == t && (t = {level: 6}); + var r = 0, i = new Uint8Array(50 + Math.floor(1.1 * e.length)); + i[r] = 120, i[r + 1] = 156, r += 2, r = UZIP.F.deflateRaw(e, i, r, t.level); + var o = UZIP.adler(e, 0, e.length); + return i[r + 0] = o >>> 24 & 255, i[r + 1] = o >>> 16 & 255, i[r + 2] = o >>> 8 & 255, i[r + 3] = o >>> 0 & 255, new Uint8Array(i.buffer, 0, r + 4) + }, UZIP.deflateRaw = function (e, t) { + null == t && (t = {level: 6}); + var r = new Uint8Array(50 + Math.floor(1.1 * e.length)), i = UZIP.F.deflateRaw(e, r, i, t.level); + return new Uint8Array(r.buffer, 0, i) + }, UZIP.encode = function (e, t) { + null == t && (t = !1); + var r = 0, i = UZIP.bin.writeUint, o = UZIP.bin.writeUshort, a = {}; + for (var s in e) { + var f = !UZIP._noNeed(s) && !t, l = e[s], c = UZIP.crc.crc(l, 0, l.length); + a[s] = {cpr: f, usize: l.length, crc: c, file: f ? UZIP.deflateRaw(l) : l} + } + for (var s in a) r += a[s].file.length + 30 + 46 + 2 * UZIP.bin.sizeUTF8(s); + r += 22; + var u = new Uint8Array(r), h = 0, d = []; + for (var s in a) { + var A = a[s]; + d.push(h), h = UZIP._writeHeader(u, h, s, A, 0) + } + var g = 0, p = h; + for (var s in a) { + A = a[s]; + d.push(h), h = UZIP._writeHeader(u, h, s, A, 1, d[g++]) + } + var m = h - p; + return i(u, h, 101010256), h += 4, o(u, h += 4, g), o(u, h += 2, g), i(u, h += 2, m), i(u, h += 4, p), h += 4, h += 2, u.buffer + }, UZIP._noNeed = function (e) { + var t = e.split(".").pop().toLowerCase(); + return -1 != "png,jpg,jpeg,zip".indexOf(t) + }, UZIP._writeHeader = function (e, t, r, i, o, a) { + var s = UZIP.bin.writeUint, f = UZIP.bin.writeUshort, l = i.file; + return s(e, t, 0 == o ? 67324752 : 33639248), t += 4, 1 == o && (t += 2), f(e, t, 20), f(e, t += 2, 0), f(e, t += 2, i.cpr ? 8 : 0), s(e, t += 2, 0), s(e, t += 4, i.crc), s(e, t += 4, l.length), s(e, t += 4, i.usize), f(e, t += 4, UZIP.bin.sizeUTF8(r)), f(e, t += 2, 0), t += 2, 1 == o && (t += 2, t += 2, s(e, t += 6, a), t += 4), t += UZIP.bin.writeUTF8(e, t, r), 0 == o && (e.set(l, t), t += l.length), t + }, UZIP.crc = { + table: function () { + for (var e = new Uint32Array(256), t = 0; t < 256; t++) { + for (var r = t, i = 0; i < 8; i++) 1 & r ? r = 3988292384 ^ r >>> 1 : r >>>= 1; + e[t] = r + } + return e + }(), update: function (e, t, r, i) { + for (var o = 0; o < i; o++) e = UZIP.crc.table[255 & (e ^ t[r + o])] ^ e >>> 8; + return e + }, crc: function (e, t, r) { + return 4294967295 ^ UZIP.crc.update(4294967295, e, t, r) + } + }, UZIP.adler = function (e, t, r) { + for (var i = 1, o = 0, a = t, s = t + r; a < s;) { + for (var f = Math.min(a + 5552, s); a < f;) o += i += e[a++]; + i %= 65521, o %= 65521 + } + return o << 16 | i + }, UZIP.bin = { + readUshort: function (e, t) { + return e[t] | e[t + 1] << 8 + }, writeUshort: function (e, t, r) { + e[t] = 255 & r, e[t + 1] = r >> 8 & 255 + }, readUint: function (e, t) { + return 16777216 * e[t + 3] + (e[t + 2] << 16 | e[t + 1] << 8 | e[t]) + }, writeUint: function (e, t, r) { + e[t] = 255 & r, e[t + 1] = r >> 8 & 255, e[t + 2] = r >> 16 & 255, e[t + 3] = r >> 24 & 255 + }, readASCII: function (e, t, r) { + for (var i = "", o = 0; o < r; o++) i += String.fromCharCode(e[t + o]); + return i + }, writeASCII: function (e, t, r) { + for (var i = 0; i < r.length; i++) e[t + i] = r.charCodeAt(i) + }, pad: function (e) { + return e.length < 2 ? "0" + e : e + }, readUTF8: function (e, t, r) { + for (var i, o = "", a = 0; a < r; a++) o += "%" + UZIP.bin.pad(e[t + a].toString(16)); + try { + i = decodeURIComponent(o) + } catch (i) { + return UZIP.bin.readASCII(e, t, r) + } + return i + }, writeUTF8: function (e, t, r) { + for (var i = r.length, o = 0, a = 0; a < i; a++) { + var s = r.charCodeAt(a); + if (0 == (4294967168 & s)) e[t + o] = s, o++; else if (0 == (4294965248 & s)) e[t + o] = 192 | s >> 6, e[t + o + 1] = 128 | s >> 0 & 63, o += 2; else if (0 == (4294901760 & s)) e[t + o] = 224 | s >> 12, e[t + o + 1] = 128 | s >> 6 & 63, e[t + o + 2] = 128 | s >> 0 & 63, o += 3; else { + if (0 != (4292870144 & s)) throw"e"; + e[t + o] = 240 | s >> 18, e[t + o + 1] = 128 | s >> 12 & 63, e[t + o + 2] = 128 | s >> 6 & 63, e[t + o + 3] = 128 | s >> 0 & 63, o += 4 + } + } + return o + }, sizeUTF8: function (e) { + for (var t = e.length, r = 0, i = 0; i < t; i++) { + var o = e.charCodeAt(i); + if (0 == (4294967168 & o)) r++; else if (0 == (4294965248 & o)) r += 2; else if (0 == (4294901760 & o)) r += 3; else { + if (0 != (4292870144 & o)) throw"e"; + r += 4 + } + } + return r + } + }, UZIP.F = {}, UZIP.F.deflateRaw = function (e, t, r, i) { + var o = [[0, 0, 0, 0, 0], [4, 4, 8, 4, 0], [4, 5, 16, 8, 0], [4, 6, 16, 16, 0], [4, 10, 16, 32, 0], [8, 16, 32, 32, 0], [8, 16, 128, 128, 0], [8, 32, 128, 256, 0], [32, 128, 258, 1024, 1], [32, 258, 258, 4096, 1]][i], + a = UZIP.F.U, s = UZIP.F._goodIndex; + UZIP.F._hash; + var f = UZIP.F._putsE, l = 0, c = r << 3, u = 0, h = e.length; + if (0 == i) { + for (; l < h;) { + f(t, c, l + (_ = Math.min(65535, h - l)) == h ? 1 : 0), c = UZIP.F._copyExact(e, l, _, t, c + 8), l += _ + } + return c >>> 3 + } + var d = a.lits, A = a.strt, g = a.prev, p = 0, m = 0, w = 0, v = 0, b = 0, y = 0; + for (h > 2 && (A[y = UZIP.F._hash(e, 0)] = 0), l = 0; l < h; l++) { + if (b = y, l + 1 < h - 2) { + y = UZIP.F._hash(e, l + 1); + var E = l + 1 & 32767; + g[E] = A[y], A[y] = E + } + if (u <= l) { + (p > 14e3 || m > 26697) && h - l > 100 && (u < l && (d[p] = l - u, p += 2, u = l), c = UZIP.F._writeBlock(l == h - 1 || u == h ? 1 : 0, d, p, v, e, w, l - w, t, c), p = m = v = 0, w = l); + var F = 0; + l < h - 2 && (F = UZIP.F._bestMatch(e, l, g, b, Math.min(o[2], h - l), o[3])); + var _ = F >>> 16, B = 65535 & F; + if (0 != F) { + B = 65535 & F; + var U = s(_ = F >>> 16, a.of0); + a.lhst[257 + U]++; + var C = s(B, a.df0); + a.dhst[C]++, v += a.exb[U] + a.dxb[C], d[p] = _ << 23 | l - u, d[p + 1] = B << 16 | U << 8 | C, p += 2, u = l + _ + } else a.lhst[e[l]]++; + m++ + } + } + for (w == l && 0 != e.length || (u < l && (d[p] = l - u, p += 2, u = l), c = UZIP.F._writeBlock(1, d, p, v, e, w, l - w, t, c), p = 0, m = 0, p = m = v = 0, w = l); 0 != (7 & c);) c++; + return c >>> 3 + }, UZIP.F._bestMatch = function (e, t, r, i, o, a) { + var s = 32767 & t, f = r[s], l = s - f + 32768 & 32767; + if (f == s || i != UZIP.F._hash(e, t - l)) return 0; + for (var c = 0, u = 0, h = Math.min(32767, t); l <= h && 0 != --a && f != s;) { + if (0 == c || e[t + c] == e[t + c - l]) { + var d = UZIP.F._howLong(e, t, l); + if (d > c) { + if (u = l, (c = d) >= o) break; + l + 2 < d && (d = l + 2); + for (var A = 0, g = 0; g < d - 2; g++) { + var p = t - l + g + 32768 & 32767, m = p - r[p] + 32768 & 32767; + m > A && (A = m, f = p) + } + } + } + l += (s = f) - (f = r[s]) + 32768 & 32767 + } + return c << 16 | u + }, UZIP.F._howLong = function (e, t, r) { + if (e[t] != e[t - r] || e[t + 1] != e[t + 1 - r] || e[t + 2] != e[t + 2 - r]) return 0; + var i = t, o = Math.min(e.length, t + 258); + for (t += 3; t < o && e[t] == e[t - r];) t++; + return t - i + }, UZIP.F._hash = function (e, t) { + return (e[t] << 8 | e[t + 1]) + (e[t + 2] << 4) & 65535 + }, UZIP.saved = 0, UZIP.F._writeBlock = function (e, t, r, i, o, a, s, f, l) { + var c, u, h, d, A, g, p, m, w, v = UZIP.F.U, b = UZIP.F._putsF, y = UZIP.F._putsE; + v.lhst[256]++, u = (c = UZIP.F.getTrees())[0], h = c[1], d = c[2], A = c[3], g = c[4], p = c[5], m = c[6], w = c[7]; + var E = 32 + (0 == (l + 3 & 7) ? 0 : 8 - (l + 3 & 7)) + (s << 3), + F = i + UZIP.F.contSize(v.fltree, v.lhst) + UZIP.F.contSize(v.fdtree, v.dhst), + _ = i + UZIP.F.contSize(v.ltree, v.lhst) + UZIP.F.contSize(v.dtree, v.dhst); + _ += 14 + 3 * p + UZIP.F.contSize(v.itree, v.ihst) + (2 * v.ihst[16] + 3 * v.ihst[17] + 7 * v.ihst[18]); + for (var B = 0; B < 286; B++) v.lhst[B] = 0; + for (B = 0; B < 30; B++) v.dhst[B] = 0; + for (B = 0; B < 19; B++) v.ihst[B] = 0; + var U = E < F && E < _ ? 0 : F < _ ? 1 : 2; + if (b(f, l, e), b(f, l + 1, U), l += 3, 0 == U) { + for (; 0 != (7 & l);) l++; + l = UZIP.F._copyExact(o, a, s, f, l) + } else { + var C, I; + if (1 == U && (C = v.fltree, I = v.fdtree), 2 == U) { + UZIP.F.makeCodes(v.ltree, u), UZIP.F.revCodes(v.ltree, u), UZIP.F.makeCodes(v.dtree, h), UZIP.F.revCodes(v.dtree, h), UZIP.F.makeCodes(v.itree, d), UZIP.F.revCodes(v.itree, d), C = v.ltree, I = v.dtree, y(f, l, A - 257), y(f, l += 5, g - 1), y(f, l += 5, p - 4), l += 4; + for (var Q = 0; Q < p; Q++) y(f, l + 3 * Q, v.itree[1 + (v.ordr[Q] << 1)]); + l += 3 * p, l = UZIP.F._codeTiny(m, v.itree, f, l), l = UZIP.F._codeTiny(w, v.itree, f, l) + } + for (var M = a, x = 0; x < r; x += 2) { + for (var T = t[x], S = T >>> 23, R = M + (8388607 & T); M < R;) l = UZIP.F._writeLit(o[M++], C, f, l); + if (0 != S) { + var O = t[x + 1], P = O >> 16, H = O >> 8 & 255, L = 255 & O; + y(f, l = UZIP.F._writeLit(257 + H, C, f, l), S - v.of0[H]), l += v.exb[H], b(f, l = UZIP.F._writeLit(L, I, f, l), P - v.df0[L]), l += v.dxb[L], M += S + } + } + l = UZIP.F._writeLit(256, C, f, l) + } + return l + }, UZIP.F._copyExact = function (e, t, r, i, o) { + var a = o >>> 3; + return i[a] = r, i[a + 1] = r >>> 8, i[a + 2] = 255 - i[a], i[a + 3] = 255 - i[a + 1], a += 4, i.set(new Uint8Array(e.buffer, t, r), a), o + (r + 4 << 3) + }, UZIP.F.getTrees = function () { + for (var e = UZIP.F.U, t = UZIP.F._hufTree(e.lhst, e.ltree, 15), r = UZIP.F._hufTree(e.dhst, e.dtree, 15), i = [], o = UZIP.F._lenCodes(e.ltree, i), a = [], s = UZIP.F._lenCodes(e.dtree, a), f = 0; f < i.length; f += 2) e.ihst[i[f]]++; + for (f = 0; f < a.length; f += 2) e.ihst[a[f]]++; + for (var l = UZIP.F._hufTree(e.ihst, e.itree, 7), c = 19; c > 4 && 0 == e.itree[1 + (e.ordr[c - 1] << 1)];) c--; + return [t, r, l, o, s, c, i, a] + }, UZIP.F.getSecond = function (e) { + for (var t = [], r = 0; r < e.length; r += 2) t.push(e[r + 1]); + return t + }, UZIP.F.nonZero = function (e) { + for (var t = "", r = 0; r < e.length; r += 2) 0 != e[r + 1] && (t += (r >> 1) + ","); + return t + }, UZIP.F.contSize = function (e, t) { + for (var r = 0, i = 0; i < t.length; i++) r += t[i] * e[1 + (i << 1)]; + return r + }, UZIP.F._codeTiny = function (e, t, r, i) { + for (var o = 0; o < e.length; o += 2) { + var a = e[o], s = e[o + 1]; + i = UZIP.F._writeLit(a, t, r, i); + var f = 16 == a ? 2 : 17 == a ? 3 : 7; + a > 15 && (UZIP.F._putsE(r, i, s, f), i += f) + } + return i + }, UZIP.F._lenCodes = function (e, t) { + for (var r = e.length; 2 != r && 0 == e[r - 1];) r -= 2; + for (var i = 0; i < r; i += 2) { + var o = e[i + 1], a = i + 3 < r ? e[i + 3] : -1, s = i + 5 < r ? e[i + 5] : -1, + f = 0 == i ? -1 : e[i - 1]; + if (0 == o && a == o && s == o) { + for (var l = i + 5; l + 2 < r && e[l + 2] == o;) l += 2; + (c = Math.min(l + 1 - i >>> 1, 138)) < 11 ? t.push(17, c - 3) : t.push(18, c - 11), i += 2 * c - 2 + } else if (o == f && a == o && s == o) { + for (l = i + 5; l + 2 < r && e[l + 2] == o;) l += 2; + var c = Math.min(l + 1 - i >>> 1, 6); + t.push(16, c - 3), i += 2 * c - 2 + } else t.push(o, 0) + } + return r >>> 1 + }, UZIP.F._hufTree = function (e, t, r) { + var i = [], o = e.length, a = t.length, s = 0; + for (s = 0; s < a; s += 2) t[s] = 0, t[s + 1] = 0; + for (s = 0; s < o; s++) 0 != e[s] && i.push({lit: s, f: e[s]}); + var f = i.length, l = i.slice(0); + if (0 == f) return 0; + if (1 == f) { + var c = i[0].lit; + l = 0 == c ? 1 : 0; + return t[1 + (c << 1)] = 1, t[1 + (l << 1)] = 1, 1 + } + i.sort((function (e, t) { + return e.f - t.f + })); + var u = i[0], h = i[1], d = 0, A = 1, g = 2; + for (i[0] = { + lit: -1, + f: u.f + h.f, + l: u, + r: h, + d: 0 + }; A != f - 1;) u = d != A && (g == f || i[d].f < i[g].f) ? i[d++] : i[g++], h = d != A && (g == f || i[d].f < i[g].f) ? i[d++] : i[g++], i[A++] = { + lit: -1, + f: u.f + h.f, + l: u, + r: h + }; + var p = UZIP.F.setDepth(i[A - 1], 0); + for (p > r && (UZIP.F.restrictDepth(l, r, p), p = r), s = 0; s < f; s++) t[1 + (l[s].lit << 1)] = l[s].d; + return p + }, UZIP.F.setDepth = function (e, t) { + return -1 != e.lit ? (e.d = t, t) : Math.max(UZIP.F.setDepth(e.l, t + 1), UZIP.F.setDepth(e.r, t + 1)) + }, UZIP.F.restrictDepth = function (e, t, r) { + var i = 0, o = 1 << r - t, a = 0; + for (e.sort((function (e, t) { + return t.d == e.d ? e.f - t.f : t.d - e.d + })), i = 0; i < e.length && e[i].d > t; i++) { + var s = e[i].d; + e[i].d = t, a += o - (1 << r - s) + } + for (a >>>= r - t; a > 0;) { + (s = e[i].d) < t ? (e[i].d++, a -= 1 << t - s - 1) : i++ + } + for (; i >= 0; i--) e[i].d == t && a < 0 && (e[i].d--, a++); + 0 != a && console.log("debt left") + }, UZIP.F._goodIndex = function (e, t) { + var r = 0; + return t[16 | r] <= e && (r |= 16), t[8 | r] <= e && (r |= 8), t[4 | r] <= e && (r |= 4), t[2 | r] <= e && (r |= 2), t[1 | r] <= e && (r |= 1), r + }, UZIP.F._writeLit = function (e, t, r, i) { + return UZIP.F._putsF(r, i, t[e << 1]), i + t[1 + (e << 1)] + }, UZIP.F.inflate = function (e, t) { + var r = Uint8Array; + if (3 == e[0] && 0 == e[1]) return t || new r(0); + var i = UZIP.F, o = i._bitsF, a = i._bitsE, s = i._decodeTiny, f = i.makeCodes, l = i.codes2map, + c = i._get17, u = i.U, h = null == t; + h && (t = new r(e.length >>> 2 << 3)); + for (var d, A, g = 0, p = 0, m = 0, w = 0, v = 0, b = 0, y = 0, E = 0, F = 0; 0 == g;) if (g = o(e, F, 1), p = o(e, F + 1, 2), F += 3, 0 != p) { + if (h && (t = UZIP.F._check(t, E + (1 << 17))), 1 == p && (d = u.flmap, A = u.fdmap, b = 511, y = 31), 2 == p) { + m = a(e, F, 5) + 257, w = a(e, F + 5, 5) + 1, v = a(e, F + 10, 4) + 4, F += 14; + for (var _ = 0; _ < 38; _ += 2) u.itree[_] = 0, u.itree[_ + 1] = 0; + var B = 1; + for (_ = 0; _ < v; _++) { + var U = a(e, F + 3 * _, 3); + u.itree[1 + (u.ordr[_] << 1)] = U, U > B && (B = U) + } + F += 3 * v, f(u.itree, B), l(u.itree, B, u.imap), d = u.lmap, A = u.dmap, F = s(u.imap, (1 << B) - 1, m + w, e, F, u.ttree); + var C = i._copyOut(u.ttree, 0, m, u.ltree); + b = (1 << C) - 1; + var I = i._copyOut(u.ttree, m, w, u.dtree); + y = (1 << I) - 1, f(u.ltree, C), l(u.ltree, C, d), f(u.dtree, I), l(u.dtree, I, A) + } + for (; ;) { + var Q = d[c(e, F) & b]; + F += 15 & Q; + var M = Q >>> 4; + if (M >>> 8 == 0) t[E++] = M; else { + if (256 == M) break; + var x = E + M - 254; + if (M > 264) { + var T = u.ldef[M - 257]; + x = E + (T >>> 3) + a(e, F, 7 & T), F += 7 & T + } + var S = A[c(e, F) & y]; + F += 15 & S; + var R = S >>> 4, O = u.ddef[R], P = (O >>> 4) + o(e, F, 15 & O); + for (F += 15 & O, h && (t = UZIP.F._check(t, E + (1 << 17))); E < x;) t[E] = t[E++ - P], t[E] = t[E++ - P], t[E] = t[E++ - P], t[E] = t[E++ - P]; + E = x + } + } + } else { + 0 != (7 & F) && (F += 8 - (7 & F)); + var H = 4 + (F >>> 3), L = e[H - 4] | e[H - 3] << 8; + h && (t = UZIP.F._check(t, E + L)), t.set(new r(e.buffer, e.byteOffset + H, L), E), F = H + L << 3, E += L + } + return t.length == E ? t : t.slice(0, E) + }, UZIP.F._check = function (e, t) { + var r = e.length; + if (t <= r) return e; + var i = new Uint8Array(Math.max(r << 1, t)); + return i.set(e, 0), i + }, UZIP.F._decodeTiny = function (e, t, r, i, o, a) { + for (var s = UZIP.F._bitsE, f = UZIP.F._get17, l = 0; l < r;) { + var c = e[f(i, o) & t]; + o += 15 & c; + var u = c >>> 4; + if (u <= 15) a[l] = u, l++; else { + var h = 0, d = 0; + 16 == u ? (d = 3 + s(i, o, 2), o += 2, h = a[l - 1]) : 17 == u ? (d = 3 + s(i, o, 3), o += 3) : 18 == u && (d = 11 + s(i, o, 7), o += 7); + for (var A = l + d; l < A;) a[l] = h, l++ + } + } + return o + }, UZIP.F._copyOut = function (e, t, r, i) { + for (var o = 0, a = 0, s = i.length >>> 1; a < r;) { + var f = e[a + t]; + i[a << 1] = 0, i[1 + (a << 1)] = f, f > o && (o = f), a++ + } + for (; a < s;) i[a << 1] = 0, i[1 + (a << 1)] = 0, a++; + return o + }, UZIP.F.makeCodes = function (e, t) { + for (var r, i, o, a, s = UZIP.F.U, f = e.length, l = s.bl_count, c = 0; c <= t; c++) l[c] = 0; + for (c = 1; c < f; c += 2) l[e[c]]++; + var u = s.next_code; + for (r = 0, l[0] = 0, i = 1; i <= t; i++) r = r + l[i - 1] << 1, u[i] = r; + for (o = 0; o < f; o += 2) 0 != (a = e[o + 1]) && (e[o] = u[a], u[a]++) + }, UZIP.F.codes2map = function (e, t, r) { + for (var i = e.length, o = UZIP.F.U.rev15, a = 0; a < i; a += 2) if (0 != e[a + 1]) for (var s = a >> 1, f = e[a + 1], l = s << 4 | f, c = t - f, u = e[a] << c, h = u + (1 << c); u != h;) { + r[o[u] >>> 15 - t] = l, u++ + } + }, UZIP.F.revCodes = function (e, t) { + for (var r = UZIP.F.U.rev15, i = 15 - t, o = 0; o < e.length; o += 2) { + var a = e[o] << t - e[o + 1]; + e[o] = r[a] >>> i + } + }, UZIP.F._putsE = function (e, t, r) { + r <<= 7 & t; + var i = t >>> 3; + e[i] |= r, e[i + 1] |= r >>> 8 + }, UZIP.F._putsF = function (e, t, r) { + r <<= 7 & t; + var i = t >>> 3; + e[i] |= r, e[i + 1] |= r >>> 8, e[i + 2] |= r >>> 16 + }, UZIP.F._bitsE = function (e, t, r) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8) >>> (7 & t) & (1 << r) - 1 + }, UZIP.F._bitsF = function (e, t, r) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8 | e[2 + (t >>> 3)] << 16) >>> (7 & t) & (1 << r) - 1 + }, UZIP.F._get17 = function (e, t) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8 | e[2 + (t >>> 3)] << 16) >>> (7 & t) + }, UZIP.F._get25 = function (e, t) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8 | e[2 + (t >>> 3)] << 16 | e[3 + (t >>> 3)] << 24) >>> (7 & t) + }, UZIP.F.U = (t = Uint16Array, r = Uint32Array, { + next_code: new t(16), + bl_count: new t(16), + ordr: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], + of0: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], + exb: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], + ldef: new t(32), + df0: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], + dxb: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], + ddef: new r(32), + flmap: new t(512), + fltree: [], + fdmap: new t(32), + fdtree: [], + lmap: new t(32768), + ltree: [], + ttree: [], + dmap: new t(32768), + dtree: [], + imap: new t(512), + itree: [], + rev15: new t(32768), + lhst: new r(286), + dhst: new r(30), + ihst: new r(19), + lits: new r(15e3), + strt: new t(65536), + prev: new t(32768) + }), function () { + for (var e = UZIP.F.U, t = 0; t < 32768; t++) { + var r = t; + r = (4278255360 & (r = (4042322160 & (r = (3435973836 & (r = (2863311530 & r) >>> 1 | (1431655765 & r) << 1)) >>> 2 | (858993459 & r) << 2)) >>> 4 | (252645135 & r) << 4)) >>> 8 | (16711935 & r) << 8, e.rev15[t] = (r >>> 16 | r << 16) >>> 17 + } + + function pushV(e, t, r) { + for (; 0 != t--;) e.push(0, r) + } + + for (t = 0; t < 32; t++) e.ldef[t] = e.of0[t] << 3 | e.exb[t], e.ddef[t] = e.df0[t] << 4 | e.dxb[t]; + pushV(e.fltree, 144, 8), pushV(e.fltree, 112, 9), pushV(e.fltree, 24, 7), pushV(e.fltree, 8, 8), UZIP.F.makeCodes(e.fltree, 9), UZIP.F.codes2map(e.fltree, 9, e.flmap), UZIP.F.revCodes(e.fltree, 9), pushV(e.fdtree, 32, 5), UZIP.F.makeCodes(e.fdtree, 5), UZIP.F.codes2map(e.fdtree, 5, e.fdmap), UZIP.F.revCodes(e.fdtree, 5), pushV(e.itree, 19, 0), pushV(e.ltree, 286, 0), pushV(e.dtree, 30, 0), pushV(e.ttree, 320, 0) + }() + }({ + get exports() { + return e + }, set exports(t) { + e = t + } + }); + var UZIP = _mergeNamespaces({__proto__: null, default: e}, [e]); + const UPNG = function () { + var e = { + nextZero(e, t) { + for (; 0 != e[t];) t++; + return t + }, + readUshort: (e, t) => e[t] << 8 | e[t + 1], + writeUshort(e, t, r) { + e[t] = r >> 8 & 255, e[t + 1] = 255 & r + }, + readUint: (e, t) => 16777216 * e[t] + (e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]), + writeUint(e, t, r) { + e[t] = r >> 24 & 255, e[t + 1] = r >> 16 & 255, e[t + 2] = r >> 8 & 255, e[t + 3] = 255 & r + }, + readASCII(e, t, r) { + let i = ""; + for (let o = 0; o < r; o++) i += String.fromCharCode(e[t + o]); + return i + }, + writeASCII(e, t, r) { + for (let i = 0; i < r.length; i++) e[t + i] = r.charCodeAt(i) + }, + readBytes(e, t, r) { + const i = []; + for (let o = 0; o < r; o++) i.push(e[t + o]); + return i + }, + pad: e => e.length < 2 ? `0${e}` : e, + readUTF8(t, r, i) { + let o, a = ""; + for (let o = 0; o < i; o++) a += `%${e.pad(t[r + o].toString(16))}`; + try { + o = decodeURIComponent(a) + } catch (o) { + return e.readASCII(t, r, i) + } + return o + } + }; + + function decodeImage(t, r, i, o) { + const a = r * i, s = _getBPP(o), f = Math.ceil(r * s / 8), l = new Uint8Array(4 * a), + c = new Uint32Array(l.buffer), {ctype: u} = o, {depth: h} = o, d = e.readUshort; + if (6 == u) { + const e = a << 2; + if (8 == h) for (var A = 0; A < e; A += 4) l[A] = t[A], l[A + 1] = t[A + 1], l[A + 2] = t[A + 2], l[A + 3] = t[A + 3]; + if (16 == h) for (A = 0; A < e; A++) l[A] = t[A << 1] + } else if (2 == u) { + const e = o.tabs.tRNS; + if (null == e) { + if (8 == h) for (A = 0; A < a; A++) { + var g = 3 * A; + c[A] = 255 << 24 | t[g + 2] << 16 | t[g + 1] << 8 | t[g] + } + if (16 == h) for (A = 0; A < a; A++) { + g = 6 * A; + c[A] = 255 << 24 | t[g + 4] << 16 | t[g + 2] << 8 | t[g] + } + } else { + var p = e[0]; + const r = e[1], i = e[2]; + if (8 == h) for (A = 0; A < a; A++) { + var m = A << 2; + g = 3 * A; + c[A] = 255 << 24 | t[g + 2] << 16 | t[g + 1] << 8 | t[g], t[g] == p && t[g + 1] == r && t[g + 2] == i && (l[m + 3] = 0) + } + if (16 == h) for (A = 0; A < a; A++) { + m = A << 2, g = 6 * A; + c[A] = 255 << 24 | t[g + 4] << 16 | t[g + 2] << 8 | t[g], d(t, g) == p && d(t, g + 2) == r && d(t, g + 4) == i && (l[m + 3] = 0) + } + } + } else if (3 == u) { + const e = o.tabs.PLTE, s = o.tabs.tRNS, c = s ? s.length : 0; + if (1 == h) for (var w = 0; w < i; w++) { + var v = w * f, b = w * r; + for (A = 0; A < r; A++) { + m = b + A << 2; + var y = 3 * (E = t[v + (A >> 3)] >> 7 - ((7 & A) << 0) & 1); + l[m] = e[y], l[m + 1] = e[y + 1], l[m + 2] = e[y + 2], l[m + 3] = E < c ? s[E] : 255 + } + } + if (2 == h) for (w = 0; w < i; w++) for (v = w * f, b = w * r, A = 0; A < r; A++) { + m = b + A << 2, y = 3 * (E = t[v + (A >> 2)] >> 6 - ((3 & A) << 1) & 3); + l[m] = e[y], l[m + 1] = e[y + 1], l[m + 2] = e[y + 2], l[m + 3] = E < c ? s[E] : 255 + } + if (4 == h) for (w = 0; w < i; w++) for (v = w * f, b = w * r, A = 0; A < r; A++) { + m = b + A << 2, y = 3 * (E = t[v + (A >> 1)] >> 4 - ((1 & A) << 2) & 15); + l[m] = e[y], l[m + 1] = e[y + 1], l[m + 2] = e[y + 2], l[m + 3] = E < c ? s[E] : 255 + } + if (8 == h) for (A = 0; A < a; A++) { + var E; + m = A << 2, y = 3 * (E = t[A]); + l[m] = e[y], l[m + 1] = e[y + 1], l[m + 2] = e[y + 2], l[m + 3] = E < c ? s[E] : 255 + } + } else if (4 == u) { + if (8 == h) for (A = 0; A < a; A++) { + m = A << 2; + var F = t[_ = A << 1]; + l[m] = F, l[m + 1] = F, l[m + 2] = F, l[m + 3] = t[_ + 1] + } + if (16 == h) for (A = 0; A < a; A++) { + var _; + m = A << 2, F = t[_ = A << 2]; + l[m] = F, l[m + 1] = F, l[m + 2] = F, l[m + 3] = t[_ + 2] + } + } else if (0 == u) for (p = o.tabs.tRNS ? o.tabs.tRNS : -1, w = 0; w < i; w++) { + const e = w * f, i = w * r; + if (1 == h) for (var B = 0; B < r; B++) { + var U = (F = 255 * (t[e + (B >>> 3)] >>> 7 - (7 & B) & 1)) == 255 * p ? 0 : 255; + c[i + B] = U << 24 | F << 16 | F << 8 | F + } else if (2 == h) for (B = 0; B < r; B++) { + U = (F = 85 * (t[e + (B >>> 2)] >>> 6 - ((3 & B) << 1) & 3)) == 85 * p ? 0 : 255; + c[i + B] = U << 24 | F << 16 | F << 8 | F + } else if (4 == h) for (B = 0; B < r; B++) { + U = (F = 17 * (t[e + (B >>> 1)] >>> 4 - ((1 & B) << 2) & 15)) == 17 * p ? 0 : 255; + c[i + B] = U << 24 | F << 16 | F << 8 | F + } else if (8 == h) for (B = 0; B < r; B++) { + U = (F = t[e + B]) == p ? 0 : 255; + c[i + B] = U << 24 | F << 16 | F << 8 | F + } else if (16 == h) for (B = 0; B < r; B++) { + F = t[e + (B << 1)], U = d(t, e + (B << 1)) == p ? 0 : 255; + c[i + B] = U << 24 | F << 16 | F << 8 | F + } + } + return l + } + + function _decompress(e, r, i, o) { + const a = _getBPP(e), s = Math.ceil(i * a / 8), f = new Uint8Array((s + 1 + e.interlace) * o); + return r = e.tabs.CgBI ? t(r, f) : _inflate(r, f), 0 == e.interlace ? r = _filterZero(r, e, 0, i, o) : 1 == e.interlace && (r = function _readInterlace(e, t) { + const r = t.width, i = t.height, o = _getBPP(t), a = o >> 3, s = Math.ceil(r * o / 8), + f = new Uint8Array(i * s); + let l = 0; + const c = [0, 0, 4, 0, 2, 0, 1], u = [0, 4, 0, 2, 0, 1, 0], h = [8, 8, 8, 4, 4, 2, 2], + d = [8, 8, 4, 4, 2, 2, 1]; + let A = 0; + for (; A < 7;) { + const p = h[A], m = d[A]; + let w = 0, v = 0, b = c[A]; + for (; b < i;) b += p, v++; + let y = u[A]; + for (; y < r;) y += m, w++; + const E = Math.ceil(w * o / 8); + _filterZero(e, t, l, w, v); + let F = 0, _ = c[A]; + for (; _ < i;) { + let t = u[A], i = l + F * E << 3; + for (; t < r;) { + var g; + if (1 == o) g = (g = e[i >> 3]) >> 7 - (7 & i) & 1, f[_ * s + (t >> 3)] |= g << 7 - ((7 & t) << 0); + if (2 == o) g = (g = e[i >> 3]) >> 6 - (7 & i) & 3, f[_ * s + (t >> 2)] |= g << 6 - ((3 & t) << 1); + if (4 == o) g = (g = e[i >> 3]) >> 4 - (7 & i) & 15, f[_ * s + (t >> 1)] |= g << 4 - ((1 & t) << 2); + if (o >= 8) { + const r = _ * s + t * a; + for (let t = 0; t < a; t++) f[r + t] = e[(i >> 3) + t] + } + i += o, t += m + } + F++, _ += p + } + w * v != 0 && (l += v * (1 + E)), A += 1 + } + return f + }(r, e)), r + } + + function _inflate(e, r) { + return t(new Uint8Array(e.buffer, 2, e.length - 6), r) + } + + var t = function () { + const e = {H: {}}; + return e.H.N = function (t, r) { + const i = Uint8Array; + let o, a, s = 0, f = 0, l = 0, c = 0, u = 0, h = 0, d = 0, A = 0, g = 0; + if (3 == t[0] && 0 == t[1]) return r || new i(0); + const p = e.H, m = p.b, w = p.e, v = p.R, b = p.n, y = p.A, E = p.Z, F = p.m, _ = null == r; + for (_ && (r = new i(t.length >>> 2 << 5)); 0 == s;) if (s = m(t, g, 1), f = m(t, g + 1, 2), g += 3, 0 != f) { + if (_ && (r = e.H.W(r, A + (1 << 17))), 1 == f && (o = F.J, a = F.h, h = 511, d = 31), 2 == f) { + l = w(t, g, 5) + 257, c = w(t, g + 5, 5) + 1, u = w(t, g + 10, 4) + 4, g += 14; + let e = 1; + for (var B = 0; B < 38; B += 2) F.Q[B] = 0, F.Q[B + 1] = 0; + for (B = 0; B < u; B++) { + const r = w(t, g + 3 * B, 3); + F.Q[1 + (F.X[B] << 1)] = r, r > e && (e = r) + } + g += 3 * u, b(F.Q, e), y(F.Q, e, F.u), o = F.w, a = F.d, g = v(F.u, (1 << e) - 1, l + c, t, g, F.v); + const r = p.V(F.v, 0, l, F.C); + h = (1 << r) - 1; + const i = p.V(F.v, l, c, F.D); + d = (1 << i) - 1, b(F.C, r), y(F.C, r, o), b(F.D, i), y(F.D, i, a) + } + for (; ;) { + const e = o[E(t, g) & h]; + g += 15 & e; + const i = e >>> 4; + if (i >>> 8 == 0) r[A++] = i; else { + if (256 == i) break; + { + let e = A + i - 254; + if (i > 264) { + const r = F.q[i - 257]; + e = A + (r >>> 3) + w(t, g, 7 & r), g += 7 & r + } + const o = a[E(t, g) & d]; + g += 15 & o; + const s = o >>> 4, f = F.c[s], l = (f >>> 4) + m(t, g, 15 & f); + for (g += 15 & f; A < e;) r[A] = r[A++ - l], r[A] = r[A++ - l], r[A] = r[A++ - l], r[A] = r[A++ - l]; + A = e + } + } + } + } else { + 0 != (7 & g) && (g += 8 - (7 & g)); + const o = 4 + (g >>> 3), a = t[o - 4] | t[o - 3] << 8; + _ && (r = e.H.W(r, A + a)), r.set(new i(t.buffer, t.byteOffset + o, a), A), g = o + a << 3, A += a + } + return r.length == A ? r : r.slice(0, A) + }, e.H.W = function (e, t) { + const r = e.length; + if (t <= r) return e; + const i = new Uint8Array(r << 1); + return i.set(e, 0), i + }, e.H.R = function (t, r, i, o, a, s) { + const f = e.H.e, l = e.H.Z; + let c = 0; + for (; c < i;) { + const e = t[l(o, a) & r]; + a += 15 & e; + const i = e >>> 4; + if (i <= 15) s[c] = i, c++; else { + let e = 0, t = 0; + 16 == i ? (t = 3 + f(o, a, 2), a += 2, e = s[c - 1]) : 17 == i ? (t = 3 + f(o, a, 3), a += 3) : 18 == i && (t = 11 + f(o, a, 7), a += 7); + const r = c + t; + for (; c < r;) s[c] = e, c++ + } + } + return a + }, e.H.V = function (e, t, r, i) { + let o = 0, a = 0; + const s = i.length >>> 1; + for (; a < r;) { + const r = e[a + t]; + i[a << 1] = 0, i[1 + (a << 1)] = r, r > o && (o = r), a++ + } + for (; a < s;) i[a << 1] = 0, i[1 + (a << 1)] = 0, a++; + return o + }, e.H.n = function (t, r) { + const i = e.H.m, o = t.length; + let a, s, f; + let l; + const c = i.j; + for (var u = 0; u <= r; u++) c[u] = 0; + for (u = 1; u < o; u += 2) c[t[u]]++; + const h = i.K; + for (a = 0, c[0] = 0, s = 1; s <= r; s++) a = a + c[s - 1] << 1, h[s] = a; + for (f = 0; f < o; f += 2) l = t[f + 1], 0 != l && (t[f] = h[l], h[l]++) + }, e.H.A = function (t, r, i) { + const o = t.length, a = e.H.m.r; + for (let e = 0; e < o; e += 2) if (0 != t[e + 1]) { + const o = e >> 1, s = t[e + 1], f = o << 4 | s, l = r - s; + let c = t[e] << l; + const u = c + (1 << l); + for (; c != u;) { + i[a[c] >>> 15 - r] = f, c++ + } + } + }, e.H.l = function (t, r) { + const i = e.H.m.r, o = 15 - r; + for (let e = 0; e < t.length; e += 2) { + const a = t[e] << r - t[e + 1]; + t[e] = i[a] >>> o + } + }, e.H.M = function (e, t, r) { + r <<= 7 & t; + const i = t >>> 3; + e[i] |= r, e[i + 1] |= r >>> 8 + }, e.H.I = function (e, t, r) { + r <<= 7 & t; + const i = t >>> 3; + e[i] |= r, e[i + 1] |= r >>> 8, e[i + 2] |= r >>> 16 + }, e.H.e = function (e, t, r) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8) >>> (7 & t) & (1 << r) - 1 + }, e.H.b = function (e, t, r) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8 | e[2 + (t >>> 3)] << 16) >>> (7 & t) & (1 << r) - 1 + }, e.H.Z = function (e, t) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8 | e[2 + (t >>> 3)] << 16) >>> (7 & t) + }, e.H.i = function (e, t) { + return (e[t >>> 3] | e[1 + (t >>> 3)] << 8 | e[2 + (t >>> 3)] << 16 | e[3 + (t >>> 3)] << 24) >>> (7 & t) + }, e.H.m = function () { + const e = Uint16Array, t = Uint32Array; + return { + K: new e(16), + j: new e(16), + X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], + S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], + T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], + q: new e(32), + p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], + z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], + c: new t(32), + J: new e(512), + _: [], + h: new e(32), + $: [], + w: new e(32768), + C: [], + v: [], + d: new e(32768), + D: [], + u: new e(512), + Q: [], + r: new e(32768), + s: new t(286), + Y: new t(30), + a: new t(19), + t: new t(15e3), + k: new e(65536), + g: new e(32768) + } + }(), function () { + const t = e.H.m; + for (var r = 0; r < 32768; r++) { + let e = r; + e = (2863311530 & e) >>> 1 | (1431655765 & e) << 1, e = (3435973836 & e) >>> 2 | (858993459 & e) << 2, e = (4042322160 & e) >>> 4 | (252645135 & e) << 4, e = (4278255360 & e) >>> 8 | (16711935 & e) << 8, t.r[r] = (e >>> 16 | e << 16) >>> 17 + } + + function n(e, t, r) { + for (; 0 != t--;) e.push(0, r) + } + + for (r = 0; r < 32; r++) t.q[r] = t.S[r] << 3 | t.T[r], t.c[r] = t.p[r] << 4 | t.z[r]; + n(t._, 144, 8), n(t._, 112, 9), n(t._, 24, 7), n(t._, 8, 8), e.H.n(t._, 9), e.H.A(t._, 9, t.J), e.H.l(t._, 9), n(t.$, 32, 5), e.H.n(t.$, 5), e.H.A(t.$, 5, t.h), e.H.l(t.$, 5), n(t.Q, 19, 0), n(t.C, 286, 0), n(t.D, 30, 0), n(t.v, 320, 0) + }(), e.H.N + }(); + + function _getBPP(e) { + return [1, null, 3, 1, 2, null, 4][e.ctype] * e.depth + } + + function _filterZero(e, t, r, i, o) { + let a = _getBPP(t); + const s = Math.ceil(i * a / 8); + let f, l; + a = Math.ceil(a / 8); + let c = e[r], u = 0; + if (c > 1 && (e[r] = [0, 0, 1][c - 2]), 3 == c) for (u = a; u < s; u++) e[u + 1] = e[u + 1] + (e[u + 1 - a] >>> 1) & 255; + for (let t = 0; t < o; t++) if (f = r + t * s, l = f + t + 1, c = e[l - 1], u = 0, 0 == c) for (; u < s; u++) e[f + u] = e[l + u]; else if (1 == c) { + for (; u < a; u++) e[f + u] = e[l + u]; + for (; u < s; u++) e[f + u] = e[l + u] + e[f + u - a] + } else if (2 == c) for (; u < s; u++) e[f + u] = e[l + u] + e[f + u - s]; else if (3 == c) { + for (; u < a; u++) e[f + u] = e[l + u] + (e[f + u - s] >>> 1); + for (; u < s; u++) e[f + u] = e[l + u] + (e[f + u - s] + e[f + u - a] >>> 1) + } else { + for (; u < a; u++) e[f + u] = e[l + u] + _paeth(0, e[f + u - s], 0); + for (; u < s; u++) e[f + u] = e[l + u] + _paeth(e[f + u - a], e[f + u - s], e[f + u - a - s]) + } + return e + } + + function _paeth(e, t, r) { + const i = e + t - r, o = i - e, a = i - t, s = i - r; + return o * o <= a * a && o * o <= s * s ? e : a * a <= s * s ? t : r + } + + function _IHDR(t, r, i) { + i.width = e.readUint(t, r), r += 4, i.height = e.readUint(t, r), r += 4, i.depth = t[r], r++, i.ctype = t[r], r++, i.compress = t[r], r++, i.filter = t[r], r++, i.interlace = t[r], r++ + } + + function _copyTile(e, t, r, i, o, a, s, f, l) { + const c = Math.min(t, o), u = Math.min(r, a); + let h = 0, d = 0; + for (let r = 0; r < u; r++) for (let a = 0; a < c; a++) if (s >= 0 && f >= 0 ? (h = r * t + a << 2, d = (f + r) * o + s + a << 2) : (h = (-f + r) * t - s + a << 2, d = r * o + a << 2), 0 == l) i[d] = e[h], i[d + 1] = e[h + 1], i[d + 2] = e[h + 2], i[d + 3] = e[h + 3]; else if (1 == l) { + var A = e[h + 3] * (1 / 255), g = e[h] * A, p = e[h + 1] * A, m = e[h + 2] * A, + w = i[d + 3] * (1 / 255), v = i[d] * w, b = i[d + 1] * w, y = i[d + 2] * w; + const t = 1 - A, r = A + w * t, o = 0 == r ? 0 : 1 / r; + i[d + 3] = 255 * r, i[d + 0] = (g + v * t) * o, i[d + 1] = (p + b * t) * o, i[d + 2] = (m + y * t) * o + } else if (2 == l) { + A = e[h + 3], g = e[h], p = e[h + 1], m = e[h + 2], w = i[d + 3], v = i[d], b = i[d + 1], y = i[d + 2]; + A == w && g == v && p == b && m == y ? (i[d] = 0, i[d + 1] = 0, i[d + 2] = 0, i[d + 3] = 0) : (i[d] = g, i[d + 1] = p, i[d + 2] = m, i[d + 3] = A) + } else if (3 == l) { + A = e[h + 3], g = e[h], p = e[h + 1], m = e[h + 2], w = i[d + 3], v = i[d], b = i[d + 1], y = i[d + 2]; + if (A == w && g == v && p == b && m == y) continue; + if (A < 220 && w > 20) return !1 + } + return !0 + } + + return { + decode: function decode(r) { + const i = new Uint8Array(r); + let o = 8; + const a = e, s = a.readUshort, f = a.readUint, l = {tabs: {}, frames: []}, + c = new Uint8Array(i.length); + let u, h = 0, d = 0; + const A = [137, 80, 78, 71, 13, 10, 26, 10]; + for (var g = 0; g < 8; g++) if (i[g] != A[g]) throw"The input is not a PNG file!"; + for (; o < i.length;) { + const e = a.readUint(i, o); + o += 4; + const r = a.readASCII(i, o, 4); + if (o += 4, "IHDR" == r) _IHDR(i, o, l); else if ("iCCP" == r) { + for (var p = o; 0 != i[p];) p++; + a.readASCII(i, o, p - o), i[p + 1]; + const s = i.slice(p + 2, o + e); + let f = null; + try { + f = _inflate(s) + } catch (e) { + f = t(s) + } + l.tabs[r] = f + } else if ("CgBI" == r) l.tabs[r] = i.slice(o, o + 4); else if ("IDAT" == r) { + for (g = 0; g < e; g++) c[h + g] = i[o + g]; + h += e + } else if ("acTL" == r) l.tabs[r] = { + num_frames: f(i, o), + num_plays: f(i, o + 4) + }, u = new Uint8Array(i.length); else if ("fcTL" == r) { + if (0 != d) (E = l.frames[l.frames.length - 1]).data = _decompress(l, u.slice(0, d), E.rect.width, E.rect.height), d = 0; + const e = {x: f(i, o + 12), y: f(i, o + 16), width: f(i, o + 4), height: f(i, o + 8)}; + let t = s(i, o + 22); + t = s(i, o + 20) / (0 == t ? 100 : t); + const r = {rect: e, delay: Math.round(1e3 * t), dispose: i[o + 24], blend: i[o + 25]}; + l.frames.push(r) + } else if ("fdAT" == r) { + for (g = 0; g < e - 4; g++) u[d + g] = i[o + g + 4]; + d += e - 4 + } else if ("pHYs" == r) l.tabs[r] = [a.readUint(i, o), a.readUint(i, o + 4), i[o + 8]]; else if ("cHRM" == r) { + l.tabs[r] = []; + for (g = 0; g < 8; g++) l.tabs[r].push(a.readUint(i, o + 4 * g)) + } else if ("tEXt" == r || "zTXt" == r) { + null == l.tabs[r] && (l.tabs[r] = {}); + var m = a.nextZero(i, o), w = a.readASCII(i, o, m - o), v = o + e - m - 1; + if ("tEXt" == r) y = a.readASCII(i, m + 1, v); else { + var b = _inflate(i.slice(m + 2, m + 2 + v)); + y = a.readUTF8(b, 0, b.length) + } + l.tabs[r][w] = y + } else if ("iTXt" == r) { + null == l.tabs[r] && (l.tabs[r] = {}); + m = 0, p = o; + m = a.nextZero(i, p); + w = a.readASCII(i, p, m - p); + const t = i[p = m + 1]; + var y; + i[p + 1], p += 2, m = a.nextZero(i, p), a.readASCII(i, p, m - p), p = m + 1, m = a.nextZero(i, p), a.readUTF8(i, p, m - p); + v = e - ((p = m + 1) - o); + if (0 == t) y = a.readUTF8(i, p, v); else { + b = _inflate(i.slice(p, p + v)); + y = a.readUTF8(b, 0, b.length) + } + l.tabs[r][w] = y + } else if ("PLTE" == r) l.tabs[r] = a.readBytes(i, o, e); else if ("hIST" == r) { + const e = l.tabs.PLTE.length / 3; + l.tabs[r] = []; + for (g = 0; g < e; g++) l.tabs[r].push(s(i, o + 2 * g)) + } else if ("tRNS" == r) 3 == l.ctype ? l.tabs[r] = a.readBytes(i, o, e) : 0 == l.ctype ? l.tabs[r] = s(i, o) : 2 == l.ctype && (l.tabs[r] = [s(i, o), s(i, o + 2), s(i, o + 4)]); else if ("gAMA" == r) l.tabs[r] = a.readUint(i, o) / 1e5; else if ("sRGB" == r) l.tabs[r] = i[o]; else if ("bKGD" == r) 0 == l.ctype || 4 == l.ctype ? l.tabs[r] = [s(i, o)] : 2 == l.ctype || 6 == l.ctype ? l.tabs[r] = [s(i, o), s(i, o + 2), s(i, o + 4)] : 3 == l.ctype && (l.tabs[r] = i[o]); else if ("IEND" == r) break; + o += e, a.readUint(i, o), o += 4 + } + var E; + return 0 != d && ((E = l.frames[l.frames.length - 1]).data = _decompress(l, u.slice(0, d), E.rect.width, E.rect.height)), l.data = _decompress(l, c, l.width, l.height), delete l.compress, delete l.interlace, delete l.filter, l + }, toRGBA8: function toRGBA8(e) { + const t = e.width, r = e.height; + if (null == e.tabs.acTL) return [decodeImage(e.data, t, r, e).buffer]; + const i = []; + null == e.frames[0].data && (e.frames[0].data = e.data); + const o = t * r * 4, a = new Uint8Array(o), s = new Uint8Array(o), f = new Uint8Array(o); + for (let c = 0; c < e.frames.length; c++) { + const u = e.frames[c], h = u.rect.x, d = u.rect.y, A = u.rect.width, g = u.rect.height, + p = decodeImage(u.data, A, g, e); + if (0 != c) for (var l = 0; l < o; l++) f[l] = a[l]; + if (0 == u.blend ? _copyTile(p, A, g, a, t, r, h, d, 0) : 1 == u.blend && _copyTile(p, A, g, a, t, r, h, d, 1), i.push(a.buffer.slice(0)), 0 == u.dispose) ; else if (1 == u.dispose) _copyTile(s, A, g, a, t, r, h, d, 0); else if (2 == u.dispose) for (l = 0; l < o; l++) a[l] = f[l] + } + return i + }, _paeth: _paeth, _copyTile: _copyTile, _bin: e + } + }(); + !function () { + const {_copyTile: e} = UPNG, {_bin: t} = UPNG, r = UPNG._paeth; + var i = { + table: function () { + const e = new Uint32Array(256); + for (let t = 0; t < 256; t++) { + let r = t; + for (let e = 0; e < 8; e++) 1 & r ? r = 3988292384 ^ r >>> 1 : r >>>= 1; + e[t] = r + } + return e + }(), update(e, t, r, o) { + for (let a = 0; a < o; a++) e = i.table[255 & (e ^ t[r + a])] ^ e >>> 8; + return e + }, crc: (e, t, r) => 4294967295 ^ i.update(4294967295, e, t, r) + }; + + function addErr(e, t, r, i) { + t[r] += e[0] * i >> 4, t[r + 1] += e[1] * i >> 4, t[r + 2] += e[2] * i >> 4, t[r + 3] += e[3] * i >> 4 + } + + function N(e) { + return Math.max(0, Math.min(255, e)) + } + + function D(e, t) { + const r = e[0] - t[0], i = e[1] - t[1], o = e[2] - t[2], a = e[3] - t[3]; + return r * r + i * i + o * o + a * a + } + + function dither(e, t, r, i, o, a, s) { + null == s && (s = 1); + const f = i.length, l = []; + for (var c = 0; c < f; c++) { + const e = i[c]; + l.push([e >>> 0 & 255, e >>> 8 & 255, e >>> 16 & 255, e >>> 24 & 255]) + } + for (c = 0; c < f; c++) { + let e = 4294967295; + for (var u = 0, h = 0; h < f; h++) { + var d = D(l[c], l[h]); + h != c && d < e && (e = d, u = h) + } + } + const A = new Uint32Array(o.buffer), g = new Int16Array(t * r * 4), + p = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5]; + for (c = 0; c < p.length; c++) p[c] = 255 * ((p[c] + .5) / 16 - .5); + for (let o = 0; o < r; o++) for (let w = 0; w < t; w++) { + var m; + c = 4 * (o * t + w); + if (2 != s) m = [N(e[c] + g[c]), N(e[c + 1] + g[c + 1]), N(e[c + 2] + g[c + 2]), N(e[c + 3] + g[c + 3])]; else { + d = p[4 * (3 & o) + (3 & w)]; + m = [N(e[c] + d), N(e[c + 1] + d), N(e[c + 2] + d), N(e[c + 3] + d)] + } + u = 0; + let v = 16777215; + for (h = 0; h < f; h++) { + const e = D(m, l[h]); + e < v && (v = e, u = h) + } + const b = l[u], y = [m[0] - b[0], m[1] - b[1], m[2] - b[2], m[3] - b[3]]; + 1 == s && (w != t - 1 && addErr(y, g, c + 4, 7), o != r - 1 && (0 != w && addErr(y, g, c + 4 * t - 4, 3), addErr(y, g, c + 4 * t, 5), w != t - 1 && addErr(y, g, c + 4 * t + 4, 1))), a[c >> 2] = u, A[c >> 2] = i[u] + } + } + + function _main(e, r, o, a, s) { + null == s && (s = {}); + const {crc: f} = i, l = t.writeUint, c = t.writeUshort, u = t.writeASCII; + let h = 8; + const d = e.frames.length > 1; + let A, g = !1, p = 33 + (d ? 20 : 0); + if (null != s.sRGB && (p += 13), null != s.pHYs && (p += 21), null != s.iCCP && (A = pako.deflate(s.iCCP), p += 21 + A.length + 4), 3 == e.ctype) { + for (var m = e.plte.length, w = 0; w < m; w++) e.plte[w] >>> 24 != 255 && (g = !0); + p += 8 + 3 * m + 4 + (g ? 8 + 1 * m + 4 : 0) + } + for (var v = 0; v < e.frames.length; v++) { + d && (p += 38), p += (F = e.frames[v]).cimg.length + 12, 0 != v && (p += 4) + } + p += 12; + const b = new Uint8Array(p), y = [137, 80, 78, 71, 13, 10, 26, 10]; + for (w = 0; w < 8; w++) b[w] = y[w]; + if (l(b, h, 13), h += 4, u(b, h, "IHDR"), h += 4, l(b, h, r), h += 4, l(b, h, o), h += 4, b[h] = e.depth, h++, b[h] = e.ctype, h++, b[h] = 0, h++, b[h] = 0, h++, b[h] = 0, h++, l(b, h, f(b, h - 17, 17)), h += 4, null != s.sRGB && (l(b, h, 1), h += 4, u(b, h, "sRGB"), h += 4, b[h] = s.sRGB, h++, l(b, h, f(b, h - 5, 5)), h += 4), null != s.iCCP) { + const e = 13 + A.length; + l(b, h, e), h += 4, u(b, h, "iCCP"), h += 4, u(b, h, "ICC profile"), h += 11, h += 2, b.set(A, h), h += A.length, l(b, h, f(b, h - (e + 4), e + 4)), h += 4 + } + if (null != s.pHYs && (l(b, h, 9), h += 4, u(b, h, "pHYs"), h += 4, l(b, h, s.pHYs[0]), h += 4, l(b, h, s.pHYs[1]), h += 4, b[h] = s.pHYs[2], h++, l(b, h, f(b, h - 13, 13)), h += 4), d && (l(b, h, 8), h += 4, u(b, h, "acTL"), h += 4, l(b, h, e.frames.length), h += 4, l(b, h, null != s.loop ? s.loop : 0), h += 4, l(b, h, f(b, h - 12, 12)), h += 4), 3 == e.ctype) { + l(b, h, 3 * (m = e.plte.length)), h += 4, u(b, h, "PLTE"), h += 4; + for (w = 0; w < m; w++) { + const t = 3 * w, r = e.plte[w], i = 255 & r, o = r >>> 8 & 255, a = r >>> 16 & 255; + b[h + t + 0] = i, b[h + t + 1] = o, b[h + t + 2] = a + } + if (h += 3 * m, l(b, h, f(b, h - 3 * m - 4, 3 * m + 4)), h += 4, g) { + l(b, h, m), h += 4, u(b, h, "tRNS"), h += 4; + for (w = 0; w < m; w++) b[h + w] = e.plte[w] >>> 24 & 255; + h += m, l(b, h, f(b, h - m - 4, m + 4)), h += 4 + } + } + let E = 0; + for (v = 0; v < e.frames.length; v++) { + var F = e.frames[v]; + d && (l(b, h, 26), h += 4, u(b, h, "fcTL"), h += 4, l(b, h, E++), h += 4, l(b, h, F.rect.width), h += 4, l(b, h, F.rect.height), h += 4, l(b, h, F.rect.x), h += 4, l(b, h, F.rect.y), h += 4, c(b, h, a[v]), h += 2, c(b, h, 1e3), h += 2, b[h] = F.dispose, h++, b[h] = F.blend, h++, l(b, h, f(b, h - 30, 30)), h += 4); + const t = F.cimg; + l(b, h, (m = t.length) + (0 == v ? 0 : 4)), h += 4; + const r = h; + u(b, h, 0 == v ? "IDAT" : "fdAT"), h += 4, 0 != v && (l(b, h, E++), h += 4), b.set(t, h), h += m, l(b, h, f(b, r, h - r)), h += 4 + } + return l(b, h, 0), h += 4, u(b, h, "IEND"), h += 4, l(b, h, f(b, h - 4, 4)), h += 4, b.buffer + } + + function compressPNG(e, t, r) { + for (let i = 0; i < e.frames.length; i++) { + const o = e.frames[i]; + o.rect.width; + const a = o.rect.height, s = new Uint8Array(a * o.bpl + a); + o.cimg = _filterZero(o.img, a, o.bpp, o.bpl, s, t, r) + } + } + + function compress(t, r, i, o, a) { + const s = a[0], f = a[1], l = a[2], c = a[3], u = a[4], h = a[5]; + let d = 6, A = 8, g = 255; + for (var p = 0; p < t.length; p++) { + const e = new Uint8Array(t[p]); + for (var m = e.length, w = 0; w < m; w += 4) g &= e[w + 3] + } + const v = 255 != g, b = function framize(t, r, i, o, a, s) { + const f = []; + for (var l = 0; l < t.length; l++) { + const h = new Uint8Array(t[l]), A = new Uint32Array(h.buffer); + var c; + let g = 0, p = 0, m = r, w = i, v = o ? 1 : 0; + if (0 != l) { + const b = s || o || 1 == l || 0 != f[l - 2].dispose ? 1 : 2; + let y = 0, E = 1e9; + for (let e = 0; e < b; e++) { + var u = new Uint8Array(t[l - 1 - e]); + const o = new Uint32Array(t[l - 1 - e]); + let s = r, f = i, c = -1, h = -1; + for (let e = 0; e < i; e++) for (let t = 0; t < r; t++) { + A[d = e * r + t] != o[d] && (t < s && (s = t), t > c && (c = t), e < f && (f = e), e > h && (h = e)) + } + -1 == c && (s = f = c = h = 0), a && (1 == (1 & s) && s--, 1 == (1 & f) && f--); + const v = (c - s + 1) * (h - f + 1); + v < E && (E = v, y = e, g = s, p = f, m = c - s + 1, w = h - f + 1) + } + u = new Uint8Array(t[l - 1 - y]); + 1 == y && (f[l - 1].dispose = 2), c = new Uint8Array(m * w * 4), e(u, r, i, c, m, w, -g, -p, 0), v = e(h, r, i, c, m, w, -g, -p, 3) ? 1 : 0, 1 == v ? _prepareDiff(h, r, i, c, { + x: g, + y: p, + width: m, + height: w + }) : e(h, r, i, c, m, w, -g, -p, 0) + } else c = h.slice(0); + f.push({rect: {x: g, y: p, width: m, height: w}, img: c, blend: v, dispose: 0}) + } + if (o) for (l = 0; l < f.length; l++) { + if (1 == (A = f[l]).blend) continue; + const e = A.rect, o = f[l - 1].rect, s = Math.min(e.x, o.x), c = Math.min(e.y, o.y), u = { + x: s, + y: c, + width: Math.max(e.x + e.width, o.x + o.width) - s, + height: Math.max(e.y + e.height, o.y + o.height) - c + }; + f[l - 1].dispose = 1, l - 1 != 0 && _updateFrame(t, r, i, f, l - 1, u, a), _updateFrame(t, r, i, f, l, u, a) + } + let h = 0; + if (1 != t.length) for (var d = 0; d < f.length; d++) { + var A; + h += (A = f[d]).rect.width * A.rect.height + } + return f + }(t, r, i, s, f, l), y = {}, E = [], F = []; + if (0 != o) { + const e = []; + for (w = 0; w < b.length; w++) e.push(b[w].img.buffer); + const t = function concatRGBA(e) { + let t = 0; + for (var r = 0; r < e.length; r++) t += e[r].byteLength; + const i = new Uint8Array(t); + let o = 0; + for (r = 0; r < e.length; r++) { + const t = new Uint8Array(e[r]), a = t.length; + for (let e = 0; e < a; e += 4) { + let r = t[e], a = t[e + 1], s = t[e + 2]; + const f = t[e + 3]; + 0 == f && (r = a = s = 0), i[o + e] = r, i[o + e + 1] = a, i[o + e + 2] = s, i[o + e + 3] = f + } + o += a + } + return i.buffer + }(e), r = quantize(t, o); + for (w = 0; w < r.plte.length; w++) E.push(r.plte[w].est.rgba); + let i = 0; + for (w = 0; w < b.length; w++) { + const e = (B = b[w]).img.length; + var _ = new Uint8Array(r.inds.buffer, i >> 2, e >> 2); + F.push(_); + const t = new Uint8Array(r.abuf, i, e); + h && dither(B.img, B.rect.width, B.rect.height, E, t, _), B.img.set(t), i += e + } + } else for (p = 0; p < b.length; p++) { + var B = b[p]; + const e = new Uint32Array(B.img.buffer); + var U = B.rect.width; + m = e.length, _ = new Uint8Array(m); + F.push(_); + for (w = 0; w < m; w++) { + const t = e[w]; + if (0 != w && t == e[w - 1]) _[w] = _[w - 1]; else if (w > U && t == e[w - U]) _[w] = _[w - U]; else { + let e = y[t]; + if (null == e && (y[t] = e = E.length, E.push(t), E.length >= 300)) break; + _[w] = e + } + } + } + const C = E.length; + C <= 256 && 0 == u && (A = C <= 2 ? 1 : C <= 4 ? 2 : C <= 16 ? 4 : 8, A = Math.max(A, c)); + for (p = 0; p < b.length; p++) { + (B = b[p]).rect.x, B.rect.y; + U = B.rect.width; + const e = B.rect.height; + let t = B.img; + new Uint32Array(t.buffer); + let r = 4 * U, i = 4; + if (C <= 256 && 0 == u) { + r = Math.ceil(A * U / 8); + var I = new Uint8Array(r * e); + const o = F[p]; + for (let t = 0; t < e; t++) { + w = t * r; + const e = t * U; + if (8 == A) for (var Q = 0; Q < U; Q++) I[w + Q] = o[e + Q]; else if (4 == A) for (Q = 0; Q < U; Q++) I[w + (Q >> 1)] |= o[e + Q] << 4 - 4 * (1 & Q); else if (2 == A) for (Q = 0; Q < U; Q++) I[w + (Q >> 2)] |= o[e + Q] << 6 - 2 * (3 & Q); else if (1 == A) for (Q = 0; Q < U; Q++) I[w + (Q >> 3)] |= o[e + Q] << 7 - 1 * (7 & Q) + } + t = I, d = 3, i = 1 + } else if (0 == v && 1 == b.length) { + I = new Uint8Array(U * e * 3); + const o = U * e; + for (w = 0; w < o; w++) { + const e = 3 * w, r = 4 * w; + I[e] = t[r], I[e + 1] = t[r + 1], I[e + 2] = t[r + 2] + } + t = I, d = 2, i = 3, r = 3 * U + } + B.img = t, B.bpl = r, B.bpp = i + } + return {ctype: d, depth: A, plte: E, frames: b} + } + + function _updateFrame(t, r, i, o, a, s, f) { + const l = Uint8Array, c = Uint32Array, u = new l(t[a - 1]), h = new c(t[a - 1]), + d = a + 1 < t.length ? new l(t[a + 1]) : null, A = new l(t[a]), g = new c(A.buffer); + let p = r, m = i, w = -1, v = -1; + for (let e = 0; e < s.height; e++) for (let t = 0; t < s.width; t++) { + const i = s.x + t, f = s.y + e, l = f * r + i, c = g[l]; + 0 == c || 0 == o[a - 1].dispose && h[l] == c && (null == d || 0 != d[4 * l + 3]) || (i < p && (p = i), i > w && (w = i), f < m && (m = f), f > v && (v = f)) + } + -1 == w && (p = m = w = v = 0), f && (1 == (1 & p) && p--, 1 == (1 & m) && m--), s = { + x: p, + y: m, + width: w - p + 1, + height: v - m + 1 + }; + const b = o[a]; + b.rect = s, b.blend = 1, b.img = new Uint8Array(s.width * s.height * 4), 0 == o[a - 1].dispose ? (e(u, r, i, b.img, s.width, s.height, -s.x, -s.y, 0), _prepareDiff(A, r, i, b.img, s)) : e(A, r, i, b.img, s.width, s.height, -s.x, -s.y, 0) + } + + function _prepareDiff(t, r, i, o, a) { + e(t, r, i, o, a.width, a.height, -a.x, -a.y, 2) + } + + function _filterZero(e, t, r, i, o, a, s) { + const f = []; + let l, c = [0, 1, 2, 3, 4]; + -1 != a ? c = [a] : (t * i > 5e5 || 1 == r) && (c = [0]), s && (l = {level: 0}); + const u = UZIP; + for (var h = 0; h < c.length; h++) { + for (let a = 0; a < t; a++) _filterLine(o, e, a, i, r, c[h]); + f.push(u.deflate(o, l)) + } + let d, A = 1e9; + for (h = 0; h < f.length; h++) f[h].length < A && (d = h, A = f[h].length); + return f[d] + } + + function _filterLine(e, t, i, o, a, s) { + const f = i * o; + let l = f + i; + if (e[l] = s, l++, 0 == s) if (o < 500) for (var c = 0; c < o; c++) e[l + c] = t[f + c]; else e.set(new Uint8Array(t.buffer, f, o), l); else if (1 == s) { + for (c = 0; c < a; c++) e[l + c] = t[f + c]; + for (c = a; c < o; c++) e[l + c] = t[f + c] - t[f + c - a] + 256 & 255 + } else if (0 == i) { + for (c = 0; c < a; c++) e[l + c] = t[f + c]; + if (2 == s) for (c = a; c < o; c++) e[l + c] = t[f + c]; + if (3 == s) for (c = a; c < o; c++) e[l + c] = t[f + c] - (t[f + c - a] >> 1) + 256 & 255; + if (4 == s) for (c = a; c < o; c++) e[l + c] = t[f + c] - r(t[f + c - a], 0, 0) + 256 & 255 + } else { + if (2 == s) for (c = 0; c < o; c++) e[l + c] = t[f + c] + 256 - t[f + c - o] & 255; + if (3 == s) { + for (c = 0; c < a; c++) e[l + c] = t[f + c] + 256 - (t[f + c - o] >> 1) & 255; + for (c = a; c < o; c++) e[l + c] = t[f + c] + 256 - (t[f + c - o] + t[f + c - a] >> 1) & 255 + } + if (4 == s) { + for (c = 0; c < a; c++) e[l + c] = t[f + c] + 256 - r(0, t[f + c - o], 0) & 255; + for (c = a; c < o; c++) e[l + c] = t[f + c] + 256 - r(t[f + c - a], t[f + c - o], t[f + c - a - o]) & 255 + } + } + } + + function quantize(e, t) { + const r = new Uint8Array(e), i = r.slice(0), o = new Uint32Array(i.buffer), a = getKDtree(i, t), + s = a[0], f = a[1], l = r.length, c = new Uint8Array(l >> 2); + let u; + if (r.length < 2e7) for (var h = 0; h < l; h += 4) { + u = getNearest(s, d = r[h] * (1 / 255), A = r[h + 1] * (1 / 255), g = r[h + 2] * (1 / 255), p = r[h + 3] * (1 / 255)), c[h >> 2] = u.ind, o[h >> 2] = u.est.rgba + } else for (h = 0; h < l; h += 4) { + var d = r[h] * (1 / 255), A = r[h + 1] * (1 / 255), g = r[h + 2] * (1 / 255), + p = r[h + 3] * (1 / 255); + for (u = s; u.left;) u = planeDst(u.est, d, A, g, p) <= 0 ? u.left : u.right; + c[h >> 2] = u.ind, o[h >> 2] = u.est.rgba + } + return {abuf: i.buffer, inds: c, plte: f} + } + + function getKDtree(e, t, r) { + null == r && (r = 1e-4); + const i = new Uint32Array(e.buffer), + o = {i0: 0, i1: e.length, bst: null, est: null, tdst: 0, left: null, right: null}; + o.bst = stats(e, o.i0, o.i1), o.est = estats(o.bst); + const a = [o]; + for (; a.length < t;) { + let t = 0, o = 0; + for (var s = 0; s < a.length; s++) a[s].est.L > t && (t = a[s].est.L, o = s); + if (t < r) break; + const f = a[o], l = splitPixels(e, i, f.i0, f.i1, f.est.e, f.est.eMq255); + if (f.i0 >= l || f.i1 <= l) { + f.est.L = 0; + continue + } + const c = {i0: f.i0, i1: l, bst: null, est: null, tdst: 0, left: null, right: null}; + c.bst = stats(e, c.i0, c.i1), c.est = estats(c.bst); + const u = {i0: l, i1: f.i1, bst: null, est: null, tdst: 0, left: null, right: null}; + u.bst = {R: [], m: [], N: f.bst.N - c.bst.N}; + for (s = 0; s < 16; s++) u.bst.R[s] = f.bst.R[s] - c.bst.R[s]; + for (s = 0; s < 4; s++) u.bst.m[s] = f.bst.m[s] - c.bst.m[s]; + u.est = estats(u.bst), f.left = c, f.right = u, a[o] = c, a.push(u) + } + a.sort(((e, t) => t.bst.N - e.bst.N)); + for (s = 0; s < a.length; s++) a[s].ind = s; + return [o, a] + } + + function getNearest(e, t, r, i, o) { + if (null == e.left) return e.tdst = function dist(e, t, r, i, o) { + const a = t - e[0], s = r - e[1], f = i - e[2], l = o - e[3]; + return a * a + s * s + f * f + l * l + }(e.est.q, t, r, i, o), e; + const a = planeDst(e.est, t, r, i, o); + let s = e.left, f = e.right; + a > 0 && (s = e.right, f = e.left); + const l = getNearest(s, t, r, i, o); + if (l.tdst <= a * a) return l; + const c = getNearest(f, t, r, i, o); + return c.tdst < l.tdst ? c : l + } + + function planeDst(e, t, r, i, o) { + const {e: a} = e; + return a[0] * t + a[1] * r + a[2] * i + a[3] * o - e.eMq + } + + function splitPixels(e, t, r, i, o, a) { + for (i -= 4; r < i;) { + for (; vecDot(e, r, o) <= a;) r += 4; + for (; vecDot(e, i, o) > a;) i -= 4; + if (r >= i) break; + const s = t[r >> 2]; + t[r >> 2] = t[i >> 2], t[i >> 2] = s, r += 4, i -= 4 + } + for (; vecDot(e, r, o) > a;) r -= 4; + return r + 4 + } + + function vecDot(e, t, r) { + return e[t] * r[0] + e[t + 1] * r[1] + e[t + 2] * r[2] + e[t + 3] * r[3] + } + + function stats(e, t, r) { + const i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = [0, 0, 0, 0], a = r - t >> 2; + for (let a = t; a < r; a += 4) { + const t = e[a] * (1 / 255), r = e[a + 1] * (1 / 255), s = e[a + 2] * (1 / 255), + f = e[a + 3] * (1 / 255); + o[0] += t, o[1] += r, o[2] += s, o[3] += f, i[0] += t * t, i[1] += t * r, i[2] += t * s, i[3] += t * f, i[5] += r * r, i[6] += r * s, i[7] += r * f, i[10] += s * s, i[11] += s * f, i[15] += f * f + } + return i[4] = i[1], i[8] = i[2], i[9] = i[6], i[12] = i[3], i[13] = i[7], i[14] = i[11], { + R: i, + m: o, + N: a + } + } + + function estats(e) { + const {R: t} = e, {m: r} = e, {N: i} = e, a = r[0], s = r[1], f = r[2], l = r[3], + c = 0 == i ? 0 : 1 / i, + u = [t[0] - a * a * c, t[1] - a * s * c, t[2] - a * f * c, t[3] - a * l * c, t[4] - s * a * c, t[5] - s * s * c, t[6] - s * f * c, t[7] - s * l * c, t[8] - f * a * c, t[9] - f * s * c, t[10] - f * f * c, t[11] - f * l * c, t[12] - l * a * c, t[13] - l * s * c, t[14] - l * f * c, t[15] - l * l * c], + h = u, d = o; + let A = [Math.random(), Math.random(), Math.random(), Math.random()], g = 0, p = 0; + if (0 != i) for (let e = 0; e < 16 && (A = d.multVec(h, A), p = Math.sqrt(d.dot(A, A)), A = d.sml(1 / p, A), !(0 != e && Math.abs(p - g) < 1e-9)); e++) g = p; + const m = [a * c, s * c, f * c, l * c]; + return { + Cov: u, + q: m, + e: A, + L: g, + eMq255: d.dot(d.sml(255, m), A), + eMq: d.dot(A, m), + rgba: (Math.round(255 * m[3]) << 24 | Math.round(255 * m[2]) << 16 | Math.round(255 * m[1]) << 8 | Math.round(255 * m[0]) << 0) >>> 0 + } + } + + var o = { + multVec: (e, t) => [e[0] * t[0] + e[1] * t[1] + e[2] * t[2] + e[3] * t[3], e[4] * t[0] + e[5] * t[1] + e[6] * t[2] + e[7] * t[3], e[8] * t[0] + e[9] * t[1] + e[10] * t[2] + e[11] * t[3], e[12] * t[0] + e[13] * t[1] + e[14] * t[2] + e[15] * t[3]], + dot: (e, t) => e[0] * t[0] + e[1] * t[1] + e[2] * t[2] + e[3] * t[3], + sml: (e, t) => [e * t[0], e * t[1], e * t[2], e * t[3]] + }; + UPNG.encode = function encode(e, t, r, i, o, a, s) { + null == i && (i = 0), null == s && (s = !1); + const f = compress(e, t, r, i, [!1, !1, !1, 0, s, !1]); + return compressPNG(f, -1), _main(f, t, r, o, a) + }, UPNG.encodeLL = function encodeLL(e, t, r, i, o, a, s, f) { + const l = {ctype: 0 + (1 == i ? 0 : 2) + (0 == o ? 0 : 4), depth: a, frames: []}, c = (i + o) * a, + u = c * t; + for (let i = 0; i < e.length; i++) l.frames.push({ + rect: {x: 0, y: 0, width: t, height: r}, + img: new Uint8Array(e[i]), + blend: 0, + dispose: 1, + bpp: Math.ceil(c / 8), + bpl: Math.ceil(u / 8) + }); + return compressPNG(l, 0, !0), _main(l, t, r, s, f) + }, UPNG.encode.compress = compress, UPNG.encode.dither = dither, UPNG.quantize = quantize, UPNG.quantize.getKDtree = getKDtree, UPNG.quantize.getNearest = getNearest + }(); + const t = { + toArrayBuffer(e, r) { + const i = e.width, o = e.height, a = i << 2, s = e.getContext("2d").getImageData(0, 0, i, o), + f = new Uint32Array(s.data.buffer), l = (32 * i + 31) / 32 << 2, c = l * o, u = 122 + c, + h = new ArrayBuffer(u), d = new DataView(h), A = 1 << 20; + let g, p, m, w, v = A, b = 0, y = 0, E = 0; + + function set16(e) { + d.setUint16(y, e, !0), y += 2 + } + + function set32(e) { + d.setUint32(y, e, !0), y += 4 + } + + function seek(e) { + y += e + } + + set16(19778), set32(u), seek(4), set32(122), set32(108), set32(i), set32(-o >>> 0), set16(1), set16(32), set32(3), set32(c), set32(2835), set32(2835), seek(8), set32(16711680), set32(65280), set32(255), set32(4278190080), set32(1466527264), function convert() { + for (; b < o && v > 0;) { + for (w = 122 + b * l, g = 0; g < a;) v--, p = f[E++], m = p >>> 24, d.setUint32(w + g, p << 8 | m), g += 4; + b++ + } + E < f.length ? (v = A, setTimeout(convert, t._dly)) : r(h) + }() + }, toBlob(e, t) { + this.toArrayBuffer(e, (e => { + t(new Blob([e], {type: "image/bmp"})) + })) + }, _dly: 9 + }; + var r = { + CHROME: "CHROME", + FIREFOX: "FIREFOX", + DESKTOP_SAFARI: "DESKTOP_SAFARI", + IE: "IE", + IOS: "IOS", + ETC: "ETC" + }, i = { + [r.CHROME]: 16384, + [r.FIREFOX]: 11180, + [r.DESKTOP_SAFARI]: 16384, + [r.IE]: 8192, + [r.IOS]: 4096, + [r.ETC]: 8192 + }; + const o = "undefined" != typeof window, + a = "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope, + s = o && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), + CustomFile = (o || a) && (s && s.getOriginalSymbol(window, "File") || "undefined" != typeof File && File), + CustomFileReader = (o || a) && (s && s.getOriginalSymbol(window, "FileReader") || "undefined" != typeof FileReader && FileReader); + + function getFilefromDataUrl(e, t, r = Date.now()) { + return new Promise((i => { + const o = e.split(","), a = o[0].match(/:(.*?);/)[1], s = globalThis.atob(o[1]); + let f = s.length; + const l = new Uint8Array(f); + for (; f--;) l[f] = s.charCodeAt(f); + const c = new Blob([l], {type: a}); + c.name = t, c.lastModified = r, i(c) + })) + } + + function getDataUrlFromFile(e) { + return new Promise(((t, r) => { + const i = new CustomFileReader; + i.onload = () => t(i.result), i.onerror = e => r(e), i.readAsDataURL(e) + })) + } + + function loadImage(e) { + return new Promise(((t, r) => { + const i = new Image; + i.onload = () => t(i), i.onerror = e => r(e), i.src = e + })) + } + + function getBrowserName() { + if (void 0 !== getBrowserName.cachedResult) return getBrowserName.cachedResult; + let e = r.ETC; + const {userAgent: t} = navigator; + return /Chrom(e|ium)/i.test(t) ? e = r.CHROME : /iP(ad|od|hone)/i.test(t) && /WebKit/i.test(t) ? e = r.IOS : /Safari/i.test(t) ? e = r.DESKTOP_SAFARI : /Firefox/i.test(t) ? e = r.FIREFOX : (/MSIE/i.test(t) || !0 == !!document.documentMode) && (e = r.IE), getBrowserName.cachedResult = e, getBrowserName.cachedResult + } + + function approximateBelowMaximumCanvasSizeOfBrowser(e, t) { + const r = getBrowserName(), o = i[r]; + let a = e, s = t, f = a * s; + const l = a > s ? s / a : a / s; + for (; f > o * o;) { + const e = (o + a) / 2, t = (o + s) / 2; + e < t ? (s = t, a = t * l) : (s = e * l, a = e), f = a * s + } + return {width: a, height: s} + } + + function getNewCanvasAndCtx(e, t) { + let r, i; + try { + if (r = new OffscreenCanvas(e, t), i = r.getContext("2d"), null === i) throw new Error("getContext of OffscreenCanvas returns null") + } catch (e) { + r = document.createElement("canvas"), i = r.getContext("2d") + } + return r.width = e, r.height = t, [r, i] + } + + function drawImageInCanvas(e, t) { + const { + width: r, + height: i + } = approximateBelowMaximumCanvasSizeOfBrowser(e.width, e.height), [o, a] = getNewCanvasAndCtx(r, i); + return t && /jpe?g/.test(t) && (a.fillStyle = "white", a.fillRect(0, 0, o.width, o.height)), a.drawImage(e, 0, 0, o.width, o.height), o + } + + function isIOS() { + return void 0 !== isIOS.cachedResult || (isIOS.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "undefined" != typeof document && "ontouchend" in document), isIOS.cachedResult + } + + function drawFileInCanvas(e, t = {}) { + return new Promise((function (i, o) { + let a, s; + var $Try_2_Post = function () { + try { + return s = drawImageInCanvas(a, t.fileType || e.type), i([a, s]) + } catch (e) { + return o(e) + } + }, $Try_2_Catch = function (t) { + try { + 0; + var $Try_3_Catch = function (e) { + try { + throw e + } catch (e) { + return o(e) + } + }; + try { + let t; + return getDataUrlFromFile(e).then((function (e) { + try { + return t = e, loadImage(t).then((function (e) { + try { + return a = e, function () { + try { + return $Try_2_Post() + } catch (e) { + return o(e) + } + }() + } catch (e) { + return $Try_3_Catch(e) + } + }), $Try_3_Catch) + } catch (e) { + return $Try_3_Catch(e) + } + }), $Try_3_Catch) + } catch (e) { + $Try_3_Catch(e) + } + } catch (e) { + return o(e) + } + }; + try { + if (isIOS() || [r.DESKTOP_SAFARI, r.MOBILE_SAFARI].includes(getBrowserName())) throw new Error("Skip createImageBitmap on IOS and Safari"); + return createImageBitmap(e).then((function (e) { + try { + return a = e, $Try_2_Post() + } catch (e) { + return $Try_2_Catch() + } + }), $Try_2_Catch) + } catch (e) { + $Try_2_Catch() + } + })) + } + + function canvasToFile(e, r, i, o, a = 1) { + return new Promise((function (s, f) { + let l; + if ("image/png" === r) { + let c, u, h; + return c = e.getContext("2d"), ({data: u} = c.getImageData(0, 0, e.width, e.height)), h = UPNG.encode([u.buffer], e.width, e.height, 4096 * a), l = new Blob([h], {type: r}), l.name = i, l.lastModified = o, $If_4.call(this) + } + { + if ("image/bmp" === r) return new Promise((r => t.toBlob(e, r))).then(function (e) { + try { + return l = e, l.name = i, l.lastModified = o, $If_5.call(this) + } catch (e) { + return f(e) + } + }.bind(this), f); + { + if ("function" == typeof OffscreenCanvas && e instanceof OffscreenCanvas) return e.convertToBlob({ + type: r, + quality: a + }).then(function (e) { + try { + return l = e, l.name = i, l.lastModified = o, $If_6.call(this) + } catch (e) { + return f(e) + } + }.bind(this), f); + { + let d; + return d = e.toDataURL(r, a), getFilefromDataUrl(d, i, o).then(function (e) { + try { + return l = e, $If_6.call(this) + } catch (e) { + return f(e) + } + }.bind(this), f) + } + + function $If_6() { + return $If_5.call(this) + } + } + + function $If_5() { + return $If_4.call(this) + } + } + + function $If_4() { + return s(l) + } + })) + } + + function cleanupCanvasMemory(e) { + e.width = 0, e.height = 0 + } + + function isAutoOrientationInBrowser() { + return new Promise((function (e, t) { + let r, i, o, a, s; + return void 0 !== isAutoOrientationInBrowser.cachedResult ? e(isAutoOrientationInBrowser.cachedResult) : (r = "data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then((function (r) { + try { + return i = r, drawFileInCanvas(i).then((function (r) { + try { + return o = r[1], canvasToFile(o, i.type, i.name, i.lastModified).then((function (r) { + try { + return a = r, cleanupCanvasMemory(o), drawFileInCanvas(a).then((function (r) { + try { + return s = r[0], isAutoOrientationInBrowser.cachedResult = 1 === s.width && 2 === s.height, e(isAutoOrientationInBrowser.cachedResult) + } catch (e) { + return t(e) + } + }), t) + } catch (e) { + return t(e) + } + }), t) + } catch (e) { + return t(e) + } + }), t) + } catch (e) { + return t(e) + } + }), t)) + })) + } + + function getExifOrientation(e) { + return new Promise(((t, r) => { + const i = new CustomFileReader; + i.onload = e => { + const r = new DataView(e.target.result); + if (65496 != r.getUint16(0, !1)) return t(-2); + const i = r.byteLength; + let o = 2; + for (; o < i;) { + if (r.getUint16(o + 2, !1) <= 8) return t(-1); + const e = r.getUint16(o, !1); + if (o += 2, 65505 == e) { + if (1165519206 != r.getUint32(o += 2, !1)) return t(-1); + const e = 18761 == r.getUint16(o += 6, !1); + o += r.getUint32(o + 4, e); + const i = r.getUint16(o, e); + o += 2; + for (let a = 0; a < i; a++) if (274 == r.getUint16(o + 12 * a, e)) return t(r.getUint16(o + 12 * a + 8, e)) + } else { + if (65280 != (65280 & e)) break; + o += r.getUint16(o, !1) + } + } + return t(-1) + }, i.onerror = e => r(e), i.readAsArrayBuffer(e) + })) + } + + function handleMaxWidthOrHeight(e, t) { + const {width: r} = e, {height: i} = e, {maxWidthOrHeight: o} = t; + let a, s = e; + return isFinite(o) && (r > o || i > o) && ([s, a] = getNewCanvasAndCtx(r, i), r > i ? (s.width = o, s.height = i / r * o) : (s.width = r / i * o, s.height = o), a.drawImage(e, 0, 0, s.width, s.height), cleanupCanvasMemory(e)), s + } + + function followExifOrientation(e, t) { + const {width: r} = e, {height: i} = e, [o, a] = getNewCanvasAndCtx(r, i); + switch (t > 4 && t < 9 ? (o.width = i, o.height = r) : (o.width = r, o.height = i), t) { + case 2: + a.transform(-1, 0, 0, 1, r, 0); + break; + case 3: + a.transform(-1, 0, 0, -1, r, i); + break; + case 4: + a.transform(1, 0, 0, -1, 0, i); + break; + case 5: + a.transform(0, 1, 1, 0, 0, 0); + break; + case 6: + a.transform(0, 1, -1, 0, i, 0); + break; + case 7: + a.transform(0, -1, -1, 0, i, r); + break; + case 8: + a.transform(0, -1, 1, 0, 0, r) + } + return a.drawImage(e, 0, 0, r, i), cleanupCanvasMemory(e), o + } + + function compress(e, t, r = 0) { + return new Promise((function (i, o) { + let a, s, f, l, c, u, h, d, A, g, p, m, w, v, b, y, E, F, _, B; + + function incProgress(e = 5) { + if (t.signal && t.signal.aborted) throw t.signal.reason; + a += e, t.onProgress(Math.min(a, 100)) + } + + function setProgress(e) { + if (t.signal && t.signal.aborted) throw t.signal.reason; + a = Math.min(Math.max(e, a), 100), t.onProgress(a) + } + + return a = r, s = t.maxIteration || 10, f = 1024 * t.maxSizeMB * 1024, incProgress(), drawFileInCanvas(e, t).then(function (r) { + try { + return [, l] = r, incProgress(), c = handleMaxWidthOrHeight(l, t), incProgress(), new Promise((function (r, i) { + var o; + if (!(o = t.exifOrientation)) return getExifOrientation(e).then(function (e) { + try { + return o = e, $If_2.call(this) + } catch (e) { + return i(e) + } + }.bind(this), i); + + function $If_2() { + return r(o) + } + + return $If_2.call(this) + })).then(function (r) { + try { + return u = r, incProgress(), isAutoOrientationInBrowser().then(function (r) { + try { + return h = r ? c : followExifOrientation(c, u), incProgress(), d = t.initialQuality || 1, A = t.fileType || e.type, canvasToFile(h, A, e.name, e.lastModified, d).then(function (r) { + try { + { + if (g = r, incProgress(), p = g.size > f, m = g.size > e.size, !p && !m) return setProgress(100), i(g); + var a; + + function $Loop_3() { + if (s-- && (b > f || b > w)) { + let t, r; + return t = B ? .95 * _.width : _.width, r = B ? .95 * _.height : _.height, [E, F] = getNewCanvasAndCtx(t, r), F.drawImage(_, 0, 0, t, r), d *= "image/png" === A ? .85 : .95, canvasToFile(E, A, e.name, e.lastModified, d).then((function (e) { + try { + return y = e, cleanupCanvasMemory(_), _ = E, b = y.size, setProgress(Math.min(99, Math.floor((v - b) / (v - f) * 100))), $Loop_3 + } catch (e) { + return o(e) + } + }), o) + } + return [1] + } + + return w = e.size, v = g.size, b = v, _ = h, B = !t.alwaysKeepResolution && p, (a = function (e) { + for (; e;) { + if (e.then) return void e.then(a, o); + try { + if (e.pop) { + if (e.length) return e.pop() ? $Loop_3_exit.call(this) : e; + e = $Loop_3 + } else e = e.call(this) + } catch (e) { + return o(e) + } + } + }.bind(this))($Loop_3); + + function $Loop_3_exit() { + return cleanupCanvasMemory(_), cleanupCanvasMemory(E), cleanupCanvasMemory(c), cleanupCanvasMemory(h), cleanupCanvasMemory(l), setProgress(100), i(y) + } + } + } catch (u) { + return o(u) + } + }.bind(this), o) + } catch (e) { + return o(e) + } + }.bind(this), o) + } catch (e) { + return o(e) + } + }.bind(this), o) + } catch (e) { + return o(e) + } + }.bind(this), o) + })) + } + + const f = "\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"; + let l; + + function compressOnWebWorker(e, t) { + return new Promise(((r, i) => { + l || (l = function createWorkerScriptURL(e) { + const t = []; + return "function" == typeof e ? t.push(`(${e})()`) : t.push(e), URL.createObjectURL(new Blob(t)) + }(f)); + const o = new Worker(l); + o.addEventListener("message", (function handler(e) { + if (t.signal && t.signal.aborted) o.terminate(); else if (void 0 === e.data.progress) { + if (e.data.error) return i(new Error(e.data.error)), void o.terminate(); + r(e.data.file), o.terminate() + } else t.onProgress(e.data.progress) + })), o.addEventListener("error", i), t.signal && t.signal.addEventListener("abort", (() => { + i(t.signal.reason), o.terminate() + })), o.postMessage({ + file: e, + imageCompressionLibUrl: t.libURL, + options: {...t, onProgress: void 0, signal: void 0} + }) + })) + } + + function imageCompression(e, t) { + return new Promise((function (r, i) { + let o, a, s, f, l, c; + if (o = {...t}, s = 0, ({onProgress: f} = o), o.maxSizeMB = o.maxSizeMB || Number.POSITIVE_INFINITY, l = "boolean" != typeof o.useWebWorker || o.useWebWorker, delete o.useWebWorker, o.onProgress = e => { + s = e, "function" == typeof f && f(s) + }, !(1 || e instanceof Blob || e instanceof CustomFile)) return i(new Error("The file given is not an instance of Blob or File")); + if (!/^image/.test(e.type)) return i(new Error("The file given is not an image")); + if (c = "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope, !l || "function" != typeof Worker || c) return compress(e, o).then(function (e) { + try { + return a = e, $If_4.call(this) + } catch (e) { + return i(e) + } + }.bind(this), i); + var u = function () { + try { + return $If_4.call(this) + } catch (e) { + return i(e) + } + }.bind(this), $Try_1_Catch = function (t) { + try { + return compress(e, o).then((function (e) { + try { + return a = e, u() + } catch (e) { + return i(e) + } + }), i) + } catch (e) { + return i(e) + } + }; + try { + return o.libURL = o.libURL || "https://cdn.bootcdn.net/ajax/libs/browser-image-compression/2.0.2/browser-image-compression.js", compressOnWebWorker(e, o).then((function (e) { + try { + return a = e, u() + } catch (e) { + return $Try_1_Catch() + } + }), $Try_1_Catch) + } catch (e) { + $Try_1_Catch() + } + + function $If_4() { + try { + a.name = e.name, a.lastModified = e.lastModified + } catch (e) { + } + try { + o.preserveExif && "image/jpeg" === e.type && (!o.fileType || o.fileType && o.fileType === e.type) && (a = copyExifWithoutOrientation(e, a)) + } catch (e) { + } + return r(a) + } + })) + } + + return imageCompression.getDataUrlFromFile = getDataUrlFromFile, imageCompression.getFilefromDataUrl = getFilefromDataUrl, imageCompression.loadImage = loadImage, imageCompression.drawImageInCanvas = drawImageInCanvas, imageCompression.drawFileInCanvas = drawFileInCanvas, imageCompression.canvasToFile = canvasToFile, imageCompression.getExifOrientation = getExifOrientation, imageCompression.handleMaxWidthOrHeight = handleMaxWidthOrHeight, imageCompression.followExifOrientation = followExifOrientation, imageCompression.cleanupCanvasMemory = cleanupCanvasMemory, imageCompression.isAutoOrientationInBrowser = isAutoOrientationInBrowser, imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = approximateBelowMaximumCanvasSizeOfBrowser, imageCompression.copyExifWithoutOrientation = copyExifWithoutOrientation, imageCompression.getBrowserName = getBrowserName, imageCompression.version = "2.0.2", imageCompression + })); + return { + // { + // maxSizeMB: number, // (default: Number.POSITIVE_INFINITY) + // maxWidthOrHeight: number, // compressedFile will scale down by ratio to a point that width or height is smaller than maxWidthOrHeight (default: undefined) + // // but, automatically reduce the size to smaller than the maximum Canvas size supported by each browser. + // // Please check the Caveat part for details. + // onProgress: Function, // optional, a function takes one progress argument (percentage from 0 to 100) + // useWebWorker: boolean, // optional, use multi-thread web worker, fallback to run in main-thread (default: true) + // libURL: string, // optional, the libURL of this library for importing script in Web Worker (default: https://cdn.jsdelivr.net/npm/browser-image-compression/dist/browser-image-compression.js) + // preserveExif: boolean, // optional, use preserve Exif metadata for JPEG image e.g., Camera model, Focal length, etc (default: false) + // + // signal: AbortSignal, // optional, to abort / cancel the compression + // + // // following options are for advanced users + // maxIteration: number, // optional, max number of iteration to compress the image (default: 10) + // exifOrientation: number, // optional, see https://stackoverflow.com/a/32490603/10395024 + // fileType: string, // optional, fileType override e.g., 'image/jpeg', 'image/png' (default: file.type) + // initialQuality: number, // optional, initial quality value between 0 and 1 (default: 1) + // alwaysKeepResolution: boolean // optional, only reduce quality, always keep width and height (default: false) + // } + compress: function (file, option) { + return imageCompression(file, option); + } + }; + })(); + + +// core/dialog.js + UE.dialog = (function () { + return { + loadingPlaceholder: function (me) { + var loadingId = "loading_" + (+new Date()).toString(36); + me.focus(); + me.execCommand( + "inserthtml", + '' + ); + return loadingId; + }, + removeLoadingPlaceholder: function (me, loadingId) { + var loader = me.document.getElementById(loadingId); + if (loader) { + domUtils.remove(loader, false); + } + }, + tipError: function (me, title) { + me.fireEvent("showmessage", { + content: title, + type: "error", + timeout: 4000 + }); + } + } + })(); + + +// core/filterword.js + /** + * UE过滤word的静态方法 + * @file + */ + + /** + * UEditor公用空间,UEditor所有的功能都挂载在该空间下 + * @module UE + */ + + /** + * 根据传入html字符串过滤word + * @module UE + * @since 1.2.6.1 + * @method filterWord + * @param { String } html html字符串 + * @return { String } 已过滤后的结果字符串 + * @example + * ```javascript + * UE.filterWord(html); + * ``` + */ + var filterWord = (UE.filterWord = (function () { + //是否是word过来的内容 + function isWordDocument(str) { + return /(class="?Mso|style="[^"]*\bmso\-|w:WordDocument|<(v|o):|lang=)/gi.test( + str + ); + } + + //去掉小数 + function transUnit(v) { + v = v.replace(/[\d.]+\w+/g, function (m) { + return utils.transUnitToPx(m); + }); + return v; + } + + function filterPasteWord(str) { + return ( + str + .replace(/[\t\r\n]+/g, " ") + .replace(//gi, "") + //转换图片 + .replace(/]*>[\s\S]*?.<\/v:shape>/gi, function (str) { + //opera能自己解析出image所这里直接返回空 + if (browser.opera) { + return ""; + } + try { + //有可能是bitmap占为图,无用,直接过滤掉,主要体现在粘贴excel表格中 + if (/Bitmap/i.test(str)) { + return ""; + } + var width = str.match(/width:([ \d.]*p[tx])/i)[1], + height = str.match(/height:([ \d.]*p[tx])/i)[1], + src = str.match(/src=\s*"([^"]*)"/i)[1]; + return ( + '' + ); + } catch (e) { + return ""; + } + }) + //针对wps添加的多余标签处理 + .replace(/<\/?div[^>]*>/g, "") + //去掉多余的属性 + .replace(/v:\w+=(["']?)[^'"]+\1/g, "") + .replace( + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|xml|meta|link|style|\w+:\w+)(?=[\s\/>]))[^>]*>/gi, + "" + ) + .replace( + /

              ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, + "

              $1

              " + ) + //去掉多余的属性 + .replace(/\s+(class|lang|align)\s*=\s*(['"]?)([\w-]+)\2/gi, function ( + str, + name, + marks, + val + ) { + //保留list的标示 + return name == "class" && val == "MsoListParagraph" ? str : ""; + }) + //清除多余的font/span不能匹配 有可能是空格 + .replace(/<(font|span)[^>]*>(\s*)<\/\1>/gi, function (a, b, c) { + return c.replace(/[\t\r\n ]+/g, " "); + }) + //处理style的问题 + .replace(/(<[a-z][^>]*)\sstyle=(["'])([^\2]*?)\2/gi, function ( + str, + tag, + tmp, + style + ) { + var n = [], + s = style + .replace(/^\s+|\s+$/, "") + .replace(/'/g, "'") + .replace(/"/gi, "'") + .replace(/[\d.]+(cm|pt)/g, function (str) { + return utils.transUnitToPx(str); + }) + .split(/;\s*/g); + + for (var i = 0, v; (v = s[i]); i++) { + var name, + value, + parts = v.split(":"); + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + if ( + (/^(background)\w*/.test(name) && + value.replace(/(initial|\s)/g, "").length == 0) || + (/^(margin)\w*/.test(name) && /^0\w+$/.test(value)) + ) { + continue; + } + + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + //ie下会出现挤到一起的情况 + //case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + //trace:1819 ff下会解析出padding在table上 + if (!/]/.test(html)) { + return UE.htmlparser(html).children[0]; + } else { + return new uNode({ + type: "element", + children: [], + tagName: html + }); + } + }; + uNode.createText = function (data, noTrans) { + return new UE.uNode({ + type: "text", + data: noTrans ? data : utils.unhtml(data || "") + }); + }; + + function nodeToHtml(node, arr, formatter, current) { + switch (node.type) { + case "root": + for (var i = 0, ci; (ci = node.children[i++]);) { + //插入新行 + if ( + formatter && + ci.type == "element" && + !dtd.$inlineWithA[ci.tagName] && + i > 1 + ) { + insertLine(arr, current, true); + insertIndent(arr, current); + } + nodeToHtml(ci, arr, formatter, current); + } + break; + case "text": + isText(node, arr); + break; + case "element": + isElement(node, arr, formatter, current); + break; + case "comment": + isComment(node, arr, formatter); + } + return arr; + } + + function isText(node, arr) { + if (node.parentNode.tagName == "pre") { + //源码模式下输入html标签,不能做转换处理,直接输出 + arr.push(node.data); + } else { + arr.push( + notTransTagName[node.parentNode.tagName] + ? utils.html(node.data) + : node.data.replace(/[ ]{2}/g, "  ") + ); + } + } + + function isElement(node, arr, formatter, current) { + var attrhtml = ""; + if (node.attrs) { + attrhtml = []; + var attrs = node.attrs; + for (var a in attrs) { + //这里就针对 + //

              '

              + //这里边的\"做转换,要不用innerHTML直接被截断了,属性src + //有可能做的不够 + attrhtml.push( + a + + (attrs[a] !== undefined + ? '="' + + (notTransAttrs[a] + ? utils.html(attrs[a]).replace(/["]/g, function (a) { + return """; + }) + : utils.unhtml(attrs[a])) + + '"' + : "") + ); + } + attrhtml = attrhtml.join(" "); + } + arr.push( + "<" + + node.tagName + + (attrhtml ? " " + attrhtml : "") + + (dtd.$empty[node.tagName] ? "/" : "") + + ">" + ); + //插入新行 + if (formatter && !dtd.$inlineWithA[node.tagName] && node.tagName != "pre") { + if (node.children && node.children.length) { + current = insertLine(arr, current, true); + insertIndent(arr, current); + } + } + if (node.children && node.children.length) { + for (var i = 0, ci; (ci = node.children[i++]);) { + if ( + formatter && + ci.type == "element" && + !dtd.$inlineWithA[ci.tagName] && + i > 1 + ) { + insertLine(arr, current); + insertIndent(arr, current); + } + nodeToHtml(ci, arr, formatter, current); + } + } + if (!dtd.$empty[node.tagName]) { + if ( + formatter && + !dtd.$inlineWithA[node.tagName] && + node.tagName != "pre" + ) { + if (node.children && node.children.length) { + current = insertLine(arr, current); + insertIndent(arr, current); + } + } + arr.push(""); + } + } + + function isComment(node, arr) { + arr.push(""); + } + + function getNodeById(root, id) { + var node; + if (root.type == "element" && root.getAttr("id") == id) { + return root; + } + if (root.children && root.children.length) { + for (var i = 0, ci; (ci = root.children[i++]);) { + if ((node = getNodeById(ci, id))) { + return node; + } + } + } + } + + function getNodesByTagName(node, tagName, arr) { + if (node.type == "element" && node.tagName == tagName) { + arr.push(node); + } + if (node.children && node.children.length) { + for (var i = 0, ci; (ci = node.children[i++]);) { + getNodesByTagName(ci, tagName, arr); + } + } + } + + function nodeTraversal(root, fn) { + if (root.children && root.children.length) { + for (var i = 0, ci; (ci = root.children[i]);) { + nodeTraversal(ci, fn); + //ci被替换的情况,这里就不再走 fn了 + if (ci.parentNode) { + if (ci.children && ci.children.length) { + fn(ci); + } + if (ci.parentNode) i++; + } + } + } else { + fn(root); + } + } + + uNode.prototype = { + /** + * 当前节点对象,转换成html文本 + * @method toHtml + * @return { String } 返回转换后的html字符串 + * @example + * ```javascript + * node.toHtml(); + * ``` + */ + + /** + * 当前节点对象,转换成html文本 + * @method toHtml + * @param { Boolean } formatter 是否格式化返回值 + * @return { String } 返回转换后的html字符串 + * @example + * ```javascript + * node.toHtml( true ); + * ``` + */ + toHtml: function (formatter) { + var arr = []; + nodeToHtml(this, arr, formatter, 0); + return arr.join(""); + }, + + /** + * 获取节点的html内容 + * @method innerHTML + * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 + * @return { String } 返回节点的html内容 + * @example + * ```javascript + * var htmlstr = node.innerHTML(); + * ``` + */ + + /** + * 设置节点的html内容 + * @method innerHTML + * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 + * @param { String } htmlstr 传入要设置的html内容 + * @return { UE.uNode } 返回节点本身 + * @example + * ```javascript + * node.innerHTML('text'); + * ``` + */ + innerHTML: function (htmlstr) { + if (this.type != "element" || dtd.$empty[this.tagName]) { + return this; + } + if (utils.isString(htmlstr)) { + if (this.children) { + for (var i = 0, ci; (ci = this.children[i++]);) { + ci.parentNode = null; + } + } + this.children = []; + var tmpRoot = UE.htmlparser(htmlstr); + for (var i = 0, ci; (ci = tmpRoot.children[i++]);) { + this.children.push(ci); + ci.parentNode = this; + } + return this; + } else { + var tmpRoot = new UE.uNode({ + type: "root", + children: this.children + }); + return tmpRoot.toHtml(); + } + }, + + /** + * 获取节点的纯文本内容 + * @method innerText + * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 + * @return { String } 返回节点的存文本内容 + * @example + * ```javascript + * var textStr = node.innerText(); + * ``` + */ + + /** + * 设置节点的纯文本内容 + * @method innerText + * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 + * @param { String } textStr 传入要设置的文本内容 + * @return { UE.uNode } 返回节点本身 + * @example + * ```javascript + * node.innerText('text'); + * ``` + */ + innerText: function (textStr, noTrans) { + if (this.type != "element" || dtd.$empty[this.tagName]) { + return this; + } + if (textStr) { + if (this.children) { + for (var i = 0, ci; (ci = this.children[i++]);) { + ci.parentNode = null; + } + } + this.children = []; + this.appendChild(uNode.createText(textStr, noTrans)); + return this; + } else { + return this.toHtml().replace(/<[^>]+>/g, ""); + } + }, + + /** + * 获取当前对象的data属性 + * @method getData + * @return { Object } 若节点的type值是elemenet,返回空字符串,否则返回节点的data属性 + * @example + * ```javascript + * node.getData(); + * ``` + */ + getData: function () { + if (this.type == "element") return ""; + return this.data; + }, + + /** + * 获取当前节点下的第一个子节点 + * @method firstChild + * @return { UE.uNode } 返回第一个子节点 + * @example + * ```javascript + * node.firstChild(); //返回第一个子节点 + * ``` + */ + firstChild: function () { + // if (this.type != 'element' || dtd.$empty[this.tagName]) { + // return this; + // } + return this.children ? this.children[0] : null; + }, + + /** + * 获取当前节点下的最后一个子节点 + * @method lastChild + * @return { UE.uNode } 返回最后一个子节点 + * @example + * ```javascript + * node.lastChild(); //返回最后一个子节点 + * ``` + */ + lastChild: function () { + // if (this.type != 'element' || dtd.$empty[this.tagName] ) { + // return this; + // } + return this.children ? this.children[this.children.length - 1] : null; + }, + + /** + * 获取和当前节点有相同父亲节点的前一个节点 + * @method previousSibling + * @return { UE.uNode } 返回前一个节点 + * @example + * ```javascript + * node.children[2].previousSibling(); //返回子节点node.children[1] + * ``` + */ + previousSibling: function () { + var parent = this.parentNode; + for (var i = 0, ci; (ci = parent.children[i]); i++) { + if (ci === this) { + return i == 0 ? null : parent.children[i - 1]; + } + } + }, + + /** + * 获取和当前节点有相同父亲节点的后一个节点 + * @method nextSibling + * @return { UE.uNode } 返回后一个节点,找不到返回null + * @example + * ```javascript + * node.children[2].nextSibling(); //如果有,返回子节点node.children[3] + * ``` + */ + nextSibling: function () { + var parent = this.parentNode; + for (var i = 0, ci; (ci = parent.children[i++]);) { + if (ci === this) { + return parent.children[i]; + } + } + }, + + /** + * 用新的节点替换当前节点 + * @method replaceChild + * @param { UE.uNode } target 要替换成该节点参数 + * @param { UE.uNode } source 要被替换掉的节点 + * @return { UE.uNode } 返回替换之后的节点对象 + * @example + * ```javascript + * node.replaceChild(newNode, childNode); //用newNode替换childNode,childNode是node的子节点 + * ``` + */ + replaceChild: function (target, source) { + if (this.children) { + if (target.parentNode) { + target.parentNode.removeChild(target); + } + for (var i = 0, ci; (ci = this.children[i]); i++) { + if (ci === source) { + this.children.splice(i, 1, target); + source.parentNode = null; + target.parentNode = this; + return target; + } + } + } + }, + + /** + * 在节点的子节点列表最后位置插入一个节点 + * @method appendChild + * @param { UE.uNode } node 要插入的节点 + * @return { UE.uNode } 返回刚插入的子节点 + * @example + * ```javascript + * node.appendChild( newNode ); //在node内插入子节点newNode + * ``` + */ + appendChild: function (node) { + if ( + this.type == "root" || + (this.type == "element" && !dtd.$empty[this.tagName]) + ) { + if (!this.children) { + this.children = []; + } + if (node.parentNode) { + node.parentNode.removeChild(node); + } + for (var i = 0, ci; (ci = this.children[i]); i++) { + if (ci === node) { + this.children.splice(i, 1); + break; + } + } + this.children.push(node); + node.parentNode = this; + return node; + } + }, + + /** + * 在传入节点的前面插入一个节点 + * @method insertBefore + * @param { UE.uNode } target 要插入的节点 + * @param { UE.uNode } source 在该参数节点前面插入 + * @return { UE.uNode } 返回刚插入的子节点 + * @example + * ```javascript + * node.parentNode.insertBefore(newNode, node); //在node节点后面插入newNode + * ``` + */ + insertBefore: function (target, source) { + if (this.children) { + if (target.parentNode) { + target.parentNode.removeChild(target); + } + for (var i = 0, ci; (ci = this.children[i]); i++) { + if (ci === source) { + this.children.splice(i, 0, target); + target.parentNode = this; + return target; + } + } + } + }, + + /** + * 在传入节点的后面插入一个节点 + * @method insertAfter + * @param { UE.uNode } target 要插入的节点 + * @param { UE.uNode } source 在该参数节点后面插入 + * @return { UE.uNode } 返回刚插入的子节点 + * @example + * ```javascript + * node.parentNode.insertAfter(newNode, node); //在node节点后面插入newNode + * ``` + */ + insertAfter: function (target, source) { + if (this.children) { + if (target.parentNode) { + target.parentNode.removeChild(target); + } + for (var i = 0, ci; (ci = this.children[i]); i++) { + if (ci === source) { + this.children.splice(i + 1, 0, target); + target.parentNode = this; + return target; + } + } + } + }, + + /** + * 从当前节点的子节点列表中,移除节点 + * @method removeChild + * @param { UE.uNode } node 要移除的节点引用 + * @param { Boolean } keepChildren 是否保留移除节点的子节点,若传入true,自动把移除节点的子节点插入到移除的位置 + * @return { * } 返回刚移除的子节点 + * @example + * ```javascript + * node.removeChild(childNode,true); //在node的子节点列表中移除child节点,并且吧child的子节点插入到移除的位置 + * ``` + */ + removeChild: function (node, keepChildren) { + if (this.children) { + for (var i = 0, ci; (ci = this.children[i]); i++) { + if (ci === node) { + this.children.splice(i, 1); + ci.parentNode = null; + if (keepChildren && ci.children && ci.children.length) { + for (var j = 0, cj; (cj = ci.children[j]); j++) { + this.children.splice(i + j, 0, cj); + cj.parentNode = this; + } + } + return ci; + } + } + } + }, + + /** + * 获取当前节点所代表的元素属性,即获取attrs对象下的属性值 + * @method getAttr + * @param { String } attrName 要获取的属性名称 + * @return { * } 返回attrs对象下的属性值 + * @example + * ```javascript + * node.getAttr('title'); + * ``` + */ + getAttr: function (attrName) { + return this.attrs && this.attrs[attrName.toLowerCase()]; + }, + + /** + * 设置当前节点所代表的元素属性,即设置attrs对象下的属性值 + * @method setAttr + * @param { String } attrName 要设置的属性名称 + * @param { * } attrVal 要设置的属性值,类型视设置的属性而定 + * @return { * } 返回attrs对象下的属性值 + * @example + * ```javascript + * node.setAttr('title','标题'); + * ``` + */ + setAttr: function (attrName, attrVal) { + if (!attrName) { + delete this.attrs; + return; + } + if (!this.attrs) { + this.attrs = {}; + } + if (utils.isObject(attrName)) { + for (var a in attrName) { + if (!attrName[a]) { + delete this.attrs[a]; + } else { + this.attrs[a.toLowerCase()] = attrName[a]; + } + } + } else { + if (!attrVal) { + delete this.attrs[attrName]; + } else { + this.attrs[attrName.toLowerCase()] = attrVal; + } + } + }, + + /** + * 获取当前节点在父节点下的位置索引 + * @method getIndex + * @return { Number } 返回索引数值,如果没有父节点,返回-1 + * @example + * ```javascript + * node.getIndex(); + * ``` + */ + getIndex: function () { + var parent = this.parentNode; + for (var i = 0, ci; (ci = parent.children[i]); i++) { + if (ci === this) { + return i; + } + } + return -1; + }, + + /** + * 在当前节点下,根据id查找节点 + * @method getNodeById + * @param { String } id 要查找的id + * @return { UE.uNode } 返回找到的节点 + * @example + * ```javascript + * node.getNodeById('textId'); + * ``` + */ + getNodeById: function (id) { + var node; + if (this.children && this.children.length) { + for (var i = 0, ci; (ci = this.children[i++]);) { + if ((node = getNodeById(ci, id))) { + return node; + } + } + } + }, + + /** + * 在当前节点下,根据元素名称查找节点列表 + * @method getNodesByTagName + * @param { String } tagNames 要查找的元素名称 + * @return { Array } 返回找到的节点列表 + * @example + * ```javascript + * node.getNodesByTagName('span'); + * ``` + */ + getNodesByTagName: function (tagNames) { + tagNames = utils.trim(tagNames).replace(/[ ]{2,}/g, " ").split(" "); + var arr = [], + me = this; + utils.each(tagNames, function (tagName) { + if (me.children && me.children.length) { + for (var i = 0, ci; (ci = me.children[i++]);) { + getNodesByTagName(ci, tagName, arr); + } + } + }); + return arr; + }, + + /** + * 根据样式名称,获取节点的样式值 + * @method getStyle + * @param { String } name 要获取的样式名称 + * @return { String } 返回样式值 + * @example + * ```javascript + * node.getStyle('font-size'); + * ``` + */ + getStyle: function (name) { + var cssStyle = this.getAttr("style"); + if (!cssStyle) { + return ""; + } + var reg = new RegExp("(^|;)\\s*" + name + ":([^;]+)", "i"); + var match = cssStyle.match(reg); + if (match && match[0]) { + return match[2]; + } + return ""; + }, + + /** + * 给节点设置样式 + * @method setStyle + * @param { String } name 要设置的的样式名称 + * @param { String } val 要设置的的样值 + * @example + * ```javascript + * node.setStyle('font-size', '12px'); + * ``` + */ + setStyle: function (name, val) { + function exec(name, val) { + var reg = new RegExp("(^|;)\\s*" + name + ":([^;]+;?)", "gi"); + cssStyle = cssStyle.replace(reg, "$1"); + if (val) { + cssStyle = name + ":" + utils.unhtml(val) + ";" + cssStyle; + } + } + + var cssStyle = this.getAttr("style"); + if (!cssStyle) { + cssStyle = ""; + } + if (utils.isObject(name)) { + for (var a in name) { + exec(a, name[a]); + } + } else { + exec(name, val); + } + this.setAttr("style", utils.trim(cssStyle)); + }, + + /** + * 传入一个函数,递归遍历当前节点下的所有节点 + * @method traversal + * @param { Function } fn 遍历到节点的时,传入节点作为参数,运行此函数 + * @example + * ```javascript + * traversal(node, function(){ + * console.log(node.type); + * }); + * ``` + */ + traversal: function (fn) { + if (this.children && this.children.length) { + nodeTraversal(this, fn); + } + return this; + } + }; + })(); + + +// core/htmlparser.js + /** + * html字符串转换成uNode节点 + * @file + * @module UE + * @since 1.2.6.1 + */ + + /** + * UEditor公用空间,UEditor所有的功能都挂载在该空间下 + * @unfile + * @module UE + */ + + /** + * html字符串转换成uNode节点的静态方法 + * @method htmlparser + * @param { String } htmlstr 要转换的html代码 + * @param { Boolean } ignoreBlank 若设置为true,转换的时候忽略\n\r\t等空白字符 + * @return { uNode } 给定的html片段转换形成的uNode对象 + * @example + * ```javascript + * var root = UE.htmlparser('

              htmlparser

              ', true); + * ``` + */ + + var htmlparser = (UE.htmlparser = function (htmlstr, ignoreBlank) { + //todo 原来的方式 [^"'<>\/] 有\/就不能配对上 "); + + tmpl.push( + '' + ); + + tempIndex === 2 && tmpl.push(""); + } + + return ( + '
              ' + + '
              ' + + '
              这样的标签了 + //先去掉了,加上的原因忘了,这里先记录 + //var re_tag = /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g, + //以上的正则表达式无法匹配:

              + //修改为如下正则表达式: + var re_tag = /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g, + re_attr = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g; + + //ie下取得的html可能会有\n存在,要去掉,在处理replace(/[\t\r\n]*/g,'');代码高量的\n不能去除 + var allowEmptyTags = { + b: 1, + code: 1, + i: 1, + u: 1, + strike: 1, + s: 1, + tt: 1, + strong: 1, + q: 1, + samp: 1, + em: 1, + span: 1, + sub: 1, + img: 1, + sup: 1, + font: 1, + big: 1, + small: 1, + iframe: 1, + a: 1, + br: 1, + pre: 1 + }; + htmlstr = htmlstr.replace(new RegExp(domUtils.fillChar, "g"), ""); + if (!ignoreBlank) { + htmlstr = htmlstr.replace( + new RegExp( + "[\\r\\t\\n" + + (ignoreBlank ? "" : " ") + + "]*]*)>[\\r\\t\\n" + + (ignoreBlank ? "" : " ") + + "]*", + "g" + ), + function (a, b) { + //br暂时单独处理 + if (b && allowEmptyTags[b.toLowerCase()]) { + return a.replace(/(^[\n\r]+)|([\n\r]+$)/g, ""); + } + return a + .replace(new RegExp("^[\\r\\n" + (ignoreBlank ? "" : " ") + "]+"), "") + .replace( + new RegExp("[\\r\\n" + (ignoreBlank ? "" : " ") + "]+$"), + "" + ); + } + ); + } + + var notTransAttrs = { + href: 1, + src: 1 + }; + + var uNode = UE.uNode, + needParentNode = { + td: "tr", + tr: ["tbody", "thead", "tfoot"], + tbody: "table", + th: "tr", + thead: "table", + tfoot: "table", + caption: "table", + li: ["ul", "ol"], + dt: "dl", + dd: "dl", + option: "select" + }, + needChild = { + ol: "li", + ul: "li" + }; + + function text(parent, data) { + if (needChild[parent.tagName]) { + var tmpNode = uNode.createElement(needChild[parent.tagName]); + parent.appendChild(tmpNode); + tmpNode.appendChild(uNode.createText(data)); + parent = tmpNode; + } else { + parent.appendChild(uNode.createText(data)); + } + } + + function element(parent, tagName, htmlattr) { + var needParentTag; + if ((needParentTag = needParentNode[tagName])) { + var tmpParent = parent, + hasParent; + while (tmpParent.type != "root") { + if ( + utils.isArray(needParentTag) + ? utils.indexOf(needParentTag, tmpParent.tagName) != -1 + : needParentTag == tmpParent.tagName + ) { + parent = tmpParent; + hasParent = true; + break; + } + tmpParent = tmpParent.parentNode; + } + if (!hasParent) { + parent = element( + parent, + utils.isArray(needParentTag) ? needParentTag[0] : needParentTag + ); + } + } + //按dtd处理嵌套 + // if(parent.type != 'root' && !dtd[parent.tagName][tagName]) + // parent = parent.parentNode; + var elm = new uNode({ + parentNode: parent, + type: "element", + tagName: tagName.toLowerCase(), + //是自闭合的处理一下 + children: dtd.$empty[tagName] ? null : [] + }); + //如果属性存在,处理属性 + if (htmlattr) { + var attrs = {}, + match; + while ((match = re_attr.exec(htmlattr))) { + attrs[match[1].toLowerCase()] = notTransAttrs[match[1].toLowerCase()] + ? match[2] || match[3] || match[4] + : utils.unhtml(match[2] || match[3] || match[4]); + } + elm.attrs = attrs; + } + //trace:3970 + // //如果parent下不能放elm + // if(dtd.$inline[parent.tagName] && dtd.$block[elm.tagName] && !dtd[parent.tagName][elm.tagName]){ + // parent = parent.parentNode; + // elm.parentNode = parent; + // } + parent.children.push(elm); + //如果是自闭合节点返回父亲节点 + return dtd.$empty[tagName] ? parent : elm; + } + + function comment(parent, data) { + parent.children.push( + new uNode({ + type: "comment", + data: data, + parentNode: parent + }) + ); + } + + var match, + currentIndex = 0, + nextIndex = 0; + //设置根节点 + var root = new uNode({ + type: "root", + children: [] + }); + var currentParent = root; + + while ((match = re_tag.exec(htmlstr))) { + currentIndex = match.index; + try { + if (currentIndex > nextIndex) { + //text node + text(currentParent, htmlstr.slice(nextIndex, currentIndex)); + } + if (match[3]) { + if (dtd.$cdata[currentParent.tagName]) { + text(currentParent, match[0]); + } else { + //start tag + currentParent = element( + currentParent, + match[3].toLowerCase(), + match[4] + ); + } + } else if (match[1]) { + if (currentParent.type != "root") { + if (dtd.$cdata[currentParent.tagName] && !dtd.$cdata[match[1]]) { + text(currentParent, match[0]); + } else { + var tmpParent = currentParent; + while ( + currentParent.type == "element" && + currentParent.tagName != match[1].toLowerCase() + ) { + currentParent = currentParent.parentNode; + if (currentParent.type == "root") { + currentParent = tmpParent; + throw "break"; + } + } + //end tag + currentParent = currentParent.parentNode; + } + } + } else if (match[2]) { + //comment + comment(currentParent, match[2]); + } + } catch (e) { + } + + nextIndex = re_tag.lastIndex; + } + //如果结束是文本,就有可能丢掉,所以这里手动判断一下 + //例如
            • sdfsdfsdf
            • sdfsdfsdfsdf + if (nextIndex < htmlstr.length) { + text(currentParent, htmlstr.slice(nextIndex)); + } + return root; + }); + + +// core/filternode.js + /** + * UE过滤节点的静态方法 + * @file + */ + + /** + * UEditor公用空间,UEditor所有的功能都挂载在该空间下 + * @module UE + */ + + /** + * 根据传入节点和过滤规则过滤相应节点 + * @module UE + * @since 1.2.6.1 + * @method filterNode + * @param { Object } root 指定root节点 + * @param { Object } rules 过滤规则json对象 + * @example + * ```javascript + * UE.filterNode(root,editor.options.filterRules); + * ``` + */ + var filterNode = (UE.filterNode = (function () { + function filterNode(node, rules) { + switch (node.type) { + case "text": + break; + case "element": + var val; + if ((val = rules[node.tagName])) { + if (val === "-") { + node.parentNode.removeChild(node); + } else if (utils.isFunction(val)) { + var parentNode = node.parentNode, + index = node.getIndex(); + val(node); + if (node.parentNode) { + if (node.children) { + for (var i = 0, ci; (ci = node.children[i]);) { + filterNode(ci, rules); + if (ci.parentNode) { + i++; + } + } + } + } else { + for (var i = index, ci; (ci = parentNode.children[i]);) { + filterNode(ci, rules); + if (ci.parentNode) { + i++; + } + } + } + } else { + var attrs = val["$"]; + if (attrs && node.attrs) { + var tmpAttrs = {}, + tmpVal; + for (var a in attrs) { + tmpVal = node.getAttr(a); + //todo 只先对style单独处理 + if (a == "style" && utils.isArray(attrs[a])) { + var tmpCssStyle = []; + utils.each(attrs[a], function (v) { + var tmp; + if ((tmp = node.getStyle(v))) { + tmpCssStyle.push(v + ":" + tmp); + } + }); + tmpVal = tmpCssStyle.join(";"); + } + if (tmpVal) { + tmpAttrs[a] = tmpVal; + } + } + node.attrs = tmpAttrs; + } + if (node.children) { + for (var i = 0, ci; (ci = node.children[i]);) { + filterNode(ci, rules); + if (ci.parentNode) { + i++; + } + } + } + } + } else { + //如果不在名单里扣出子节点并删除该节点,cdata除外 + if (dtd.$cdata[node.tagName]) { + node.parentNode.removeChild(node); + } else { + var parentNode = node.parentNode, + index = node.getIndex(); + node.parentNode.removeChild(node, true); + for (var i = index, ci; (ci = parentNode.children[i]);) { + filterNode(ci, rules); + if (ci.parentNode) { + i++; + } + } + } + } + break; + case "comment": + node.parentNode.removeChild(node); + } + } + + return function (root, rules) { + if (utils.isEmptyObject(rules)) { + return root; + } + var val; + if ((val = rules["-"])) { + utils.each(val.split(" "), function (k) { + rules[k] = "-"; + }); + } + for (var i = 0, ci; (ci = root.children[i]);) { + filterNode(ci, rules); + if (ci.parentNode) { + i++; + } + } + return root; + }; + })()); + + +// core/plugin.js + /** + * Created with JetBrains PhpStorm. + * User: campaign + * Date: 10/8/13 + * Time: 6:15 PM + * To change this template use File | Settings | File Templates. + */ + UE.plugin = (function () { + var _plugins = {}; + return { + register: function (pluginName, fn, oldOptionName, afterDisabled) { + if (oldOptionName && utils.isFunction(oldOptionName)) { + afterDisabled = oldOptionName; + oldOptionName = null; + } + _plugins[pluginName] = { + optionName: oldOptionName || pluginName, + execFn: fn, + //当插件被禁用时执行 + afterDisabled: afterDisabled + }; + }, + load: function (editor) { + utils.each(_plugins, function (plugin) { + var _export = plugin.execFn.call(editor); + if (editor.options[plugin.optionName] !== false) { + if (_export) { + //后边需要再做扩展 + utils.each(_export, function (v, k) { + switch (k.toLowerCase()) { + case "shortcutkey": + editor.addshortcutkey(v); + break; + case "bindevents": + utils.each(v, function (fn, eventName) { + editor.addListener(eventName, fn); + }); + break; + case "bindmultievents": + utils.each(utils.isArray(v) ? v : [v], function (event) { + var types = utils.trim(event.type).split(/\s+/); + utils.each(types, function (eventName) { + editor.addListener(eventName, event.handler); + }); + }); + break; + case "commands": + utils.each(v, function (execFn, execName) { + editor.commands[execName] = execFn; + }); + break; + case "outputrule": + editor.addOutputRule(v); + break; + case "inputrule": + editor.addInputRule(v); + break; + case "defaultoptions": + editor.setOpt(v); + } + }); + } + } else if (plugin.afterDisabled) { + plugin.afterDisabled.call(editor); + } + }); + //向下兼容 + utils.each(UE.plugins, function (plugin) { + plugin.call(editor); + }); + }, + run: function (pluginName, editor) { + var plugin = _plugins[pluginName]; + if (plugin) { + plugin.exeFn.call(editor); + } + } + }; + })(); + + +// core/keymap.js + var keymap = (UE.keymap = { + Backspace: 8, + Tab: 9, + Enter: 13, + + Shift: 16, + Control: 17, + Alt: 18, + CapsLock: 20, + + Esc: 27, + + Spacebar: 32, + + PageUp: 33, + PageDown: 34, + End: 35, + Home: 36, + + Left: 37, + Up: 38, + Right: 39, + Down: 40, + + Insert: 45, + + Del: 46, + + NumLock: 144, + + Cmd: 91, + + "=": 187, + "-": 189, + + b: 66, + i: 73, + //回退 + z: 90, + y: 89, + //粘贴 + v: 86, + x: 88, + + s: 83, + + n: 78 + }); + + +// core/localstorage.js + var LocalStorage = (UE.LocalStorage = (function () { + + var storage = window.localStorage + + return { + saveLocalData: function (key, data) { + // console.log('saveLocalData', key, data); + if (!storage) { + return false; + } + storage.setItem(key, data); + return true; + }, + getLocalData: function (key) { + // console.log('getLocalData', key); + if (!storage) { + return null; + } + return storage.getItem(key) || null; + }, + removeItem: function (key) { + // console.log('removeItem', key); + storage && storage.removeItem(key); + } + }; + + })()); + + (function () { + + var ROOT_KEY = "UEditorPlusPref"; + + UE.Editor.prototype.setPreferences = function (key, value) { + // console.log('setPreferences', key, value); + var obj = {}; + if (utils.isString(key)) { + obj[key] = value; + } else { + obj = key; + } + var data = LocalStorage.getLocalData(ROOT_KEY); + if (data && (data = utils.str2json(data))) { + utils.extend(data, obj); + } else { + data = obj; + } + data && LocalStorage.saveLocalData(ROOT_KEY, utils.json2str(data)); + }; + + UE.Editor.prototype.getPreferences = function (key) { + // console.log('getPreferences', key); + var data = LocalStorage.getLocalData(ROOT_KEY); + if (data && (data = utils.str2json(data))) { + return key ? data[key] : data; + } + return null; + }; + + UE.Editor.prototype.removePreferences = function (key) { + // console.log('removePreferences', key); + var data = LocalStorage.getLocalData(ROOT_KEY); + if (data && (data = utils.str2json(data))) { + data[key] = undefined; + delete data[key]; + } + data && LocalStorage.saveLocalData(ROOT_KEY, utils.json2str(data)); + }; + })(); + + +// plugins/defaultfilter.js +///import core +///plugin 编辑器默认的过滤转换机制 + + UE.plugins["defaultfilter"] = function () { + var me = this; + me.setOpt({ + allowDivTransToP: true, + disabledTableInTable: true, + rgb2Hex: true + }); + //默认的过滤处理 + //进入编辑器的内容处理 + me.addInputRule(function (root) { + var allowDivTransToP = this.options.allowDivTransToP; + var val; + + function tdParent(node) { + while (node && node.type == "element") { + if (node.tagName == "td") { + return true; + } + node = node.parentNode; + } + return false; + } + + //进行默认的处理 + root.traversal(function (node) { + if (node.type == "element") { + if ( + !dtd.$cdata[node.tagName] && + me.options.autoClearEmptyNode && + dtd.$inline[node.tagName] && + !dtd.$empty[node.tagName] && + (!node.attrs || utils.isEmptyObject(node.attrs)) + ) { + if (!node.firstChild()) node.parentNode.removeChild(node); + else if ( + node.tagName == "span" && + (!node.attrs || utils.isEmptyObject(node.attrs)) + ) { + node.parentNode.removeChild(node, true); + } + return; + } + switch (node.tagName) { + case "style": + case "script": + node.setAttr({ + cdata_tag: node.tagName, + cdata_data: node.innerHTML() || "", + _ue_custom_node_: "true" + }); + node.tagName = "div"; + node.innerHTML(""); + break; + case "a": + if ((val = node.getAttr("href"))) { + node.setAttr("_href", val); + } + break; + case "img": + //todo base64暂时去掉,后边做远程图片上传后,干掉这个 + if ((val = node.getAttr("src"))) { + if (/^data:/.test(val)) { + node.parentNode.removeChild(node); + break; + } + } + node.setAttr("_src", node.getAttr("src")); + break; + case "span": + if (browser.webkit && (val = node.getStyle("white-space"))) { + if (/nowrap|normal/.test(val)) { + node.setStyle("white-space", ""); + if ( + me.options.autoClearEmptyNode && + utils.isEmptyObject(node.attrs) + ) { + node.parentNode.removeChild(node, true); + } + } + } + val = node.getAttr("id"); + if (val && /^_baidu_bookmark_/i.test(val)) { + node.parentNode.removeChild(node); + } + break; + case "p": + if ((val = node.getAttr("align"))) { + node.setAttr("align"); + node.setStyle("text-align", val); + } + //trace:3431 + // var cssStyle = node.getAttr('style'); + // if (cssStyle) { + // cssStyle = cssStyle.replace(/(margin|padding)[^;]+/g, ''); + // node.setAttr('style', cssStyle) + // + // } + //p标签不允许嵌套 + utils.each(node.children, function (n) { + if (n.type == "element" && n.tagName == "p") { + var next = n.nextSibling(); + node.parentNode.insertAfter(n, node); + var last = n; + while (next) { + var tmp = next.nextSibling(); + node.parentNode.insertAfter(next, last); + last = next; + next = tmp; + } + return false; + } + }); + if (!node.firstChild()) { + node.innerHTML(browser.ie ? " " : "
              "); + } + break; + case "div": + if (node.getAttr("cdata_tag")) { + break; + } + //针对代码这里不处理插入代码的div + val = node.getAttr("class"); + if (val && /^line number\d+/.test(val)) { + break; + } + if (!allowDivTransToP) { + break; + } + var tmpNode, + p = UE.uNode.createElement("p"); + while ((tmpNode = node.firstChild())) { + if ( + tmpNode.type == "text" || + !UE.dom.dtd.$block[tmpNode.tagName] + ) { + p.appendChild(tmpNode); + } else { + if (p.firstChild()) { + node.parentNode.insertBefore(p, node); + p = UE.uNode.createElement("p"); + } else { + node.parentNode.insertBefore(tmpNode, node); + } + } + } + if (p.firstChild()) { + node.parentNode.insertBefore(p, node); + } + node.parentNode.removeChild(node); + break; + case "dl": + node.tagName = "ul"; + break; + case "dt": + case "dd": + node.tagName = "li"; + break; + case "li": + var className = node.getAttr("class"); + if (!className || !/list\-/.test(className)) { + node.setAttr(); + } + var tmpNodes = node.getNodesByTagName("ol ul"); + UE.utils.each(tmpNodes, function (n) { + node.parentNode.insertAfter(n, node); + }); + break; + case "td": + case "th": + case "caption": + if (!node.children || !node.children.length) { + node.appendChild( + browser.ie11below + ? UE.uNode.createText(" ") + : UE.uNode.createElement("br") + ); + } + break; + case "table": + if (me.options.disabledTableInTable && tdParent(node)) { + node.parentNode.insertBefore( + UE.uNode.createText(node.innerText()), + node + ); + node.parentNode.removeChild(node); + } + } + } + // if(node.type == 'comment'){ + // node.parentNode.removeChild(node); + // } + }); + }); + + //从编辑器出去的内容处理 + me.addOutputRule(function (root) { + var val; + root.traversal(function (node) { + if (node.type == "element") { + if ( + me.options.autoClearEmptyNode && + dtd.$inline[node.tagName] && + !dtd.$empty[node.tagName] && + (!node.attrs || utils.isEmptyObject(node.attrs)) + ) { + if (!node.firstChild()) node.parentNode.removeChild(node); + else if ( + node.tagName == "span" && + (!node.attrs || utils.isEmptyObject(node.attrs)) + ) { + node.parentNode.removeChild(node, true); + } + return; + } + switch (node.tagName) { + case "div": + if ((val = node.getAttr("cdata_tag"))) { + node.tagName = val; + node.appendChild(UE.uNode.createText(node.getAttr("cdata_data"))); + node.setAttr({ + cdata_tag: "", + cdata_data: "", + _ue_custom_node_: "" + }); + } + break; + case "a": + if ((val = node.getAttr("_href"))) { + node.setAttr({ + href: utils.html(val), + _href: "" + }); + } + break; + break; + case "span": + val = node.getAttr("id"); + if (val && /^_baidu_bookmark_/i.test(val)) { + node.parentNode.removeChild(node); + } + //将color的rgb格式转换为#16进制格式 + if (me.getOpt("rgb2Hex")) { + var cssStyle = node.getAttr("style"); + if (cssStyle) { + node.setAttr( + "style", + cssStyle.replace(/rgba?\(([\d,\s]+)\)/g, function (a, value) { + var array = value.split(","); + if (array.length > 3) return ""; + value = "#"; + for (var i = 0, color; (color = array[i++]);) { + color = parseInt( + color.replace(/[^\d]/gi, ""), + 10 + ).toString(16); + value += color.length == 1 ? "0" + color : color; + } + return value.toUpperCase(); + }) + ); + } + } + break; + case "img": + if ((val = node.getAttr("_src"))) { + node.setAttr({ + src: node.getAttr("_src"), + _src: "" + }); + } + } + } + }); + }); + }; + + +// plugins/inserthtml.js + /** + * 插入html字符串插件 + * @file + * @since 1.2.6.1 + */ + + /** + * 插入html代码 + * @command inserthtml + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } html 插入的html字符串 + * @remaind 插入的标签内容是在当前的选区位置上插入,如果当前是闭合状态,那直接插入内容, 如果当前是选中状态,将先清除当前选中内容后,再做插入 + * @warning 注意:该命令会对当前选区的位置,对插入的内容进行过滤转换处理。 过滤的规则遵循html语意化的原则。 + * @example + * ```javascript + * //xxx[BB]xxx 当前选区为非闭合选区,选中BB这两个文本 + * //执行命令,插入CC + * //插入后的效果 xxxCCxxx + * //

              xx|xxx

              当前选区为闭合状态 + * //插入

              CC

              + * //结果

              xx

              CC

              xxx

              + * //

              xxxx

              |

              xxx

              当前选区在两个p标签之间 + * //插入 xxxx + * //结果

              xxxx

              xxxx

              xxx

              + * ``` + */ + + UE.commands["inserthtml"] = { + execCommand: function (command, html, notNeedFilter) { + var me = this, + range, + div; + if (!html) { + return; + } + if (me.fireEvent("beforeinserthtml", html) === true) { + return; + } + range = me.selection.getRange(); + div = range.document.createElement("div"); + div.style.display = "inline"; + + if (!notNeedFilter) { + var root = UE.htmlparser(html); + //如果给了过滤规则就先进行过滤 + if (me.options.filterRules) { + UE.filterNode(root, me.options.filterRules); + } + //执行默认的处理 + me.filterInputRule(root); + html = root.toHtml(); + } + div.innerHTML = utils.trim(html); + + if (!range.collapsed) { + var tmpNode = range.startContainer; + if (domUtils.isFillChar(tmpNode)) { + range.setStartBefore(tmpNode); + } + tmpNode = range.endContainer; + if (domUtils.isFillChar(tmpNode)) { + range.setEndAfter(tmpNode); + } + range.txtToElmBoundary(); + //结束边界可能放到了br的前边,要把br包含进来 + // x[xxx]
              + if (range.endContainer && range.endContainer.nodeType == 1) { + tmpNode = range.endContainer.childNodes[range.endOffset]; + if (tmpNode && domUtils.isBr(tmpNode)) { + range.setEndAfter(tmpNode); + } + } + if (range.startOffset == 0) { + tmpNode = range.startContainer; + if (domUtils.isBoundaryNode(tmpNode, "firstChild")) { + tmpNode = range.endContainer; + if ( + range.endOffset == + (tmpNode.nodeType == 3 + ? tmpNode.nodeValue.length + : tmpNode.childNodes.length) && + domUtils.isBoundaryNode(tmpNode, "lastChild") + ) { + me.body.innerHTML = "

              " + (browser.ie ? "" : "
              ") + "

              "; + range.setStart(me.body.firstChild, 0).collapse(true); + } + } + } + !range.collapsed && range.deleteContents(); + if (range.startContainer.nodeType == 1) { + var child = range.startContainer.childNodes[range.startOffset], + pre; + if ( + child && + domUtils.isBlockElm(child) && + (pre = child.previousSibling) && + domUtils.isBlockElm(pre) + ) { + range.setEnd(pre, pre.childNodes.length).collapse(); + while (child.firstChild) { + pre.appendChild(child.firstChild); + } + domUtils.remove(child); + } + } + } + + var child, + parent, + pre, + tmp, + hadBreak = 0, + nextNode; + //如果当前位置选中了fillchar要干掉,要不会产生空行 + if (range.inFillChar()) { + child = range.startContainer; + if (domUtils.isFillChar(child)) { + range.setStartBefore(child).collapse(true); + domUtils.remove(child); + } else if (domUtils.isFillChar(child, true)) { + child.nodeValue = child.nodeValue.replace(fillCharReg, ""); + range.startOffset--; + range.collapsed && range.collapse(true); + } + } + //列表单独处理 + var li = domUtils.findParentByTagName(range.startContainer, "li", true); + if (li) { + var next, last; + while ((child = div.firstChild)) { + //针对hr单独处理一下先 + while ( + child && + (child.nodeType == 3 || + !domUtils.isBlockElm(child) || + child.tagName == "HR") + ) { + next = child.nextSibling; + range.insertNode(child).collapse(); + last = child; + child = next; + } + if (child) { + if (/^(ol|ul)$/i.test(child.tagName)) { + while (child.firstChild) { + last = child.firstChild; + domUtils.insertAfter(li, child.firstChild); + li = li.nextSibling; + } + domUtils.remove(child); + } else { + var tmpLi; + next = child.nextSibling; + tmpLi = me.document.createElement("li"); + domUtils.insertAfter(li, tmpLi); + tmpLi.appendChild(child); + last = child; + child = next; + li = tmpLi; + } + } + } + li = domUtils.findParentByTagName(range.startContainer, "li", true); + if (domUtils.isEmptyBlock(li)) { + domUtils.remove(li); + } + if (last) { + range.setStartAfter(last).collapse(true).select(true); + } + } else { + while ((child = div.firstChild)) { + if (hadBreak) { + var p = me.document.createElement("p"); + while (child && (child.nodeType == 3 || !dtd.$block[child.tagName])) { + nextNode = child.nextSibling; + p.appendChild(child); + child = nextNode; + } + if (p.firstChild) { + child = p; + } + } + range.insertNode(child); + nextNode = child.nextSibling; + if ( + !hadBreak && + child.nodeType == domUtils.NODE_ELEMENT && + domUtils.isBlockElm(child) + ) { + parent = domUtils.findParent(child, function (node) { + return domUtils.isBlockElm(node); + }); + if ( + parent && + parent.tagName.toLowerCase() != "body" && + !( + dtd[parent.tagName][child.nodeName] && child.parentNode === parent + ) + ) { + if (!dtd[parent.tagName][child.nodeName]) { + pre = parent; + } else { + tmp = child.parentNode; + while (tmp !== parent) { + pre = tmp; + tmp = tmp.parentNode; + } + } + + domUtils.breakParent(child, pre || tmp); + //去掉break后前一个多余的节点

              |<[p> ==>

              |

              + var pre = child.previousSibling; + domUtils.trimWhiteTextNode(pre); + if (!pre.childNodes.length) { + domUtils.remove(pre); + } + //trace:2012,在非ie的情况,切开后剩下的节点有可能不能点入光标添加br占位 + + if ( + !browser.ie && + (next = child.nextSibling) && + domUtils.isBlockElm(next) && + next.lastChild && + !domUtils.isBr(next.lastChild) + ) { + next.appendChild(me.document.createElement("br")); + } + hadBreak = 1; + } + } + var next = child.nextSibling; + if (!div.firstChild && next && domUtils.isBlockElm(next)) { + range.setStart(next, 0).collapse(true); + break; + } + range.setEndAfter(child).collapse(); + } + + child = range.startContainer; + + if (nextNode && domUtils.isBr(nextNode)) { + domUtils.remove(nextNode); + } + //用chrome可能有空白展位符 + if (domUtils.isBlockElm(child) && domUtils.isEmptyNode(child)) { + if ((nextNode = child.nextSibling)) { + domUtils.remove(child); + if (nextNode.nodeType == 1 && dtd.$block[nextNode.tagName]) { + range.setStart(nextNode, 0).collapse(true).shrinkBoundary(); + } + } else { + try { + child.innerHTML = browser.ie ? domUtils.fillChar : "
              "; + } catch (e) { + range.setStartBefore(child); + domUtils.remove(child); + } + } + } + //加上true因为在删除表情等时会删两次,第一次是删的fillData + try { + range.select(true); + } catch (e) { + } + } + + setTimeout(function () { + range = me.selection.getRange(); + range.scrollToView( + me.autoHeightEnabled, + me.autoHeightEnabled ? domUtils.getXY(me.iframe).y : 0 + ); + me.fireEvent("afterinserthtml", html); + }, 200); + } + }; + + +// plugins/autotypeset.js + /** + * 自动排版 + * @file + * @since 1.2.6.1 + */ + + /** + * 对当前编辑器的内容执行自动排版, 排版的行为根据config配置文件里的“autotypeset”选项进行控制。 + * @command autotypeset + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'autotypeset' ); + * ``` + */ + + UE.plugins["autotypeset"] = function () { + this.setOpt({ + // 自动排版参数 + autotypeset: { + // 合并空行 + mergeEmptyline: true, + // 去掉冗余的class + removeClass: true, + // 去掉空行 + removeEmptyline: false, + // 段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版 + textAlign: "left", + // 图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版 + imageBlockLine: "center", + // 根据规则过滤没事粘贴进来的内容 + pasteFilter: false, + // 去掉所有的内嵌字号,使用编辑器默认的字号 + clearFontSize: false, + // 去掉所有的内嵌字体,使用编辑器默认的字体 + clearFontFamily: false, + // 去掉空节点 + removeEmptyNode: false, + // 可以去掉的标签 + removeTagNames: utils.extend({div: 1}, dtd.$removeEmpty), + // 行首缩进 + indent: false, + // 行首缩进的大小 + indentValue: "2em", + // 全角转半角 + bdc2sb: false, + // 半角转全角 + tobdc: false + } + }); + + var me = this, + opt = me.options.autotypeset, + remainClass = { + selectTdClass: 1, + pagebreak: 1, + anchorclass: 1 + }, + remainTag = { + li: 1 + }, + tags = { + div: 1, + p: 1, + //trace:2183 这些也认为是行 + blockquote: 1, + center: 1, + h1: 1, + h2: 1, + h3: 1, + h4: 1, + h5: 1, + h6: 1, + span: 1 + }, + highlightCont; + //升级了版本,但配置项目里没有autotypeset + if (!opt) { + return; + } + + readLocalOpts(); + + function isLine(node, notEmpty) { + if (!node || node.nodeType == 3) return 0; + if (domUtils.isBr(node)) return 1; + if (node && node.parentNode && tags[node.tagName.toLowerCase()]) { + if ( + (highlightCont && highlightCont.contains(node)) || + node.getAttribute("pagebreak") + ) { + return 0; + } + + return notEmpty + ? !domUtils.isEmptyBlock(node) + : domUtils.isEmptyBlock( + node, + new RegExp("[\\s" + domUtils.fillChar + "]", "g") + ); + } + } + + function removeNotAttributeSpan(node) { + if (!node.style.cssText) { + domUtils.removeAttributes(node, ["style"]); + if ( + node.tagName.toLowerCase() == "span" && + domUtils.hasNoAttributes(node) + ) { + domUtils.remove(node, true); + } + } + } + + function autotype(type, html) { + var me = this, + cont; + if (html) { + if (!opt.pasteFilter) { + return; + } + cont = me.document.createElement("div"); + cont.innerHTML = html.html; + } else { + cont = me.document.body; + } + var nodes = domUtils.getElementsByTagName(cont, "*"); + + // 行首缩进,段落方向,段间距,段内间距 + for (var i = 0, ci; (ci = nodes[i++]);) { + if (me.fireEvent("excludeNodeinautotype", ci) === true) { + continue; + } + //font-size + if (opt.clearFontSize && ci.style.fontSize) { + domUtils.removeStyle(ci, "font-size"); + + removeNotAttributeSpan(ci); + } + //font-family + if (opt.clearFontFamily && ci.style.fontFamily) { + domUtils.removeStyle(ci, "font-family"); + removeNotAttributeSpan(ci); + } + + if (isLine(ci)) { + //合并空行 + if (opt.mergeEmptyline) { + var next = ci.nextSibling, + tmpNode, + isBr = domUtils.isBr(ci); + while (isLine(next)) { + tmpNode = next; + next = tmpNode.nextSibling; + if (isBr && (!next || (next && !domUtils.isBr(next)))) { + break; + } + domUtils.remove(tmpNode); + } + } + //去掉空行,保留占位的空行 + if ( + opt.removeEmptyline && + domUtils.inDoc(ci, cont) && + !remainTag[ci.parentNode.tagName.toLowerCase()] + ) { + if (domUtils.isBr(ci)) { + next = ci.nextSibling; + if (next && !domUtils.isBr(next)) { + continue; + } + } + domUtils.remove(ci); + continue; + } + } + if (isLine(ci, true) && ci.tagName != "SPAN") { + if (opt.indent) { + ci.style.textIndent = opt.indentValue; + } + if (opt.textAlign) { + ci.style.textAlign = opt.textAlign; + } + // if(opt.lineHeight) + // ci.style.lineHeight = opt.lineHeight + 'cm'; + } + + //去掉class,保留的class不去掉 + if ( + opt.removeClass && + ci.className && + !remainClass[ci.className.toLowerCase()] + ) { + if (highlightCont && highlightCont.contains(ci)) { + continue; + } + domUtils.removeAttributes(ci, ["class"]); + } + + //表情不处理 + if ( + opt.imageBlockLine && + ci.tagName.toLowerCase() == "img" && + !ci.getAttribute("emotion") + ) { + if (html) { + var img = ci; + switch (opt.imageBlockLine) { + case "left": + case "right": + case "none": + var pN = img.parentNode, + tmpNode, + pre, + next; + while (dtd.$inline[pN.tagName] || pN.tagName == "A") { + pN = pN.parentNode; + } + tmpNode = pN; + if ( + tmpNode.tagName == "P" && + domUtils.getStyle(tmpNode, "text-align") == "center" + ) { + if ( + !domUtils.isBody(tmpNode) && + domUtils.getChildCount(tmpNode, function (node) { + return !domUtils.isBr(node) && !domUtils.isWhitespace(node); + }) == 1 + ) { + pre = tmpNode.previousSibling; + next = tmpNode.nextSibling; + if ( + pre && + next && + pre.nodeType == 1 && + next.nodeType == 1 && + pre.tagName == next.tagName && + domUtils.isBlockElm(pre) + ) { + pre.appendChild(tmpNode.firstChild); + while (next.firstChild) { + pre.appendChild(next.firstChild); + } + domUtils.remove(tmpNode); + domUtils.remove(next); + } else { + domUtils.setStyle(tmpNode, "text-align", ""); + } + } + } + domUtils.setStyle(img, "float", opt.imageBlockLine); + break; + case "center": + if (me.queryCommandValue("imagefloat") != "center") { + pN = img.parentNode; + domUtils.setStyle(img, "float", "none"); + tmpNode = img; + while ( + pN && + domUtils.getChildCount(pN, function (node) { + return !domUtils.isBr(node) && !domUtils.isWhitespace(node); + }) == 1 && + (dtd.$inline[pN.tagName] || pN.tagName == "A") + ) { + tmpNode = pN; + pN = pN.parentNode; + } + var pNode = me.document.createElement("p"); + domUtils.setAttributes(pNode, { + style: "text-align:center" + }); + tmpNode.parentNode.insertBefore(pNode, tmpNode); + pNode.appendChild(tmpNode); + domUtils.setStyle(tmpNode, "float", ""); + } + } + } else { + var range = me.selection.getRange(); + range.selectNode(ci).select(); + me.execCommand("imagefloat", opt.imageBlockLine); + } + } + + //去掉冗余的标签 + if (opt.removeEmptyNode) { + if ( + opt.removeTagNames[ci.tagName.toLowerCase()] && + domUtils.hasNoAttributes(ci) && + domUtils.isEmptyBlock(ci) + ) { + domUtils.remove(ci); + } + } + } + if (opt.tobdc) { + var root = UE.htmlparser(cont.innerHTML); + root.traversal(function (node) { + if (node.type == "text") { + node.data = ToDBC(node.data); + } + }); + cont.innerHTML = root.toHtml(); + } + if (opt.bdc2sb) { + var root = UE.htmlparser(cont.innerHTML); + root.traversal(function (node) { + if (node.type == "text") { + node.data = DBC2SB(node.data); + } + }); + cont.innerHTML = root.toHtml(); + } + if (html) { + html.html = cont.innerHTML; + } + } + + if (opt.pasteFilter) { + me.addListener("beforepaste", autotype); + } + + function DBC2SB(str) { + var result = ""; + for (var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); //获取当前字符的unicode编码 + if (code >= 65281 && code <= 65373) { + //在这个unicode编码范围中的是所有的英文字母已经各种字符 + result += String.fromCharCode(str.charCodeAt(i) - 65248); //把全角字符的unicode编码转换为对应半角字符的unicode码 + } else if (code == 12288) { + //空格 + result += String.fromCharCode(str.charCodeAt(i) - 12288 + 32); + } else { + result += str.charAt(i); + } + } + return result; + } + + function ToDBC(txtstring) { + txtstring = utils.html(txtstring); + var tmp = ""; + var mark = ""; /*用于判断,如果是html尖括里的标记,则不进行全角的转换*/ + for (var i = 0; i < txtstring.length; i++) { + if (txtstring.charCodeAt(i) == 32) { + tmp = tmp + String.fromCharCode(12288); + } else if (txtstring.charCodeAt(i) < 127) { + tmp = tmp + String.fromCharCode(txtstring.charCodeAt(i) + 65248); + } else { + tmp += txtstring.charAt(i); + } + } + return tmp; + } + + function readLocalOpts() { + var cookieOpt = me.getPreferences("autotypeset"); + utils.extend(me.options.autotypeset, cookieOpt); + } + + me.commands["autotypeset"] = { + execCommand: function () { + me.removeListener("beforepaste", autotype); + if (opt.pasteFilter) { + me.addListener("beforepaste", autotype); + } + autotype.call(me); + } + }; + }; + + +// plugins/autosubmit.js + /** + * 快捷键提交 + * @file + * @since 1.2.6.1 + */ + + /** + * 提交表单 + * @command autosubmit + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'autosubmit' ); + * ``` + */ + + UE.plugin.register("autosubmit", function () { + return { + shortcutkey: { + autosubmit: "ctrl+13" //手动提交 + }, + commands: { + autosubmit: { + execCommand: function () { + var me = this, + form = domUtils.findParentByTagName(me.iframe, "form", false); + if (form) { + if (me.fireEvent("beforesubmit") === false) { + return; + } + me.sync(); + form.submit(); + } + } + } + } + }; + }); + + +// plugins/background.js + /** + * 背景插件,为UEditor提供设置背景功能 + * @file + * @since 1.2.6.1 + */ + UE.plugin.register("background", function () { + var me = this, + cssRuleId = "editor_background", + isSetColored, + reg = new RegExp("body[\\s]*\\{(.+)\\}", "i"); + + function stringToObj(str) { + var obj = {}, + styles = str.split(";"); + utils.each(styles, function (v) { + var index = v.indexOf(":"), + key = utils.trim(v.substr(0, index)).toLowerCase(); + key && (obj[key] = utils.trim(v.substr(index + 1) || "")); + }); + return obj; + } + + function setBackground(obj) { + if (obj) { + var styles = []; + for (var name in obj) { + if (obj.hasOwnProperty(name)) { + styles.push(name + ":" + obj[name] + "; "); + } + } + utils.cssRule( + cssRuleId, + styles.length ? "body{" + styles.join("") + "}" : "", + me.document + ); + } else { + utils.cssRule(cssRuleId, "", me.document); + } + } + + //重写editor.hasContent方法 + + var orgFn = me.hasContents; + me.hasContents = function () { + if (me.queryCommandValue("background")) { + return true; + } + return orgFn.apply(me, arguments); + }; + return { + bindEvents: { + getAllHtml: function (type, headHtml) { + var body = this.body, + su = domUtils.getComputedStyle(body, "background-image"), + url = ""; + if (su.indexOf(me.options.imagePath) > 0) { + url = su + .substring(su.indexOf(me.options.imagePath), su.length - 1) + .replace(/"|\(|\)/gi, ""); + } else { + url = su != "none" ? su.replace(/url\("?|"?\)/gi, "") : ""; + } + var html = ' "; + headHtml.push(html); + }, + aftersetcontent: function () { + if (isSetColored == false) setBackground(); + } + }, + inputRule: function (root) { + isSetColored = false; + utils.each(root.getNodesByTagName("p"), function (p) { + var styles = p.getAttr("data-background"); + if (styles) { + isSetColored = true; + setBackground(stringToObj(styles)); + p.parentNode.removeChild(p); + } + }); + }, + outputRule: function (root) { + var me = this, + styles = (utils.cssRule(cssRuleId, me.document) || "") + .replace(/[\n\r]+/g, "") + .match(reg); + if (styles) { + root.appendChild( + UE.uNode.createElement( + '


              ' + ) + ); + } + }, + commands: { + background: { + execCommand: function (cmd, obj) { + setBackground(obj); + }, + queryCommandValue: function () { + var me = this, + styles = (utils.cssRule(cssRuleId, me.document) || "") + .replace(/[\n\r]+/g, "") + .match(reg); + return styles ? stringToObj(styles[1]) : null; + }, + notNeedUndo: true + } + } + }; + }); + + +// plugins/image.js + /** + * 图片插入、排版插件 + * @file + * @since 1.2.6.1 + */ + + /** + * 图片对齐方式 + * @command imagefloat + * @method execCommand + * @remind 值center为独占一行居中 + * @param { String } cmd 命令字符串 + * @param { String } align 对齐方式,可传left、right、none、center + * @remaind center表示图片独占一行 + * @example + * ```javascript + * editor.execCommand( 'imagefloat', 'center' ); + * ``` + */ + + /** + * 如果选区所在位置是图片区域 + * @command imagefloat + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回图片对齐方式 + * @example + * ```javascript + * editor.queryCommandValue( 'imagefloat' ); + * ``` + */ + + UE.commands["imagefloat"] = { + execCommand: function (cmd, align) { + var me = this, + range = me.selection.getRange(); + if (!range.collapsed) { + var img = range.getClosedNode(); + if (img && img.tagName === "IMG") { + switch (align) { + case "left": + case "right": + case "none": + var pN = img.parentNode, + tmpNode, + pre, + next; + while (dtd.$inline[pN.tagName] || pN.tagName == "A") { + pN = pN.parentNode; + } + tmpNode = pN; + if ( + tmpNode.tagName == "P" && + domUtils.getStyle(tmpNode, "text-align") == "center" + ) { + if ( + !domUtils.isBody(tmpNode) && + domUtils.getChildCount(tmpNode, function (node) { + return !domUtils.isBr(node) && !domUtils.isWhitespace(node); + }) == 1 + ) { + pre = tmpNode.previousSibling; + next = tmpNode.nextSibling; + if ( + pre && + next && + pre.nodeType == 1 && + next.nodeType == 1 && + pre.tagName == next.tagName && + domUtils.isBlockElm(pre) + ) { + pre.appendChild(tmpNode.firstChild); + while (next.firstChild) { + pre.appendChild(next.firstChild); + } + domUtils.remove(tmpNode); + domUtils.remove(next); + } else { + domUtils.setStyle(tmpNode, "text-align", ""); + } + } + + range.selectNode(img).select(); + } + domUtils.setStyle(img, "float", align == "none" ? "" : align); + if (align == "none") { + domUtils.removeAttributes(img, "align"); + } + + break; + case "center": + if (me.queryCommandValue("imagefloat") != "center") { + pN = img.parentNode; + domUtils.setStyle(img, "float", ""); + domUtils.removeAttributes(img, "align"); + tmpNode = img; + while ( + pN && + domUtils.getChildCount(pN, function (node) { + return !domUtils.isBr(node) && !domUtils.isWhitespace(node); + }) == 1 && + (dtd.$inline[pN.tagName] || pN.tagName == "A") + ) { + tmpNode = pN; + pN = pN.parentNode; + } + range.setStartBefore(tmpNode).setCursor(false); + pN = me.document.createElement("div"); + pN.appendChild(tmpNode); + domUtils.setStyle(tmpNode, "float", ""); + + me.execCommand( + "insertHtml", + '

              ' + + pN.innerHTML + + "

              " + ); + + tmpNode = me.document.getElementById("_img_parent_tmp"); + tmpNode.removeAttribute("id"); + tmpNode = tmpNode.firstChild; + range.selectNode(tmpNode).select(); + //去掉后边多余的元素 + next = tmpNode.parentNode.nextSibling; + if (next && domUtils.isEmptyNode(next)) { + domUtils.remove(next); + } + } + + break; + } + } + } + }, + queryCommandValue: function () { + var range = this.selection.getRange(), + startNode, + floatStyle; + if (range.collapsed) { + return "none"; + } + startNode = range.getClosedNode(); + if (startNode && startNode.nodeType == 1 && startNode.tagName == "IMG") { + floatStyle = + domUtils.getComputedStyle(startNode, "float") || + startNode.getAttribute("align"); + + if (floatStyle == "none") { + floatStyle = domUtils.getComputedStyle( + startNode.parentNode, + "text-align" + ) == "center" + ? "center" + : floatStyle; + } + return { + left: 1, + right: 1, + center: 1 + }[floatStyle] + ? floatStyle + : "none"; + } + return "none"; + }, + queryCommandState: function () { + var range = this.selection.getRange(), + startNode; + + if (range.collapsed) return -1; + + startNode = range.getClosedNode(); + if (startNode && startNode.nodeType === 1 && startNode.tagName === "IMG") { + return 0; + } + return -1; + } + }; + + /** + * 插入图片 + * @command insertimage + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { Object } opt 属性键值对,这些属性都将被复制到当前插入图片 + * @remind 该命令第二个参数可接受一个图片配置项对象的数组,可以插入多张图片, + * 此时数组的每一个元素都是一个Object类型的图片属性集合。 + * @example + * ```javascript + * editor.execCommand( 'insertimage', { + * src:'a/b/c.jpg', + * width:'100', + * height:'100' + * } ); + * ``` + * @example + * ```javascript + * editor.execCommand( 'insertimage', [{ + * src:'a/b/c.jpg', + * width:'100', + * height:'100' + * },{ + * src:'a/b/d.jpg', + * width:'100', + * height:'100' + * }] ); + * ``` + */ + + UE.commands["insertimage"] = { + execCommand: function (cmd, opt) { + opt = utils.isArray(opt) ? opt : [opt]; + if (!opt.length) { + return; + } + var me = this, + range = me.selection.getRange(), + img = range.getClosedNode(); + + if (me.fireEvent("beforeinsertimage", opt) === true) { + return; + } + + if ( + img && + /img/i.test(img.tagName) && + (img.className != "edui-faked-video" || + img.className.indexOf("edui-upload-video") != -1) && + !img.getAttribute("data-word-image") + ) { + var first = opt.shift(); + var floatStyle = first["floatStyle"]; + delete first["floatStyle"]; + //// img.style.border = (first.border||0) +"px solid #000"; + //// img.style.margin = (first.margin||0) +"px"; + // img.style.cssText += ';margin:' + (first.margin||0) +"px;" + 'border:' + (first.border||0) +"px solid #000"; + domUtils.setAttributes(img, first); + me.execCommand("imagefloat", floatStyle); + if (opt.length > 0) { + range.setStartAfter(img).setCursor(false, true); + me.execCommand("insertimage", opt); + } + } else { + var html = [], + str = "", + ci; + ci = opt[0]; + if (opt.length == 1) { + str = + '' + ci.alt + '"; + if (ci["floatStyle"] == "center") { + str = '

              ' + str + "

              "; + } + html.push(str); + } else { + for (var i = 0; (ci = opt[i++]);) { + str = + "

              "; + html.push(str); + } + } + + me.execCommand("insertHtml", html.join("")); + } + + me.fireEvent("afterinsertimage", opt); + } + }; + + +// plugins/justify.js + /** + * 段落格式 + * @file + * @since 1.2.6.1 + */ + + /** + * 段落对齐方式 + * @command justify + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } align 对齐方式:left => 居左,right => 居右,center => 居中,justify => 两端对齐 + * @example + * ```javascript + * editor.execCommand( 'justify', 'center' ); + * ``` + */ + /** + * 如果选区所在位置是段落区域,返回当前段落对齐方式 + * @command justify + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回段落对齐方式 + * @example + * ```javascript + * editor.queryCommandValue( 'justify' ); + * ``` + */ + + UE.plugins["justify"] = function () { + var me = this, + block = domUtils.isBlockElm, + defaultValue = { + left: 1, + right: 1, + center: 1, + justify: 1 + }, + doJustify = function (range, style) { + var bookmark = range.createBookmark(), + filterFn = function (node) { + return node.nodeType == 1 + ? node.tagName.toLowerCase() != "br" && + !domUtils.isBookmarkNode(node) + : !domUtils.isWhitespace(node); + }; + + range.enlarge(true); + var bookmark2 = range.createBookmark(), + current = domUtils.getNextDomNode(bookmark2.start, false, filterFn), + tmpRange = range.cloneRange(), + tmpNode; + while ( + current && + !( + domUtils.getPosition(current, bookmark2.end) & + domUtils.POSITION_FOLLOWING + ) + ) { + if (current.nodeType == 3 || !block(current)) { + tmpRange.setStartBefore(current); + while (current && current !== bookmark2.end && !block(current)) { + tmpNode = current; + current = domUtils.getNextDomNode(current, false, null, function ( + node + ) { + return !block(node); + }); + } + tmpRange.setEndAfter(tmpNode); + var common = tmpRange.getCommonAncestor(); + if (!domUtils.isBody(common) && block(common)) { + domUtils.setStyles( + common, + utils.isString(style) ? {"text-align": style} : style + ); + current = common; + } else { + var p = range.document.createElement("p"); + domUtils.setStyles( + p, + utils.isString(style) ? {"text-align": style} : style + ); + var frag = tmpRange.extractContents(); + p.appendChild(frag); + tmpRange.insertNode(p); + current = p; + } + current = domUtils.getNextDomNode(current, false, filterFn); + } else { + current = domUtils.getNextDomNode(current, true, filterFn); + } + } + return range.moveToBookmark(bookmark2).moveToBookmark(bookmark); + }; + + UE.commands["justify"] = { + execCommand: function (cmdName, align) { + var range = this.selection.getRange(), + txt; + + //闭合时单独处理 + if (range.collapsed) { + txt = this.document.createTextNode("p"); + range.insertNode(txt); + } + doJustify(range, align); + if (txt) { + range.setStartBefore(txt).collapse(true); + domUtils.remove(txt); + } + + range.select(); + + return true; + }, + queryCommandValue: function () { + var startNode = this.selection.getStart(), + value = domUtils.getComputedStyle(startNode, "text-align"); + return defaultValue[value] ? value : "left"; + }, + queryCommandState: function () { + var start = this.selection.getStart(), + cell = + start && + domUtils.findParentByTagName(start, ["td", "th", "caption"], true); + + return cell ? -1 : 0; + } + }; + }; + + +// plugins/font.js + /** + * 字体颜色,背景色,字号,字体,下划线,删除线 + * @file + * @since 1.2.6.1 + */ + + /** + * 字体颜色 + * @command forecolor + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } value 色值(必须十六进制) + * @example + * ```javascript + * editor.execCommand( 'forecolor', '#000' ); + * ``` + */ + /** + * 返回选区字体颜色 + * @command forecolor + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回字体颜色 + * @example + * ```javascript + * editor.queryCommandValue( 'forecolor' ); + * ``` + */ + + /** + * 字体背景颜色 + * @command backcolor + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } value 色值(必须十六进制) + * @example + * ```javascript + * editor.execCommand( 'backcolor', '#000' ); + * ``` + */ + /** + * 返回选区字体颜色 + * @command backcolor + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回字体背景颜色 + * @example + * ```javascript + * editor.queryCommandValue( 'backcolor' ); + * ``` + */ + + /** + * 字体大小 + * @command fontsize + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } value 字体大小 + * @example + * ```javascript + * editor.execCommand( 'fontsize', '14px' ); + * ``` + */ + /** + * 返回选区字体大小 + * @command fontsize + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回字体大小 + * @example + * ```javascript + * editor.queryCommandValue( 'fontsize' ); + * ``` + */ + + /** + * 字体样式 + * @command fontfamily + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } value 字体样式 + * @example + * ```javascript + * editor.execCommand( 'fontfamily', '微软雅黑' ); + * ``` + */ + /** + * 返回选区字体样式 + * @command fontfamily + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回字体样式 + * @example + * ```javascript + * editor.queryCommandValue( 'fontfamily' ); + * ``` + */ + + /** + * 字体下划线,与删除线互斥 + * @command underline + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'underline' ); + * ``` + */ + + /** + * 字体删除线,与下划线互斥 + * @command strikethrough + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'strikethrough' ); + * ``` + */ + + /** + * 字体边框 + * @command fontborder + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'fontborder' ); + * ``` + */ + + UE.plugins["font"] = function () { + var me = this, + fonts = { + forecolor: "color", + backcolor: "background-color", + fontsize: "font-size", + fontfamily: "font-family", + underline: "text-decoration", + strikethrough: "text-decoration", + fontborder: "border" + }, + lang = me.getLang(), + needCmd = {underline: 1, strikethrough: 1, fontborder: 1}, + needSetChild = { + forecolor: "color", + backcolor: "background-color", + fontsize: "font-size", + fontfamily: "font-family" + }; + me.setOpt({ + fontfamily: [ + {name: "default", val: "default"}, + {name: "songti", val: "宋体,SimSun"}, + {name: "yahei", val: "微软雅黑,Microsoft YaHei"}, + {name: "kaiti", val: "楷体,楷体_GB2312,SimKai"}, + {name: "heiti", val: "黑体,SimHei"}, + {name: "lishu", val: "隶书,SimLi"}, + // { name: "andaleMono", val: "andale mono" }, + {name: "arial", val: "arial,helvetica,sans-serif"}, + // { name: "arialBlack", val: "arial black,avant garde" }, + // { name: "comicSansMs", val: "comic sans ms" }, + // { name: "impact", val: "impact,chicago" }, + {name: "timesNewRoman", val: "times new roman"} + ], + fontsize: [10, 11, 12, 14, 16, 18, 20, 24, 36] + }); + + function mergeWithParent(node) { + var parent; + while ((parent = node.parentNode)) { + if ( + parent.tagName == "SPAN" && + domUtils.getChildCount(parent, function (child) { + return !domUtils.isBookmarkNode(child) && !domUtils.isBr(child); + }) == 1 + ) { + parent.style.cssText += node.style.cssText; + domUtils.remove(node, true); + node = parent; + } else { + break; + } + } + } + + function mergeChild(rng, cmdName, value) { + if (needSetChild[cmdName]) { + rng.adjustmentBoundary(); + if (!rng.collapsed && rng.startContainer.nodeType == 1) { + var start = rng.startContainer.childNodes[rng.startOffset]; + if (start && domUtils.isTagNode(start, "span")) { + var bk = rng.createBookmark(); + utils.each(domUtils.getElementsByTagName(start, "span"), function ( + span + ) { + if (!span.parentNode || domUtils.isBookmarkNode(span)) return; + if ( + cmdName == "backcolor" && + domUtils + .getComputedStyle(span, "background-color") + .toLowerCase() === value + ) { + return; + } + domUtils.removeStyle(span, needSetChild[cmdName]); + if (span.style.cssText.replace(/^\s+$/, "").length == 0) { + domUtils.remove(span, true); + } + }); + rng.moveToBookmark(bk); + } + } + } + } + + function mergesibling(rng, cmdName, value) { + var collapsed = rng.collapsed, + bk = rng.createBookmark(), + common; + if (collapsed) { + common = bk.start.parentNode; + while (dtd.$inline[common.tagName]) { + common = common.parentNode; + } + } else { + common = domUtils.getCommonAncestor(bk.start, bk.end); + } + utils.each(domUtils.getElementsByTagName(common, "span"), function (span) { + if (!span.parentNode || domUtils.isBookmarkNode(span)) return; + if (/\s*border\s*:\s*none;?\s*/i.test(span.style.cssText)) { + if (/^\s*border\s*:\s*none;?\s*$/.test(span.style.cssText)) { + domUtils.remove(span, true); + } else { + domUtils.removeStyle(span, "border"); + } + return; + } + if ( + /border/i.test(span.style.cssText) && + span.parentNode.tagName == "SPAN" && + /border/i.test(span.parentNode.style.cssText) + ) { + span.style.cssText = span.style.cssText.replace( + /border[^:]*:[^;]+;?/gi, + "" + ); + } + if (!(cmdName == "fontborder" && value == "none")) { + var next = span.nextSibling; + while (next && next.nodeType == 1 && next.tagName == "SPAN") { + if (domUtils.isBookmarkNode(next) && cmdName == "fontborder") { + span.appendChild(next); + next = span.nextSibling; + continue; + } + if (next.style.cssText == span.style.cssText) { + domUtils.moveChild(next, span); + domUtils.remove(next); + } + if (span.nextSibling === next) break; + next = span.nextSibling; + } + } + + mergeWithParent(span); + if (browser.ie && browser.version > 8) { + //拷贝父亲们的特别的属性,这里只做背景颜色的处理 + var parent = domUtils.findParent(span, function (n) { + return ( + n.tagName == "SPAN" && /background-color/.test(n.style.cssText) + ); + }); + if (parent && !/background-color/.test(span.style.cssText)) { + span.style.backgroundColor = parent.style.backgroundColor; + } + } + }); + rng.moveToBookmark(bk); + mergeChild(rng, cmdName, value); + } + + me.addInputRule(function (root) { + utils.each(root.getNodesByTagName("u s del font strike"), function (node) { + if (node.tagName == "font") { + var cssStyle = []; + for (var p in node.attrs) { + switch (p) { + case "size": + cssStyle.push( + "font-size:" + + ({ + "1": "10", + "2": "12", + "3": "16", + "4": "18", + "5": "24", + "6": "32", + "7": "48" + }[node.attrs[p]] || node.attrs[p]) + + "px" + ); + break; + case "color": + cssStyle.push("color:" + node.attrs[p]); + break; + case "face": + cssStyle.push("font-family:" + node.attrs[p]); + break; + case "style": + cssStyle.push(node.attrs[p]); + } + } + node.attrs = { + style: cssStyle.join(";") + }; + } else { + var val = node.tagName == "u" ? "underline" : "line-through"; + node.attrs = { + style: (node.getAttr("style") || "") + "text-decoration:" + val + ";" + }; + } + node.tagName = "span"; + }); + // utils.each(root.getNodesByTagName('span'), function (node) { + // var val; + // if(val = node.getAttr('class')){ + // if(/fontstrikethrough/.test(val)){ + // node.setStyle('text-decoration','line-through'); + // if(node.attrs['class']){ + // node.attrs['class'] = node.attrs['class'].replace(/fontstrikethrough/,''); + // }else{ + // node.setAttr('class') + // } + // } + // if(/fontborder/.test(val)){ + // node.setStyle('border','1px solid #000'); + // if(node.attrs['class']){ + // node.attrs['class'] = node.attrs['class'].replace(/fontborder/,''); + // }else{ + // node.setAttr('class') + // } + // } + // } + // }); + }); + // me.addOutputRule(function(root){ + // utils.each(root.getNodesByTagName('span'), function (node) { + // var val; + // if(val = node.getStyle('text-decoration')){ + // if(/line-through/.test(val)){ + // if(node.attrs['class']){ + // node.attrs['class'] += ' fontstrikethrough'; + // }else{ + // node.setAttr('class','fontstrikethrough') + // } + // } + // + // node.setStyle('text-decoration') + // } + // if(val = node.getStyle('border')){ + // if(/1px/.test(val) && /solid/.test(val)){ + // if(node.attrs['class']){ + // node.attrs['class'] += ' fontborder'; + // + // }else{ + // node.setAttr('class','fontborder') + // } + // } + // node.setStyle('border') + // + // } + // }); + // }); + for (var p in fonts) { + (function (cmd, style) { + UE.commands[cmd] = { + execCommand: function (cmdName, value) { + // console.log("execCommand", cmdName, value); + value = + value || + (this.queryCommandState(cmdName) + ? "none" + : cmdName === "underline" + ? "underline" + : cmdName === "fontborder" ? "1px solid #000" : "line-through"); + var me = this, + range = this.selection.getRange(), + text; + + if (value === "default") { + if (range.collapsed) { + text = me.document.createTextNode("font"); + range.insertNode(text).select(); + } + me.execCommand("removeFormat", "span,a", style); + if (text) { + range.setStartBefore(text).collapse(true); + domUtils.remove(text); + } + mergesibling(range, cmdName, value); + range.select(); + } else { + if (!range.collapsed) { + if (needCmd[cmd] && me.queryCommandValue(cmd)) { + me.execCommand("removeFormat", "span,a", style); + } + range = me.selection.getRange(); + + range.applyInlineStyle("span", {style: style + ":" + value}); + mergesibling(range, cmdName, value); + range.select(); + } else { + var span = domUtils.findParentByTagName( + range.startContainer, + "span", + true + ); + text = me.document.createTextNode("font"); + if ( + span && + !span.children.length && + !span[browser.ie ? "innerText" : "textContent"].replace( + fillCharReg, + "" + ).length + ) { + //for ie hack when enter + range.insertNode(text); + if (needCmd[cmd]) { + range.selectNode(text).select(); + me.execCommand("removeFormat", "span,a", style, null); + + span = domUtils.findParentByTagName(text, "span", true); + range.setStartBefore(text); + } + span && (span.style.cssText += ";" + style + ":" + value); + range.collapse(true).select(); + } else { + range.insertNode(text); + range.selectNode(text).select(); + span = range.document.createElement("span"); + + if (needCmd[cmd]) { + //a标签内的不处理跳过 + if (domUtils.findParentByTagName(text, "a", true)) { + range.setStartBefore(text).setCursor(); + domUtils.remove(text); + return; + } + me.execCommand("removeFormat", "span,a", style); + } + + span.style.cssText = style + ":" + value; + + text.parentNode.insertBefore(span, text); + //修复,span套span 但样式不继承的问题 + if (!browser.ie || (browser.ie && browser.version === 9)) { + var spanParent = span.parentNode; + while (!domUtils.isBlockElm(spanParent)) { + if (spanParent.tagName === "SPAN") { + //opera合并style不会加入";" + span.style.cssText = + spanParent.style.cssText + ";" + span.style.cssText; + } + spanParent = spanParent.parentNode; + } + } + + if (opera) { + setTimeout(function () { + range.setStart(span, 0).collapse(true); + mergesibling(range, cmdName, value); + range.select(); + }); + } else { + range.setStart(span, 0).collapse(true); + mergesibling(range, cmdName, value); + range.select(); + } + + //trace:981 + //domUtils.mergeToParent(span) + } + domUtils.remove(text); + } + } + return true; + }, + queryCommandValue: function (cmdName) { + var startNode = this.selection.getStart(); + var styleVal; + + //trace:946 + if (cmdName === "underline" || cmdName === "strikethrough") { + var tmpNode = startNode, + value; + while ( + tmpNode && + !domUtils.isBlockElm(tmpNode) && + !domUtils.isBody(tmpNode) + ) { + if (tmpNode.nodeType === 1) { + value = domUtils.getComputedStyle(tmpNode, style); + if (value !== "none") { + return value; + } + } + + tmpNode = tmpNode.parentNode; + } + return "none"; + } else if (cmdName === "fontborder") { + var tmp = startNode, + val; + while (tmp && dtd.$inline[tmp.tagName]) { + if ((val = domUtils.getComputedStyle(tmp, "border"))) { + if (/1px/.test(val) && /solid/.test(val)) { + return val; + } + } + tmp = tmp.parentNode; + } + return ""; + } else if (cmdName === "FontSize") { + styleVal = domUtils.getComputedStyle(startNode, style); + tmp = /^([\d\.]+)(\w+)$/.exec(styleVal); + + if (tmp) { + return Math.floor(tmp[1]) + tmp[2]; + } + + return styleVal; + } else if (cmdName === 'FontFamily') { + styleVal = domUtils.getComputedStyle(startNode, style) + // 移除左右引号 + styleVal = styleVal.replace(/['"]/g, ''); + // 移除字体 宋体, SimSun 转为 宋体,SimSun,否则以下的判断会出错 + styleVal = styleVal.replace(/\s*,\s*/g, ','); + var fontFamily = lang.fontfamily.default; + var fontList = me.options["fontfamily"] || []; + for (var i = 0; i < fontList.length; i++) { + var v = fontList[i]; + // console.log('FontFamily', styleVal, v.val); + if (v.val === styleVal) { + fontFamily = styleVal; + break; + } + } + // console.log('fontList', fontList); + // console.log('FontFamily', styleVal, fontFamily); + return fontFamily; + } + + value = domUtils.getComputedStyle(startNode, style); + return value; + }, + queryCommandState: function (cmdName) { + if (!needCmd[cmdName]) return 0; + var val = this.queryCommandValue(cmdName); + if (cmdName === "fontborder") { + return /1px/.test(val) && /solid/.test(val); + } else { + return cmdName === "underline" + ? /underline/.test(val) + : /line\-through/.test(val); + } + } + }; + })(p, fonts[p]); + } + }; + + +// plugins/link.js + /** + * 超链接 + * @file + * @since 1.2.6.1 + */ + + /** + * 插入超链接 + * @command link + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { Object } options 设置自定义属性,例如:url、title、target + * @example + * ```javascript + * editor.execCommand( 'link', '{ + * url:'ueditor.baidu.com', + * title:'ueditor', + * target:'_blank' + * }' ); + * ``` + */ + /** + * 返回当前选中的第一个超链接节点 + * @command link + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { Element } 超链接节点 + * @example + * ```javascript + * editor.queryCommandValue( 'link' ); + * ``` + */ + + /** + * 取消超链接 + * @command unlink + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'unlink'); + * ``` + */ + + UE.plugins["link"] = function () { + function optimize(range) { + var start = range.startContainer, + end = range.endContainer; + + if ((start = domUtils.findParentByTagName(start, "a", true))) { + range.setStartBefore(start); + } + if ((end = domUtils.findParentByTagName(end, "a", true))) { + range.setEndAfter(end); + } + } + + UE.commands["unlink"] = { + execCommand: function () { + var range = this.selection.getRange(), + bookmark; + if ( + range.collapsed && + !domUtils.findParentByTagName(range.startContainer, "a", true) + ) { + return; + } + bookmark = range.createBookmark(); + optimize(range); + range.removeInlineStyle("a").moveToBookmark(bookmark).select(); + }, + queryCommandState: function () { + return !this.highlight && this.queryCommandValue("link") ? 0 : -1; + } + }; + + function doLink(range, opt, me) { + var rngClone = range.cloneRange(), + link = me.queryCommandValue("link"); + optimize((range = range.adjustmentBoundary())); + var start = range.startContainer; + if (start.nodeType == 1 && link) { + start = start.childNodes[range.startOffset]; + if ( + start && + start.nodeType == 1 && + start.tagName == "A" && + /^(?:https?|ftp|file)\s*:\s*\/\//.test( + start[browser.ie ? "innerText" : "textContent"] + ) + ) { + start[browser.ie ? "innerText" : "textContent"] = utils.html( + opt.textValue || opt.href + ); + } + } + if (!rngClone.collapsed || link) { + range.removeInlineStyle("a"); + rngClone = range.cloneRange(); + } + + if (rngClone.collapsed) { + var a = range.document.createElement("a"), + text = ""; + if (opt.textValue) { + text = utils.html(opt.textValue); + delete opt.textValue; + } else { + text = utils.html(opt.href); + } + domUtils.setAttributes(a, opt); + start = domUtils.findParentByTagName(rngClone.startContainer, "a", true); + if (start && domUtils.isInNodeEndBoundary(rngClone, start)) { + range.setStartAfter(start).collapse(true); + } + a[browser.ie ? "innerText" : "textContent"] = text; + range.insertNode(a).selectNode(a); + } else { + range.applyInlineStyle("a", opt); + } + } + + UE.commands["link"] = { + execCommand: function (cmdName, opt) { + var range; + opt._href && (opt._href = utils.unhtml(opt._href, /[<">]/g)); + opt.href && (opt.href = utils.unhtml(opt.href, /[<">]/g)); + opt.textValue && (opt.textValue = utils.unhtml(opt.textValue, /[<">]/g)); + doLink((range = this.selection.getRange()), opt, this); + //闭合都不加占位符,如果加了会在a后边多个占位符节点,导致a是图片背景组成的列表,出现空白问题 + range.collapse().select(true); + }, + queryCommandValue: function () { + var range = this.selection.getRange(), + node; + if (range.collapsed) { + // node = this.selection.getStart(); + //在ie下getstart()取值偏上了 + node = range.startContainer; + node = node.nodeType == 1 ? node : node.parentNode; + + if ( + node && + (node = domUtils.findParentByTagName(node, "a", true)) && + !domUtils.isInNodeEndBoundary(range, node) + ) { + return node; + } + } else { + //trace:1111 如果是

              xx

              startContainer是p就会找不到a + range.shrinkBoundary(); + var start = range.startContainer.nodeType == 3 || + !range.startContainer.childNodes[range.startOffset] + ? range.startContainer + : range.startContainer.childNodes[range.startOffset], + end = range.endContainer.nodeType == 3 || range.endOffset == 0 + ? range.endContainer + : range.endContainer.childNodes[range.endOffset - 1], + common = range.getCommonAncestor(); + node = domUtils.findParentByTagName(common, "a", true); + if (!node && common.nodeType == 1) { + var as = common.getElementsByTagName("a"), + ps, + pe; + + for (var i = 0, ci; (ci = as[i++]);) { + (ps = domUtils.getPosition(ci, start)), (pe = domUtils.getPosition( + ci, + end + )); + if ( + (ps & domUtils.POSITION_FOLLOWING || + ps & domUtils.POSITION_CONTAINS) && + (pe & domUtils.POSITION_PRECEDING || + pe & domUtils.POSITION_CONTAINS) + ) { + node = ci; + break; + } + } + } + return node; + } + }, + queryCommandState: function () { + //判断如果是视频的话连接不可用 + //fix 853 + var img = this.selection.getRange().getClosedNode(), + flag = + img && + (img.className == "edui-faked-video" || + img.className.indexOf("edui-upload-video") != -1); + return flag ? -1 : 0; + } + }; + }; + + +// plugins/iframe.js +///import core +///import plugins\inserthtml.js +///commands 插入框架 +///commandsName InsertFrame +///commandsTitle 插入Iframe +///commandsDialog dialogs\insertframe + + UE.plugins["insertframe"] = function () { + var me = this; + + function deleteIframe() { + me._iframe && delete me._iframe; + } + + me.addListener("selectionchange", function () { + deleteIframe(); + }); + }; + + +// plugins/scrawl.js +///import core +///commands 涂鸦 +///commandsName Scrawl +///commandsTitle 涂鸦 +///commandsDialog dialogs\scrawl + UE.commands["scrawl"] = { + queryCommandState: function () { + return browser.ie && browser.version <= 8 ? -1 : 0; + } + }; + + +// plugins/removeformat.js + /** + * 清除格式 + * @file + * @since 1.2.6.1 + */ + + /** + * 清除文字样式 + * @command removeformat + * @method execCommand + * @param { String } cmd 命令字符串 + * @param {String} tags 以逗号隔开的标签。如:strong + * @param {String} style 样式如:color + * @param {String} attrs 属性如:width + * @example + * ```javascript + * editor.execCommand( 'removeformat', 'strong','color','width' ); + * ``` + */ + + UE.plugins["removeformat"] = function () { + var me = this; + me.setOpt({ + removeFormatTags: + "b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var", + removeFormatAttributes: "class,style,lang,width,height,align,hspace,valign" + }); + me.commands["removeformat"] = { + execCommand: function (cmdName, tags, style, attrs, notIncludeA) { + var tagReg = new RegExp( + "^(?:" + + (tags || this.options.removeFormatTags).replace(/,/g, "|") + + ")$", + "i" + ), + removeFormatAttributes = style + ? [] + : (attrs || this.options.removeFormatAttributes).split(","), + range = new dom.Range(this.document), + bookmark, + node, + parent, + filter = function (node) { + return node.nodeType == 1; + }; + + function isRedundantSpan(node) { + if (node.nodeType == 3 || node.tagName.toLowerCase() != "span") { + return 0; + } + if (browser.ie) { + //ie 下判断实效,所以只能简单用style来判断 + //return node.style.cssText == '' ? 1 : 0; + var attrs = node.attributes; + if (attrs.length) { + for (var i = 0, l = attrs.length; i < l; i++) { + if (attrs[i].specified) { + return 0; + } + } + return 1; + } + } + return !node.attributes.length; + } + + function doRemove(range) { + var bookmark1 = range.createBookmark(); + if (range.collapsed) { + range.enlarge(true); + } + + //不能把a标签切了 + if (!notIncludeA) { + var aNode = domUtils.findParentByTagName( + range.startContainer, + "a", + true + ); + if (aNode) { + range.setStartBefore(aNode); + } + + aNode = domUtils.findParentByTagName(range.endContainer, "a", true); + if (aNode) { + range.setEndAfter(aNode); + } + } + + bookmark = range.createBookmark(); + + node = bookmark.start; + + //切开始 + while ((parent = node.parentNode) && !domUtils.isBlockElm(parent)) { + domUtils.breakParent(node, parent); + + domUtils.clearEmptySibling(node); + } + if (bookmark.end) { + //切结束 + node = bookmark.end; + while ((parent = node.parentNode) && !domUtils.isBlockElm(parent)) { + domUtils.breakParent(node, parent); + domUtils.clearEmptySibling(node); + } + + //开始去除样式 + var current = domUtils.getNextDomNode(bookmark.start, false, filter), + next; + while (current) { + if (current == bookmark.end) { + break; + } + + next = domUtils.getNextDomNode(current, true, filter); + + if ( + !dtd.$empty[current.tagName.toLowerCase()] && + !domUtils.isBookmarkNode(current) + ) { + if (tagReg.test(current.tagName)) { + if (style) { + domUtils.removeStyle(current, style); + if (isRedundantSpan(current) && style != "text-decoration") { + domUtils.remove(current, true); + } + } else { + domUtils.remove(current, true); + } + } else { + //trace:939 不能把list上的样式去掉 + // 清除格式时,默认移除Table、List上的样式 + if ( + true + // !dtd.$tableContent[current.tagName] && !dtd.$list[current.tagName] + ) { + domUtils.removeAttributes(current, removeFormatAttributes); + if (isRedundantSpan(current)) { + domUtils.remove(current, true); + } + } else { + // console.log('current.ignore',current); + } + } + } + current = next; + } + } + //trace:1035 + //trace:1096 不能把td上的样式去掉,比如边框 + var pN = bookmark.start.parentNode; + if ( + domUtils.isBlockElm(pN) && + !dtd.$tableContent[pN.tagName] && + !dtd.$list[pN.tagName] + ) { + domUtils.removeAttributes(pN, removeFormatAttributes); + } + pN = bookmark.end.parentNode; + if ( + bookmark.end && + domUtils.isBlockElm(pN) && + !dtd.$tableContent[pN.tagName] && + !dtd.$list[pN.tagName] + ) { + domUtils.removeAttributes(pN, removeFormatAttributes); + } + range.moveToBookmark(bookmark).moveToBookmark(bookmark1); + //清除冗余的代码 + var node = range.startContainer, + tmp, + collapsed = range.collapsed; + while ( + node.nodeType == 1 && + domUtils.isEmptyNode(node) && + dtd.$removeEmpty[node.tagName] + ) { + tmp = node.parentNode; + range.setStartBefore(node); + //trace:937 + //更新结束边界 + if (range.startContainer === range.endContainer) { + range.endOffset--; + } + domUtils.remove(node); + node = tmp; + } + + if (!collapsed) { + node = range.endContainer; + while ( + node.nodeType == 1 && + domUtils.isEmptyNode(node) && + dtd.$removeEmpty[node.tagName] + ) { + tmp = node.parentNode; + range.setEndBefore(node); + domUtils.remove(node); + + node = tmp; + } + } + } + + range = this.selection.getRange(); + doRemove(range); + range.select(); + } + }; + }; + + +// plugins/blockquote.js + /** + * 添加引用 + * @file + * @since 1.2.6.1 + */ + + /** + * 添加引用 + * @command blockquote + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'blockquote' ); + * ``` + */ + + /** + * 添加引用 + * @command blockquote + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { Object } attrs 节点属性 + * @example + * ```javascript + * editor.execCommand( 'blockquote',{ + * style: "color: red;" + * } ); + * ``` + */ + + UE.plugins["blockquote"] = function () { + var me = this; + + function getObj(editor) { + return domUtils.filterNodeList( + editor.selection.getStartElementPath(), + "blockquote" + ); + } + + me.commands["blockquote"] = { + execCommand: function (cmdName, attrs) { + var range = this.selection.getRange(), + obj = getObj(this), + blockquote = dtd.blockquote, + bookmark = range.createBookmark(); + + if (obj) { + var start = range.startContainer, + startBlock = domUtils.isBlockElm(start) + ? start + : domUtils.findParent(start, function (node) { + return domUtils.isBlockElm(node); + }), + end = range.endContainer, + endBlock = domUtils.isBlockElm(end) + ? end + : domUtils.findParent(end, function (node) { + return domUtils.isBlockElm(node); + }); + + //处理一下li + startBlock = + domUtils.findParentByTagName(startBlock, "li", true) || startBlock; + endBlock = + domUtils.findParentByTagName(endBlock, "li", true) || endBlock; + + if ( + startBlock.tagName == "LI" || + startBlock.tagName == "TD" || + startBlock === obj || + domUtils.isBody(startBlock) + ) { + domUtils.remove(obj, true); + } else { + domUtils.breakParent(startBlock, obj); + } + + if (startBlock !== endBlock) { + obj = domUtils.findParentByTagName(endBlock, "blockquote"); + if (obj) { + if ( + endBlock.tagName == "LI" || + endBlock.tagName == "TD" || + domUtils.isBody(endBlock) + ) { + obj.parentNode && domUtils.remove(obj, true); + } else { + domUtils.breakParent(endBlock, obj); + } + } + } + + var blockquotes = domUtils.getElementsByTagName( + this.document, + "blockquote" + ); + for (var i = 0, bi; (bi = blockquotes[i++]);) { + if (!bi.childNodes.length) { + domUtils.remove(bi); + } else if ( + domUtils.getPosition(bi, startBlock) & + domUtils.POSITION_FOLLOWING && + domUtils.getPosition(bi, endBlock) & domUtils.POSITION_PRECEDING + ) { + domUtils.remove(bi, true); + } + } + } else { + var tmpRange = range.cloneRange(), + node = tmpRange.startContainer.nodeType == 1 + ? tmpRange.startContainer + : tmpRange.startContainer.parentNode, + preNode = node, + doEnd = 1; + + //调整开始 + while (1) { + if (domUtils.isBody(node)) { + if (preNode !== node) { + if (range.collapsed) { + tmpRange.selectNode(preNode); + doEnd = 0; + } else { + tmpRange.setStartBefore(preNode); + } + } else { + tmpRange.setStart(node, 0); + } + + break; + } + if (!blockquote[node.tagName]) { + if (range.collapsed) { + tmpRange.selectNode(preNode); + } else { + tmpRange.setStartBefore(preNode); + } + break; + } + + preNode = node; + node = node.parentNode; + } + + //调整结束 + if (doEnd) { + preNode = node = node = tmpRange.endContainer.nodeType == 1 + ? tmpRange.endContainer + : tmpRange.endContainer.parentNode; + while (1) { + if (domUtils.isBody(node)) { + if (preNode !== node) { + tmpRange.setEndAfter(preNode); + } else { + tmpRange.setEnd(node, node.childNodes.length); + } + + break; + } + if (!blockquote[node.tagName]) { + tmpRange.setEndAfter(preNode); + break; + } + + preNode = node; + node = node.parentNode; + } + } + + node = range.document.createElement("blockquote"); + domUtils.setAttributes(node, attrs); + node.appendChild(tmpRange.extractContents()); + tmpRange.insertNode(node); + //去除重复的 + var childs = domUtils.getElementsByTagName(node, "blockquote"); + for (var i = 0, ci; (ci = childs[i++]);) { + if (ci.parentNode) { + domUtils.remove(ci, true); + } + } + } + range.moveToBookmark(bookmark).select(); + }, + queryCommandState: function () { + return getObj(this) ? 1 : 0; + } + }; + }; + + +// plugins/convertcase.js + /** + * 大小写转换 + * @file + * @since 1.2.6.1 + */ + + /** + * 把选区内文本变大写,与“tolowercase”命令互斥 + * @command touppercase + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'touppercase' ); + * ``` + */ + + /** + * 把选区内文本变小写,与“touppercase”命令互斥 + * @command tolowercase + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'tolowercase' ); + * ``` + */ + UE.commands["touppercase"] = UE.commands["tolowercase"] = { + execCommand: function (cmd) { + var me = this; + var rng = me.selection.getRange(); + if (rng.collapsed) { + return rng; + } + var bk = rng.createBookmark(), + bkEnd = bk.end, + filterFn = function (node) { + return !domUtils.isBr(node) && !domUtils.isWhitespace(node); + }, + curNode = domUtils.getNextDomNode(bk.start, false, filterFn); + while ( + curNode && + domUtils.getPosition(curNode, bkEnd) & domUtils.POSITION_PRECEDING + ) { + if (curNode.nodeType == 3) { + curNode.nodeValue = curNode.nodeValue[ + cmd == "touppercase" ? "toUpperCase" : "toLowerCase" + ](); + } + curNode = domUtils.getNextDomNode(curNode, true, filterFn); + if (curNode === bkEnd) { + break; + } + } + rng.moveToBookmark(bk).select(); + } + }; + + +// plugins/indent.js + /** + * 首行缩进 + * @file + * @since 1.2.6.1 + */ + + /** + * 缩进 + * @command indent + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'indent' ); + * ``` + */ + UE.commands["indent"] = { + execCommand: function () { + var me = this, + value = me.queryCommandState("indent") + ? "0em" + : me.options.indentValue || "2em"; + me.execCommand("Paragraph", "p", {style: "text-indent:" + value}); + }, + queryCommandState: function () { + var pN = domUtils.filterNodeList( + this.selection.getStartElementPath(), + "p h1 h2 h3 h4 h5 h6" + ); + return pN && pN.style.textIndent && parseInt(pN.style.textIndent) ? 1 : 0; + } + }; + + +// plugins/print.js + /** + * 打印 + * @file + * @since 1.2.6.1 + */ + + /** + * 打印 + * @command print + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'print' ); + * ``` + */ + UE.commands["print"] = { + execCommand: function () { + this.window.print(); + }, + notNeedUndo: 1 + }; + + +// plugins/preview.js + /** + * 预览 + * @file + * @since 1.2.6.1 + */ + + /** + * 预览 + * @command preview + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'preview' ); + * ``` + */ + UE.commands["preview"] = { + execCommand: function () { + var w = window.open("", "_blank", ""), + d = w.document; + d.open(); + d.write( + '
              " + + this.getContent(null, null, true) + + "
              " + ); + d.close(); + }, + notNeedUndo: 1 + }; + + +// plugins/selectall.js + /** + * 全选 + * @file + * @since 1.2.6.1 + */ + + /** + * 选中所有内容 + * @command selectall + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'selectall' ); + * ``` + */ + UE.plugins["selectall"] = function () { + var me = this; + me.commands["selectall"] = { + execCommand: function () { + //去掉了原生的selectAll,因为会出现报错和当内容为空时,不能出现闭合状态的光标 + var me = this, + body = me.body, + range = me.selection.getRange(); + range.selectNodeContents(body); + if (domUtils.isEmptyBlock(body)) { + //opera不能自动合并到元素的里边,要手动处理一下 + if (browser.opera && body.firstChild && body.firstChild.nodeType == 1) { + range.setStartAtFirst(body.firstChild); + } + range.collapse(true); + } + range.select(true); + }, + notNeedUndo: 1 + }; + + //快捷键 + me.addshortcutkey({ + selectAll: "ctrl+65" + }); + }; + + +// plugins/paragraph.js + /** + * 段落样式 + * @file + * @since 1.2.6.1 + */ + + /** + * 段落格式 + * @command paragraph + * @method execCommand + * @param { String } cmd 命令字符串 + * @param {String} style 标签值为:'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' + * @param {Object} attrs 标签的属性 + * @example + * ```javascript + * editor.execCommand( 'Paragraph','h1','{ + * class:'test' + * }' ); + * ``` + */ + + /** + * 返回选区内节点标签名 + * @command paragraph + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 节点标签名 + * @example + * ```javascript + * editor.queryCommandValue( 'Paragraph' ); + * ``` + */ + + UE.plugins["paragraph"] = function () { + var me = this, + block = domUtils.isBlockElm, + notExchange = ["TD", "LI", "PRE"], + doParagraph = function (range, style, attrs, sourceCmdName) { + var bookmark = range.createBookmark(), + filterFn = function (node) { + return node.nodeType == 1 + ? node.tagName.toLowerCase() != "br" && + !domUtils.isBookmarkNode(node) + : !domUtils.isWhitespace(node); + }, + para; + + range.enlarge(true); + var bookmark2 = range.createBookmark(), + current = domUtils.getNextDomNode(bookmark2.start, false, filterFn), + tmpRange = range.cloneRange(), + tmpNode; + while ( + current && + !( + domUtils.getPosition(current, bookmark2.end) & + domUtils.POSITION_FOLLOWING + ) + ) { + if (current.nodeType === 3 || !block(current)) { + tmpRange.setStartBefore(current); + while (current && current !== bookmark2.end && !block(current)) { + tmpNode = current; + current = domUtils.getNextDomNode(current, false, null, function ( + node + ) { + return !block(node); + }); + } + tmpRange.setEndAfter(tmpNode); + + para = range.document.createElement(style); + if (attrs) { + domUtils.setAttributes(para, attrs); + if ( + sourceCmdName && + sourceCmdName === "customstyle" && + attrs.style + ) { + para.style.cssText = attrs.style; + } + } + para.appendChild(tmpRange.extractContents()); + //需要内容占位 + if (domUtils.isEmptyNode(para)) { + domUtils.fillChar(range.document, para); + } + + tmpRange.insertNode(para); + + var parent = para.parentNode; + //如果para上一级是一个block元素且不是body,td就删除它 + if ( + block(parent) && + !domUtils.isBody(para.parentNode) && + utils.indexOf(notExchange, parent.tagName) === -1 + ) { + //存储dir,style + if (!(sourceCmdName && sourceCmdName === "customstyle")) { + parent.getAttribute("dir") && + para.setAttribute("dir", parent.getAttribute("dir")); + //trace:1070 + parent.style.cssText && + (para.style.cssText = + parent.style.cssText + ";" + para.style.cssText); + //trace:1030 + parent.style.textAlign && + !para.style.textAlign && + (para.style.textAlign = parent.style.textAlign); + parent.style.textIndent && + !para.style.textIndent && + (para.style.textIndent = parent.style.textIndent); + parent.style.padding && + !para.style.padding && + (para.style.padding = parent.style.padding); + } + + //trace:1706 选择的就是h1-6要删除 + if ( + attrs && + /h\d/i.test(parent.tagName) && + !/h\d/i.test(para.tagName) + ) { + domUtils.setAttributes(parent, attrs); + if ( + sourceCmdName && + sourceCmdName === "customstyle" && + attrs.style + ) { + parent.style.cssText = attrs.style; + } + domUtils.remove(para.parentNode, true); + para = parent; + } else { + domUtils.remove(para.parentNode, true); + } + } + if (utils.indexOf(notExchange, parent.tagName) !== -1) { + current = parent; + } else { + current = para; + } + + current = domUtils.getNextDomNode(current, false, filterFn); + } else { + current = domUtils.getNextDomNode(current, true, filterFn); + } + } + return range.moveToBookmark(bookmark2).moveToBookmark(bookmark); + }; + me.setOpt("paragraph", { + p: "", + h1: "", + h2: "", + h3: "", + h4: "", + h5: "", + h6: "" + }); + me.commands["paragraph"] = { + execCommand: function (cmdName, style, attrs, sourceCmdName) { + var range = this.selection.getRange(); + //闭合时单独处理 + if (range.collapsed) { + var txt = this.document.createTextNode("p"); + range.insertNode(txt); + //去掉冗余的fillchar + if (browser.ie) { + var node = txt.previousSibling; + if (node && domUtils.isWhitespace(node)) { + domUtils.remove(node); + } + node = txt.nextSibling; + if (node && domUtils.isWhitespace(node)) { + domUtils.remove(node); + } + } + } + range = doParagraph(range, style, attrs, sourceCmdName); + if (txt) { + range.setStartBefore(txt).collapse(true); + pN = txt.parentNode; + + domUtils.remove(txt); + + if (domUtils.isBlockElm(pN) && domUtils.isEmptyNode(pN)) { + domUtils.fillNode(this.document, pN); + } + } + + if ( + browser.gecko && + range.collapsed && + range.startContainer.nodeType === 1 + ) { + var child = range.startContainer.childNodes[range.startOffset]; + if ( + child && + child.nodeType === 1 && + child.tagName.toLowerCase() === style + ) { + range.setStart(child, 0).collapse(true); + } + } + //trace:1097 原来有true,原因忘了,但去了就不能清除多余的占位符了 + range.select(); + + return true; + }, + queryCommandValue: function () { + var node = domUtils.filterNodeList( + this.selection.getStartElementPath(), + "p h1 h2 h3 h4 h5 h6" + ); + return node ? node.tagName.toLowerCase() : ""; + } + }; + }; + + +// plugins/directionality.js + /** + * 设置文字输入的方向的插件 + * @file + * @since 1.2.6.1 + */ + (function () { + var block = domUtils.isBlockElm, + getObj = function (editor) { + // var startNode = editor.selection.getStart(), + // parents; + // if ( startNode ) { + // //查找所有的是block的父亲节点 + // parents = domUtils.findParents( startNode, true, block, true ); + // for ( var i = 0,ci; ci = parents[i++]; ) { + // if ( ci.getAttribute( 'dir' ) ) { + // return ci; + // } + // } + // } + return domUtils.filterNodeList( + editor.selection.getStartElementPath(), + function (n) { + return n && n.nodeType == 1 && n.getAttribute("dir"); + } + ); + }, + doDirectionality = function (range, editor, forward) { + var bookmark, + filterFn = function (node) { + return node.nodeType == 1 + ? !domUtils.isBookmarkNode(node) + : !domUtils.isWhitespace(node); + }, + obj = getObj(editor); + + if (obj && range.collapsed) { + obj.setAttribute("dir", forward); + return range; + } + bookmark = range.createBookmark(); + range.enlarge(true); + var bookmark2 = range.createBookmark(), + current = domUtils.getNextDomNode(bookmark2.start, false, filterFn), + tmpRange = range.cloneRange(), + tmpNode; + while ( + current && + !( + domUtils.getPosition(current, bookmark2.end) & + domUtils.POSITION_FOLLOWING + ) + ) { + if (current.nodeType == 3 || !block(current)) { + tmpRange.setStartBefore(current); + while (current && current !== bookmark2.end && !block(current)) { + tmpNode = current; + current = domUtils.getNextDomNode(current, false, null, function ( + node + ) { + return !block(node); + }); + } + tmpRange.setEndAfter(tmpNode); + var common = tmpRange.getCommonAncestor(); + if (!domUtils.isBody(common) && block(common)) { + //遍历到了block节点 + common.setAttribute("dir", forward); + current = common; + } else { + //没有遍历到,添加一个block节点 + var p = range.document.createElement("p"); + p.setAttribute("dir", forward); + var frag = tmpRange.extractContents(); + p.appendChild(frag); + tmpRange.insertNode(p); + current = p; + } + + current = domUtils.getNextDomNode(current, false, filterFn); + } else { + current = domUtils.getNextDomNode(current, true, filterFn); + } + } + return range.moveToBookmark(bookmark2).moveToBookmark(bookmark); + }; + + /** + * 文字输入方向 + * @command directionality + * @method execCommand + * @param { String } cmdName 命令字符串 + * @param { String } forward 传入'ltr'表示从左向右输入,传入'rtl'表示从右向左输入 + * @example + * ```javascript + * editor.execCommand( 'directionality', 'ltr'); + * ``` + */ + + /** + * 查询当前选区的文字输入方向 + * @command directionality + * @method queryCommandValue + * @param { String } cmdName 命令字符串 + * @return { String } 返回'ltr'表示从左向右输入,返回'rtl'表示从右向左输入 + * @example + * ```javascript + * editor.queryCommandValue( 'directionality'); + * ``` + */ + UE.commands["directionality"] = { + execCommand: function (cmdName, forward) { + var range = this.selection.getRange(); + //闭合时单独处理 + if (range.collapsed) { + var txt = this.document.createTextNode("d"); + range.insertNode(txt); + } + doDirectionality(range, this, forward); + if (txt) { + range.setStartBefore(txt).collapse(true); + domUtils.remove(txt); + } + + range.select(); + return true; + }, + queryCommandValue: function () { + var node = getObj(this); + return node ? node.getAttribute("dir") : "ltr"; + } + }; + })(); + + +// plugins/horizontal.js + /** + * 插入分割线插件 + * @file + * @since 1.2.6.1 + */ + + /** + * 插入分割线 + * @command horizontal + * @method execCommand + * @param { String } cmdName 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'horizontal' ); + * ``` + */ + UE.plugins["horizontal"] = function () { + var me = this; + me.commands["horizontal"] = { + execCommand: function (cmdName) { + var me = this; + if (me.queryCommandState(cmdName) !== -1) { + me.execCommand("insertHtml", "
              "); + var range = me.selection.getRange(), + start = range.startContainer; + if (start.nodeType == 1 && !start.childNodes[range.startOffset]) { + var tmp; + if ((tmp = start.childNodes[range.startOffset - 1])) { + if (tmp.nodeType == 1 && tmp.tagName == "HR") { + if (me.options.enterTag == "p") { + tmp = me.document.createElement("p"); + range.insertNode(tmp); + range.setStart(tmp, 0).setCursor(); + } else { + tmp = me.document.createElement("br"); + range.insertNode(tmp); + range.setStartBefore(tmp).setCursor(); + } + } + } + } + return true; + } + }, + //边界在table里不能加分隔线 + queryCommandState: function () { + return domUtils.filterNodeList( + this.selection.getStartElementPath(), + "table" + ) + ? -1 + : 0; + } + }; + // me.addListener('delkeyup',function(){ + // var rng = this.selection.getRange(); + // if(browser.ie && browser.version > 8){ + // rng.txtToElmBoundary(true); + // if(domUtils.isStartInblock(rng)){ + // var tmpNode = rng.startContainer; + // var pre = tmpNode.previousSibling; + // if(pre && domUtils.isTagNode(pre,'hr')){ + // domUtils.remove(pre); + // rng.select(); + // return; + // } + // } + // } + // if(domUtils.isBody(rng.startContainer)){ + // var hr = rng.startContainer.childNodes[rng.startOffset -1]; + // if(hr && hr.nodeName == 'HR'){ + // var next = hr.nextSibling; + // if(next){ + // rng.setStart(next,0) + // }else if(hr.previousSibling){ + // rng.setStartAtLast(hr.previousSibling) + // }else{ + // var p = this.document.createElement('p'); + // hr.parentNode.insertBefore(p,hr); + // domUtils.fillNode(this.document,p); + // rng.setStart(p,0); + // } + // domUtils.remove(hr); + // rng.setCursor(false,true); + // } + // } + // }) + me.addListener("delkeydown", function (name, evt) { + var rng = this.selection.getRange(); + rng.txtToElmBoundary(true); + if (domUtils.isStartInblock(rng)) { + var tmpNode = rng.startContainer; + var pre = tmpNode.previousSibling; + if (pre && domUtils.isTagNode(pre, "hr")) { + domUtils.remove(pre); + rng.select(); + domUtils.preventDefault(evt); + return true; + } + } + }); + }; + + +// plugins/time.js + /** + * 插入时间和日期 + * @file + * @since 1.2.6.1 + */ + + /** + * 插入时间,默认格式:12:59:59 + * @command time + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'time'); + * ``` + */ + + /** + * 插入日期,默认格式:2013-08-30 + * @command date + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'date'); + * ``` + */ + UE.commands["time"] = UE.commands["date"] = { + execCommand: function (cmd, format) { + var date = new Date(); + + function formatTime(date, format) { + var hh = ("0" + date.getHours()).slice(-2), + ii = ("0" + date.getMinutes()).slice(-2), + ss = ("0" + date.getSeconds()).slice(-2); + format = format || "hh:ii:ss"; + return format.replace(/hh/gi, hh).replace(/ii/gi, ii).replace(/ss/gi, ss); + } + + function formatDate(date, format) { + var yyyy = ("000" + date.getFullYear()).slice(-4), + yy = yyyy.slice(-2), + mm = ("0" + (date.getMonth() + 1)).slice(-2), + dd = ("0" + date.getDate()).slice(-2); + format = format || "yyyy-mm-dd"; + return format + .replace(/yyyy/gi, yyyy) + .replace(/yy/gi, yy) + .replace(/mm/gi, mm) + .replace(/dd/gi, dd); + } + + this.execCommand( + "insertHtml", + cmd == "time" ? formatTime(date, format) : formatDate(date, format) + ); + } + }; + + +// plugins/rowspacing.js + /** + * 段前段后间距插件 + * @file + * @since 1.2.6.1 + */ + + /** + * 设置段间距 + * @command rowspacing + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } value 段间距的值,以px为单位 + * @param { String } dir 间距位置,top或bottom,分别表示段前和段后 + * @example + * ```javascript + * editor.execCommand( 'rowspacing', '10', 'top' ); + * ``` + */ + + UE.plugins["rowspacing"] = function () { + var me = this; + me.setOpt({ + rowspacingtop: ["5", "10", "15", "20", "25"], + rowspacingbottom: ["5", "10", "15", "20", "25"] + }); + me.commands["rowspacing"] = { + execCommand: function (cmdName, value, dir) { + this.execCommand("paragraph", "p", { + style: "margin-" + dir + ":" + value + "px" + }); + return true; + }, + queryCommandValue: function (cmdName, dir) { + var pN = domUtils.filterNodeList( + this.selection.getStartElementPath(), + function (node) { + return domUtils.isBlockElm(node); + } + ), + value; + //trace:1026 + if (pN) { + value = domUtils + .getComputedStyle(pN, "margin-" + dir) + .replace(/[^\d]/g, ""); + return !value ? 0 : value; + } + return 0; + } + }; + }; + + +// plugins/lineheight.js + /** + * 设置行内间距 + * @file + * @since 1.2.6.1 + */ + UE.plugins["lineheight"] = function () { + var me = this; + me.setOpt({lineheight: ["1", "1.5", "1.75", "2", "3", "4", "5"]}); + + /** + * 行距 + * @command lineheight + * @method execCommand + * @param { String } cmdName 命令字符串 + * @param { String } value 传入的行高值, 该值是当前字体的倍数, 例如: 1.5, 1.75 + * @example + * ```javascript + * editor.execCommand( 'lineheight', 1.5); + * ``` + */ + /** + * 查询当前选区内容的行高大小 + * @command lineheight + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回当前行高大小 + * @example + * ```javascript + * editor.queryCommandValue( 'lineheight' ); + * ``` + */ + + me.commands["lineheight"] = { + execCommand: function (cmdName, value) { + this.execCommand("paragraph", "p", { + style: "line-height:" + (value == "1" ? "normal" : value + "em") + }); + return true; + }, + queryCommandValue: function () { + var pN = domUtils.filterNodeList( + this.selection.getStartElementPath(), + function (node) { + return domUtils.isBlockElm(node); + } + ); + if (pN) { + var value = domUtils.getComputedStyle(pN, "line-height"); + return value == "normal" ? 1 : value.replace(/[^\d.]*/gi, ""); + } + } + }; + }; + + +// plugins/insertcode.js + /** + * 插入代码插件 + * @file + * @since 1.2.6.1 + */ + + UE.plugins["insertcode"] = function () { + var me = this; + me.setOpt("insertcode", { + as3: "ActionScript3", + bash: "Bash/Shell", + cpp: "C/C++", + css: "Css", + // cf: "CodeFunction", + "c#": "C#", + delphi: "Delphi", + // diff: "Diff", + erlang: "Erlang", + groovy: "Groovy", + html: "Html", + java: "Java", + // jfx: "JavaFx", + js: "Javascript", + pl: "Perl", + php: "PHP", + plain: "Text", + ps: "PowerShell", + python: "Python", + ruby: "Ruby", + scala: "Scala", + sql: "SQL", + vb: "VB", + xml: "XML", + mind: "Mind", + }); + + /** + * 插入代码 + * @command insertcode + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } lang 插入代码的语言 + * @example + * ```javascript + * editor.execCommand( 'insertcode', 'javascript' ); + * ``` + */ + + /** + * 如果选区所在位置是插入插入代码区域,返回代码的语言 + * @command insertcode + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回代码的语言 + * @example + * ```javascript + * editor.queryCommandValue( 'insertcode' ); + * ``` + */ + + me.commands["insertcode"] = { + execCommand: function (cmd, lang) { + var me = this, + rng = me.selection.getRange(), + pre = domUtils.findParentByTagName(rng.startContainer, "pre", true); + if (pre) { + pre.className = "brush:" + lang + ";toolbar:false;"; + } else { + var code = ""; + if (rng.collapsed) { + code = browser.ie && browser.ie11below + ? browser.version <= 8 ? " " : "" + : "
              "; + } else { + var frag = rng.extractContents(); + var div = me.document.createElement("div"); + div.appendChild(frag); + + utils.each( + UE.filterNode( + UE.htmlparser(div.innerHTML.replace(/[\r\t]/g, "")), + me.options.filterTxtRules + ).children, + function (node) { + if (browser.ie && browser.ie11below && browser.version > 8) { + if (node.type == "element") { + if (node.tagName == "br") { + code += "\n"; + } else if (!dtd.$empty[node.tagName]) { + utils.each(node.children, function (cn) { + if (cn.type == "element") { + if (cn.tagName == "br") { + code += "\n"; + } else if (!dtd.$empty[node.tagName]) { + code += cn.innerText(); + } + } else { + code += cn.data; + } + }); + if (!/\n$/.test(code)) { + code += "\n"; + } + } + } else { + code += node.data + "\n"; + } + if (!node.nextSibling() && /\n$/.test(code)) { + code = code.replace(/\n$/, ""); + } + } else { + if (browser.ie && browser.ie11below) { + if (node.type == "element") { + if (node.tagName == "br") { + code += "
              "; + } else if (!dtd.$empty[node.tagName]) { + utils.each(node.children, function (cn) { + if (cn.type == "element") { + if (cn.tagName == "br") { + code += "
              "; + } else if (!dtd.$empty[node.tagName]) { + code += cn.innerText(); + } + } else { + code += cn.data; + } + }); + if (!/br>$/.test(code)) { + code += "
              "; + } + } + } else { + code += node.data + "
              "; + } + if (!node.nextSibling() && /
              $/.test(code)) { + code = code.replace(/
              $/, ""); + } + } else { + code += node.type == "element" + ? dtd.$empty[node.tagName] ? "" : node.innerText() + : node.data; + if (!/br\/?\s*>$/.test(code)) { + if (!node.nextSibling()) return; + code += "
              "; + } + } + } + } + ); + } + me.execCommand( + "inserthtml", + '
              ' +
              +                        code +
              +                        "
              ", + true + ); + + pre = me.document.getElementById("coder"); + domUtils.removeAttributes(pre, "id"); + var tmpNode = pre.previousSibling; + + if ( + tmpNode && + ((tmpNode.nodeType == 3 && + tmpNode.nodeValue.length == 1 && + browser.ie && + browser.version == 6) || + domUtils.isEmptyBlock(tmpNode)) + ) { + domUtils.remove(tmpNode); + } + var rng = me.selection.getRange(); + if (domUtils.isEmptyBlock(pre)) { + rng.setStart(pre, 0).setCursor(false, true); + } else { + rng.selectNodeContents(pre).select(); + } + } + }, + queryCommandValue: function () { + var path = this.selection.getStartElementPath(); + var lang = ""; + utils.each(path, function (node) { + if (node.nodeName == "PRE") { + var match = node.className.match(/brush:([^;]+)/); + lang = match && match[1] ? match[1] : ""; + return false; + } + }); + return lang; + } + }; + + me.addInputRule(function (root) { + utils.each(root.getNodesByTagName("pre"), function (pre) { + var brs = pre.getNodesByTagName("br"); + if (brs.length) { + browser.ie && + browser.ie11below && + browser.version > 8 && + utils.each(brs, function (br) { + var txt = UE.uNode.createText("\n"); + br.parentNode.insertBefore(txt, br); + br.parentNode.removeChild(br); + }); + return; + } + if (browser.ie && browser.ie11below && browser.version > 8) return; + var code = pre.innerText().split(/\n/); + pre.innerHTML(""); + utils.each(code, function (c) { + if (c.length) { + pre.appendChild(UE.uNode.createText(c)); + } + pre.appendChild(UE.uNode.createElement("br")); + }); + }); + }); + me.addOutputRule(function (root) { + utils.each(root.getNodesByTagName("pre"), function (pre) { + var code = ""; + utils.each(pre.children, function (n) { + if (n.type == "text") { + //在ie下文本内容有可能末尾带有\n要去掉 + //trace:3396 + code += n.data.replace(/[ ]/g, " ").replace(/\n$/, ""); + } else { + if (n.tagName == "br") { + code += "\n"; + } else { + code += !dtd.$empty[n.tagName] ? "" : n.innerText(); + } + } + }); + + pre.innerText(code.replace(/( |\n)+$/, "")); + }); + }); + //不需要判断highlight的command列表 + me.notNeedCodeQuery = { + help: 1, + undo: 1, + redo: 1, + source: 1, + print: 1, + searchreplace: 1, + fullscreen: 1, + preview: 1, + insertparagraph: 1, + elementpath: 1, + insertcode: 1, + inserthtml: 1, + selectall: 1 + }; + //将queyCommamndState重置 + var orgQuery = me.queryCommandState; + me.queryCommandState = function (cmd) { + var me = this; + + if ( + !me.notNeedCodeQuery[cmd.toLowerCase()] && + me.selection && + me.queryCommandValue("insertcode") + ) { + return -1; + } + return UE.Editor.prototype.queryCommandState.apply(this, arguments); + }; + me.addListener("beforeenterkeydown", function () { + var rng = me.selection.getRange(); + var pre = domUtils.findParentByTagName(rng.startContainer, "pre", true); + if (pre) { + me.fireEvent("saveScene"); + if (!rng.collapsed) { + rng.deleteContents(); + } + if (!browser.ie || browser.ie9above) { + var tmpNode = me.document.createElement("br"), + pre; + rng.insertNode(tmpNode).setStartAfter(tmpNode).collapse(true); + var next = tmpNode.nextSibling; + if (!next && (!browser.ie || browser.version > 10)) { + rng.insertNode(tmpNode.cloneNode(false)); + } else { + rng.setStartAfter(tmpNode); + } + pre = tmpNode.previousSibling; + var tmp; + while (pre) { + tmp = pre; + pre = pre.previousSibling; + if (!pre || pre.nodeName == "BR") { + pre = tmp; + break; + } + } + if (pre) { + var str = ""; + while ( + pre && + pre.nodeName != "BR" && + new RegExp("^[\\s" + domUtils.fillChar + "]*$").test(pre.nodeValue) + ) { + str += pre.nodeValue; + pre = pre.nextSibling; + } + if (pre.nodeName != "BR") { + var match = pre.nodeValue.match( + new RegExp("^([\\s" + domUtils.fillChar + "]+)") + ); + if (match && match[1]) { + str += match[1]; + } + } + if (str) { + str = me.document.createTextNode(str); + rng.insertNode(str).setStartAfter(str); + } + } + rng.collapse(true).select(true); + } else { + if (browser.version > 8) { + var txt = me.document.createTextNode("\n"); + var start = rng.startContainer; + if (rng.startOffset == 0) { + var preNode = start.previousSibling; + if (preNode) { + rng.insertNode(txt); + var fillchar = me.document.createTextNode(" "); + rng + .setStartAfter(txt) + .insertNode(fillchar) + .setStart(fillchar, 0) + .collapse(true) + .select(true); + } + } else { + rng.insertNode(txt).setStartAfter(txt); + var fillchar = me.document.createTextNode(" "); + start = rng.startContainer.childNodes[rng.startOffset]; + if (start && !/^\n/.test(start.nodeValue)) { + rng.setStartBefore(txt); + } + rng + .insertNode(fillchar) + .setStart(fillchar, 0) + .collapse(true) + .select(true); + } + } else { + var tmpNode = me.document.createElement("br"); + rng.insertNode(tmpNode); + rng.insertNode(me.document.createTextNode(domUtils.fillChar)); + rng.setStartAfter(tmpNode); + pre = tmpNode.previousSibling; + var tmp; + while (pre) { + tmp = pre; + pre = pre.previousSibling; + if (!pre || pre.nodeName == "BR") { + pre = tmp; + break; + } + } + if (pre) { + var str = ""; + while ( + pre && + pre.nodeName != "BR" && + new RegExp("^[ " + domUtils.fillChar + "]*$").test(pre.nodeValue) + ) { + str += pre.nodeValue; + pre = pre.nextSibling; + } + if (pre.nodeName != "BR") { + var match = pre.nodeValue.match( + new RegExp("^([ " + domUtils.fillChar + "]+)") + ); + if (match && match[1]) { + str += match[1]; + } + } + + str = me.document.createTextNode(str); + rng.insertNode(str).setStartAfter(str); + } + rng.collapse(true).select(); + } + } + me.fireEvent("saveScene"); + return true; + } + }); + + me.addListener("tabkeydown", function (cmd, evt) { + var rng = me.selection.getRange(); + var pre = domUtils.findParentByTagName(rng.startContainer, "pre", true); + if (pre) { + me.fireEvent("saveScene"); + if (evt.shiftKey) { + } else { + if (!rng.collapsed) { + var bk = rng.createBookmark(); + var start = bk.start.previousSibling; + + while (start) { + if (pre.firstChild === start && !domUtils.isBr(start)) { + pre.insertBefore(me.document.createTextNode(" "), start); + + break; + } + if (domUtils.isBr(start)) { + pre.insertBefore( + me.document.createTextNode(" "), + start.nextSibling + ); + + break; + } + start = start.previousSibling; + } + var end = bk.end; + start = bk.start.nextSibling; + if (pre.firstChild === bk.start) { + pre.insertBefore( + me.document.createTextNode(" "), + start.nextSibling + ); + } + while (start && start !== end) { + if (domUtils.isBr(start) && start.nextSibling) { + if (start.nextSibling === end) { + break; + } + pre.insertBefore( + me.document.createTextNode(" "), + start.nextSibling + ); + } + + start = start.nextSibling; + } + rng.moveToBookmark(bk).select(); + } else { + var tmpNode = me.document.createTextNode(" "); + rng + .insertNode(tmpNode) + .setStartAfter(tmpNode) + .collapse(true) + .select(true); + } + } + + me.fireEvent("saveScene"); + return true; + } + }); + + me.addListener("beforeinserthtml", function (evtName, html) { + var me = this, + rng = me.selection.getRange(), + pre = domUtils.findParentByTagName(rng.startContainer, "pre", true); + if (pre) { + if (!rng.collapsed) { + rng.deleteContents(); + } + var htmlstr = ""; + if (browser.ie && browser.version > 8) { + utils.each( + UE.filterNode(UE.htmlparser(html), me.options.filterTxtRules) + .children, + function (node) { + if (node.type == "element") { + if (node.tagName == "br") { + htmlstr += "\n"; + } else if (!dtd.$empty[node.tagName]) { + utils.each(node.children, function (cn) { + if (cn.type == "element") { + if (cn.tagName == "br") { + htmlstr += "\n"; + } else if (!dtd.$empty[node.tagName]) { + htmlstr += cn.innerText(); + } + } else { + htmlstr += cn.data; + } + }); + if (!/\n$/.test(htmlstr)) { + htmlstr += "\n"; + } + } + } else { + htmlstr += node.data + "\n"; + } + if (!node.nextSibling() && /\n$/.test(htmlstr)) { + htmlstr = htmlstr.replace(/\n$/, ""); + } + } + ); + var tmpNode = me.document.createTextNode( + utils.html(htmlstr.replace(/ /g, " ")) + ); + rng.insertNode(tmpNode).selectNode(tmpNode).select(); + } else { + var frag = me.document.createDocumentFragment(); + + utils.each( + UE.filterNode(UE.htmlparser(html), me.options.filterTxtRules) + .children, + function (node) { + if (node.type == "element") { + if (node.tagName == "br") { + frag.appendChild(me.document.createElement("br")); + } else if (!dtd.$empty[node.tagName]) { + utils.each(node.children, function (cn) { + if (cn.type == "element") { + if (cn.tagName == "br") { + frag.appendChild(me.document.createElement("br")); + } else if (!dtd.$empty[node.tagName]) { + frag.appendChild( + me.document.createTextNode( + utils.html(cn.innerText().replace(/ /g, " ")) + ) + ); + } + } else { + frag.appendChild( + me.document.createTextNode( + utils.html(cn.data.replace(/ /g, " ")) + ) + ); + } + }); + if (frag.lastChild.nodeName != "BR") { + frag.appendChild(me.document.createElement("br")); + } + } + } else { + frag.appendChild( + me.document.createTextNode( + utils.html(node.data.replace(/ /g, " ")) + ) + ); + } + if (!node.nextSibling() && frag.lastChild.nodeName == "BR") { + frag.removeChild(frag.lastChild); + } + } + ); + rng.insertNode(frag).select(); + } + + return true; + } + }); + //方向键的处理 + me.addListener("keydown", function (cmd, evt) { + var me = this, + keyCode = evt.keyCode || evt.which; + if (keyCode == 40) { + var rng = me.selection.getRange(), + pre, + start = rng.startContainer; + if ( + rng.collapsed && + (pre = domUtils.findParentByTagName(rng.startContainer, "pre", true)) && + !pre.nextSibling + ) { + var last = pre.lastChild; + while (last && last.nodeName == "BR") { + last = last.previousSibling; + } + if ( + last === start || + (rng.startContainer === pre && + rng.startOffset == pre.childNodes.length) + ) { + me.execCommand("insertparagraph"); + domUtils.preventDefault(evt); + } + } + } + }); + //trace:3395 + me.addListener("delkeydown", function (type, evt) { + var rng = this.selection.getRange(); + rng.txtToElmBoundary(true); + var start = rng.startContainer; + if ( + domUtils.isTagNode(start, "pre") && + rng.collapsed && + domUtils.isStartInblock(rng) + ) { + var p = me.document.createElement("p"); + domUtils.fillNode(me.document, p); + start.parentNode.insertBefore(p, start); + domUtils.remove(start); + rng.setStart(p, 0).setCursor(false, true); + domUtils.preventDefault(evt); + return true; + } + }); + }; + + +// plugins/cleardoc.js + /** + * 清空文档插件 + * @file + * @since 1.2.6.1 + */ + + /** + * 清空文档 + * @command cleardoc + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * //editor 是编辑器实例 + * editor.execCommand('cleardoc'); + * ``` + */ + + UE.commands["cleardoc"] = { + execCommand: function (cmdName) { + var me = this, + enterTag = me.options.enterTag, + range = me.selection.getRange(); + if (enterTag == "br") { + me.body.innerHTML = "
              "; + range.setStart(me.body, 0).setCursor(); + } else { + me.body.innerHTML = "

              " + (ie ? "" : "
              ") + "

              "; + range.setStart(me.body.firstChild, 0).setCursor(false, true); + } + setTimeout(function () { + me.fireEvent("clearDoc"); + }, 0); + } + }; + + +// plugins/anchor.js + /** + * 锚点插件,为UEditor提供插入锚点支持 + * @file + * @since 1.2.6.1 + */ + UE.plugin.register("anchor", function () { + return { + bindEvents: { + ready: function () { + utils.cssRule( + "anchor", + ".anchorclass{background: url('" + + this.options.themePath + + this.options.theme + + "/images/anchor.gif') no-repeat scroll left center transparent;cursor: auto;display: inline-block;height: 16px;width: 15px;}", + this.document + ); + } + }, + outputRule: function (root) { + utils.each(root.getNodesByTagName("img"), function (a) { + var val; + if ((val = a.getAttr("anchorname"))) { + a.tagName = "a"; + a.setAttr({ + anchorname: "", + name: val, + class: "" + }); + } + }); + }, + inputRule: function (root) { + utils.each(root.getNodesByTagName("a"), function (a) { + var val; + if ((val = a.getAttr("name")) && !a.getAttr("href")) { + //过滤掉word冗余标签 + //_Toc\d+有可能勿命中 + if (/^\_Toc\d+$/.test(val)) { + a.parentNode.removeChild(a); + return; + } + a.tagName = "img"; + a.setAttr({ + anchorname: a.getAttr("name"), + class: "anchorclass" + }); + a.setAttr("name"); + } + }); + }, + commands: { + /** + * 插入锚点 + * @command anchor + * @method execCommand + * @param { String } cmd 命令字符串 + * @param { String } name 锚点名称字符串 + * @example + * ```javascript + * //editor 是编辑器实例 + * editor.execCommand('anchor', 'anchor1'); + * ``` + */ + anchor: { + execCommand: function (cmd, name) { + var range = this.selection.getRange(), + img = range.getClosedNode(); + if (img && img.getAttribute("anchorname")) { + if (name) { + img.setAttribute("anchorname", name); + } else { + range.setStartBefore(img).setCursor(); + domUtils.remove(img); + } + } else { + if (name) { + //只在选区的开始插入 + var anchor = this.document.createElement("img"); + range.collapse(true); + domUtils.setAttributes(anchor, { + anchorname: name, + class: "anchorclass" + }); + range + .insertNode(anchor) + .setStartAfter(anchor) + .setCursor(false, true); + } + } + } + } + } + }; + }); + + +// plugins/wordcount.js +///import core +///commands 字数统计 +///commandsName WordCount,wordCount +///commandsTitle 字数统计 + /* + * Created by JetBrains WebStorm. + * User: taoqili + * Date: 11-9-7 + * Time: 下午8:18 + * To change this template use File | Settings | File Templates. + */ + + UE.plugins["wordcount"] = function () { + var me = this; + me.setOpt("wordCount", true); + me.addListener("contentchange", function () { + me.fireEvent("wordcount"); + }); + var timer; + me.addListener("ready", function () { + var me = this; + domUtils.on(me.body, "keyup", function (evt) { + var code = evt.keyCode || evt.which, + //忽略的按键,ctr,alt,shift,方向键 + ignores = { + "16": 1, + "18": 1, + "20": 1, + "37": 1, + "38": 1, + "39": 1, + "40": 1 + }; + if (code in ignores) return; + clearTimeout(timer); + timer = setTimeout(function () { + me.fireEvent("wordcount"); + }, 200); + }); + }); + }; + + +// plugins/pagebreak.js + /** + * 分页功能插件 + * @file + * @since 1.2.6.1 + */ + UE.plugins["pagebreak"] = function () { + var me = this, + notBreakTags = ["td"]; + me.setOpt("pageBreakTag", "_ueditor_page_break_tag_"); + + function fillNode(node) { + if (domUtils.isEmptyBlock(node)) { + var firstChild = node.firstChild, + tmpNode; + + while ( + firstChild && + firstChild.nodeType == 1 && + domUtils.isEmptyBlock(firstChild) + ) { + tmpNode = firstChild; + firstChild = firstChild.firstChild; + } + !tmpNode && (tmpNode = node); + domUtils.fillNode(me.document, tmpNode); + } + } + + //分页符样式添加 + + me.ready(function () { + utils.cssRule( + "pagebreak", + ".pagebreak{display:block;clear:both !important;cursor:default !important;width: 100% !important;margin:0;}", + me.document + ); + }); + + function isHr(node) { + return ( + node && + node.nodeType == 1 && + node.tagName == "HR" && + node.className == "pagebreak" + ); + } + + me.addInputRule(function (root) { + root.traversal(function (node) { + if (node.type == "text" && node.data == me.options.pageBreakTag) { + var hr = UE.uNode.createElement( + '
              ' + ); + node.parentNode.insertBefore(hr, node); + node.parentNode.removeChild(node); + } + }); + }); + me.addOutputRule(function (node) { + utils.each(node.getNodesByTagName("hr"), function (n) { + if (n.getAttr("class") == "pagebreak") { + var txt = UE.uNode.createText(me.options.pageBreakTag); + n.parentNode.insertBefore(txt, n); + n.parentNode.removeChild(n); + } + }); + }); + + /** + * 插入分页符 + * @command pagebreak + * @method execCommand + * @param { String } cmd 命令字符串 + * @remind 在表格中插入分页符会把表格切分成两部分 + * @remind 获取编辑器内的数据时, 编辑器会把分页符转换成“_ueditor_page_break_tag_”字符串, + * 以便于提交数据到服务器端后处理分页。 + * @example + * ```javascript + * editor.execCommand( 'pagebreak'); //插入一个hr标签,带有样式类名pagebreak + * ``` + */ + + me.commands["pagebreak"] = { + execCommand: function () { + var range = me.selection.getRange(), + hr = me.document.createElement("hr"); + domUtils.setAttributes(hr, { + class: "pagebreak", + noshade: "noshade", + size: "5" + }); + domUtils.unSelectable(hr); + //table单独处理 + var node = domUtils.findParentByTagName( + range.startContainer, + notBreakTags, + true + ), + parents = [], + pN; + if (node) { + switch (node.tagName) { + case "TD": + pN = node.parentNode; + if (!pN.previousSibling) { + var table = domUtils.findParentByTagName(pN, "table"); + // var tableWrapDiv = table.parentNode; + // if(tableWrapDiv && tableWrapDiv.nodeType == 1 + // && tableWrapDiv.tagName == 'DIV' + // && tableWrapDiv.getAttribute('dropdrag') + // ){ + // domUtils.remove(tableWrapDiv,true); + // } + table.parentNode.insertBefore(hr, table); + parents = domUtils.findParents(hr, true); + } else { + pN.parentNode.insertBefore(hr, pN); + parents = domUtils.findParents(hr); + } + pN = parents[1]; + if (hr !== pN) { + domUtils.breakParent(hr, pN); + } + //table要重写绑定一下拖拽 + me.fireEvent("afteradjusttable", me.document); + } + } else { + if (!range.collapsed) { + range.deleteContents(); + var start = range.startContainer; + while ( + !domUtils.isBody(start) && + domUtils.isBlockElm(start) && + domUtils.isEmptyNode(start) + ) { + range.setStartBefore(start).collapse(true); + domUtils.remove(start); + start = range.startContainer; + } + } + range.insertNode(hr); + + var pN = hr.parentNode, + nextNode; + while (!domUtils.isBody(pN)) { + domUtils.breakParent(hr, pN); + nextNode = hr.nextSibling; + if (nextNode && domUtils.isEmptyBlock(nextNode)) { + domUtils.remove(nextNode); + } + pN = hr.parentNode; + } + nextNode = hr.nextSibling; + var pre = hr.previousSibling; + if (isHr(pre)) { + domUtils.remove(pre); + } else { + pre && fillNode(pre); + } + + if (!nextNode) { + var p = me.document.createElement("p"); + + hr.parentNode.appendChild(p); + domUtils.fillNode(me.document, p); + range.setStart(p, 0).collapse(true); + } else { + if (isHr(nextNode)) { + domUtils.remove(nextNode); + } else { + fillNode(nextNode); + } + range.setEndAfter(hr).collapse(false); + } + + range.select(true); + } + } + }; + }; + + +// plugins/wordimage.js +///import core +///commands 本地图片引导上传 +///commandsName WordImage +///commandsTitle 本地图片引导上传 +///commandsDialog dialogs\wordimage + + UE.plugin.register("wordimage", function () { + var me = this, + images = []; + + this.addListener("click", function (type, evt) { + var el = evt.target || evt.srcElement; + if ('IMG' == el.tagName && el.getAttribute('data-word-image')) { + me.ui._dialogs.wordimageDialog && me.ui._dialogs.wordimageDialog.open(); + } + }); + + return { + commands: { + wordimage: { + execCommand: function () { + var images = domUtils.getElementsByTagName(me.body, "img"); + var urlList = []; + for (var i = 0, ci; (ci = images[i++]);) { + var url = ci.getAttribute("data-word-image"); + url && urlList.push(url); + } + return urlList; + }, + queryCommandState: function () { + images = domUtils.getElementsByTagName(me.body, "img"); + for (var i = 0, ci; (ci = images[i++]);) { + if (ci.getAttribute("data-word-image")) { + return 1; + } + } + return -1; + }, + notNeedUndo: true + } + }, + inputRule: function (root) { + utils.each(root.getNodesByTagName("img"), function (img) { + var attrs = img.attrs, + flag = parseInt(attrs.width) < 128 || parseInt(attrs.height) < 43, + opt = me.options, + src = opt.UEDITOR_HOME_URL + "themes/default/images/spacer.gif"; + if (attrs["src"] && /^(?:(file:\/+))/.test(attrs["src"])) { + img.setAttr({ + width: attrs.width, + height: attrs.height, + alt: attrs.alt, + 'data-word-image': attrs.src, + src: src, + style: + "background:url(" + + (flag + ? opt.themePath + opt.theme + "/images/word.gif" + : opt.langPath + opt.lang + "/images/localimage.png") + + ") no-repeat center center;border:1px solid #ddd" + }); + } + }); + } + }; + }); + + +// plugins/autosave.js + UE.plugin.register("autosave", function () { + var me = this, saveKey = null; + + function save(editor) { + var saveData; + + if (!editor.hasContents()) { + //这里不能调用命令来删除, 会造成事件死循环 + saveKey && me.removePreferences(saveKey); + return; + } + + editor._autoSaveTimer = null; + + saveData = me.body.innerHTML; + + if ( + editor.fireEvent("beforeautosave", { + content: saveData + }) === false + ) { + return; + } + + // console.log('autosave', saveKey, saveData); + me.setPreferences(saveKey, saveData); + + editor.fireEvent("afterautosave", { + content: saveData + }); + } + + return { + defaultOptions: { + autoSaveEnable: true, + autoSaveRestore: false, + autoSaveKey: null, + }, + bindEvents: { + ready: function () { + saveKey = me.getOpt('autoSaveKey'); + if (!saveKey) { + var _suffix = "_DraftsData", key = null; + + if (me.key) { + key = me.key + _suffix; + } else { + key = (me.container.parentNode.id || "ue-common") + _suffix; + } + saveKey = (location.protocol + location.host + location.pathname).replace( + /[.:\/]/g, + "_" + ) + key; + } + if (me.getOpt('autoSaveRestore')) { + var data = me.getPreferences(saveKey); + // console.log('saveKey', saveKey, data); + if (data) { + me.body.innerHTML = data; + me.fireEvent('showmessage', { + type: 'info', + content: me.getLang('autosave').autoRestoreTip + }) + } + } + // console.log('saveKey', saveKey); + }, + beforesubmit: function () { + if (!me.getOpt("autoSaveEnable") || !saveKey) { + return; + } + me.execCommand('clear_auto_save_content'); + }, + contentchange: function () { + if (!me.isReady) { + return; + } + if (!me.getOpt("autoSaveEnable") || !saveKey) { + return; + } + + if (me._autoSaveTimer) { + window.clearTimeout(me._autoSaveTimer); + } + + me._autoSaveTimer = window.setTimeout(function () { + save(me); + }, 1000); + } + }, + commands: { + clear_auto_save_content: { + execCommand: function (cmd, name) { + if (saveKey && me.getPreferences(saveKey)) { + me.removePreferences(saveKey); + } + }, + notNeedUndo: true, + ignoreContentChange: true + }, + + set_auto_save_content: { + execCommand: function (cmd, name) { + save(me); + }, + notNeedUndo: true, + ignoreContentChange: true + }, + + get_auto_save_content: { + execCommand: function (cmd, name) { + return me.getPreferences(saveKey) || ""; + }, + notNeedUndo: true, + ignoreContentChange: true + }, + + auto_save_restore: { + execCommand: function (cmd, name) { + if (saveKey) { + me.body.innerHTML = + me.getPreferences(saveKey) || "

              " + domUtils.fillHtml + "

              "; + me.focus(true); + } + }, + queryCommandState: function () { + return saveKey ? (me.getPreferences(saveKey) === null ? -1 : 0) : -1; + }, + notNeedUndo: true, + ignoreContentChange: true + } + } + }; + }); + + +// plugins/formula.js + UE.plugin.register("formula", function () { + var me = this, images = []; + + return { + commands: { + formula: { + execCommand: function (cmdName, value) { + var range = me.selection.getRange(), + img = range.getClosedNode(); + + value = encodeURIComponent(value); + var formulaConfig = me.getOpt('formulaConfig'); + var src = formulaConfig.imageUrlTemplate.replace(/\{\}/, value); + + if (img) { + img.setAttribute("src", src); + } else { + me.execCommand("insertHtml", ''); + } + }, + } + }, + }; + }); + + +// plugins/dragdrop.js + UE.plugins["dragdrop"] = function () { + var me = this; + me.ready(function () { + domUtils.on(this.body, "dragend", function () { + var rng = me.selection.getRange(); + var node = rng.getClosedNode() || me.selection.getStart(); + + if (node && node.tagName == "IMG") { + var pre = node.previousSibling, + next; + while ((next = node.nextSibling)) { + if ( + next.nodeType == 1 && + next.tagName == "SPAN" && + !next.firstChild + ) { + domUtils.remove(next); + } else { + break; + } + } + + if ( + ((pre && pre.nodeType == 1 && !domUtils.isEmptyBlock(pre)) || !pre) && + (!next || (next && !domUtils.isEmptyBlock(next))) + ) { + if (pre && pre.tagName == "P" && !domUtils.isEmptyBlock(pre)) { + pre.appendChild(node); + domUtils.moveChild(next, pre); + domUtils.remove(next); + } else if ( + next && + next.tagName == "P" && + !domUtils.isEmptyBlock(next) + ) { + next.insertBefore(node, next.firstChild); + } + + if (pre && pre.tagName == "P" && domUtils.isEmptyBlock(pre)) { + domUtils.remove(pre); + } + if (next && next.tagName == "P" && domUtils.isEmptyBlock(next)) { + domUtils.remove(next); + } + rng.selectNode(node).select(); + me.fireEvent("saveScene"); + } + } + }); + }); + me.addListener("keyup", function (type, evt) { + var keyCode = evt.keyCode || evt.which; + if (keyCode == 13) { + var rng = me.selection.getRange(), + node; + if ( + (node = domUtils.findParentByTagName(rng.startContainer, "p", true)) + ) { + if (domUtils.getComputedStyle(node, "text-align") == "center") { + domUtils.removeStyle(node, "text-align"); + } + } + } + }); + }; + + +// plugins/undo.js + /** + * undo redo + * @file + * @since 1.2.6.1 + */ + + /** + * 撤销上一次执行的命令 + * @command undo + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'undo' ); + * ``` + */ + + /** + * 重做上一次执行的命令 + * @command redo + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'redo' ); + * ``` + */ + + UE.plugins["undo"] = function () { + var saveSceneTimer; + var me = this, + maxUndoCount = me.options.maxUndoCount || 20, + maxInputCount = me.options.maxInputCount || 20, + fillchar = new RegExp(domUtils.fillChar + "|", "gi"); // ie会产生多余的 + var noNeedFillCharTags = { + ol: 1, + ul: 1, + table: 1, + tbody: 1, + tr: 1, + body: 1 + }; + var orgState = me.options.autoClearEmptyNode; + + function compareAddr(indexA, indexB) { + if (indexA.length != indexB.length) return 0; + for (var i = 0, l = indexA.length; i < l; i++) { + if (indexA[i] != indexB[i]) return 0; + } + return 1; + } + + function compareRangeAddress(rngAddrA, rngAddrB) { + if (rngAddrA.collapsed != rngAddrB.collapsed) { + return 0; + } + if ( + !compareAddr(rngAddrA.startAddress, rngAddrB.startAddress) || + !compareAddr(rngAddrA.endAddress, rngAddrB.endAddress) + ) { + return 0; + } + return 1; + } + + function UndoManager() { + this.list = []; + this.index = 0; + this.hasUndo = false; + this.hasRedo = false; + this.undo = function () { + if (this.hasUndo) { + if (!this.list[this.index - 1] && this.list.length == 1) { + this.reset(); + return; + } + while ( + this.list[this.index].content == this.list[this.index - 1].content + ) { + this.index--; + if (this.index == 0) { + return this.restore(0); + } + } + this.restore(--this.index); + } + }; + this.redo = function () { + if (this.hasRedo) { + while ( + this.list[this.index].content == this.list[this.index + 1].content + ) { + this.index++; + if (this.index == this.list.length - 1) { + return this.restore(this.index); + } + } + this.restore(++this.index); + } + }; + + this.restore = function () { + var me = this.editor; + var scene = this.list[this.index]; + var root = UE.htmlparser(scene.content.replace(fillchar, "")); + me.options.autoClearEmptyNode = false; + me.filterInputRule(root); + me.options.autoClearEmptyNode = orgState; + //trace:873 + //去掉展位符 + me.document.body.innerHTML = root.toHtml(); + me.fireEvent("afterscencerestore"); + //处理undo后空格不展位的问题 + if (browser.ie) { + utils.each( + domUtils.getElementsByTagName(me.document, "td th caption p"), + function (node) { + if (domUtils.isEmptyNode(node)) { + domUtils.fillNode(me.document, node); + } + } + ); + } + + try { + var rng = new dom.Range(me.document).moveToAddress(scene.address); + rng.select( + noNeedFillCharTags[rng.startContainer.nodeName.toLowerCase()] + ); + } catch (e) { + } + + this.update(); + this.clearKey(); + //不能把自己reset了 + me.fireEvent("reset", true); + }; + + this.getScene = function () { + var me = this.editor; + var rng = me.selection.getRange(), + rngAddress = rng.createAddress(false, true); + me.fireEvent("beforegetscene"); + var root = UE.htmlparser(me.body.innerHTML); + me.options.autoClearEmptyNode = false; + me.filterOutputRule(root); + me.options.autoClearEmptyNode = orgState; + var cont = root.toHtml(); + //trace:3461 + //这个会引起回退时导致空格丢失的情况 + // browser.ie && (cont = cont.replace(/> <').replace(/\s*\s*/g, '>')); + me.fireEvent("aftergetscene"); + + return { + address: rngAddress, + content: cont + }; + }; + this.save = function (notCompareRange, notSetCursor) { + + clearTimeout(saveSceneTimer); + var currentScene = this.getScene(notSetCursor), + lastScene = this.list[this.index]; + if (!lastScene || (lastScene && lastScene.content != currentScene.content)) { + // 使用异步避免直接在事件中取值滞后一个字符 + setTimeout(function () { + me.trigger("contentchange"); + }, 0); + } + //内容相同位置相同不存 + if ( + lastScene && + lastScene.content == currentScene.content && + (notCompareRange + ? 1 + : compareRangeAddress(lastScene.address, currentScene.address)) + ) { + return; + } + this.list = this.list.slice(0, this.index + 1); + this.list.push(currentScene); + //如果大于最大数量了,就把最前的剔除 + if (this.list.length > maxUndoCount) { + this.list.shift(); + } + this.index = this.list.length - 1; + this.clearKey(); + //跟新undo/redo状态 + this.update(); + }; + this.update = function () { + this.hasRedo = !!this.list[this.index + 1]; + this.hasUndo = !!this.list[this.index - 1]; + }; + this.reset = function () { + this.list = []; + this.index = 0; + this.hasUndo = false; + this.hasRedo = false; + this.clearKey(); + }; + this.clearKey = function () { + keycont = 0; + lastKeyCode = null; + }; + } + + me.undoManger = new UndoManager(); + me.undoManger.editor = me; + + function saveScene() { + this.undoManger.save(); + } + + me.addListener("saveScene", function () { + var args = Array.prototype.splice.call(arguments, 1); + this.undoManger.save.apply(this.undoManger, args); + }); + + // me.addListener('beforeexeccommand', saveScene); + // me.addListener('afterexeccommand', saveScene); + + me.addListener("reset", function (type, exclude) { + if (!exclude) { + this.undoManger.reset(); + } + }); + me.commands["redo"] = me.commands["undo"] = { + execCommand: function (cmdName) { + this.undoManger[cmdName](); + }, + queryCommandState: function (cmdName) { + return this.undoManger[ + "has" + (cmdName.toLowerCase() == "undo" ? "Undo" : "Redo") + ] + ? 0 + : -1; + }, + notNeedUndo: 1 + }; + + var keys = { + // /*Backspace*/ 8:1, /*Delete*/ 46:1, + /*Shift*/ 16: 1, + /*Ctrl*/ 17: 1, + /*Alt*/ 18: 1, + 37: 1, + 38: 1, + 39: 1, + 40: 1 + }, + keycont = 0, + lastKeyCode; + //输入法状态下不计算字符数 + var inputType = false; + me.addListener("ready", function () { + domUtils.on(this.body, "compositionstart", function () { + inputType = true; + }); + domUtils.on(this.body, "compositionend", function () { + inputType = false; + }); + }); + //快捷键 + me.addshortcutkey({ + Undo: "ctrl+90", //undo + Redo: "ctrl+89" //redo + }); + var isCollapsed = true; + me.addListener("keyup", function (type, evt) { + + var me = this; + var keyCode = evt.keyCode || evt.which; + if ( + !keys[keyCode] && + !evt.ctrlKey && + !evt.metaKey && + !evt.shiftKey && + !evt.altKey + ) { + if (inputType) return; + + if (!me.selection.getRange().collapsed) { + me.undoManger.save(false, true); + isCollapsed = false; + return; + } + if (me.undoManger.list.length === 0) { + me.undoManger.save(true); + } + clearTimeout(saveSceneTimer); + + function save(cont) { + cont.undoManger.save(false, true); + cont.fireEvent("selectionchange"); + } + + saveSceneTimer = setTimeout(function () { + if (inputType) { + var intervalTimer = setInterval(function () { + if (!inputType) { + save(me); + clearInterval(intervalTimer); + } + }, 300); + return; + } + save(me); + }, 200); + + lastKeyCode = keyCode; + keycont++; + if (keycont >= maxInputCount) { + save(me); + } + } + }); + me.addListener("keyup", function (type, evt) { + var keyCode = evt.keyCode || evt.which; + if ( + !keys[keyCode] && + !evt.ctrlKey && + !evt.metaKey && + !evt.shiftKey && + !evt.altKey + ) { + if (inputType) return; + if (!isCollapsed) { + this.undoManger.save(false, true); + isCollapsed = true; + } + } + }); + //扩展实例,添加关闭和开启命令undo + me.stopCmdUndo = function () { + me.__hasEnterExecCommand = true; + }; + me.startCmdUndo = function () { + me.__hasEnterExecCommand = false; + }; + }; + + +// plugins/copy.js + UE.plugin.register("copy", function () { + var me = this; + + function initZeroClipboard() { + ZeroClipboard.config({ + debug: false, + swfPath: + me.options.UEDITOR_HOME_URL + + "third-party/zeroclipboard/ZeroClipboard.swf" + }); + + var client = (me.zeroclipboard = new ZeroClipboard()); + + // 复制内容 + client.on("copy", function (e) { + var client = e.client, + rng = me.selection.getRange(), + div = document.createElement("div"); + + div.appendChild(rng.cloneContents()); + client.setText(div.innerText || div.textContent); + client.setHtml(div.innerHTML); + rng.select(); + }); + // hover事件传递到target + client.on("mouseover mouseout", function (e) { + var target = e.target; + if (target) { + if (e.type == "mouseover") { + domUtils.addClass(target, "edui-state-hover"); + } else if (e.type == "mouseout") { + domUtils.removeClasses(target, "edui-state-hover"); + } + } + }); + // flash加载不成功 + client.on("wrongflash noflash", function () { + ZeroClipboard.destroy(); + }); + + // 触发事件 + me.fireEvent("zeroclipboardready", client); + } + + return { + bindEvents: { + ready: function () { + if (!browser.ie) { + if (window.ZeroClipboard) { + initZeroClipboard(); + } else { + utils.loadFile( + document, + { + src: + me.options.UEDITOR_HOME_URL + + "third-party/zeroclipboard/ZeroClipboard.js", + tag: "script", + type: "text/javascript", + defer: "defer" + }, + function () { + initZeroClipboard(); + } + ); + } + } + } + }, + commands: { + copy: { + execCommand: function (cmd) { + if (!me.document.execCommand("copy")) { + alert(me.getLang("copymsg")); + } + } + } + } + }; + }); + + +// plugins/paste.js +///import core +///import plugins/inserthtml.js +///import plugins/undo.js +///import plugins/serialize.js +///commands 粘贴 +///commandsName PastePlain +///commandsTitle 纯文本粘贴模式 + /** + * @description 粘贴 + * @author zhanyi + */ + UE.plugins["paste"] = function () { + function getClipboardData(callback) { + var doc = this.document; + if (doc.getElementById("baidu_pastebin")) { + return; + } + var range = this.selection.getRange(), + bk = range.createBookmark(), + //创建剪贴的容器div + pastebin = doc.createElement("div"); + pastebin.id = "baidu_pastebin"; + // Safari 要求div必须有内容,才能粘贴内容进来 + browser.webkit && + pastebin.appendChild( + doc.createTextNode(domUtils.fillChar + domUtils.fillChar) + ); + doc.body.appendChild(pastebin); + //trace:717 隐藏的span不能得到top + //bk.start.innerHTML = ' '; + bk.start.style.display = ""; + pastebin.style.cssText = + "position:absolute;width:1px;height:1px;overflow:hidden;left:-1000px;white-space:nowrap;top:" + + //要在现在光标平行的位置加入,否则会出现跳动的问题 + domUtils.getXY(bk.start).y + + "px"; + + range.selectNodeContents(pastebin).select(true); + + setTimeout(function () { + if (browser.webkit) { + for ( + var i = 0, pastebins = doc.querySelectorAll("#baidu_pastebin"), pi; + (pi = pastebins[i++]); + ) { + if (domUtils.isEmptyNode(pi)) { + domUtils.remove(pi); + } else { + pastebin = pi; + break; + } + } + } + try { + pastebin.parentNode.removeChild(pastebin); + } catch (e) { + } + range.moveToBookmark(bk).select(true); + callback(pastebin); + }, 0); + } + + var me = this; + + me.setOpt({ + retainOnlyLabelPasted: false + }); + + var txtContent, htmlContent, address; + + function getPureHtml(html) { + return html.replace(/<(\/?)([\w\-]+)([^>]*)>/gi, function ( + a, + b, + tagName, + attrs + ) { + tagName = tagName.toLowerCase(); + if ({img: 1}[tagName]) { + return a; + } + attrs = attrs.replace( + /([\w\-]*?)\s*=\s*(("([^"]*)")|('([^']*)')|([^\s>]+))/gi, + function (str, atr, val) { + if ( + { + src: 1, + href: 1, + name: 1 + }[atr.toLowerCase()] + ) { + return atr + "=" + val + " "; + } + return ""; + } + ); + if ( + { + span: 1, + div: 1 + }[tagName] + ) { + return ""; + } else { + return "<" + b + tagName + " " + utils.trim(attrs) + ">"; + } + }); + } + + function filter(div) { + var html; + if (div.firstChild) { + //去掉cut中添加的边界值 + var nodes = domUtils.getElementsByTagName(div, "span"); + for (var i = 0, ni; (ni = nodes[i++]);) { + if (ni.id == "_baidu_cut_start" || ni.id == "_baidu_cut_end") { + domUtils.remove(ni); + } + } + + if (browser.webkit) { + var brs = div.querySelectorAll("div br"); + for (var i = 0, bi; (bi = brs[i++]);) { + var pN = bi.parentNode; + if (pN.tagName == "DIV" && pN.childNodes.length == 1) { + pN.innerHTML = "


              "; + domUtils.remove(pN); + } + } + var divs = div.querySelectorAll("#baidu_pastebin"); + for (var i = 0, di; (di = divs[i++]);) { + var tmpP = me.document.createElement("p"); + di.parentNode.insertBefore(tmpP, di); + while (di.firstChild) { + tmpP.appendChild(di.firstChild); + } + domUtils.remove(di); + } + + var metas = div.querySelectorAll("meta"); + for (var i = 0, ci; (ci = metas[i++]);) { + domUtils.remove(ci); + } + + var brs = div.querySelectorAll("br"); + for (i = 0; (ci = brs[i++]);) { + if (/^apple-/i.test(ci.className)) { + domUtils.remove(ci); + } + } + } + if (browser.gecko) { + var dirtyNodes = div.querySelectorAll("[_moz_dirty]"); + for (i = 0; (ci = dirtyNodes[i++]);) { + ci.removeAttribute("_moz_dirty"); + } + } + if (!browser.ie) { + var spans = div.querySelectorAll("span.Apple-style-span"); + for (var i = 0, ci; (ci = spans[i++]);) { + domUtils.remove(ci, true); + } + } + + //ie下使用innerHTML会产生多余的\r\n字符,也会产生 这里过滤掉 + html = div.innerHTML; //.replace(/>(?:(\s| )*?)<'); + + //过滤word粘贴过来的冗余属性 + html = UE.filterWord(html); + //取消了忽略空白的第二个参数,粘贴过来的有些是有空白的,会被套上相关的标签 + var root = UE.htmlparser(html); + //如果给了过滤规则就先进行过滤 + if (me.options.filterRules) { + UE.filterNode(root, me.options.filterRules); + } + //执行默认的处理 + me.filterInputRule(root); + //针对chrome的处理 + if (browser.webkit) { + var br = root.lastChild(); + if (br && br.type == "element" && br.tagName == "br") { + root.removeChild(br); + } + utils.each(me.body.querySelectorAll("div"), function (node) { + if (domUtils.isEmptyBlock(node)) { + domUtils.remove(node, true); + } + }); + } + html = {html: root.toHtml()}; + me.fireEvent("beforepaste", html, root); + //抢了默认的粘贴,那后边的内容就不执行了,比如表格粘贴 + if (!html.html) { + return; + } + root = UE.htmlparser(html.html, true); + //如果开启了纯文本模式 + if (me.queryCommandState("pasteplain") === 1) { + me.execCommand( + "insertHtml", + UE.filterNode(root, me.options.filterTxtRules).toHtml(), + true + ); + } else { + //文本模式 + UE.filterNode(root, me.options.filterTxtRules); + txtContent = root.toHtml(); + //完全模式 + htmlContent = html.html; + + address = me.selection.getRange().createAddress(true); + me.execCommand( + "insertHtml", + me.getOpt("retainOnlyLabelPasted") === true + ? getPureHtml(htmlContent) + : htmlContent, + true + ); + } + me.fireEvent("afterpaste", html); + } + } + + me.addListener("pasteTransfer", function (cmd, plainType) { + if (address && txtContent && htmlContent && txtContent != htmlContent) { + var range = me.selection.getRange(); + range.moveToAddress(address, true); + + if (!range.collapsed) { + while (!domUtils.isBody(range.startContainer)) { + var start = range.startContainer; + if (start.nodeType == 1) { + start = start.childNodes[range.startOffset]; + if (!start) { + range.setStartBefore(range.startContainer); + continue; + } + var pre = start.previousSibling; + + if ( + pre && + pre.nodeType == 3 && + new RegExp("^[\n\r\t " + domUtils.fillChar + "]*$").test( + pre.nodeValue + ) + ) { + range.setStartBefore(pre); + } + } + if (range.startOffset == 0) { + range.setStartBefore(range.startContainer); + } else { + break; + } + } + while (!domUtils.isBody(range.endContainer)) { + var end = range.endContainer; + if (end.nodeType == 1) { + end = end.childNodes[range.endOffset]; + if (!end) { + range.setEndAfter(range.endContainer); + continue; + } + var next = end.nextSibling; + if ( + next && + next.nodeType == 3 && + new RegExp("^[\n\r\t" + domUtils.fillChar + "]*$").test( + next.nodeValue + ) + ) { + range.setEndAfter(next); + } + } + if ( + range.endOffset == + range.endContainer[ + range.endContainer.nodeType == 3 ? "nodeValue" : "childNodes" + ].length + ) { + range.setEndAfter(range.endContainer); + } else { + break; + } + } + } + + range.deleteContents(); + range.select(true); + me.__hasEnterExecCommand = true; + var html = htmlContent; + if (plainType === 2) { + html = getPureHtml(html); + } else if (plainType) { + html = txtContent; + } + me.execCommand("inserthtml", html, true); + me.__hasEnterExecCommand = false; + var rng = me.selection.getRange(); + while ( + !domUtils.isBody(rng.startContainer) && + !rng.startOffset && + rng.startContainer[ + rng.startContainer.nodeType == 3 ? "nodeValue" : "childNodes" + ].length + ) { + rng.setStartBefore(rng.startContainer); + } + var tmpAddress = rng.createAddress(true); + address.endAddress = tmpAddress.startAddress; + } + }); + + me.addListener("ready", function () { + domUtils.on(me.body, "cut", function () { + var range = me.selection.getRange(); + if (!range.collapsed && me.undoManger) { + me.undoManger.save(); + } + }); + + //ie下beforepaste在点击右键时也会触发,所以用监控键盘才处理 + domUtils.on( + me.body, + browser.ie || browser.opera ? "keydown" : "paste", + function (e) { + if ( + (browser.ie || browser.opera) && + ((!e.ctrlKey && !e.metaKey) || e.keyCode != "86") + ) { + return; + } + getClipboardData.call(me, function (div) { + filter(div); + }); + } + ); + }); + + me.commands["paste"] = { + execCommand: function (cmd) { + if (browser.ie) { + getClipboardData.call(me, function (div) { + filter(div); + }); + me.document.execCommand("paste"); + } else { + alert(me.getLang("pastemsg")); + } + } + }; + }; + + +// plugins/puretxtpaste.js + /** + * 纯文本粘贴插件 + * @file + * @since 1.2.6.1 + */ + + UE.plugins["pasteplain"] = function () { + var me = this; + me.setOpt({ + pasteplain: false, + filterTxtRules: (function () { + function transP(node) { + node.tagName = "p"; + node.setStyle(); + } + + function removeNode(node) { + node.parentNode.removeChild(node, true); + } + + return { + //直接删除及其字节点内容 + "-": "script style object iframe embed input select", + p: {$: {}}, + br: {$: {}}, + div: function (node) { + var tmpNode, + p = UE.uNode.createElement("p"); + while ((tmpNode = node.firstChild())) { + if (tmpNode.type == "text" || !UE.dom.dtd.$block[tmpNode.tagName]) { + p.appendChild(tmpNode); + } else { + if (p.firstChild()) { + node.parentNode.insertBefore(p, node); + p = UE.uNode.createElement("p"); + } else { + node.parentNode.insertBefore(tmpNode, node); + } + } + } + if (p.firstChild()) { + node.parentNode.insertBefore(p, node); + } + node.parentNode.removeChild(node); + }, + ol: removeNode, + ul: removeNode, + dl: removeNode, + dt: removeNode, + dd: removeNode, + li: removeNode, + caption: transP, + th: transP, + tr: transP, + h1: transP, + h2: transP, + h3: transP, + h4: transP, + h5: transP, + h6: transP, + td: function (node) { + //没有内容的td直接删掉 + var txt = !!node.innerText(); + if (txt) { + node.parentNode.insertAfter( + UE.uNode.createText("    "), + node + ); + } + node.parentNode.removeChild(node, node.innerText()); + } + }; + })() + }); + //暂时这里支持一下老版本的属性 + var pasteplain = me.options.pasteplain; + + /** + * 启用或取消纯文本粘贴模式 + * @command pasteplain + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.queryCommandState( 'pasteplain' ); + * ``` + */ + + /** + * 查询当前是否处于纯文本粘贴模式 + * @command pasteplain + * @method queryCommandState + * @param { String } cmd 命令字符串 + * @return { int } 如果处于纯文本模式,返回1,否则,返回0 + * @example + * ```javascript + * editor.queryCommandState( 'pasteplain' ); + * ``` + */ + me.commands["pasteplain"] = { + queryCommandState: function () { + return pasteplain ? 1 : 0; + }, + execCommand: function () { + pasteplain = !pasteplain | 0; + }, + notNeedUndo: 1 + }; + }; + + +// plugins/list.js + /** + * 有序列表,无序列表插件 + * @file + * @since 1.2.6.1 + */ + + UE.plugins["list"] = function () { + var me = this, + notExchange = { + TD: 1, + PRE: 1, + BLOCKQUOTE: 1 + }; + // var customStyle = { + // cn: "cn-1-", + // cn1: "cn-2-", + // cn2: "cn-3-", + // num: "num-1-", + // num1: "num-2-", + // num2: "num-3-", + // dash: "dash", + // dot: "dot" + // }; + + me.setOpt({ + autoTransWordToList: false, + insertorderedlist: { + // num: "", + // num1: "", + // num2: "", + // cn: "", + // cn1: "", + // cn2: "", + decimal: "", + "lower-alpha": "", + "lower-roman": "", + "upper-alpha": "", + "upper-roman": "" + }, + insertunorderedlist: { + circle: "", + disc: "", + square: "", + // dash: "", + // dot: "" + }, + listDefaultPaddingLeft: "30", + listiconpath: "http://bs.baidu.com/listicon/", + maxListLevel: -1, //-1不限制 + disablePInList: false + }); + + function listToArray(list) { + var arr = []; + for (var p in list) { + arr.push(p); + } + return arr; + } + + var listStyle = { + OL: listToArray(me.options.insertorderedlist), + UL: listToArray(me.options.insertunorderedlist) + }; + var liiconpath = me.options.listiconpath; + + //根据用户配置,调整customStyle + // for (var s in customStyle) { + // if ( + // !me.options.insertorderedlist.hasOwnProperty(s) && + // !me.options.insertunorderedlist.hasOwnProperty(s) + // ) { + // delete customStyle[s]; + // } + // } + + me.ready(function () { + var customCss = []; + // for (var p in customStyle) { + // if (p == "dash" || p == "dot") { + // customCss.push( + // "li.list-" + + // customStyle[p] + + // "{background-image:url(" + + // liiconpath + + // customStyle[p] + + // ".gif)}" + // ); + // customCss.push( + // "ul.custom_" + + // p + + // "{list-style:none;}ul.custom_" + + // p + + // " li{background-position:0 3px;background-repeat:no-repeat}" + // ); + // } else { + // for (var i = 0; i < 99; i++) { + // customCss.push( + // "li.list-" + + // customStyle[p] + + // i + + // "{background-image:url(" + + // liiconpath + + // "list-" + + // customStyle[p] + + // i + + // ".gif)}" + // ); + // } + // customCss.push( + // "ol.custom_" + + // p + + // "{list-style:none;}ol.custom_" + + // p + + // " li{background-position:0 3px;background-repeat:no-repeat}" + // ); + // } + // switch (p) { + // case "cn": + // customCss.push("li.list-" + p + "-paddingleft-1{padding-left:25px}"); + // customCss.push("li.list-" + p + "-paddingleft-2{padding-left:40px}"); + // customCss.push("li.list-" + p + "-paddingleft-3{padding-left:55px}"); + // break; + // case "cn1": + // customCss.push("li.list-" + p + "-paddingleft-1{padding-left:30px}"); + // customCss.push("li.list-" + p + "-paddingleft-2{padding-left:40px}"); + // customCss.push("li.list-" + p + "-paddingleft-3{padding-left:55px}"); + // break; + // case "cn2": + // customCss.push("li.list-" + p + "-paddingleft-1{padding-left:40px}"); + // customCss.push("li.list-" + p + "-paddingleft-2{padding-left:55px}"); + // customCss.push("li.list-" + p + "-paddingleft-3{padding-left:68px}"); + // break; + // case "num": + // case "num1": + // customCss.push("li.list-" + p + "-paddingleft-1{padding-left:25px}"); + // break; + // case "num2": + // customCss.push("li.list-" + p + "-paddingleft-1{padding-left:35px}"); + // customCss.push("li.list-" + p + "-paddingleft-2{padding-left:40px}"); + // break; + // case "dash": + // customCss.push("li.list-" + p + "-paddingleft{padding-left:35px}"); + // break; + // case "dot": + // customCss.push("li.list-" + p + "-paddingleft{padding-left:20px}"); + // } + // } + customCss.push(".list-paddingleft-1{padding-left:0}"); + customCss.push( + ".list-paddingleft-2{padding-left:" + + me.options.listDefaultPaddingLeft + + "px}" + ); + customCss.push( + ".list-paddingleft-3{padding-left:" + + me.options.listDefaultPaddingLeft * 2 + + "px}" + ); + //如果不给宽度会在自定应样式里出现滚动条 + utils.cssRule( + "list", + "ol,ul{margin:0;pading:0;" + + (browser.ie ? "" : "width:95%") + + "}li{clear:both;}" + + customCss.join("\n"), + me.document + ); + }); + //单独处理剪切的问题 + me.ready(function () { + domUtils.on(me.body, "cut", function () { + setTimeout(function () { + var rng = me.selection.getRange(), + li; + //trace:3416 + if (!rng.collapsed) { + if ( + (li = domUtils.findParentByTagName(rng.startContainer, "li", true)) + ) { + if (!li.nextSibling && domUtils.isEmptyBlock(li)) { + var pn = li.parentNode, + node; + if ((node = pn.previousSibling)) { + domUtils.remove(pn); + rng.setStartAtLast(node).collapse(true); + rng.select(true); + } else if ((node = pn.nextSibling)) { + domUtils.remove(pn); + rng.setStartAtFirst(node).collapse(true); + rng.select(true); + } else { + var tmpNode = me.document.createElement("p"); + domUtils.fillNode(me.document, tmpNode); + pn.parentNode.insertBefore(tmpNode, pn); + domUtils.remove(pn); + rng.setStart(tmpNode, 0).collapse(true); + rng.select(true); + } + } + } + } + }); + }); + }); + + function getStyle(node) { + var cls = node.className; + if (domUtils.hasClass(node, /custom_/)) { + return cls.match(/custom_(\w+)/)[1]; + } + return domUtils.getStyle(node, "list-style-type"); + } + + me.addListener("beforepaste", function (type, html) { + var me = this, + rng = me.selection.getRange(), + li; + var root = UE.htmlparser(html.html, true); + if ((li = domUtils.findParentByTagName(rng.startContainer, "li", true))) { + var list = li.parentNode, + tagName = list.tagName === "OL" ? "ul" : "ol"; + utils.each(root.getNodesByTagName(tagName), function (n) { + n.tagName = list.tagName; + n.setAttr(); + if (n.parentNode === root) { + type = getStyle(list) || (list.tagName == "OL" ? "decimal" : "disc"); + } else { + var className = n.parentNode.getAttr("class"); + if (className && /custom_/.test(className)) { + type = className.match(/custom_(\w+)/)[1]; + } else { + type = n.parentNode.getStyle("list-style-type"); + } + if (!type) { + type = list.tagName === "OL" ? "decimal" : "disc"; + } + } + var index = utils.indexOf(listStyle[list.tagName], type); + if (n.parentNode !== root) + index = index + 1 === listStyle[list.tagName].length ? 0 : index + 1; + var currentStyle = listStyle[list.tagName][index]; + // if (customStyle[currentStyle]) { + // n.setAttr("class", "custom_" + currentStyle); + // } else { + n.setStyle("list-style-type", currentStyle); + // } + }); + } + + html.html = root.toHtml(); + }); + //导出时,去掉p标签 + me.getOpt("disablePInList") === true && + me.addOutputRule(function (root) { + utils.each(root.getNodesByTagName("li"), function (li) { + var newChildrens = [], + index = 0; + utils.each(li.children, function (n) { + if (n.tagName == "p") { + var tmpNode; + while ((tmpNode = n.children.pop())) { + newChildrens.splice(index, 0, tmpNode); + tmpNode.parentNode = li; + lastNode = tmpNode; + } + tmpNode = newChildrens[newChildrens.length - 1]; + if ( + !tmpNode || + tmpNode.type !== "element" || + tmpNode.tagName !== "br" + ) { + var br = UE.uNode.createElement("br"); + br.parentNode = li; + newChildrens.push(br); + } + + index = newChildrens.length; + } + }); + if (newChildrens.length) { + li.children = newChildrens; + } + }); + }); + //进入编辑器的li要套p标签 + me.addInputRule(function (root) { + utils.each(root.getNodesByTagName("li"), function (li) { + var tmpP = UE.uNode.createElement("p"); + for (var i = 0, ci; (ci = li.children[i]);) { + if (ci.type === "text" || dtd.p[ci.tagName]) { + tmpP.appendChild(ci); + } else { + if (tmpP.firstChild()) { + li.insertBefore(tmpP, ci); + tmpP = UE.uNode.createElement("p"); + i = i + 2; + } else { + i++; + } + } + } + if ((tmpP.firstChild() && !tmpP.parentNode) || !li.firstChild()) { + li.appendChild(tmpP); + } + //trace:3357 + //p不能为空 + if (!tmpP.firstChild()) { + tmpP.innerHTML(browser.ie ? " " : "
              "); + } + //去掉末尾的空白 + var p = li.firstChild(); + var lastChild = p.lastChild(); + if ( + lastChild && + lastChild.type === "text" && + /^\s*$/.test(lastChild.data) + ) { + p.removeChild(lastChild); + } + }); + if (me.options.autoTransWordToList) { + var orderlisttype = { + num1: /^\d+\)/, + decimal: /^\d+\./, + "lower-alpha": /^[a-z]+\)/, + "upper-alpha": /^[A-Z]+\./, + cn: /^[\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+[\u3001]/, + cn2: /^\([\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+\)/ + }, + unorderlisttype = { + square: "n" + }; + + function checkListType(content, container) { + var span = container.firstChild(); + if ( + span && + span.type === "element" && + span.tagName === "span" && + /Wingdings|Symbol/.test(span.getStyle("font-family")) + ) { + for (var p in unorderlisttype) { + if (unorderlisttype[p] == span.data) { + return p; + } + } + return "disc"; + } + for (var p in orderlisttype) { + if (orderlisttype[p].test(content)) { + return p; + } + } + } + + utils.each(root.getNodesByTagName("p"), function (node) { + if (node.getAttr("class") !== "MsoListParagraph") { + return; + } + + //word粘贴过来的会带有margin要去掉,但这样也可能会误命中一些央视 + node.setStyle("margin", ""); + node.setStyle("margin-left", ""); + node.setAttr("class", ""); + + function appendLi(list, p, type) { + if (list.tagName === "ol") { + if (browser.ie) { + var first = p.firstChild(); + if ( + first.type === "element" && + first.tagName === "span" && + orderlisttype[type].test(first.innerText()) + ) { + p.removeChild(first); + } + } else { + p.innerHTML(p.innerHTML().replace(orderlisttype[type], "")); + } + } else { + p.removeChild(p.firstChild()); + } + + var li = UE.uNode.createElement("li"); + li.appendChild(p); + list.appendChild(li); + } + + var tmp = node, + type, + cacheNode = node; + + if ( + node.parentNode.tagName !== "li" && + (type = checkListType(node.innerText(), node)) + ) { + var list = UE.uNode.createElement( + me.options.insertorderedlist.hasOwnProperty(type) ? "ol" : "ul" + ); + // if (customStyle[type]) { + // list.setAttr("class", "custom_" + type); + // } else { + list.setStyle("list-style-type", type); + // } + while ( + node && + node.parentNode.tagName !== "li" && + checkListType(node.innerText(), node) + ) { + tmp = node.nextSibling(); + if (!tmp) { + node.parentNode.insertBefore(list, node); + } + appendLi(list, node, type); + node = tmp; + } + if (!list.parentNode && node && node.parentNode) { + node.parentNode.insertBefore(list, node); + } + } + var span = cacheNode.firstChild(); + if ( + span && + span.type == "element" && + span.tagName == "span" && + /^\s*( )+\s*$/.test(span.innerText()) + ) { + span.parentNode.removeChild(span); + } + }); + } + }); + + //调整索引标签 + me.addListener("contentchange", function () { + adjustListStyle(me.document); + }); + + function adjustListStyle(doc, ignore) { + utils.each(domUtils.getElementsByTagName(doc, "ol ul"), function (node) { + if (!domUtils.inDoc(node, doc)) return; + + var parent = node.parentNode; + if (parent.tagName === node.tagName) { + var nodeStyleType = + getStyle(node) || (node.tagName === "OL" ? "decimal" : "disc"), + parentStyleType = + getStyle(parent) || (parent.tagName === "OL" ? "decimal" : "disc"); + if (nodeStyleType === parentStyleType) { + var styleIndex = utils.indexOf( + listStyle[node.tagName], + nodeStyleType + ); + styleIndex = styleIndex + 1 === listStyle[node.tagName].length + ? 0 + : styleIndex + 1; + setListStyle(node, listStyle[node.tagName][styleIndex]); + } + } + var index = 0, + type = 2; + if (domUtils.hasClass(node, /custom_/)) { + if ( + !( + /[ou]l/i.test(parent.tagName) && + domUtils.hasClass(parent, /custom_/) + ) + ) { + type = 1; + } + } else { + if ( + /[ou]l/i.test(parent.tagName) && + domUtils.hasClass(parent, /custom_/) + ) { + type = 3; + } + } + + var style = domUtils.getStyle(node, "list-style-type"); + style && (node.style.cssText = "list-style-type:" + style); + node.className = + utils.trim(node.className.replace(/list-paddingleft-\w+/, "")) + + " list-paddingleft-" + + type; + utils.each(domUtils.getElementsByTagName(node, "li"), function (li) { + li.style.cssText && (li.style.cssText = ""); + if (!li.firstChild) { + domUtils.remove(li); + return; + } + if (li.parentNode !== node) { + return; + } + index++; + if (domUtils.hasClass(node, /custom_/)) { + var paddingLeft = 1, + currentStyle = getStyle(node); + if (node.tagName === "OL") { + if (currentStyle) { + switch (currentStyle) { + case "cn": + case "cn1": + case "cn2": + if ( + index > 10 && + (index % 10 === 0 || (index > 10 && index < 20)) + ) { + paddingLeft = 2; + } else if (index > 20) { + paddingLeft = 3; + } + break; + case "num2": + if (index > 9) { + paddingLeft = 2; + } + } + } + li.className = + // "list-" + + // customStyle[currentStyle] + + // index + + // " " + + "list-" + + currentStyle + + "-paddingleft-" + + paddingLeft; + } else { + li.className = + // "list-" + + // customStyle[currentStyle] + + // " " + + "list-" + + currentStyle + + "-paddingleft"; + } + } else { + li.className = li.className.replace(/list-[\w\-]+/gi, ""); + } + var className = li.getAttribute("class"); + if (className !== null && !className.replace(/\s/g, "")) { + domUtils.removeAttributes(li, "class"); + } + }); + !ignore && + adjustList( + node, + node.tagName.toLowerCase(), + getStyle(node) || domUtils.getStyle(node, "list-style-type"), + true + ); + }); + } + + function adjustList(list, tag, style, ignoreEmpty) { + var nextList = list.nextSibling; + if ( + nextList && + nextList.nodeType === 1 && + nextList.tagName.toLowerCase() === tag && + (getStyle(nextList) || + domUtils.getStyle(nextList, "list-style-type") || + (tag == "ol" ? "decimal" : "disc")) == style + ) { + domUtils.moveChild(nextList, list); + if (nextList.childNodes.length === 0) { + domUtils.remove(nextList); + } + } + if (nextList && domUtils.isFillChar(nextList)) { + domUtils.remove(nextList); + } + var preList = list.previousSibling; + if ( + preList && + preList.nodeType === 1 && + preList.tagName.toLowerCase() == tag && + (getStyle(preList) || + domUtils.getStyle(preList, "list-style-type") || + (tag == "ol" ? "decimal" : "disc")) === style + ) { + domUtils.moveChild(list, preList); + } + if (preList && domUtils.isFillChar(preList)) { + domUtils.remove(preList); + } + !ignoreEmpty && domUtils.isEmptyBlock(list) && domUtils.remove(list); + if (getStyle(list)) { + adjustListStyle(list.ownerDocument, true); + } + } + + function setListStyle(list, style) { + // if (customStyle[style]) { + // list.className = "custom_" + style; + // } + try { + domUtils.setStyle(list, "list-style-type", style); + } catch (e) { + } + } + + function clearEmptySibling(node) { + var tmpNode = node.previousSibling; + if (tmpNode && domUtils.isEmptyBlock(tmpNode)) { + domUtils.remove(tmpNode); + } + tmpNode = node.nextSibling; + if (tmpNode && domUtils.isEmptyBlock(tmpNode)) { + domUtils.remove(tmpNode); + } + } + + me.addListener("keydown", function (type, evt) { + function preventAndSave() { + evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); + me.fireEvent("contentchange"); + me.undoManger && me.undoManger.save(); + } + + function findList(node, filterFn) { + while (node && !domUtils.isBody(node)) { + if (filterFn(node)) { + return null; + } + if (node.nodeType === 1 && /[ou]l/i.test(node.tagName)) { + return node; + } + node = node.parentNode; + } + return null; + } + + var keyCode = evt.keyCode || evt.which; + if (keyCode === 13 && !evt.shiftKey) { + //回车 + var rng = me.selection.getRange(), + parent = domUtils.findParent( + rng.startContainer, + function (node) { + return domUtils.isBlockElm(node); + }, + true + ), + li = domUtils.findParentByTagName(rng.startContainer, "li", true); + if (parent && parent.tagName !== "PRE" && !li) { + var html = parent.innerHTML.replace( + new RegExp(domUtils.fillChar, "g"), + "" + ); + if (/^\s*1\s*\.[^\d]/.test(html)) { + parent.innerHTML = html.replace(/^\s*1\s*\./, ""); + rng.setStartAtLast(parent).collapse(true).select(); + me.__hasEnterExecCommand = true; + me.execCommand("insertorderedlist"); + me.__hasEnterExecCommand = false; + } + } + var range = me.selection.getRange(), + start = findList(range.startContainer, function (node) { + return node.tagName === "TABLE"; + }), + end = range.collapsed + ? start + : findList(range.endContainer, function (node) { + return node.tagName === "TABLE"; + }); + + if (start && end && start === end) { + if (!range.collapsed) { + start = domUtils.findParentByTagName( + range.startContainer, + "li", + true + ); + end = domUtils.findParentByTagName(range.endContainer, "li", true); + if (start && end && start === end) { + range.deleteContents(); + li = domUtils.findParentByTagName(range.startContainer, "li", true); + if (li && domUtils.isEmptyBlock(li)) { + pre = li.previousSibling; + next = li.nextSibling; + p = me.document.createElement("p"); + + domUtils.fillNode(me.document, p); + parentList = li.parentNode; + if (pre && next) { + range.setStart(next, 0).collapse(true).select(true); + domUtils.remove(li); + } else { + if ((!pre && !next) || !pre) { + parentList.parentNode.insertBefore(p, parentList); + } else { + li.parentNode.parentNode.insertBefore( + p, + parentList.nextSibling + ); + } + domUtils.remove(li); + if (!parentList.firstChild) { + domUtils.remove(parentList); + } + range.setStart(p, 0).setCursor(); + } + preventAndSave(); + return; + } + } else { + var tmpRange = range.cloneRange(), + bk = tmpRange.collapse(false).createBookmark(); + + range.deleteContents(); + tmpRange.moveToBookmark(bk); + var li = domUtils.findParentByTagName( + tmpRange.startContainer, + "li", + true + ); + + clearEmptySibling(li); + tmpRange.select(); + preventAndSave(); + return; + } + } + + li = domUtils.findParentByTagName(range.startContainer, "li", true); + + if (li) { + if (domUtils.isEmptyBlock(li)) { + bk = range.createBookmark(); + var parentList = li.parentNode; + if (li !== parentList.lastChild) { + domUtils.breakParent(li, parentList); + clearEmptySibling(li); + } else { + parentList.parentNode.insertBefore(li, parentList.nextSibling); + if (domUtils.isEmptyNode(parentList)) { + domUtils.remove(parentList); + } + } + //嵌套不处理 + if (!dtd.$list[li.parentNode.tagName]) { + if (!domUtils.isBlockElm(li.firstChild)) { + p = me.document.createElement("p"); + li.parentNode.insertBefore(p, li); + while (li.firstChild) { + p.appendChild(li.firstChild); + } + domUtils.remove(li); + } else { + domUtils.remove(li, true); + } + } + range.moveToBookmark(bk).select(); + } else { + var first = li.firstChild; + if (!first || !domUtils.isBlockElm(first)) { + var p = me.document.createElement("p"); + + !li.firstChild && domUtils.fillNode(me.document, p); + while (li.firstChild) { + p.appendChild(li.firstChild); + } + li.appendChild(p); + first = p; + } + + var span = me.document.createElement("span"); + + range.insertNode(span); + domUtils.breakParent(span, li); + + var nextLi = span.nextSibling; + first = nextLi.firstChild; + + if (!first) { + p = me.document.createElement("p"); + + domUtils.fillNode(me.document, p); + nextLi.appendChild(p); + first = p; + } + if (domUtils.isEmptyNode(first)) { + first.innerHTML = ""; + domUtils.fillNode(me.document, first); + } + + range.setStart(first, 0).collapse(true).shrinkBoundary().select(); + domUtils.remove(span); + var pre = nextLi.previousSibling; + if (pre && domUtils.isEmptyBlock(pre)) { + pre.innerHTML = "

              "; + domUtils.fillNode(me.document, pre.firstChild); + } + } + // } + preventAndSave(); + } + } + } + if (keyCode === 8) { + //修中ie中li下的问题 + range = me.selection.getRange(); + if (range.collapsed && domUtils.isStartInblock(range)) { + tmpRange = range.cloneRange().trimBoundary(); + li = domUtils.findParentByTagName(range.startContainer, "li", true); + //要在li的最左边,才能处理 + if (li && domUtils.isStartInblock(tmpRange)) { + start = domUtils.findParentByTagName(range.startContainer, "p", true); + if (start && start !== li.firstChild) { + var parentList = domUtils.findParentByTagName(start, ["ol", "ul"]); + domUtils.breakParent(start, parentList); + clearEmptySibling(start); + me.fireEvent("contentchange"); + range.setStart(start, 0).setCursor(false, true); + me.fireEvent("saveScene"); + domUtils.preventDefault(evt); + return; + } + + if (li && (pre = li.previousSibling)) { + if (keyCode === 46 && li.childNodes.length) { + return; + } + //有可能上边的兄弟节点是个2级菜单,要追加到2级菜单的最后的li + if (dtd.$list[pre.tagName]) { + pre = pre.lastChild; + } + me.undoManger && me.undoManger.save(); + first = li.firstChild; + if (domUtils.isBlockElm(first)) { + if (domUtils.isEmptyNode(first)) { + // range.setEnd(pre, pre.childNodes.length).shrinkBoundary().collapse().select(true); + pre.appendChild(first); + range.setStart(first, 0).setCursor(false, true); + //first不是唯一的节点 + while (li.firstChild) { + pre.appendChild(li.firstChild); + } + } else { + span = me.document.createElement("span"); + range.insertNode(span); + //判断pre是否是空的节点,如果是


              类型的空节点,干掉p标签防止它占位 + if (domUtils.isEmptyBlock(pre)) { + pre.innerHTML = ""; + } + domUtils.moveChild(li, pre); + range.setStartBefore(span).collapse(true).select(true); + + domUtils.remove(span); + } + } else { + if (domUtils.isEmptyNode(li)) { + var p = me.document.createElement("p"); + pre.appendChild(p); + range.setStart(p, 0).setCursor(); + // range.setEnd(pre, pre.childNodes.length).shrinkBoundary().collapse().select(true); + } else { + range + .setEnd(pre, pre.childNodes.length) + .collapse() + .select(true); + while (li.firstChild) { + pre.appendChild(li.firstChild); + } + } + } + domUtils.remove(li); + me.fireEvent("contentchange"); + me.fireEvent("saveScene"); + domUtils.preventDefault(evt); + return; + } + //trace:980 + + if (li && !li.previousSibling) { + var parentList = li.parentNode; + var bk = range.createBookmark(); + if (domUtils.isTagNode(parentList.parentNode, "ol ul")) { + parentList.parentNode.insertBefore(li, parentList); + if (domUtils.isEmptyNode(parentList)) { + domUtils.remove(parentList); + } + } else { + while (li.firstChild) { + parentList.parentNode.insertBefore(li.firstChild, parentList); + } + + domUtils.remove(li); + if (domUtils.isEmptyNode(parentList)) { + domUtils.remove(parentList); + } + } + range.moveToBookmark(bk).setCursor(false, true); + me.fireEvent("contentchange"); + me.fireEvent("saveScene"); + domUtils.preventDefault(evt); + return; + } + } + } + } + }); + + me.addListener("keyup", function (type, evt) { + var keyCode = evt.keyCode || evt.which; + if (keyCode == 8) { + var rng = me.selection.getRange(), + list; + if ( + (list = domUtils.findParentByTagName( + rng.startContainer, + ["ol", "ul"], + true + )) + ) { + adjustList( + list, + list.tagName.toLowerCase(), + getStyle(list) || domUtils.getComputedStyle(list, "list-style-type"), + true + ); + } + } + }); + //处理tab键 + me.addListener("tabkeydown", function () { + var range = me.selection.getRange(); + + //控制级数 + function checkLevel(li) { + if (me.options.maxListLevel != -1) { + var level = li.parentNode, + levelNum = 0; + while (/[ou]l/i.test(level.tagName)) { + levelNum++; + level = level.parentNode; + } + if (levelNum >= me.options.maxListLevel) { + return true; + } + } + } + + //只以开始为准 + //todo 后续改进 + var li = domUtils.findParentByTagName(range.startContainer, "li", true); + if (li) { + var bk; + if (range.collapsed) { + if (checkLevel(li)) return true; + var parentLi = li.parentNode, + list = me.document.createElement(parentLi.tagName), + index = utils.indexOf( + listStyle[list.tagName], + getStyle(parentLi) || + domUtils.getComputedStyle(parentLi, "list-style-type") + ); + index = index + 1 == listStyle[list.tagName].length ? 0 : index + 1; + var currentStyle = listStyle[list.tagName][index]; + setListStyle(list, currentStyle); + if (domUtils.isStartInblock(range)) { + me.fireEvent("saveScene"); + bk = range.createBookmark(); + parentLi.insertBefore(list, li); + list.appendChild(li); + adjustList(list, list.tagName.toLowerCase(), currentStyle); + me.fireEvent("contentchange"); + range.moveToBookmark(bk).select(true); + return true; + } + } else { + me.fireEvent("saveScene"); + bk = range.createBookmark(); + for ( + var i = 0, closeList, parents = domUtils.findParents(li), ci; + (ci = parents[i++]); + ) { + if (domUtils.isTagNode(ci, "ol ul")) { + closeList = ci; + break; + } + } + var current = li; + if (bk.end) { + while ( + current && + !( + domUtils.getPosition(current, bk.end) & + domUtils.POSITION_FOLLOWING + ) + ) { + if (checkLevel(current)) { + current = domUtils.getNextDomNode(current, false, null, function ( + node + ) { + return node !== closeList; + }); + continue; + } + var parentLi = current.parentNode, + list = me.document.createElement(parentLi.tagName), + index = utils.indexOf( + listStyle[list.tagName], + getStyle(parentLi) || + domUtils.getComputedStyle(parentLi, "list-style-type") + ); + var currentIndex = index + 1 == listStyle[list.tagName].length + ? 0 + : index + 1; + var currentStyle = listStyle[list.tagName][currentIndex]; + setListStyle(list, currentStyle); + parentLi.insertBefore(list, current); + while ( + current && + !( + domUtils.getPosition(current, bk.end) & + domUtils.POSITION_FOLLOWING + ) + ) { + li = current.nextSibling; + list.appendChild(current); + if (!li || domUtils.isTagNode(li, "ol ul")) { + if (li) { + while ((li = li.firstChild)) { + if (li.tagName == "LI") { + break; + } + } + } else { + li = domUtils.getNextDomNode(current, false, null, function ( + node + ) { + return node !== closeList; + }); + } + break; + } + current = li; + } + adjustList(list, list.tagName.toLowerCase(), currentStyle); + current = li; + } + } + me.fireEvent("contentchange"); + range.moveToBookmark(bk).select(); + return true; + } + } + }); + + function getLi(start) { + while (start && !domUtils.isBody(start)) { + if (start.nodeName == "TABLE") { + return null; + } + if (start.nodeName == "LI") { + return start; + } + start = start.parentNode; + } + } + + /** + * 有序列表,与“insertunorderedlist”命令互斥 + * @command insertorderedlist + * @method execCommand + * @param { String } command 命令字符串 + * @param { String } style 插入的有序列表类型,值为:decimal,lower-alpha,lower-roman,upper-alpha,upper-roman,cn,cn1,cn2,num,num1,num2 + * @example + * ```javascript + * editor.execCommand( 'insertorderedlist','decimal'); + * ``` + */ + /** + * 查询当前选区内容是否有序列表 + * @command insertorderedlist + * @method queryCommandState + * @param { String } cmd 命令字符串 + * @return { int } 如果当前选区是有序列表返回1,否则返回0 + * @example + * ```javascript + * editor.queryCommandState( 'insertorderedlist' ); + * ``` + */ + /** + * 查询当前选区内容是否有序列表 + * @command insertorderedlist + * @method queryCommandValue + * @param { String } cmd 命令字符串 + * @return { String } 返回当前有序列表的类型,值为null或decimal,lower-alpha,lower-roman,upper-alpha,upper-roman,cn,cn1,cn2,num,num1,num2 + * @example + * ```javascript + * editor.queryCommandValue( 'insertorderedlist' ); + * ``` + */ + + /** + * 无序列表,与“insertorderedlist”命令互斥 + * @command insertunorderedlist + * @method execCommand + * @param { String } command 命令字符串 + * @param { String } style 插入的无序列表类型,值为:circle,disc,square,dash,dot + * @example + * ```javascript + * editor.execCommand( 'insertunorderedlist','circle'); + * ``` + */ + /** + * 查询当前是否有word文档粘贴进来的图片 + * @command insertunorderedlist + * @method insertunorderedlist + * @param { String } command 命令字符串 + * @return { int } 如果当前选区是无序列表返回1,否则返回0 + * @example + * ```javascript + * editor.queryCommandState( 'insertunorderedlist' ); + * ``` + */ + /** + * 查询当前选区内容是否有序列表 + * @command insertunorderedlist + * @method queryCommandValue + * @param { String } command 命令字符串 + * @return { String } 返回当前无序列表的类型,值为null或circle,disc,square,dash,dot + * @example + * ```javascript + * editor.queryCommandValue( 'insertunorderedlist' ); + * ``` + */ + + me.commands["insertorderedlist"] = me.commands["insertunorderedlist"] = { + execCommand: function (command, style) { + if (!style) { + style = command.toLowerCase() == "insertorderedlist" + ? "decimal" + : "disc"; + } + var me = this, + range = this.selection.getRange(), + filterFn = function (node) { + return node.nodeType == 1 + ? node.tagName.toLowerCase() != "br" + : !domUtils.isWhitespace(node); + }, + tag = command.toLowerCase() == "insertorderedlist" ? "ol" : "ul", + frag = me.document.createDocumentFragment(); + //去掉是因为会出现选到末尾,导致adjustmentBoundary缩到ol/ul的位置 + //range.shrinkBoundary();//.adjustmentBoundary(); + range.adjustmentBoundary().shrinkBoundary(); + var bko = range.createBookmark(true), + start = getLi(me.document.getElementById(bko.start)), + modifyStart = 0, + end = getLi(me.document.getElementById(bko.end)), + modifyEnd = 0, + startParent, + endParent, + list, + tmp; + + if (start || end) { + start && (startParent = start.parentNode); + if (!bko.end) { + end = start; + } + end && (endParent = end.parentNode); + + if (startParent === endParent) { + while (start !== end) { + tmp = start; + start = start.nextSibling; + if (!domUtils.isBlockElm(tmp.firstChild)) { + var p = me.document.createElement("p"); + while (tmp.firstChild) { + p.appendChild(tmp.firstChild); + } + tmp.appendChild(p); + } + frag.appendChild(tmp); + } + tmp = me.document.createElement("span"); + startParent.insertBefore(tmp, end); + if (!domUtils.isBlockElm(end.firstChild)) { + p = me.document.createElement("p"); + while (end.firstChild) { + p.appendChild(end.firstChild); + } + end.appendChild(p); + } + frag.appendChild(end); + domUtils.breakParent(tmp, startParent); + if (domUtils.isEmptyNode(tmp.previousSibling)) { + domUtils.remove(tmp.previousSibling); + } + if (domUtils.isEmptyNode(tmp.nextSibling)) { + domUtils.remove(tmp.nextSibling); + } + var nodeStyle = + getStyle(startParent) || + domUtils.getComputedStyle(startParent, "list-style-type") || + (command.toLowerCase() == "insertorderedlist" ? "decimal" : "disc"); + if (startParent.tagName.toLowerCase() == tag && nodeStyle == style) { + for ( + var i = 0, ci, tmpFrag = me.document.createDocumentFragment(); + (ci = frag.firstChild); + ) { + if (domUtils.isTagNode(ci, "ol ul")) { + // 删除时,子列表不处理 + // utils.each(domUtils.getElementsByTagName(ci,'li'),function(li){ + // while(li.firstChild){ + // tmpFrag.appendChild(li.firstChild); + // } + // + // }); + tmpFrag.appendChild(ci); + } else { + while (ci.firstChild) { + tmpFrag.appendChild(ci.firstChild); + domUtils.remove(ci); + } + } + } + tmp.parentNode.insertBefore(tmpFrag, tmp); + } else { + list = me.document.createElement(tag); + setListStyle(list, style); + list.appendChild(frag); + tmp.parentNode.insertBefore(list, tmp); + } + + domUtils.remove(tmp); + list && adjustList(list, tag, style); + range.moveToBookmark(bko).select(); + return; + } + //开始 + if (start) { + while (start) { + tmp = start.nextSibling; + if (domUtils.isTagNode(start, "ol ul")) { + frag.appendChild(start); + } else { + var tmpfrag = me.document.createDocumentFragment(), + hasBlock = 0; + while (start.firstChild) { + if (domUtils.isBlockElm(start.firstChild)) { + hasBlock = 1; + } + tmpfrag.appendChild(start.firstChild); + } + if (!hasBlock) { + var tmpP = me.document.createElement("p"); + tmpP.appendChild(tmpfrag); + frag.appendChild(tmpP); + } else { + frag.appendChild(tmpfrag); + } + domUtils.remove(start); + } + + start = tmp; + } + startParent.parentNode.insertBefore(frag, startParent.nextSibling); + if (domUtils.isEmptyNode(startParent)) { + range.setStartBefore(startParent); + domUtils.remove(startParent); + } else { + range.setStartAfter(startParent); + } + modifyStart = 1; + } + + if (end && domUtils.inDoc(endParent, me.document)) { + //结束 + start = endParent.firstChild; + while (start && start !== end) { + tmp = start.nextSibling; + if (domUtils.isTagNode(start, "ol ul")) { + frag.appendChild(start); + } else { + tmpfrag = me.document.createDocumentFragment(); + hasBlock = 0; + while (start.firstChild) { + if (domUtils.isBlockElm(start.firstChild)) { + hasBlock = 1; + } + tmpfrag.appendChild(start.firstChild); + } + if (!hasBlock) { + tmpP = me.document.createElement("p"); + tmpP.appendChild(tmpfrag); + frag.appendChild(tmpP); + } else { + frag.appendChild(tmpfrag); + } + domUtils.remove(start); + } + start = tmp; + } + var tmpDiv = domUtils.createElement(me.document, "div", { + tmpDiv: 1 + }); + domUtils.moveChild(end, tmpDiv); + + frag.appendChild(tmpDiv); + domUtils.remove(end); + endParent.parentNode.insertBefore(frag, endParent); + range.setEndBefore(endParent); + if (domUtils.isEmptyNode(endParent)) { + domUtils.remove(endParent); + } + + modifyEnd = 1; + } + } + + if (!modifyStart) { + range.setStartBefore(me.document.getElementById(bko.start)); + } + if (bko.end && !modifyEnd) { + range.setEndAfter(me.document.getElementById(bko.end)); + } + range.enlarge(true, function (node) { + return notExchange[node.tagName]; + }); + + frag = me.document.createDocumentFragment(); + + var bk = range.createBookmark(), + current = domUtils.getNextDomNode(bk.start, false, filterFn), + tmpRange = range.cloneRange(), + tmpNode, + block = domUtils.isBlockElm; + + while ( + current && + current !== bk.end && + domUtils.getPosition(current, bk.end) & domUtils.POSITION_PRECEDING + ) { + if (current.nodeType == 3 || dtd.li[current.tagName]) { + if (current.nodeType == 1 && dtd.$list[current.tagName]) { + while (current.firstChild) { + frag.appendChild(current.firstChild); + } + tmpNode = domUtils.getNextDomNode(current, false, filterFn); + domUtils.remove(current); + current = tmpNode; + continue; + } + tmpNode = current; + tmpRange.setStartBefore(current); + + while ( + current && + current !== bk.end && + (!block(current) || domUtils.isBookmarkNode(current)) + ) { + tmpNode = current; + current = domUtils.getNextDomNode(current, false, null, function ( + node + ) { + return !notExchange[node.tagName]; + }); + } + + if (current && block(current)) { + tmp = domUtils.getNextDomNode(tmpNode, false, filterFn); + if (tmp && domUtils.isBookmarkNode(tmp)) { + current = domUtils.getNextDomNode(tmp, false, filterFn); + tmpNode = tmp; + } + } + tmpRange.setEndAfter(tmpNode); + + current = domUtils.getNextDomNode(tmpNode, false, filterFn); + + var li = range.document.createElement("li"); + + li.appendChild(tmpRange.extractContents()); + if (domUtils.isEmptyNode(li)) { + var tmpNode = range.document.createElement("p"); + while (li.firstChild) { + tmpNode.appendChild(li.firstChild); + } + li.appendChild(tmpNode); + } + frag.appendChild(li); + } else { + current = domUtils.getNextDomNode(current, true, filterFn); + } + } + range.moveToBookmark(bk).collapse(true); + list = me.document.createElement(tag); + setListStyle(list, style); + list.appendChild(frag); + range.insertNode(list); + //当前list上下看能否合并 + adjustList(list, tag, style); + //去掉冗余的tmpDiv + for ( + var i = 0, ci, tmpDivs = domUtils.getElementsByTagName(list, "div"); + (ci = tmpDivs[i++]); + ) { + if (ci.getAttribute("tmpDiv")) { + domUtils.remove(ci, true); + } + } + range.moveToBookmark(bko).select(); + }, + queryCommandState: function (command) { + var tag = command.toLowerCase() == "insertorderedlist" ? "ol" : "ul"; + var path = this.selection.getStartElementPath(); + for (var i = 0, ci; (ci = path[i++]);) { + if (ci.nodeName == "TABLE") { + return 0; + } + if (tag == ci.nodeName.toLowerCase()) { + return 1; + } + } + return 0; + }, + queryCommandValue: function (command) { + var tag = command.toLowerCase() == "insertorderedlist" ? "ol" : "ul"; + var path = this.selection.getStartElementPath(), + node; + for (var i = 0, ci; (ci = path[i++]);) { + if (ci.nodeName == "TABLE") { + node = null; + break; + } + if (tag == ci.nodeName.toLowerCase()) { + node = ci; + break; + } + } + return node + ? getStyle(node) || domUtils.getComputedStyle(node, "list-style-type") + : null; + } + }; + }; + + +// plugins/source.js + /** + * 源码编辑插件 + * @file + * @since 1.2.6.1 + */ + + (function () { + var sourceEditors = { + textarea: function (editor, holder) { + var textarea = holder.ownerDocument.createElement("textarea"); + textarea.style.cssText = + "position:absolute;resize:none;width:100%;height:100%;border:0;padding:0;margin:0;overflow-y:auto;"; + // todo: IE下只有onresize属性可用... 很纠结 + if (browser.ie && browser.version < 8) { + textarea.style.width = holder.offsetWidth + "px"; + textarea.style.height = holder.offsetHeight + "px"; + holder.onresize = function () { + textarea.style.width = holder.offsetWidth + "px"; + textarea.style.height = holder.offsetHeight + "px"; + }; + } + holder.appendChild(textarea); + return { + setContent: function (content) { + textarea.value = content; + }, + getContent: function () { + return textarea.value; + }, + select: function () { + var range; + if (browser.ie) { + range = textarea.createTextRange(); + range.collapse(true); + range.select(); + } else { + //todo: chrome下无法设置焦点 + textarea.setSelectionRange(0, 0); + textarea.focus(); + } + }, + dispose: function () { + holder.removeChild(textarea); + // todo + holder.onresize = null; + textarea = null; + holder = null; + }, + focus: function () { + textarea.focus(); + }, + blur: function () { + textarea.blur(); + } + }; + }, + codemirror: function (editor, holder) { + var codeEditor = window.CodeMirror(holder, { + mode: "text/html", + tabMode: "indent", + lineNumbers: true, + lineWrapping: true, + onChange: function (v) { + editor.sync(); + editor.fireEvent("contentchange"); + // console.log('CodeMirror.onChange',v.getValue()); + } + }); + // console.log('sourceEditor',codeEditor); + var dom = codeEditor.getWrapperElement(); + dom.style.cssText = + 'position:absolute;left:0;top:0;width:100%;height:100%;font-family:consolas,"Courier new",monospace;font-size:13px;'; + codeEditor.getScrollerElement().style.cssText = + "position:absolute;left:0;top:0;width:100%;height:100%;"; + codeEditor.refresh(); + return { + getCodeMirror: function () { + return codeEditor; + }, + setContent: function (content) { + codeEditor.setValue(content); + }, + getContent: function () { + return codeEditor.getValue(); + }, + select: function () { + codeEditor.focus(); + }, + dispose: function () { + holder.removeChild(dom); + dom = null; + codeEditor = null; + }, + focus: function () { + codeEditor.focus(); + }, + blur: function () { + // codeEditor.blur(); + // since codemirror not support blur() + codeEditor.setOption('readOnly', true); + codeEditor.setOption('readOnly', false); + } + }; + } + }; + + UE.plugins["source"] = function () { + var me = this; + var opt = this.options; + var sourceMode = false; + var sourceEditor; + var orgSetContent; + var orgFocus; + var orgBlur; + opt.sourceEditor = browser.ie + ? "textarea" + : opt.sourceEditor || "codemirror"; + + me.setOpt({ + sourceEditorFirst: false + }); + + function createSourceEditor(holder) { + return sourceEditors[ + opt.sourceEditor == "codemirror" && window.CodeMirror + ? "codemirror" + : "textarea" + ](me, holder); + } + + var bakCssText; + //解决在源码模式下getContent不能得到最新的内容问题 + var oldGetContent, bakAddress; + + /** + * 切换源码模式和编辑模式 + * @command source + * @method execCommand + * @param { String } cmd 命令字符串 + * @example + * ```javascript + * editor.execCommand( 'source'); + * ``` + */ + + /** + * 查询当前编辑区域的状态是源码模式还是可视化模式 + * @command source + * @method queryCommandState + * @param { String } cmd 命令字符串 + * @return { int } 如果当前是源码编辑模式,返回1,否则返回0 + * @example + * ```javascript + * editor.queryCommandState( 'source' ); + * ``` + */ + + me.commands["source"] = { + execCommand: function () { + sourceMode = !sourceMode; + if (sourceMode) { + bakAddress = me.selection.getRange().createAddress(false, true); + me.undoManger && me.undoManger.save(true); + if (browser.gecko) { + me.body.contentEditable = false; + } + + bakCssText = me.iframe.style.cssText; + me.iframe.style.cssText += + "position:absolute;left:-32768px;top:-32768px;"; + + me.fireEvent("beforegetcontent"); + var root = UE.htmlparser(me.body.innerHTML); + me.filterOutputRule(root); + root.traversal(function (node) { + if (node.type == "element") { + switch (node.tagName) { + case "td": + case "th": + case "caption": + if (node.children && node.children.length == 1) { + if (node.firstChild().tagName == "br") { + node.removeChild(node.firstChild()); + } + } + break; + case "pre": + node.innerText(node.innerText().replace(/ /g, " ")); + } + } + }); + + me.fireEvent("aftergetcontent"); + + var content = root.toHtml(true); + + sourceEditor = createSourceEditor(me.iframe.parentNode); + + sourceEditor.setContent(content); + + orgSetContent = me.setContent; + + me.setContent = function (html) { + //这里暂时不触发事件,防止报错 + var root = UE.htmlparser(html); + me.filterInputRule(root); + html = root.toHtml(); + sourceEditor.setContent(html); + }; + + setTimeout(function () { + sourceEditor.select(); + me.addListener("fullscreenchanged", function () { + try { + sourceEditor.getCodeMirror().refresh(); + } catch (e) { + } + }); + }); + + //重置getContent,源码模式下取值也能是最新的数据 + oldGetContent = me.getContent; + me.getContent = function () { + return ( + sourceEditor.getContent() || + "

              " + (browser.ie ? "" : "
              ") + "

              " + ); + }; + + orgFocus = me.focus; + orgBlur = me.blur; + + me.focus = function () { + sourceEditor.focus(); + }; + + me.blur = function () { + orgBlur.call(me); + sourceEditor.blur(); + }; + } else { + me.iframe.style.cssText = bakCssText; + var cont = + sourceEditor.getContent() || + "

              " + (browser.ie ? "" : "
              ") + "

              "; + //处理掉block节点前后的空格,有可能会误命中,暂时不考虑 + cont = cont.replace( + new RegExp("[\\r\\t\\n ]*]*)>", "g"), + function (a, b) { + if (b && !dtd.$inlineWithA[b.toLowerCase()]) { + return a.replace(/(^[\n\r\t ]*)|([\n\r\t ]*$)/g, ""); + } + return a.replace(/(^[\n\r\t]*)|([\n\r\t]*$)/g, ""); + } + ); + + me.setContent = orgSetContent; + + me.setContent(cont); + sourceEditor.dispose(); + sourceEditor = null; + //还原getContent方法 + me.getContent = oldGetContent; + + me.focus = orgFocus; + me.blur = orgBlur; + + var first = me.body.firstChild; + //trace:1106 都删除空了,下边会报错,所以补充一个p占位 + if (!first) { + me.body.innerHTML = "

              " + (browser.ie ? "" : "
              ") + "

              "; + first = me.body.firstChild; + } + + //要在ifm为显示时ff才能取到selection,否则报错 + //这里不能比较位置了 + me.undoManger && me.undoManger.save(true); + + if (browser.gecko) { + var input = document.createElement("input"); + input.style.cssText = "position:absolute;left:0;top:-32768px"; + + document.body.appendChild(input); + + me.body.contentEditable = false; + setTimeout(function () { + domUtils.setViewportOffset(input, {left: -32768, top: 0}); + input.focus(); + setTimeout(function () { + me.body.contentEditable = true; + me.selection.getRange().moveToAddress(bakAddress).select(true); + domUtils.remove(input); + }); + }); + } else { + //ie下有可能报错,比如在代码顶头的情况 + try { + me.selection.getRange().moveToAddress(bakAddress).select(true); + } catch (e) { + } + } + } + this.fireEvent("sourcemodechanged", sourceMode); + }, + queryCommandState: function () { + return sourceMode | 0; + }, + notNeedUndo: 1 + }; + var oldQueryCommandState = me.queryCommandState; + + me.queryCommandState = function (cmdName) { + cmdName = cmdName.toLowerCase(); + if (sourceMode) { + //源码模式下可以开启的命令 + return cmdName in + { + source: 1, + fullscreen: 1 + } + ? 1 + : -1; + } + return oldQueryCommandState.apply(this, arguments); + }; + + if (opt.sourceEditor == "codemirror") { + me.addListener("ready", function () { + utils.loadFile( + document, + { + src: + opt.codeMirrorJsUrl || + opt.UEDITOR_HOME_URL + "third-party/codemirror/codemirror.js", + tag: "script", + type: "text/javascript", + defer: "defer" + }, + function () { + if (opt.sourceEditorFirst) { + setTimeout(function () { + me.execCommand("source"); + }, 0); + } + } + ); + utils.loadFile(document, { + tag: "link", + rel: "stylesheet", + type: "text/css", + href: + opt.codeMirrorCssUrl || + opt.UEDITOR_HOME_URL + "third-party/codemirror/codemirror.css?221123" + }); + }); + } + }; + })(); + + +// plugins/enterkey.js +///import core +///import plugins/undo.js +///commands 设置回车标签p或br +///commandsName EnterKey +///commandsTitle 设置回车标签p或br + /** + * @description 处理回车 + * @author zhanyi + */ + UE.plugins["enterkey"] = function () { + var hTag, + me = this, + tag = me.options.enterTag; + me.addListener("keyup", function (type, evt) { + var keyCode = evt.keyCode || evt.which; + if (keyCode == 13) { + var range = me.selection.getRange(), + start = range.startContainer, + doSave; + + //修正在h1-h6里边回车后不能嵌套p的问题 + if (!browser.ie) { + if (/h\d/i.test(hTag)) { + if (browser.gecko) { + var h = domUtils.findParentByTagName( + start, + [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "blockquote", + "caption", + "table" + ], + true + ); + if (!h) { + me.document.execCommand("formatBlock", false, "

              "); + doSave = 1; + } + } else { + //chrome remove div + if (start.nodeType == 1) { + var tmp = me.document.createTextNode(""), + div; + range.insertNode(tmp); + div = domUtils.findParentByTagName(tmp, "div", true); + if (div) { + var p = me.document.createElement("p"); + while (div.firstChild) { + p.appendChild(div.firstChild); + } + div.parentNode.insertBefore(p, div); + domUtils.remove(div); + range.setStartBefore(tmp).setCursor(); + doSave = 1; + } + domUtils.remove(tmp); + } + } + + if (me.undoManger && doSave) { + me.undoManger.save(); + } + } + //没有站位符,会出现多行的问题 + browser.opera && range.select(); + } else { + me.fireEvent("saveScene", true, true); + } + } + }); + + me.addListener("keydown", function (type, evt) { + var keyCode = evt.keyCode || evt.which; + if (keyCode == 13) { + //回车 + if (me.fireEvent("beforeenterkeydown")) { + domUtils.preventDefault(evt); + return; + } + me.fireEvent("saveScene", true, true); + hTag = ""; + + var range = me.selection.getRange(); + + if (!range.collapsed) { + //跨td不能删 + var start = range.startContainer, + end = range.endContainer, + startTd = domUtils.findParentByTagName(start, "td", true), + endTd = domUtils.findParentByTagName(end, "td", true); + if ( + (startTd && endTd && startTd !== endTd) || + (!startTd && endTd) || + (startTd && !endTd) + ) { + evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); + return; + } + } + if (tag == "p") { + if (!browser.ie) { + start = domUtils.findParentByTagName( + range.startContainer, + [ + "ol", + "ul", + "p", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "blockquote", + "caption" + ], + true + ); + + //opera下执行formatblock会在table的场景下有问题,回车在opera原生支持很好,所以暂时在opera去掉调用这个原生的command + //trace:2431 + if (!start && !browser.opera) { + me.document.execCommand("formatBlock", false, "

              "); + + if (browser.gecko) { + range = me.selection.getRange(); + start = domUtils.findParentByTagName( + range.startContainer, + "p", + true + ); + start && domUtils.removeDirtyAttr(start); + } + } else { + hTag = start.tagName; + start.tagName.toLowerCase() == "p" && + browser.gecko && + domUtils.removeDirtyAttr(start); + } + } + } else { + evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); + + if (!range.collapsed) { + range.deleteContents(); + start = range.startContainer; + if ( + start.nodeType == 1 && + (start = start.childNodes[range.startOffset]) + ) { + while (start.nodeType == 1) { + if (dtd.$empty[start.tagName]) { + range.setStartBefore(start).setCursor(); + if (me.undoManger) { + me.undoManger.save(); + } + return false; + } + if (!start.firstChild) { + var br = range.document.createElement("br"); + start.appendChild(br); + range.setStart(start, 0).setCursor(); + if (me.undoManger) { + me.undoManger.save(); + } + return false; + } + start = start.firstChild; + } + if (start === range.startContainer.childNodes[range.startOffset]) { + br = range.document.createElement("br"); + range.insertNode(br).setCursor(); + } else { + range.setStart(start, 0).setCursor(); + } + } else { + br = range.document.createElement("br"); + range.insertNode(br).setStartAfter(br).setCursor(); + } + } else { + br = range.document.createElement("br"); + range.insertNode(br); + var parent = br.parentNode; + if (parent.lastChild === br) { + br.parentNode.insertBefore(br.cloneNode(true), br); + range.setStartBefore(br); + } else { + range.setStartAfter(br); + } + range.setCursor(); + } + } + } + }); + }; + + +// plugins/keystrokes.js + /* 处理特殊键的兼容性问题 */ + UE.plugins["keystrokes"] = function () { + var me = this; + var collapsed = true; + me.addListener("keydown", function (type, evt) { + var keyCode = evt.keyCode || evt.which, + rng = me.selection.getRange(); + + //处理全选的情况 + if ( + !rng.collapsed && + !(evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) && + ((keyCode >= 65 && keyCode <= 90) || + (keyCode >= 48 && keyCode <= 57) || + (keyCode >= 96 && keyCode <= 111) || + { + 13: 1, + 8: 1, + 46: 1 + }[keyCode]) + ) { + var tmpNode = rng.startContainer; + if (domUtils.isFillChar(tmpNode)) { + rng.setStartBefore(tmpNode); + } + tmpNode = rng.endContainer; + if (domUtils.isFillChar(tmpNode)) { + rng.setEndAfter(tmpNode); + } + rng.txtToElmBoundary(); + //结束边界可能放到了br的前边,要把br包含进来 + // x[xxx]
              + if (rng.endContainer && rng.endContainer.nodeType == 1) { + tmpNode = rng.endContainer.childNodes[rng.endOffset]; + if (tmpNode && domUtils.isBr(tmpNode)) { + rng.setEndAfter(tmpNode); + } + } + if (rng.startOffset == 0) { + tmpNode = rng.startContainer; + if (domUtils.isBoundaryNode(tmpNode, "firstChild")) { + tmpNode = rng.endContainer; + if ( + rng.endOffset == + (tmpNode.nodeType == 3 + ? tmpNode.nodeValue.length + : tmpNode.childNodes.length) && + domUtils.isBoundaryNode(tmpNode, "lastChild") + ) { + me.fireEvent("saveScene"); + me.body.innerHTML = "

              " + (browser.ie ? "" : "
              ") + "

              "; + rng.setStart(me.body.firstChild, 0).setCursor(false, true); + me._selectionChange(); + return; + } + } + } + } + + //处理backspace + if (keyCode == keymap.Backspace) { + rng = me.selection.getRange(); + collapsed = rng.collapsed; + if (me.fireEvent("delkeydown", evt)) { + return; + } + var start, end; + //避免按两次删除才能生效的问题 + if (rng.collapsed && rng.inFillChar()) { + start = rng.startContainer; + + if (domUtils.isFillChar(start)) { + rng.setStartBefore(start).shrinkBoundary(true).collapse(true); + domUtils.remove(start); + } else { + start.nodeValue = start.nodeValue.replace( + new RegExp("^" + domUtils.fillChar), + "" + ); + rng.startOffset--; + rng.collapse(true).select(true); + } + } + + //解决选中control元素不能删除的问题 + if ((start = rng.getClosedNode())) { + me.fireEvent("saveScene"); + rng.setStartBefore(start); + domUtils.remove(start); + rng.setCursor(); + me.fireEvent("saveScene"); + domUtils.preventDefault(evt); + return; + } + //阻止在table上的删除 + if (!browser.ie) { + start = domUtils.findParentByTagName(rng.startContainer, "table", true); + end = domUtils.findParentByTagName(rng.endContainer, "table", true); + if ((start && !end) || (!start && end) || start !== end) { + evt.preventDefault(); + return; + } + } + } + //处理tab键的逻辑 + if (keyCode == keymap.Tab) { + //不处理以下标签 + var excludeTagNameForTabKey = { + ol: 1, + ul: 1, + table: 1 + }; + //处理组件里的tab按下事件 + if (me.fireEvent("tabkeydown", evt)) { + domUtils.preventDefault(evt); + return; + } + var range = me.selection.getRange(); + me.fireEvent("saveScene"); + for ( + var i = 0, + txt = "", + tabSize = me.options.tabSize || 4, + tabNode = me.options.tabNode || " "; + i < tabSize; + i++ + ) { + txt += tabNode; + } + var span = me.document.createElement("span"); + span.innerHTML = txt + domUtils.fillChar; + if (range.collapsed) { + range.insertNode(span.cloneNode(true).firstChild).setCursor(true); + } else { + var filterFn = function (node) { + return ( + domUtils.isBlockElm(node) && + !excludeTagNameForTabKey[node.tagName.toLowerCase()] + ); + }; + //普通的情况 + start = domUtils.findParent(range.startContainer, filterFn, true); + end = domUtils.findParent(range.endContainer, filterFn, true); + if (start && end && start === end) { + range.deleteContents(); + range.insertNode(span.cloneNode(true).firstChild).setCursor(true); + } else { + var bookmark = range.createBookmark(); + range.enlarge(true); + var bookmark2 = range.createBookmark(), + current = domUtils.getNextDomNode(bookmark2.start, false, filterFn); + while ( + current && + !( + domUtils.getPosition(current, bookmark2.end) & + domUtils.POSITION_FOLLOWING + ) + ) { + current.insertBefore( + span.cloneNode(true).firstChild, + current.firstChild + ); + current = domUtils.getNextDomNode(current, false, filterFn); + } + range.moveToBookmark(bookmark2).moveToBookmark(bookmark).select(); + } + } + domUtils.preventDefault(evt); + } + //trace:1634 + //ff的del键在容器空的时候,也会删除 + if (browser.gecko && keyCode == 46) { + range = me.selection.getRange(); + if (range.collapsed) { + start = range.startContainer; + if (domUtils.isEmptyBlock(start)) { + var parent = start.parentNode; + while ( + domUtils.getChildCount(parent) == 1 && + !domUtils.isBody(parent) + ) { + start = parent; + parent = parent.parentNode; + } + if (start === parent.lastChild) evt.preventDefault(); + return; + } + } + } + + /* 修复在编辑区域快捷键 (Mac:meta+alt+I; Win:ctrl+shift+I) 打不开 chrome 控制台的问题 */ + browser.chrome && + me.on("keydown", function (type, e) { + var keyCode = e.keyCode || e.which; + if ( + ((e.metaKey && e.altKey) || (e.ctrlKey && e.shiftKey)) && + keyCode == 73 + ) { + return true; + } + }); + }); + me.addListener("keyup", function (type, evt) { + var keyCode = evt.keyCode || evt.which, + rng, + me = this; + if (keyCode == keymap.Backspace) { + if (me.fireEvent("delkeyup")) { + return; + } + rng = me.selection.getRange(); + if (rng.collapsed) { + var tmpNode, + autoClearTagName = ["h1", "h2", "h3", "h4", "h5", "h6"]; + if ( + (tmpNode = domUtils.findParentByTagName( + rng.startContainer, + autoClearTagName, + true + )) + ) { + if (domUtils.isEmptyBlock(tmpNode)) { + var pre = tmpNode.previousSibling; + if (pre && pre.nodeName != "TABLE") { + domUtils.remove(tmpNode); + rng.setStartAtLast(pre).setCursor(false, true); + return; + } else { + var next = tmpNode.nextSibling; + if (next && next.nodeName != "TABLE") { + domUtils.remove(tmpNode); + rng.setStartAtFirst(next).setCursor(false, true); + return; + } + } + } + } + //处理当删除到body时,要重新给p标签展位 + if (domUtils.isBody(rng.startContainer)) { + var tmpNode = domUtils.createElement(me.document, "p", { + innerHTML: browser.ie ? domUtils.fillChar : "
              " + }); + rng.insertNode(tmpNode).setStart(tmpNode, 0).setCursor(false, true); + } + } + + //chrome下如果删除了inline标签,浏览器会有记忆,在输入文字还是会套上刚才删除的标签,所以这里再选一次就不会了 + if ( + !collapsed && + (rng.startContainer.nodeType == 3 || + (rng.startContainer.nodeType == 1 && + domUtils.isEmptyBlock(rng.startContainer))) + ) { + if (browser.ie) { + var span = rng.document.createElement("span"); + rng.insertNode(span).setStartBefore(span).collapse(true); + rng.select(); + domUtils.remove(span); + } else { + rng.select(); + } + } + } + }); + }; + + +// plugins/fiximgclick.js +///import core +///commands 修复chrome下图片不能点击的问题,出现八个角可改变大小 +///commandsName FixImgClick +///commandsTitle 修复chrome下图片不能点击的问题,出现八个角可改变大小 +//修复chrome下图片不能点击的问题,出现八个角可改变大小 + + UE.plugins["fiximgclick"] = (function () { + var elementUpdated = false; + + function Scale() { + this.editor = null; + this.resizer = null; + this.cover = null; + this.doc = document; + this.prePos = {x: 0, y: 0}; + this.startPos = {x: 0, y: 0}; + } + + (function () { + var rect = [ + //[left, top, width, height] + [0, 0, -1, -1], + [0, 0, 0, -1], + [0, 0, 1, -1], + [0, 0, -1, 0], + [0, 0, 1, 0], + [0, 0, -1, 1], + [0, 0, 0, 1], + [0, 0, 1, 1] + ]; + + Scale.prototype = { + init: function (editor) { + var me = this; + me.editor = editor; + me.startPos = this.prePos = {x: 0, y: 0}; + me.dragId = -1; + + var hands = [], + cover = (me.cover = document.createElement("div")), + resizer = (me.resizer = document.createElement("div")); + + cover.id = me.editor.ui.id + "_imagescale_cover"; + cover.style.cssText = + "position:absolute;display:none;z-index:" + + me.editor.options.zIndex + + ";filter:alpha(opacity=0); opacity:0;background:#CCC;"; + domUtils.on(cover, "mousedown", function (e) { + me.hide(); + }); + + for (var i = 0; i < 8; i++) { + hands.push( + '' + ); + } + resizer.id = me.editor.ui.id + "_imagescale"; + resizer.className = "edui-editor-imagescale"; + resizer.innerHTML = hands.join(""); + resizer.style.cssText += + ";display:none;border:1px solid #3b77ff;z-index:" + + me.editor.options.zIndex + + ";"; + + me.editor.ui.getDom().appendChild(cover); + me.editor.ui.getDom().appendChild(resizer); + + me.initStyle(); + me.initEvents(); + }, + initStyle: function () { + utils.cssRule( + "imagescale", + ".edui-editor-imagescale{display:none;position:absolute;border:1px solid #38B2CE;cursor:hand;-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;}" + + ".edui-editor-imagescale span{position:absolute;width:6px;height:6px;overflow:hidden;font-size:0px;display:block;background-color:#3C9DD0;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand0{cursor:nw-resize;top:0;margin-top:-4px;left:0;margin-left:-4px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand1{cursor:n-resize;top:0;margin-top:-4px;left:50%;margin-left:-4px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand2{cursor:ne-resize;top:0;margin-top:-4px;left:100%;margin-left:-3px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand3{cursor:w-resize;top:50%;margin-top:-4px;left:0;margin-left:-4px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand4{cursor:e-resize;top:50%;margin-top:-4px;left:100%;margin-left:-3px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand5{cursor:sw-resize;top:100%;margin-top:-3px;left:0;margin-left:-4px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand6{cursor:s-resize;top:100%;margin-top:-3px;left:50%;margin-left:-4px;}" + + ".edui-editor-imagescale .edui-editor-imagescale-hand7{cursor:se-resize;top:100%;margin-top:-3px;left:100%;margin-left:-3px;}" + ); + }, + initEvents: function () { + var me = this; + + me.startPos.x = me.startPos.y = 0; + me.isDraging = false; + }, + _eventHandler: function (e) { + var me = this; + switch (e.type) { + case "mousedown": + var hand = e.target || e.srcElement, + hand; + if ( + hand.className.indexOf("edui-editor-imagescale-hand") !== -1 && + me.dragId === -1 + ) { + me.dragId = hand.className.slice(-1); + me.startPos.x = me.prePos.x = e.clientX; + me.startPos.y = me.prePos.y = e.clientY; + domUtils.on(me.doc, "mousemove", me.proxy(me._eventHandler, me)); + } + break; + case "mousemove": + if (me.dragId !== -1) { + me.updateContainerStyle(me.dragId, { + x: e.clientX - me.prePos.x, + y: e.clientY - me.prePos.y + }); + me.prePos.x = e.clientX; + me.prePos.y = e.clientY; + elementUpdated = true; + me.updateTargetElement(); + } + break; + case "mouseup": + if (me.dragId !== -1) { + me.updateContainerStyle(me.dragId, { + x: e.clientX - me.prePos.x, + y: e.clientY - me.prePos.y + }); + me.updateTargetElement(); + if (me.target.parentNode) { + me.attachTo(me.target); + } + me.dragId = -1; + } + domUtils.un(me.doc, "mousemove", me.proxy(me._eventHandler, me)); + //修复只是点击挪动点,但没有改变大小,不应该触发contentchange + if (elementUpdated) { + elementUpdated = false; + me.editor.fireEvent("contentchange"); + } + + break; + default: + break; + } + }, + updateTargetElement: function () { + var me = this; + domUtils.setStyles(me.target, { + width: me.resizer.style.width, + height: me.resizer.style.height + }); + me.target.width = parseInt(me.resizer.style.width); + me.target.height = parseInt(me.resizer.style.height); + me.attachTo(me.target); + }, + updateContainerStyle: function (dir, offset) { + var me = this, + dom = me.resizer, + tmp; + + if (rect[dir][0] != 0) { + tmp = parseInt(dom.style.left) + offset.x; + dom.style.left = me._validScaledProp("left", tmp) + "px"; + } + if (rect[dir][1] != 0) { + tmp = parseInt(dom.style.top) + offset.y; + dom.style.top = me._validScaledProp("top", tmp) + "px"; + } + if (rect[dir][2] != 0) { + tmp = dom.clientWidth + rect[dir][2] * offset.x; + dom.style.width = me._validScaledProp("width", tmp) + "px"; + } + if (rect[dir][3] != 0) { + tmp = dom.clientHeight + rect[dir][3] * offset.y; + dom.style.height = me._validScaledProp("height", tmp) + "px"; + } + }, + _validScaledProp: function (prop, value) { + var ele = this.resizer, + wrap = document; + + value = isNaN(value) ? 0 : value; + switch (prop) { + case "left": + return value < 0 + ? 0 + : value + ele.clientWidth > wrap.clientWidth + ? wrap.clientWidth - ele.clientWidth + : value; + case "top": + return value < 0 + ? 0 + : value + ele.clientHeight > wrap.clientHeight + ? wrap.clientHeight - ele.clientHeight + : value; + case "width": + return value <= 0 + ? 1 + : value + ele.offsetLeft > wrap.clientWidth + ? wrap.clientWidth - ele.offsetLeft + : value; + case "height": + return value <= 0 + ? 1 + : value + ele.offsetTop > wrap.clientHeight + ? wrap.clientHeight - ele.offsetTop + : value; + } + }, + hideCover: function () { + this.cover.style.display = "none"; + }, + showCover: function () { + var me = this, + editorPos = domUtils.getXY(me.editor.ui.getDom()), + iframePos = domUtils.getXY(me.editor.iframe); + + domUtils.setStyles(me.cover, { + width: me.editor.iframe.offsetWidth + "px", + height: me.editor.iframe.offsetHeight + "px", + top: iframePos.y - editorPos.y + "px", + left: iframePos.x - editorPos.x + "px", + position: "absolute", + display: "" + }); + }, + show: function (targetObj) { + var me = this; + me.resizer.style.display = "block"; + if (targetObj) { + me.attachTo(targetObj); + } + + domUtils.on(this.resizer, "mousedown", me.proxy(me._eventHandler, me)); + domUtils.on(me.doc, "mouseup", me.proxy(me._eventHandler, me)); + + me.showCover(); + me.editor.fireEvent("afterscaleshow", me); + me.editor.fireEvent("saveScene"); + }, + hide: function () { + var me = this; + me.hideCover(); + me.resizer.style.display = "none"; + + domUtils.un(me.resizer, "mousedown", me.proxy(me._eventHandler, me)); + domUtils.un(me.doc, "mouseup", me.proxy(me._eventHandler, me)); + me.editor.fireEvent("afterscalehide", me); + }, + proxy: function (fn, context) { + return function (e) { + return fn.apply(context || this, arguments); + }; + }, + attachTo: function (targetObj) { + var me = this, + target = (me.target = targetObj), + resizer = this.resizer, + imgPos = domUtils.getXY(target), + iframePos = domUtils.getXY(me.editor.iframe), + editorPos = domUtils.getXY(resizer.parentNode); + + domUtils.setStyles(resizer, { + width: target.width + "px", + height: target.height + "px", + left: + iframePos.x + + imgPos.x - + me.editor.getScrollLeft() - + editorPos.x - + parseInt(resizer.style.borderLeftWidth) + + "px", + top: + iframePos.y + + imgPos.y - + me.editor.getScrollTop() - + editorPos.y - + parseInt(resizer.style.borderTopWidth) + + "px" + }); + } + }; + })(); + + return function () { + var me = this, + imageScale; + + me.setOpt("imageScaleEnabled", true); + + if (!browser.ie && me.options.imageScaleEnabled) { + me.addListener("click", function (type, e) { + var range = me.selection.getRange(), + img = range.getClosedNode(); + + if (img + && img.tagName === "IMG" + && me.body.contentEditable !== "false" + && img === e.target + ) { + if ( + img.getAttribute("anchorname") || + domUtils.hasClass(img, "uep-loading") || + domUtils.hasClass(img, "uep-loading-error") + ) { + return; + } + + if (!imageScale) { + imageScale = new Scale(); + imageScale.init(me); + me.ui.getDom().appendChild(imageScale.resizer); + + var _keyDownHandler = function (e) { + imageScale.hide(); + if (imageScale.target) { + me.selection.getRange().selectNode(imageScale.target).select(); + } + }, + _mouseDownHandler = function (e) { + var ele = e.target || e.srcElement; + if ( + ele && + (ele.className === undefined || + ele.className.indexOf("edui-editor-imagescale") === -1) + ) { + _keyDownHandler(e); + } + }, + timer; + + me.addListener("afterscaleshow", function (e) { + me.addListener("beforekeydown", _keyDownHandler); + me.addListener("beforemousedown", _mouseDownHandler); + domUtils.on(document, "keydown", _keyDownHandler); + domUtils.on(document, "mousedown", _mouseDownHandler); + me.selection.getNative().removeAllRanges(); + }); + me.addListener("afterscalehide", function (e) { + me.removeListener("beforekeydown", _keyDownHandler); + me.removeListener("beforemousedown", _mouseDownHandler); + domUtils.un(document, "keydown", _keyDownHandler); + domUtils.un(document, "mousedown", _mouseDownHandler); + var target = imageScale.target; + if (target.parentNode) { + me.selection.getRange().selectNode(target).select(); + } + }); + //TODO 有iframe的情况,mousedown不能往下传。。 + domUtils.on(imageScale.resizer, "mousedown", function (e) { + me.selection.getNative().removeAllRanges(); + var ele = e.target || e.srcElement; + if ( + ele && + ele.className.indexOf("edui-editor-imagescale-hand") === -1 + ) { + timer = setTimeout(function () { + imageScale.hide(); + if (imageScale.target) + me.selection.getRange().selectNode(ele).select(); + }, 200); + } + }); + domUtils.on(imageScale.resizer, "mouseup", function (e) { + var ele = e.target || e.srcElement; + if ( + ele && + ele.className.indexOf("edui-editor-imagescale-hand") === -1 + ) { + clearTimeout(timer); + } + }); + } + imageScale.show(img); + } else { + if (imageScale && imageScale.resizer.style.display !== "none") { + imageScale.hide(); + } + } + }); + } + + if (browser.webkit) { + me.addListener("click", function (type, e) { + if (e.target.tagName === "IMG" && me.body.contentEditable !== "false") { + var range = new dom.Range(me.document); + range.selectNode(e.target).select(); + } + }); + } + }; + })(); + + +// plugins/autolink.js +///import core +///commands 为非ie浏览器自动添加a标签 +///commandsName AutoLink +///commandsTitle 自动增加链接 + /** + * @description 为非ie浏览器自动添加a标签 + * @author zhanyi + */ + + UE.plugin.register( + "autolink", + function () { + var cont = 0; + + return !browser.ie + ? { + bindEvents: { + reset: function () { + cont = 0; + }, + keydown: function (type, evt) { + var me = this; + var keyCode = evt.keyCode || evt.which; + + if (keyCode == 32 || keyCode == 13) { + var sel = me.selection.getNative(), + range = sel.getRangeAt(0).cloneRange(), + offset, + charCode; + + var start = range.startContainer; + while (start.nodeType == 1 && range.startOffset > 0) { + start = + range.startContainer.childNodes[range.startOffset - 1]; + if (!start) { + break; + } + range.setStart( + start, + start.nodeType == 1 + ? start.childNodes.length + : start.nodeValue.length + ); + range.collapse(true); + start = range.startContainer; + } + + do { + if (range.startOffset == 0) { + start = range.startContainer.previousSibling; + + while (start && start.nodeType == 1) { + start = start.lastChild; + } + if (!start || domUtils.isFillChar(start)) { + break; + } + offset = start.nodeValue.length; + } else { + start = range.startContainer; + offset = range.startOffset; + } + range.setStart(start, offset - 1); + charCode = range.toString().charCodeAt(0); + } while (charCode != 160 && charCode != 32); + + if ( + range + .toString() + .replace(new RegExp(domUtils.fillChar, "g"), "") + .match(/(?:https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)/i) + ) { + while (range.toString().length) { + if ( + /^(?:https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)/i.test( + range.toString() + ) + ) { + break; + } + try { + range.setStart( + range.startContainer, + range.startOffset + 1 + ); + } catch (e) { + //trace:2121 + var start = range.startContainer; + while (!(next = start.nextSibling)) { + if (domUtils.isBody(start)) { + return; + } + start = start.parentNode; + } + range.setStart(next, 0); + } + } + //range的开始边界已经在a标签里的不再处理 + if ( + domUtils.findParentByTagName( + range.startContainer, + "a", + true + ) + ) { + return; + } + var a = me.document.createElement("a"), + text = me.document.createTextNode(" "), + href; + + me.undoManger && me.undoManger.save(); + a.appendChild(range.extractContents()); + a.href = a.innerHTML = a.innerHTML.replace(/<[^>]+>/g, ""); + href = a + .getAttribute("href") + .replace(new RegExp(domUtils.fillChar, "g"), ""); + href = /^(?:https?:\/\/)/gi.test(href) + ? href + : "http://" + href; + a.setAttribute("_src", utils.html(href)); + a.href = utils.html(href); + + range.insertNode(a); + a.parentNode.insertBefore(text, a.nextSibling); + range.setStart(text, 0); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + me.undoManger && me.undoManger.save(); + } + } + } + } + } + : {}; + }, + function () { + var keyCodes = { + 37: 1, + 38: 1, + 39: 1, + 40: 1, + 13: 1, + 32: 1 + }; + + function checkIsCludeLink(node) { + if (node.nodeType == 3) { + return null; + } + if (node.nodeName == "A") { + return node; + } + var lastChild = node.lastChild; + + while (lastChild) { + if (lastChild.nodeName == "A") { + return lastChild; + } + if (lastChild.nodeType == 3) { + if (domUtils.isWhitespace(lastChild)) { + lastChild = lastChild.previousSibling; + continue; + } + return null; + } + lastChild = lastChild.lastChild; + } + } + + browser.ie && + this.addListener("keyup", function (cmd, evt) { + var me = this, + keyCode = evt.keyCode; + if (keyCodes[keyCode]) { + var rng = me.selection.getRange(); + var start = rng.startContainer; + + if (keyCode == 13) { + while ( + start && + !domUtils.isBody(start) && + !domUtils.isBlockElm(start) + ) { + start = start.parentNode; + } + if (start && !domUtils.isBody(start) && start.nodeName == "P") { + var pre = start.previousSibling; + if (pre && pre.nodeType == 1) { + var pre = checkIsCludeLink(pre); + if (pre && !pre.getAttribute("_href")) { + domUtils.remove(pre, true); + } + } + } + } else if (keyCode == 32) { + if (start.nodeType == 3 && /^\s$/.test(start.nodeValue)) { + start = start.previousSibling; + if ( + start && + start.nodeName == "A" && + !start.getAttribute("_href") + ) { + domUtils.remove(start, true); + } + } + } else { + start = domUtils.findParentByTagName(start, "a", true); + if (start && !start.getAttribute("_href")) { + var bk = rng.createBookmark(); + + domUtils.remove(start, true); + rng.moveToBookmark(bk).select(true); + } + } + } + }); + } + ); + + +// plugins/autoheight.js +///import core +///commands 当输入内容超过编辑器高度时,编辑器自动增高 +///commandsName AutoHeight,autoHeightEnabled +///commandsTitle 自动增高 + /** + * @description 自动伸展 + * @author zhanyi + */ + UE.plugins["autoheight"] = function () { + var me = this; + //提供开关,就算加载也可以关闭 + me.autoHeightEnabled = me.options.autoHeightEnabled !== false; + if (!me.autoHeightEnabled) { + return; + } + + var bakOverflow, + lastHeight = 0, + options = me.options, + currentHeight, + timer; + + function adjustHeight() { + var me = this; + clearTimeout(timer); + if (isFullscreen) return; + if ( + !me.queryCommandState || + (me.queryCommandState && me.queryCommandState("source") != 1) + ) { + timer = setTimeout(function () { + var node = me.body.lastChild; + while (node && node.nodeType != 1) { + node = node.previousSibling; + } + if (node && node.nodeType == 1) { + node.style.clear = "both"; + currentHeight = Math.max( + domUtils.getXY(node).y + node.offsetHeight + 25, + Math.max(options.minFrameHeight, options.initialFrameHeight) + ); + if (currentHeight !== lastHeight) { + me.iframe.parentNode.style.transition = 'width 0.3s, height 0.3s, easy-in-out'; + if (currentHeight !== parseInt(me.iframe.parentNode.style.height)) { + me.iframe.parentNode.style.height = currentHeight + "px"; + } + me.body.style.height = currentHeight + "px"; + lastHeight = currentHeight; + } + domUtils.removeStyle(node, "clear"); + } + }, 50); + } + } + + var isFullscreen; + me.addListener("fullscreenchanged", function (cmd, f) { + isFullscreen = f; + }); + me.addListener("destroy", function () { + domUtils.un(me.window, "scroll", fixedScrollTop); + me.removeListener( + "contentchange afterinserthtml keyup mouseup", + adjustHeight + ); + }); + me.enableAutoHeight = function () { + var me = this; + if (!me.autoHeightEnabled) { + return; + } + var doc = me.document; + me.autoHeightEnabled = true; + bakOverflow = doc.body.style.overflowY; + doc.body.style.overflowY = "hidden"; + me.addListener("contentchange afterinserthtml keyup mouseup", adjustHeight); + //ff不给事件算得不对 + + setTimeout(function () { + adjustHeight.call(me); + }, browser.gecko ? 100 : 0); + me.fireEvent("autoheightchanged", me.autoHeightEnabled); + }; + me.disableAutoHeight = function () { + me.body.style.overflowY = bakOverflow || ""; + + me.removeListener("contentchange", adjustHeight); + me.removeListener("keyup", adjustHeight); + me.removeListener("mouseup", adjustHeight); + me.autoHeightEnabled = false; + me.fireEvent("autoheightchanged", me.autoHeightEnabled); + }; + + me.on("setHeight", function () { + me.disableAutoHeight(); + }); + me.addListener("ready", function () { + me.enableAutoHeight(); + //trace:1764 + var timer; + domUtils.on( + browser.ie ? me.body : me.document, + browser.webkit ? "dragover" : "drop", + function () { + clearTimeout(timer); + timer = setTimeout(function () { + //trace:3681 + adjustHeight.call(me); + }, 100); + } + ); + //修复内容过多时,回到顶部,顶部内容被工具栏遮挡问题 + domUtils.on(me.window, "scroll", fixedScrollTop); + }); + + var lastScrollY; + + function fixedScrollTop() { + if (!me.window) return; + if (lastScrollY === null) { + lastScrollY = me.window.scrollY; + } else if (me.window.scrollY == 0 && lastScrollY != 0) { + me.window.scrollTo(0, 0); + lastScrollY = null; + } + } + }; + + +// plugins/autofloat.js +///import core +///commands 悬浮工具栏 +///commandsName AutoFloat,autoFloatEnabled +///commandsTitle 悬浮工具栏 + /** + * modified by chengchao01 + * 注意: 引入此功能后,在IE6下会将body的背景图片覆盖掉! + */ + UE.plugins["autofloat"] = function () { + var me = this, + lang = me.getLang(); + me.setOpt({ + topOffset: 0 + }); + var optsAutoFloatEnabled = me.options.autoFloatEnabled !== false, + topOffset = me.options.topOffset; + + //如果不固定toolbar的位置,则直接退出 + if (!optsAutoFloatEnabled) { + return; + } + var uiUtils = UE.ui.uiUtils, + LteIE6 = browser.ie && browser.version <= 6, + quirks = browser.quirks; + + function checkHasUI() { + if (!UE.ui) { + alert(lang.autofloatMsg); + return 0; + } + return 1; + } + + function fixIE6FixedPos() { + var docStyle = document.body.style; + docStyle.backgroundImage = 'url("about:blank")'; + docStyle.backgroundAttachment = "fixed"; + } + + var bakCssText, + placeHolder = document.createElement("div"), + toolbarBox, + orgTop, + getPosition, + flag = true; //ie7模式下需要偏移 + function setFloating() { + var toobarBoxPos = domUtils.getXY(toolbarBox), + origalFloat = domUtils.getComputedStyle(toolbarBox, "position"), + origalLeft = domUtils.getComputedStyle(toolbarBox, "left"); + toolbarBox.style.width = toolbarBox.offsetWidth + "px"; + toolbarBox.style.zIndex = me.options.zIndex * 1 + 1; + toolbarBox.parentNode.insertBefore(placeHolder, toolbarBox); + if (LteIE6 || (quirks && browser.ie)) { + if (toolbarBox.style.position != "absolute") { + toolbarBox.style.position = "absolute"; + } + toolbarBox.style.top = + (document.body.scrollTop || document.documentElement.scrollTop) - + orgTop + + topOffset + + "px"; + } else { + if (browser.ie7Compat && flag) { + flag = false; + toolbarBox.style.left = + domUtils.getXY(toolbarBox).x - + document.documentElement.getBoundingClientRect().left + + 2 + + "px"; + } + if (toolbarBox.style.position != "fixed") { + toolbarBox.style.position = "fixed"; + toolbarBox.style.top = topOffset + "px"; + (origalFloat == "absolute" || origalFloat == "relative") && + parseFloat(origalLeft) && + (toolbarBox.style.left = toobarBoxPos.x + "px"); + } + } + } + + function unsetFloating() { + flag = true; + if (placeHolder.parentNode) { + placeHolder.parentNode.removeChild(placeHolder); + } + + toolbarBox.style.cssText = bakCssText; + } + + me.unsetFloating = unsetFloating; + + function updateFloating() { + var rect3 = getPosition(me.container); + var offset = me.options.toolbarTopOffset || 0; + if (rect3.top < 0 && rect3.bottom - toolbarBox.offsetHeight > offset) { + setFloating(); + } else { + unsetFloating(); + } + } + + var defer_updateFloating = utils.defer( + function () { + updateFloating(); + }, + browser.ie ? 200 : 100, + true + ); + + me.addListener("destroy", function () { + domUtils.un(window, ["scroll", "resize"], updateFloating); + me.removeListener("keydown", defer_updateFloating); + }); + + me.addListener("ready", function () { + if (checkHasUI(me)) { + //加载了ui组件,但在new时,没有加载ui,导致编辑器实例上没有ui类,所以这里做判断 + if (!me.ui) { + return; + } + getPosition = uiUtils.getClientRect; + toolbarBox = me.ui.getDom("toolbarbox"); + orgTop = getPosition(toolbarBox).top; + bakCssText = toolbarBox.style.cssText; + placeHolder.style.height = toolbarBox.offsetHeight + "px"; + if (LteIE6) { + fixIE6FixedPos(); + } + domUtils.on(window, ["scroll", "resize"], updateFloating); + me.addListener("keydown", defer_updateFloating); + + me.addListener("beforefullscreenchange", function (t, enabled) { + if (enabled) { + unsetFloating(); + } + }); + me.addListener("fullscreenchanged", function (t, enabled) { + if (!enabled) { + updateFloating(); + } + }); + me.addListener("sourcemodechanged", function (t, enabled) { + setTimeout(function () { + updateFloating(); + }, 0); + }); + me.addListener("clearDoc", function () { + setTimeout(function () { + updateFloating(); + }, 0); + }); + } + }); + }; + + +// plugins/video.js + /** + * video插件, 为UEditor提供视频插入支持 + * @file + * @since 1.2.6.1 + */ + + UE.plugins["video"] = function () { + var me = this; + + /** + * 创建插入视频字符窜 + * @param url 视频地址 + * @param width 视频宽度 + * @param height 视频高度 + * @param align 视频对齐 + * @param toEmbed 是否以flash代替显示 + * @param addParagraph 是否需要添加P 标签 + */ + function creatInsertStr(url, width, height, id, align, classname, type) { + var str; + switch (type) { + case 'iframe': + str = '' + + '
              ' + + '
              ' + + this.getContentHtmlTpl() + + "
              " + + " " + + "" + ); + }, + getContentHtmlTpl: function () { + if (this.content) { + if (typeof this.content == "string") { + return this.content; + } + return this.content.renderHtml(); + } else { + return ""; + } + }, + _UIBase_postRender: UIBase.prototype.postRender, + postRender: function () { + if (this.content instanceof UIBase) { + this.content.postRender(); + } + + //捕获鼠标滚轮 + if (this.captureWheel && !this.captured) { + this.captured = true; + + var winHeight = + (document.documentElement.clientHeight || + document.body.clientHeight) - 80, + _height = this.getDom().offsetHeight, + _top = uiUtils.getClientRect(this.combox.getDom()).top, + content = this.getDom("content"), + ifr = this.getDom("body").getElementsByTagName("iframe"), + me = this; + + ifr.length && (ifr = ifr[0]); + + while (_top + _height > winHeight) { + _height -= 30; + } + content.style.height = _height + "px"; + //同步更改iframe高度 + ifr && (ifr.style.height = _height + "px"); + + //阻止在combox上的鼠标滚轮事件, 防止用户的正常操作被误解 + domUtils.on( + content, + "onmousewheel" in document.body ? "mousewheel" : "DOMMouseScroll", + function (e) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + + if (e.wheelDelta) { + content.scrollTop -= e.wheelDelta / 120 * 60; + } else { + content.scrollTop -= e.detail / -3 * 60; + } + } + ); + } + this.fireEvent("postRenderAfter"); + this.hide(true); + this._UIBase_postRender(); + }, + _doAutoRender: function () { + if (!this.getDom() && this.autoRender) { + this.render(); + } + }, + mesureSize: function () { + var box = this.getDom("content"); + return uiUtils.getClientRect(box); + }, + fitSize: function () { + // console.log('fitSize.popup') + if (this.captureWheel && this.sized) { + return this.__size; + } + this.sized = true; + var popBodyEl = this.getDom("body"); + popBodyEl.style.width = ""; + popBodyEl.style.height = ""; + var size = this.mesureSize(); + if (this.captureWheel) { + popBodyEl.style.width = -(-20 - size.width) + "px"; + var height = parseInt(this.getDom("content").style.height, 10); + !window.isNaN(height) && (size.height = height); + } else { + popBodyEl.style.width = size.width + "px"; + } + popBodyEl.style.height = size.height + "px"; + this.__size = size; + this.captureWheel && (this.getDom("content").style.overflow = "auto"); + return size; + }, + showAnchor: function (element, hoz) { + this.showAnchorRect(uiUtils.getClientRect(element), hoz); + }, + showAnchorRect: function (rect, hoz, adj) { + this._doAutoRender(); + var vpRect = uiUtils.getViewportRect(); + this.getDom().style.visibility = "hidden"; + this._show(); + var popSize = this.fitSize(); + + var sideLeft, sideUp, left, top; + if (hoz) { + sideLeft = + this.canSideLeft && + (rect.right + popSize.width > vpRect.right && + rect.left > popSize.width); + sideUp = + this.canSideUp && + (rect.top + popSize.height > vpRect.bottom && + rect.bottom > popSize.height); + left = sideLeft ? rect.left - popSize.width : rect.right; + top = sideUp ? rect.bottom - popSize.height : rect.top; + } else { + sideLeft = + this.canSideLeft && + (rect.right + popSize.width > vpRect.right && + rect.left > popSize.width); + sideUp = + this.canSideUp && + (rect.top + popSize.height > vpRect.bottom && + rect.bottom > popSize.height); + left = sideLeft ? rect.right - popSize.width : rect.left; + top = sideUp ? rect.top - popSize.height : rect.bottom; + } + if (!sideUp) { + if (top + popSize.height > vpRect.bottom) { + top = vpRect.bottom - popSize.height + } + } + // console.log('popup.showAnchorRect', vpRect, rect, hoz, sideUp, sideLeft, left, top); + + var popEl = this.getDom(); + uiUtils.setViewportOffset(popEl, { + left: left, + top: top + }); + domUtils.removeClasses(popEl, ANCHOR_CLASSES); + popEl.className += + " " + ANCHOR_CLASSES[(sideUp ? 1 : 0) * 2 + (sideLeft ? 1 : 0)]; + if (this.editor) { + popEl.style.zIndex = this.editor.container.style.zIndex * 1 + 10; + baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex = + popEl.style.zIndex - 1; + } + this.getDom().style.visibility = "visible"; + }, + showAt: function (offset) { + var left = offset.left; + var top = offset.top; + var rect = { + left: left, + top: top, + right: left, + bottom: top, + height: 0, + width: 0 + }; + this.showAnchorRect(rect, false, true); + }, + _show: function () { + if (this._hidden) { + var box = this.getDom(); + box.style.display = ""; + this._hidden = false; + // if (box.setActive) { + // box.setActive(); + // } + this.fireEvent("show"); + } + }, + isHidden: function () { + return this._hidden; + }, + show: function () { + this._doAutoRender(); + this._show(); + }, + hide: function (notNofity) { + if (!this._hidden && this.getDom()) { + this.getDom().style.display = "none"; + this._hidden = true; + if (!notNofity) { + this.fireEvent("hide"); + } + } + }, + queryAutoHide: function (el) { + return !el || !uiUtils.contains(this.getDom(), el); + } + }; + utils.inherits(Popup, UIBase); + + domUtils.on(document, "mousedown", function (evt) { + var el = evt.target || evt.srcElement; + closeAllPopup(evt, el); + }); + domUtils.on(window, "scroll", function (evt, el) { + closeAllPopup(evt, el); + }); + })(); + + +// ui/colorpicker.js +///import core +///import uicore + (function () { + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase, + ColorPicker = (baidu.editor.ui.ColorPicker = function (options) { + this.initOptions(options); + this.noColorText = this.noColorText || this.editor.getLang("clearColor"); + this.initUIBase(); + }); + + ColorPicker.prototype = { + getHtmlTpl: function () { + return genColorPicker(this.noColorText, this.editor); + }, + _onTableClick: function (evt) { + var tgt = evt.target || evt.srcElement; + var color = tgt.getAttribute("data-color"); + if (color) { + this.fireEvent("pickcolor", color); + } + }, + _onTableOver: function (evt) { + var tgt = evt.target || evt.srcElement; + var color = tgt.getAttribute("data-color"); + if (color) { + this.getDom("preview").style.backgroundColor = color; + } + }, + _onTableOut: function () { + this.getDom("preview").style.backgroundColor = ""; + }, + _onPickNoColor: function () { + this.fireEvent("picknocolor"); + }, + _onColorSelect: function (evt) { + var input = evt.target || evt.srcElement; + var color = input.value; + if (color) { + this.fireEvent("pickcolor", color); + } + } + }; + utils.inherits(ColorPicker, UIBase); + + var COLORS = ("ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646," + + "f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada," + + "d8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5," + + "bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f," + + "a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09," + + "7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806," + + "c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,").split( + "," + ); + + function genColorPicker(noColorText, editor) { + var html = + '
              ' + + '
              ' + + // '
              ' + + '
              ' + + '
              ' + + noColorText + + "
              " + + "
              " + + '' + + '" + + ''; + for (var i = 0; i < COLORS.length; i++) { + if (i && i % 10 === 0) { + html += + "" + + (i == 60 + ? '" + : "") + + ""; + } + html += i < 70 + ? '" + : ""; + } + html += ""; + html += "
              ' + + editor.getLang("themeColor") + + "
              ' + + editor.getLang("standardColor") + + "
              "; + return html; + } + })(); + + +// ui/tablepicker.js +///import core +///import uicore + (function () { + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase; + + var TablePicker = (baidu.editor.ui.TablePicker = function (options) { + this.initOptions(options); + this.initTablePicker(); + }); + TablePicker.prototype = { + defaultNumRows: 10, + defaultNumCols: 10, + maxNumRows: 20, + maxNumCols: 20, + numRows: 10, + numCols: 10, + lengthOfCellSide: 22, + initTablePicker: function () { + this.initUIBase(); + }, + getHtmlTpl: function () { + var me = this; + return ( + '
              ' + + '
              ' + + '
              ' + + '' + + "
              " + + '
              " + + '
              ' + + "
              " + + "
              " + + "
              " + ); + }, + _UIBase_render: UIBase.prototype.render, + render: function (holder) { + this._UIBase_render(holder); + this.getDom("label").innerHTML = + "0" + + this.editor.getLang("t_row") + + " x 0" + + this.editor.getLang("t_col"); + }, + _track: function (numCols, numRows) { + var style = this.getDom("overlay").style; + var sideLen = this.lengthOfCellSide; + style.width = numCols * sideLen + "px"; + style.height = numRows * sideLen + "px"; + var label = this.getDom("label"); + label.innerHTML = + numCols + + this.editor.getLang("t_col") + + " x " + + numRows + + this.editor.getLang("t_row"); + this.numCols = numCols; + this.numRows = numRows; + }, + _onMouseOver: function (evt, el) { + var rel = evt.relatedTarget || evt.fromElement; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.getDom("label").innerHTML = + "0" + + this.editor.getLang("t_col") + + " x 0" + + this.editor.getLang("t_row"); + this.getDom("overlay").style.visibility = ""; + } + }, + _onMouseOut: function (evt, el) { + var rel = evt.relatedTarget || evt.toElement; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.getDom("label").innerHTML = + "0" + + this.editor.getLang("t_col") + + " x 0" + + this.editor.getLang("t_row"); + this.getDom("overlay").style.visibility = "hidden"; + } + }, + _onMouseMove: function (evt, el) { + var style = this.getDom("overlay").style; + var offset = uiUtils.getEventOffset(evt); + var sideLen = this.lengthOfCellSide; + var numCols = Math.ceil(offset.left / sideLen); + var numRows = Math.ceil(offset.top / sideLen); + this._track(numCols, numRows); + }, + _onClick: function () { + this.fireEvent("picktable", this.numCols, this.numRows); + } + }; + utils.inherits(TablePicker, UIBase); + })(); + + +// ui/stateful.js + (function () { + var browser = baidu.editor.browser, + domUtils = baidu.editor.dom.domUtils, + uiUtils = baidu.editor.ui.uiUtils; + + var TPL_STATEFUL = + 'onmousedown="$$.Stateful_onMouseDown(event, this);"' + + ' onmouseup="$$.Stateful_onMouseUp(event, this);"' + + (browser.ie + ? ' onmouseenter="$$.Stateful_onMouseEnter(event, this);"' + + ' onmouseleave="$$.Stateful_onMouseLeave(event, this);"' + : ' onmouseover="$$.Stateful_onMouseOver(event, this);"' + + ' onmouseout="$$.Stateful_onMouseOut(event, this);"'); + + baidu.editor.ui.Stateful = { + alwalysHoverable: false, + target: null, //目标元素和this指向dom不一样 + Stateful_init: function () { + this._Stateful_dGetHtmlTpl = this.getHtmlTpl; + this.getHtmlTpl = this.Stateful_getHtmlTpl; + }, + Stateful_getHtmlTpl: function () { + var tpl = this._Stateful_dGetHtmlTpl(); + // 使用function避免$转义 + return tpl.replace(/stateful/g, function () { + return TPL_STATEFUL; + }); + }, + Stateful_onMouseEnter: function (evt, el) { + this.target = el; + if (!this.isDisabled() || this.alwalysHoverable) { + this.addState("hover"); + this.fireEvent("over"); + } + }, + Stateful_onMouseLeave: function (evt, el) { + if (!this.isDisabled() || this.alwalysHoverable) { + this.removeState("hover"); + this.removeState("active"); + this.fireEvent("out"); + } + }, + Stateful_onMouseOver: function (evt, el) { + var rel = evt.relatedTarget; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.Stateful_onMouseEnter(evt, el); + } + }, + Stateful_onMouseOut: function (evt, el) { + var rel = evt.relatedTarget; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.Stateful_onMouseLeave(evt, el); + } + }, + Stateful_onMouseDown: function (evt, el) { + if (!this.isDisabled()) { + this.addState("active"); + } + }, + Stateful_onMouseUp: function (evt, el) { + if (!this.isDisabled()) { + this.removeState("active"); + } + }, + Stateful_postRender: function () { + if (this.disabled && !this.hasState("disabled")) { + this.addState("disabled"); + } + }, + hasState: function (state) { + return domUtils.hasClass(this.getStateDom(), "edui-state-" + state); + }, + addState: function (state) { + if (!this.hasState(state)) { + this.getStateDom().className += " edui-state-" + state; + } + }, + removeState: function (state) { + if (this.hasState(state)) { + domUtils.removeClasses(this.getStateDom(), ["edui-state-" + state]); + } + }, + getStateDom: function () { + return this.getDom("state"); + }, + isChecked: function () { + return this.hasState("checked"); + }, + setChecked: function (checked) { + if (!this.isDisabled() && checked) { + this.addState("checked"); + } else { + this.removeState("checked"); + } + }, + isDisabled: function () { + return this.hasState("disabled"); + }, + setDisabled: function (disabled) { + if (disabled) { + this.removeState("hover"); + this.removeState("checked"); + this.removeState("active"); + this.addState("disabled"); + } else { + this.removeState("disabled"); + } + } + }; + })(); + + +// ui/button.js +///import core +///import uicore +///import ui/stateful.js + (function () { + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase, + Stateful = baidu.editor.ui.Stateful, + Button = (baidu.editor.ui.Button = function (options) { + if (options.name) { + var btnName = options.name; + var cssRules = options.cssRules; + if (!options.className) { + options.className = "edui-for-" + btnName; + } + options.cssRules = + ".edui-" + + (options.theme || "default") + + " .edui-toolbar .edui-button.edui-for-" + + btnName + + " .edui-icon {" + + cssRules + + "}"; + } + this.initOptions(options); + this.initButton(); + }); + Button.prototype = { + uiName: "button", + label: "", + title: "", + showIcon: true, + showText: true, + cssRules: "", + initButton: function () { + this.initUIBase(); + this.Stateful_init(); + if (this.cssRules) { + utils.cssRule("edui-customize-" + this.name + "-style", this.cssRules); + } + }, + getHtmlTpl: function () { + return ( + '
              ' + + '
              ' + + '
              ' + + (this.showIcon ? '
              ' : "") + + (this.showText + ? '
              ' + this.label + "
              " + : "") + + "
              " + + "
              " + + "
              " + ); + }, + postRender: function () { + this.Stateful_postRender(); + this.setDisabled(this.disabled); + }, + _onMouseDown: function (e) { + var target = e.target || e.srcElement, + tagName = target && target.tagName && target.tagName.toLowerCase(); + if (tagName == "input" || tagName == "object" || tagName == "object") { + return false; + } + }, + _onClick: function () { + if (!this.isDisabled()) { + this.fireEvent("click"); + } + }, + setTitle: function (text) { + var label = this.getDom("label"); + label.innerHTML = text; + } + }; + utils.inherits(Button, UIBase); + utils.extend(Button.prototype, Stateful); + })(); + + +// ui/splitbutton.js +///import core +///import uicore +///import ui/stateful.js + (function () { + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + domUtils = baidu.editor.dom.domUtils, + UIBase = baidu.editor.ui.UIBase, + Stateful = baidu.editor.ui.Stateful, + SplitButton = (baidu.editor.ui.SplitButton = function (options) { + this.initOptions(options); + this.initSplitButton(); + }); + SplitButton.prototype = { + popup: null, + uiName: "splitbutton", + title: "", + initSplitButton: function () { + this.initUIBase(); + this.Stateful_init(); + var me = this; + if (this.popup != null) { + var popup = this.popup; + this.popup = null; + this.setPopup(popup); + } + }, + _UIBase_postRender: UIBase.prototype.postRender, + postRender: function () { + this.Stateful_postRender(); + this._UIBase_postRender(); + }, + setPopup: function (popup) { + if (this.popup === popup) return; + if (this.popup != null) { + this.popup.dispose(); + } + popup.addListener("show", utils.bind(this._onPopupShow, this)); + popup.addListener("hide", utils.bind(this._onPopupHide, this)); + popup.addListener( + "postrender", + utils.bind(function () { + popup + .getDom("body") + .appendChild( + uiUtils.createElementByHtml( + '
              ' + ) + ); + popup.getDom().className += " " + this.className; + }, this) + ); + this.popup = popup; + }, + _onPopupShow: function () { + this.addState("opened"); + }, + _onPopupHide: function () { + this.removeState("opened"); + }, + getHtmlTpl: function () { + return ( + '
              ' + + "
              ' + + '
              ' + + '
              ' + + "
              " + + '
              ' + + '
              ' + + "
              " + ); + }, + showPopup: function () { + // 当popup往上弹出的时候,做特殊处理 + var rect = uiUtils.getClientRect(this.getDom()); + rect.top -= this.popup.SHADOW_RADIUS; + rect.height += this.popup.SHADOW_RADIUS; + this.popup.showAnchorRect(rect); + }, + _onArrowClick: function (event, el) { + if (!this.isDisabled()) { + this.showPopup(); + } + }, + _onButtonClick: function () { + if (!this.isDisabled()) { + this.fireEvent("buttonclick"); + } + } + }; + utils.inherits(SplitButton, UIBase); + utils.extend(SplitButton.prototype, Stateful, true); + })(); + + +// ui/colorbutton.js +///import core +///import uicore +///import ui/colorpicker.js +///import ui/popup.js +///import ui/splitbutton.js + (function () { + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + ColorPicker = baidu.editor.ui.ColorPicker, + Popup = baidu.editor.ui.Popup, + SplitButton = baidu.editor.ui.SplitButton, + ColorButton = (baidu.editor.ui.ColorButton = function (options) { + this.initOptions(options); + this.initColorButton(); + }); + ColorButton.prototype = { + initColorButton: function () { + var me = this; + this.popup = new Popup({ + content: new ColorPicker({ + noColorText: me.editor.getLang("clearColor"), + editor: me.editor, + onpickcolor: function (t, color) { + me._onPickColor(color); + }, + onpicknocolor: function (t, color) { + me._onPickNoColor(color); + } + }), + editor: me.editor + }); + this.initSplitButton(); + }, + _SplitButton_postRender: SplitButton.prototype.postRender, + postRender: function () { + this._SplitButton_postRender(); + this.getDom("button_body").appendChild( + uiUtils.createElementByHtml( + '
              ' + ) + ); + this.getDom().className += " edui-colorbutton"; + }, + setColor: function (color) { + this.getDom("colorlump").style.backgroundColor = color; + this.color = color; + }, + _onPickColor: function (color) { + if (this.fireEvent("pickcolor", color) !== false) { + this.setColor(color); + this.popup.hide(); + } + }, + _onPickNoColor: function (color) { + if (this.fireEvent("picknocolor") !== false) { + this.popup.hide(); + } + }, + }; + utils.inherits(ColorButton, SplitButton); + })(); + + +// ui/tablebutton.js +///import core +///import uicore +///import ui/popup.js +///import ui/tablepicker.js +///import ui/splitbutton.js + (function () { + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + TablePicker = baidu.editor.ui.TablePicker, + SplitButton = baidu.editor.ui.SplitButton, + TableButton = (baidu.editor.ui.TableButton = function (options) { + this.initOptions(options); + this.initTableButton(); + }); + TableButton.prototype = { + initTableButton: function () { + var me = this; + this.popup = new Popup({ + content: new TablePicker({ + editor: me.editor, + onpicktable: function (t, numCols, numRows) { + me._onPickTable(numCols, numRows); + } + }), + editor: me.editor + }); + this.initSplitButton(); + }, + _onPickTable: function (numCols, numRows) { + if (this.fireEvent("picktable", numCols, numRows) !== false) { + this.popup.hide(); + } + } + }; + utils.inherits(TableButton, SplitButton); + })(); + + +// ui/autotypesetpicker.js +///import core +///import uicore + (function () { + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase; + + var AutoTypeSetPicker = (baidu.editor.ui.AutoTypeSetPicker = function ( + options + ) { + this.initOptions(options); + this.initAutoTypeSetPicker(); + }); + AutoTypeSetPicker.prototype = { + initAutoTypeSetPicker: function () { + this.initUIBase(); + }, + getHtmlTpl: function () { + var me = this.editor, + opt = me.options.autotypeset, + lang = me.getLang("autoTypeSet"); + + var textAlignInputName = "textAlignValue" + me.uid, + imageBlockInputName = "imageBlockLineValue" + me.uid, + symbolConverInputName = "symbolConverValue" + me.uid; + + return ( + '
              ' + + '
              ' + + "" + + '" + + '" + + "" + + '" + + '" + + "" + + "" + + '" + + '" + + "" + + '" + + '" + + '" + + "" + + '" + + '" + + '" + + "" + + "
              " + + lang.mergeLine + + '" + + lang.delLine + + "
              " + + lang.removeFormat + + '" + + lang.indent + + "
              " + + lang.alignment + + "' + + '" + + me.getLang("justifyleft") + + '" + + me.getLang("justifycenter") + + '" + + me.getLang("justifyright") + + "
              " + + lang.imageFloat + + "' + + '" + + me.getLang("default") + + '" + + me.getLang("justifyleft") + + '" + + me.getLang("justifycenter") + + '" + + me.getLang("justifyright") + + "
              " + + lang.removeFontsize + + '" + + lang.removeFontFamily + + "
              " + + lang.removeHtml + + "
              " + + lang.pasteFilter + + "
              " + + lang.symbol + + "' + + '" + + lang.bdc2sb + + '" + + lang.tobdc + + "" + + "
              " + + "
              " + + "
              " + ); + }, + _UIBase_render: UIBase.prototype.render + }; + utils.inherits(AutoTypeSetPicker, UIBase); + })(); + + +// ui/autotypesetbutton.js +///import core +///import uicore +///import ui/popup.js +///import ui/autotypesetpicker.js +///import ui/splitbutton.js + (function () { + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker, + SplitButton = baidu.editor.ui.SplitButton, + AutoTypeSetButton = (baidu.editor.ui.AutoTypeSetButton = function (options) { + this.initOptions(options); + this.initAutoTypeSetButton(); + }); + + function getPara(me) { + var opt = {}, + cont = me.getDom(), + editorId = me.editor.uid, + inputType = null, + attrName = null, + ipts = domUtils.getElementsByTagName(cont, "input"); + for (var i = ipts.length - 1, ipt; (ipt = ipts[i--]);) { + inputType = ipt.getAttribute("type"); + if (inputType == "checkbox") { + attrName = ipt.getAttribute("name"); + opt[attrName] && delete opt[attrName]; + if (ipt.checked) { + var attrValue = document.getElementById( + attrName + "Value" + editorId + ); + if (attrValue) { + if (/input/gi.test(attrValue.tagName)) { + opt[attrName] = attrValue.value; + } else { + var iptChilds = attrValue.getElementsByTagName("input"); + for ( + var j = iptChilds.length - 1, iptchild; + (iptchild = iptChilds[j--]); + ) { + if (iptchild.checked) { + opt[attrName] = iptchild.value; + break; + } + } + } + } else { + opt[attrName] = true; + } + } else { + opt[attrName] = false; + } + } else { + opt[ipt.getAttribute("value")] = ipt.checked; + } + } + + var selects = domUtils.getElementsByTagName(cont, "select"); + for (var i = 0, si; (si = selects[i++]);) { + var attr = si.getAttribute("name"); + opt[attr] = opt[attr] ? si.value : ""; + } + + utils.extend(me.editor.options.autotypeset, opt); + + me.editor.setPreferences("autotypeset", opt); + } + + AutoTypeSetButton.prototype = { + initAutoTypeSetButton: function () { + var me = this; + this.popup = new Popup({ + //传入配置参数 + content: new AutoTypeSetPicker({editor: me.editor}), + editor: me.editor, + hide: function () { + if (!this._hidden && this.getDom()) { + getPara(this); + this.getDom().style.display = "none"; + this._hidden = true; + this.fireEvent("hide"); + } + } + }); + var flag = 0; + this.popup.addListener("postRenderAfter", function () { + var popupUI = this; + if (flag) return; + var cont = this.getDom(), + btn = cont.getElementsByTagName("button")[0]; + + btn.onclick = function () { + getPara(popupUI); + me.editor.execCommand("autotypeset"); + popupUI.hide(); + }; + + domUtils.on(cont, "click", function (e) { + var target = e.target || e.srcElement, + editorId = me.editor.uid; + if (target && target.tagName == "INPUT") { + // 点击图片浮动的checkbox,去除对应的radio + if ( + target.name == "imageBlockLine" || + target.name == "textAlign" || + target.name == "symbolConver" + ) { + var checked = target.checked, + radioTd = document.getElementById( + target.name + "Value" + editorId + ), + radios = radioTd.getElementsByTagName("input"), + defalutSelect = { + imageBlockLine: "none", + textAlign: "left", + symbolConver: "tobdc" + }; + + for (var i = 0; i < radios.length; i++) { + if (checked) { + if (radios[i].value == defalutSelect[target.name]) { + radios[i].checked = "checked"; + } + } else { + radios[i].checked = false; + } + } + } + // 点击radio,选中对应的checkbox + if ( + target.name == "imageBlockLineValue" + editorId || + target.name == "textAlignValue" + editorId || + target.name == "bdc" + ) { + var checkboxs = target.parentNode.previousSibling.getElementsByTagName( + "input" + ); + checkboxs && (checkboxs[0].checked = true); + } + + getPara(popupUI); + } + }); + + flag = 1; + }); + this.initSplitButton(); + } + }; + utils.inherits(AutoTypeSetButton, SplitButton); + })(); + + +// ui/cellalignpicker.js +///import core +///import uicore + (function () { + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + Stateful = baidu.editor.ui.Stateful, + UIBase = baidu.editor.ui.UIBase; + + /** + * 该参数将新增一个参数: selected, 参数类型为一个Object, 形如{ 'align': 'center', 'valign': 'top' }, 表示单元格的初始 + * 对齐状态为: 竖直居上,水平居中; 其中 align的取值为:'center', 'left', 'right'; valign的取值为: 'top', 'middle', 'bottom' + * @update 2013/4/2 hancong03@baidu.com + */ + var CellAlignPicker = (baidu.editor.ui.CellAlignPicker = function (options) { + this.initOptions(options); + this.initSelected(); + this.initCellAlignPicker(); + }); + CellAlignPicker.prototype = { + //初始化选中状态, 该方法将根据传递进来的参数获取到应该选中的对齐方式图标的索引 + initSelected: function () { + var status = { + valign: { + top: 0, + middle: 1, + bottom: 2 + }, + align: { + left: 0, + center: 1, + right: 2 + }, + count: 3 + }, + result = -1; + + if (this.selected) { + this.selectedIndex = + status.valign[this.selected.valign] * status.count + + status.align[this.selected.align]; + } + }, + initCellAlignPicker: function () { + this.initUIBase(); + this.Stateful_init(); + }, + getHtmlTpl: function () { + var alignType = ["left", "center", "right"], + COUNT = 9, + tempClassName = null, + tempIndex = -1, + tmpl = []; + + for (var i = 0; i < COUNT; i++) { + tempClassName = this.selectedIndex === i + ? ' class="edui-cellalign-selected" ' + : ""; + tempIndex = i % 3; + + tempIndex === 0 && tmpl.push("
            • ' + + tmpl.join("") + + "
              " + + "
              " + + "
              " + ); + }, + getStateDom: function () { + return this.target; + }, + _onClick: function (evt) { + var target = evt.target || evt.srcElement; + if (/icon/.test(target.className)) { + this.items[target.parentNode.getAttribute("index")].onclick(); + Popup.postHide(evt); + } + }, + _UIBase_render: UIBase.prototype.render + }; + utils.inherits(CellAlignPicker, UIBase); + utils.extend(CellAlignPicker.prototype, Stateful, true); + })(); + + +// ui/pastepicker.js +///import core +///import uicore + (function () { + var utils = baidu.editor.utils, + Stateful = baidu.editor.ui.Stateful, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase; + + var PastePicker = (baidu.editor.ui.PastePicker = function (options) { + this.initOptions(options); + this.initPastePicker(); + }); + PastePicker.prototype = { + initPastePicker: function () { + this.initUIBase(); + this.Stateful_init(); + }, + getHtmlTpl: function () { + return ( + '
              ' + + '
              ' + + '
              ' + + this.editor.getLang("pasteOpt") + + "
              " + + '
              ' + + '
              ' + + '
              ' + + '
              ' + + '
              ' + + '
              ' + + '
              ' + + "
              " + + "
              " + + "
              " + ); + }, + getStateDom: function () { + return this.target; + }, + format: function (param) { + this.editor.ui._isTransfer = true; + this.editor.fireEvent("pasteTransfer", param); + }, + _onClick: function (cur) { + var node = domUtils.getNextDomNode(cur), + screenHt = uiUtils.getViewportRect().height, + subPop = uiUtils.getClientRect(node); + + if (subPop.top + subPop.height > screenHt) + node.style.top = -subPop.height - cur.offsetHeight + "px"; + else node.style.top = ""; + + if (/hidden/gi.test(domUtils.getComputedStyle(node, "visibility"))) { + node.style.visibility = "visible"; + domUtils.addClass(cur, "edui-state-opened"); + } else { + node.style.visibility = "hidden"; + domUtils.removeClasses(cur, "edui-state-opened"); + } + }, + _UIBase_render: UIBase.prototype.render + }; + utils.inherits(PastePicker, UIBase); + utils.extend(PastePicker.prototype, Stateful, true); + })(); + + +// ui/toolbar.js + (function () { + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase, + Toolbar = (baidu.editor.ui.Toolbar = function (options) { + this.initOptions(options); + this.initToolbar(); + }); + Toolbar.prototype = { + items: null, + initToolbar: function () { + this.items = this.items || []; + this.initUIBase(); + }, + add: function (item, index) { + if (index === undefined) { + this.items.push(item); + } else { + this.items.splice(index, 0, item); + } + }, + getHtmlTpl: function () { + var buff = []; + for (var i = 0; i < this.items.length; i++) { + buff[i] = this.items[i].renderHtml(); + } + return ( + '
              ' + + buff.join("") + + "
              " + ); + }, + postRender: function () { + var box = this.getDom(); + for (var i = 0; i < this.items.length; i++) { + this.items[i].postRender(); + } + uiUtils.makeUnselectable(box); + }, + _onMouseDown: function (e) { + var target = e.target || e.srcElement, + tagName = target && target.tagName && target.tagName.toLowerCase(); + if (tagName == "input" || tagName == "object" || tagName == "object") { + return false; + } + } + }; + utils.inherits(Toolbar, UIBase); + })(); + + +// ui/quick-operate.js +///import core +///import uicore +///import ui\popup.js +///import ui\stateful.js + (function () { + var utils = baidu.editor.utils, + domUtils = baidu.editor.dom.domUtils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase, + Popup = baidu.editor.ui.Popup, + Stateful = baidu.editor.ui.Stateful, + CellAlignPicker = baidu.editor.ui.CellAlignPicker, + QuickOperate = (baidu.editor.ui.QuickOperate = function (options) { + this.initOptions(options); + // this.initMenu(); + }); + + // var menuSeparator = { + // renderHtml: function() { + // return '
              '; + // }, + // postRender: function() {}, + // queryAutoHide: function() { + // return true; + // } + // }; + QuickOperate.prototype = { + // items: null, + uiName: "quick-operate", + // initMenu: function() { + // this.items = this.items || []; + // this.initPopup(); + // this.initItems(); + // }, + // initItems: function() { + // for (var i = 0; i < this.items.length; i++) { + // var item = this.items[i]; + // if (item == "-") { + // this.items[i] = this.getSeparator(); + // } else if (!(item instanceof MenuItem)) { + // item.editor = this.editor; + // item.theme = this.editor.options.theme; + // this.items[i] = this.createItem(item); + // } + // } + // }, + // getSeparator: function() { + // return menuSeparator; + // }, + // createItem: function(item) { + // //新增一个参数menu, 该参数存储了menuItem所对应的menu引用 + // item.menu = this; + // return new MenuItem(item); + // }, + _Popup_getContentHtmlTpl: Popup.prototype.getContentHtmlTpl, + getContentHtmlTpl: function () { + // if (this.items.length == 0) { + // return this._Popup_getContentHtmlTpl(); + // } + // var buff = []; + // for (var i = 0; i < this.items.length; i++) { + // var item = this.items[i]; + // buff[i] = item.renderHtml(); + // } + // return '
              ' + buff.join("") + "
              "; + return [ + '
              ', + '
              ', + '
              ', + '
              ', + '
              ', + '
              ', + '
              删除
              ', + '
              左对齐
              ', + '
              右对齐
              ', + '
              ', + '
              ', + ].join('') + }, + // _Popup_postRender: Popup.prototype.postRender, + // postRender: function() { + // var me = this; + // for (var i = 0; i < this.items.length; i++) { + // var item = this.items[i]; + // item.ownerMenu = this; + // item.postRender(); + // } + // domUtils.on(this.getDom(), "mouseover", function(evt) { + // evt = evt || event; + // var rel = evt.relatedTarget || evt.fromElement; + // var el = me.getDom(); + // if (!uiUtils.contains(el, rel) && el !== rel) { + // me.fireEvent("over"); + // } + // }); + // this._Popup_postRender(); + // }, + // queryAutoHide: function(el) { + // if (el) { + // if (uiUtils.contains(this.getDom(), el)) { + // return false; + // } + // for (var i = 0; i < this.items.length; i++) { + // var item = this.items[i]; + // if (item.queryAutoHide(el) === false) { + // return false; + // } + // } + // } + // }, + // clearItems: function() { + // for (var i = 0; i < this.items.length; i++) { + // var item = this.items[i]; + // clearTimeout(item._showingTimer); + // clearTimeout(item._closingTimer); + // if (item.subMenu) { + // item.subMenu.destroy(); + // } + // } + // this.items = []; + // }, + destroy: function () { + if (this.getDom()) { + domUtils.remove(this.getDom()); + } + // this.clearItems(); + }, + dispose: function () { + this.destroy(); + } + }; + utils.inherits(QuickOperate, Popup); + // + // /** + // * @update 2013/04/03 hancong03 新增一个参数menu, 该参数存储了menuItem所对应的menu引用 + // * @type {Function} + // */ + // var MenuItem = (baidu.editor.ui.MenuItem = function(options) { + // this.initOptions(options); + // this.initUIBase(); + // this.Stateful_init(); + // if (this.subMenu && !(this.subMenu instanceof QuickOperate)) { + // if (options.className && options.className.indexOf("aligntd") != -1) { + // var me = this; + // + // //获取单元格对齐初始状态 + // this.subMenu.selected = this.editor.queryCommandValue("cellalignment"); + // + // this.subMenu = new Popup({ + // content: new CellAlignPicker(this.subMenu), + // parentMenu: me, + // editor: me.editor, + // destroy: function() { + // if (this.getDom()) { + // domUtils.remove(this.getDom()); + // } + // } + // }); + // this.subMenu.addListener("postRenderAfter", function() { + // domUtils.on(this.getDom(), "mouseover", function() { + // me.addState("opened"); + // }); + // }); + // } else { + // this.subMenu = new QuickOperate(this.subMenu); + // } + // } + // }); + // MenuItem.prototype = { + // label: "", + // subMenu: null, + // ownerMenu: null, + // uiName: "menuitem", + // alwalysHoverable: true, + // getHtmlTpl: function() { + // return ( + // '
              ' + + // '
              ' + + // this.renderLabelHtml() + + // "
              " + + // "
              " + // ); + // }, + // postRender: function() { + // var me = this; + // this.addListener("over", function() { + // me.ownerMenu.fireEvent("submenuover", me); + // if (me.subMenu) { + // me.delayShowSubMenu(); + // } + // }); + // if (this.subMenu) { + // this.getDom().className += " edui-hassubmenu"; + // this.subMenu.render(); + // this.addListener("out", function() { + // me.delayHideSubMenu(); + // }); + // this.subMenu.addListener("over", function() { + // clearTimeout(me._closingTimer); + // me._closingTimer = null; + // me.addState("opened"); + // }); + // this.ownerMenu.addListener("hide", function() { + // me.hideSubMenu(); + // }); + // this.ownerMenu.addListener("submenuover", function(t, subMenu) { + // if (subMenu !== me) { + // me.delayHideSubMenu(); + // } + // }); + // this.subMenu._bakQueryAutoHide = this.subMenu.queryAutoHide; + // this.subMenu.queryAutoHide = function(el) { + // if (el && uiUtils.contains(me.getDom(), el)) { + // return false; + // } + // return this._bakQueryAutoHide(el); + // }; + // } + // this.getDom().style.tabIndex = "-1"; + // uiUtils.makeUnselectable(this.getDom()); + // this.Stateful_postRender(); + // }, + // delayShowSubMenu: function() { + // var me = this; + // if (!me.isDisabled()) { + // me.addState("opened"); + // clearTimeout(me._showingTimer); + // clearTimeout(me._closingTimer); + // me._closingTimer = null; + // me._showingTimer = setTimeout(function() { + // me.showSubMenu(); + // }, 250); + // } + // }, + // delayHideSubMenu: function() { + // var me = this; + // if (!me.isDisabled()) { + // me.removeState("opened"); + // clearTimeout(me._showingTimer); + // if (!me._closingTimer) { + // me._closingTimer = setTimeout(function() { + // if (!me.hasState("opened")) { + // me.hideSubMenu(); + // } + // me._closingTimer = null; + // }, 400); + // } + // } + // }, + // renderLabelHtml: function() { + // return ( + // '
              ' + + // '
              ' + + // '
              ' + + // (this.label || "") + + // "
              " + // ); + // }, + // getStateDom: function() { + // return this.getDom(); + // }, + // queryAutoHide: function(el) { + // if (this.subMenu && this.hasState("opened")) { + // return this.subMenu.queryAutoHide(el); + // } + // }, + // _onClick: function(event, this_) { + // if (this.hasState("disabled")) return; + // if (this.fireEvent("click", event, this_) !== false) { + // if (this.subMenu) { + // this.showSubMenu(); + // } else { + // Popup.postHide(event); + // } + // } + // }, + // showSubMenu: function() { + // var rect = uiUtils.getClientRect(this.getDom()); + // rect.right -= 5; + // rect.left += 2; + // rect.width -= 7; + // rect.top -= 4; + // rect.bottom += 4; + // rect.height += 8; + // this.subMenu.showAnchorRect(rect, true, true); + // }, + // hideSubMenu: function() { + // this.subMenu.hide(); + // } + // }; + // utils.inherits(MenuItem, UIBase); + // utils.extend(MenuItem.prototype, Stateful, true); + })(); + + +// ui/menu.js +///import core +///import uicore +///import ui\popup.js +///import ui\stateful.js + (function () { + var utils = baidu.editor.utils, + domUtils = baidu.editor.dom.domUtils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase, + Popup = baidu.editor.ui.Popup, + Stateful = baidu.editor.ui.Stateful, + CellAlignPicker = baidu.editor.ui.CellAlignPicker, + Menu = (baidu.editor.ui.Menu = function (options) { + this.initOptions(options); + this.initMenu(); + }); + + var menuSeparator = { + renderHtml: function () { + return '
              '; + }, + postRender: function () { + }, + queryAutoHide: function () { + return true; + } + }; + Menu.prototype = { + items: null, + uiName: "menu", + initMenu: function () { + this.items = this.items || []; + this.initPopup(); + this.initItems(); + }, + initItems: function () { + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + if (item == "-") { + this.items[i] = this.getSeparator(); + } else if (!(item instanceof MenuItem)) { + item.editor = this.editor; + item.theme = this.editor.options.theme; + this.items[i] = this.createItem(item); + } + } + }, + getSeparator: function () { + return menuSeparator; + }, + createItem: function (item) { + //新增一个参数menu, 该参数存储了menuItem所对应的menu引用 + item.menu = this; + return new MenuItem(item); + }, + _Popup_getContentHtmlTpl: Popup.prototype.getContentHtmlTpl, + getContentHtmlTpl: function () { + if (this.items.length == 0) { + return this._Popup_getContentHtmlTpl(); + } + var buff = []; + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + buff[i] = item.renderHtml(); + } + return '
              ' + buff.join("") + "
              "; + }, + _Popup_postRender: Popup.prototype.postRender, + postRender: function () { + var me = this; + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + item.ownerMenu = this; + item.postRender(); + } + domUtils.on(this.getDom(), "mouseover", function (evt) { + evt = evt || event; + var rel = evt.relatedTarget || evt.fromElement; + var el = me.getDom(); + if (!uiUtils.contains(el, rel) && el !== rel) { + me.fireEvent("over"); + } + }); + this._Popup_postRender(); + }, + queryAutoHide: function (el) { + if (el) { + if (uiUtils.contains(this.getDom(), el)) { + return false; + } + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + if (item.queryAutoHide(el) === false) { + return false; + } + } + } + }, + clearItems: function () { + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + clearTimeout(item._showingTimer); + clearTimeout(item._closingTimer); + if (item.subMenu) { + item.subMenu.destroy(); + } + } + this.items = []; + }, + destroy: function () { + if (this.getDom()) { + domUtils.remove(this.getDom()); + } + this.clearItems(); + }, + dispose: function () { + this.destroy(); + } + }; + utils.inherits(Menu, Popup); + + /** + * @update 2013/04/03 hancong03 新增一个参数menu, 该参数存储了menuItem所对应的menu引用 + * @type {Function} + */ + var MenuItem = (baidu.editor.ui.MenuItem = function (options) { + this.initOptions(options); + this.initUIBase(); + this.Stateful_init(); + if (this.subMenu && !(this.subMenu instanceof Menu)) { + if (options.className && options.className.indexOf("aligntd") != -1) { + var me = this; + + //获取单元格对齐初始状态 + this.subMenu.selected = this.editor.queryCommandValue("cellalignment"); + + this.subMenu = new Popup({ + content: new CellAlignPicker(this.subMenu), + parentMenu: me, + editor: me.editor, + destroy: function () { + if (this.getDom()) { + domUtils.remove(this.getDom()); + } + } + }); + this.subMenu.addListener("postRenderAfter", function () { + domUtils.on(this.getDom(), "mouseover", function () { + me.addState("opened"); + }); + }); + } else { + this.subMenu = new Menu(this.subMenu); + } + } + }); + MenuItem.prototype = { + label: "", + subMenu: null, + ownerMenu: null, + uiName: "menuitem", + alwalysHoverable: true, + getHtmlTpl: function () { + return ( + '
              ' + + '
              ' + + this.renderLabelHtml() + + "
              " + + "
              " + ); + }, + postRender: function () { + var me = this; + this.addListener("over", function () { + me.ownerMenu.fireEvent("submenuover", me); + if (me.subMenu) { + me.delayShowSubMenu(); + } + }); + if (this.subMenu) { + this.getDom().className += " edui-hassubmenu"; + this.subMenu.render(); + this.addListener("out", function () { + me.delayHideSubMenu(); + }); + this.subMenu.addListener("over", function () { + clearTimeout(me._closingTimer); + me._closingTimer = null; + me.addState("opened"); + }); + this.ownerMenu.addListener("hide", function () { + me.hideSubMenu(); + }); + this.ownerMenu.addListener("submenuover", function (t, subMenu) { + if (subMenu !== me) { + me.delayHideSubMenu(); + } + }); + this.subMenu._bakQueryAutoHide = this.subMenu.queryAutoHide; + this.subMenu.queryAutoHide = function (el) { + if (el && uiUtils.contains(me.getDom(), el)) { + return false; + } + return this._bakQueryAutoHide(el); + }; + } + this.getDom().style.tabIndex = "-1"; + uiUtils.makeUnselectable(this.getDom()); + this.Stateful_postRender(); + }, + delayShowSubMenu: function () { + var me = this; + if (!me.isDisabled()) { + me.addState("opened"); + clearTimeout(me._showingTimer); + clearTimeout(me._closingTimer); + me._closingTimer = null; + me._showingTimer = setTimeout(function () { + me.showSubMenu(); + }, 250); + } + }, + delayHideSubMenu: function () { + var me = this; + if (!me.isDisabled()) { + me.removeState("opened"); + clearTimeout(me._showingTimer); + if (!me._closingTimer) { + me._closingTimer = setTimeout(function () { + if (!me.hasState("opened")) { + me.hideSubMenu(); + } + me._closingTimer = null; + }, 400); + } + } + }, + renderLabelHtml: function () { + return ( + '
              ' + + '
              ' + + '
              ' + + (this.label || "") + + "
              " + ); + }, + getStateDom: function () { + return this.getDom(); + }, + queryAutoHide: function (el) { + if (this.subMenu && this.hasState("opened")) { + return this.subMenu.queryAutoHide(el); + } + }, + _onClick: function (event, this_) { + if (this.hasState("disabled")) return; + if (this.fireEvent("click", event, this_) !== false) { + if (this.subMenu) { + this.showSubMenu(); + } else { + Popup.postHide(event); + } + } + }, + showSubMenu: function () { + var rect = uiUtils.getClientRect(this.getDom()); + rect.right -= 5; + rect.left += 2; + rect.width -= 7; + rect.top -= 4; + rect.bottom += 4; + rect.height += 8; + this.subMenu.showAnchorRect(rect, true, true); + }, + hideSubMenu: function () { + this.subMenu.hide(); + } + }; + utils.inherits(MenuItem, UIBase); + utils.extend(MenuItem.prototype, Stateful, true); + })(); + + +// ui/combox.js +///import core +///import uicore +///import ui/menu.js +///import ui/splitbutton.js + (function () { + // todo: menu和item提成通用list + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + Menu = baidu.editor.ui.Menu, + SplitButton = baidu.editor.ui.SplitButton, + Combox = (baidu.editor.ui.Combox = function (options) { + this.initOptions(options); + this.initCombox(); + }); + Combox.prototype = { + uiName: "combox", + onbuttonclick: function () { + this.showPopup(); + }, + initCombox: function () { + var me = this; + this.items = this.items || []; + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + item.uiName = "listitem"; + item.index = i; + item.onclick = function () { + me.selectByIndex(this.index); + }; + } + this.popup = new Menu({ + items: this.items, + uiName: "list", + editor: this.editor, + captureWheel: true, + combox: this + }); + + this.initSplitButton(); + }, + _SplitButton_postRender: SplitButton.prototype.postRender, + postRender: function () { + this._SplitButton_postRender(); + this.setLabel(this.label || ""); + this.setValue(this.initValue || ""); + }, + showPopup: function () { + var rect = uiUtils.getClientRect(this.getDom()); + rect.top += 1; + rect.bottom -= 1; + rect.height -= 2; + this.popup.showAnchorRect(rect); + }, + getValue: function () { + return this.value; + }, + setValue: function (value) { + var index = this.indexByValue(value); + if (index != -1) { + this.selectedIndex = index; + this.setLabel(this.items[index].label); + this.value = this.items[index].value; + } else { + this.selectedIndex = -1; + this.setLabel(this.getLabelForUnknowValue(value)); + this.value = value; + } + }, + setLabel: function (label) { + this.getDom("button_body").innerHTML = label; + this.label = label; + }, + getLabelForUnknowValue: function (value) { + return value; + }, + indexByValue: function (value) { + for (var i = 0; i < this.items.length; i++) { + if (value == this.items[i].value) { + return i; + } + } + return -1; + }, + getItem: function (index) { + return this.items[index]; + }, + selectByIndex: function (index) { + if ( + index < this.items.length && + this.fireEvent("select", index) !== false + ) { + this.selectedIndex = index; + this.value = this.items[index].value; + this.setLabel(this.items[index].label); + } + } + }; + utils.inherits(Combox, SplitButton); + })(); + + +// ui/dialog.js +///import core +///import uicore +///import ui/mask.js +///import ui/button.js + (function () { + var utils = baidu.editor.utils, + domUtils = baidu.editor.dom.domUtils, + uiUtils = baidu.editor.ui.uiUtils, + Mask = baidu.editor.ui.Mask, + UIBase = baidu.editor.ui.UIBase, + Button = baidu.editor.ui.Button, + Dialog = (baidu.editor.ui.Dialog = function (options) { + if (options.name) { + var name = options.name; + var cssRules = options.cssRules; + if (!options.className) { + options.className = "edui-for-" + name; + } + if (cssRules) { + options.cssRules = + ".edui-for-" + name + " .edui-dialog-content {" + cssRules + "}"; + } + } + this.initOptions( + utils.extend( + { + autoReset: true, + draggable: true, + onok: function () { + }, + oncancel: function () { + }, + onclose: function (t, ok) { + return ok ? this.onok() : this.oncancel(); + }, + //是否控制dialog中的scroll事件, 默认为不阻止 + holdScroll: false + }, + options + ) + ); + this.initDialog(); + }); + var modalMask; + var dragMask; + var activeDialog; + Dialog.prototype = { + draggable: false, + uiName: "dialog", + initDialog: function () { + var me = this, + theme = this.editor.options.theme; + if (this.cssRules) { + this.cssRules = ".edui-" + theme + " " + this.cssRules; + utils.cssRule("edui-customize-" + this.name + "-style", this.cssRules); + } + this.initUIBase(); + this.modalMask = + modalMask || + (modalMask = new Mask({ + className: "edui-dialog-modalmask", + theme: theme, + onclick: function () { + activeDialog && activeDialog.close(false); + } + })); + this.dragMask = + dragMask || + (dragMask = new Mask({ + className: "edui-dialog-dragmask", + theme: theme + })); + this.closeButton = new Button({ + className: "edui-dialog-closebutton", + title: me.closeDialog, + theme: theme, + onclick: function () { + me.close(false); + } + }); + + this.fullscreen && this.initResizeEvent(); + + if (this.buttons) { + for (var i = 0; i < this.buttons.length; i++) { + if (!(this.buttons[i] instanceof Button)) { + this.buttons[i] = new Button( + utils.extend( + this.buttons[i], + { + editor: this.editor + }, + true + ) + ); + } + } + } + }, + initResizeEvent: function () { + var me = this; + + + domUtils.on(window, "resize", function () { + + if (me._hidden || me._hidden === undefined) { + return; + } + + if (me.__resizeTimer) { + window.clearTimeout(me.__resizeTimer); + } + + me.__resizeTimer = window.setTimeout(function () { + me.__resizeTimer = null; + + + var dialogWrapNode = me.getDom(), + contentNode = me.getDom("content"), + wrapRect = UE.ui.uiUtils.getClientRect(dialogWrapNode), + contentRect = UE.ui.uiUtils.getClientRect(contentNode), + vpRect = uiUtils.getViewportRect(); + + contentNode.style.width = + vpRect.width - wrapRect.width + contentRect.width + "px"; + contentNode.style.height = + vpRect.height - wrapRect.height + contentRect.height + "px"; + + dialogWrapNode.style.width = vpRect.width + "px"; + dialogWrapNode.style.height = vpRect.height + "px"; + + me.fireEvent("resize"); + }, 100); + }); + }, + fitSize: function () { + // console.log('fitSize.dialog') + var popBodyEl = this.getDom("body"); + var $foot = popBodyEl.querySelector('.edui-dialog-foot'); + var heightWithoutBody = 70; + if (!$foot) { + heightWithoutBody = 30; + } + var size = this.mesureSize(); + var winSize = uiUtils.getViewportRect(); + var width = size.width; + var height = size.height - heightWithoutBody; + var maxWidth = winSize.width - 2; + var maxHeight = winSize.height - heightWithoutBody - 2; + if (width > maxWidth) { + height = height * maxWidth / width; + width = maxWidth; + } + if (height > maxHeight) { + width = width * maxHeight / height; + height = maxHeight; + } + var scale = (width / size.width); + // console.log('size', {sizeWidth: size.width, sizeHeight: size.height, width, height, scale}); + // console.log('popBodyEl',popBodyEl, popBodyEl.querySelector('.edui-dialog-foot')); + // window._xxx = popBodyEl; + var $content = popBodyEl.querySelector('.edui-dialog-content'); + if (!$content.dataset.dialogScaled) { + $content.dataset.dialogScaled = true + $content.style.width = (width) + 'px'; + $content.style.height = (height) + 'px'; + var $iframe = popBodyEl.querySelector('.edui-dialog-content iframe'); + $iframe.style.width = (size.width) + 'px'; + $iframe.style.height = (size.height - heightWithoutBody) + 'px'; + $iframe.style.transformOrigin = '0 0'; + $iframe.style.transform = 'scale(' + scale + ')'; + size.width = width + size.height = height + heightWithoutBody + } + popBodyEl.style.width = size.width + "px"; + popBodyEl.style.height = size.height + "px"; + return size; + }, + safeSetOffset: function (offset) { + var me = this; + var el = me.getDom(); + var vpRect = uiUtils.getViewportRect(); + var rect = uiUtils.getClientRect(el); + var left = offset.left; + if (left + rect.width > vpRect.right) { + left = vpRect.right - rect.width; + } + var top = offset.top; + if (top + rect.height > vpRect.bottom) { + top = vpRect.bottom - rect.height; + } + el.style.left = Math.max(left, 0) + "px"; + el.style.top = Math.max(top, 0) + "px"; + }, + showAtCenter: function () { + var vpRect = uiUtils.getViewportRect(); + + if (!this.fullscreen) { + this.getDom().style.display = ""; + var popSize = this.fitSize(); + var titleHeight = this.getDom("titlebar").offsetHeight | 0; + var left = vpRect.width / 2 - popSize.width / 2; + var top = + vpRect.height / 2 - (popSize.height - titleHeight) / 2 - titleHeight; + var popEl = this.getDom(); + this.safeSetOffset({ + left: Math.max(left | 0, 0), + top: Math.max(top | 0, 0) + }); + if (!domUtils.hasClass(popEl, "edui-state-centered")) { + popEl.className += " edui-state-centered"; + } + } else { + var dialogWrapNode = this.getDom(), + contentNode = this.getDom("content"); + + dialogWrapNode.style.display = "block"; + + var wrapRect = UE.ui.uiUtils.getClientRect(dialogWrapNode), + contentRect = UE.ui.uiUtils.getClientRect(contentNode); + dialogWrapNode.style.left = "-100000px"; + + contentNode.style.width = + vpRect.width - wrapRect.width + contentRect.width + "px"; + contentNode.style.height = + vpRect.height - wrapRect.height + contentRect.height + "px"; + + dialogWrapNode.style.width = vpRect.width + "px"; + dialogWrapNode.style.height = vpRect.height + "px"; + dialogWrapNode.style.left = 0; + + //保存环境的overflow值 + this._originalContext = { + html: { + overflowX: document.documentElement.style.overflowX, + overflowY: document.documentElement.style.overflowY + }, + body: { + overflowX: document.body.style.overflowX, + overflowY: document.body.style.overflowY + } + }; + + document.documentElement.style.overflowX = "hidden"; + document.documentElement.style.overflowY = "hidden"; + document.body.style.overflowX = "hidden"; + document.body.style.overflowY = "hidden"; + } + + this._show(); + }, + getContentHtml: function () { + var contentHtml = ""; + if (typeof this.content == "string") { + contentHtml = this.content; + } else if (this.iframeUrl) { + contentHtml = + ''; + } + return contentHtml; + }, + getHtmlTpl: function () { + var footHtml = ""; + + if (this.buttons) { + var buff = []; + for (var i = 0; i < this.buttons.length; i++) { + buff[i] = this.buttons[i].renderHtml(); + } + footHtml = + '
              ' + + '
              ' + + buff.join("") + + "
              " + + "
              "; + } + + return ( + '
              ' + + '
              ' + + '
              ' + + '
              ' + + '' + + (this.title || "") + + "" + + "
              " + + this.closeButton.renderHtml() + + "
              " + + '
              ' + + (this.autoReset ? "" : this.getContentHtml()) + + "
              " + + footHtml + + "
              " + ); + }, + postRender: function () { + // todo: 保持居中/记住上次关闭位置选项 + if (!this.modalMask.getDom()) { + this.modalMask.render(); + this.modalMask.hide(); + } + if (!this.dragMask.getDom()) { + this.dragMask.render(); + this.dragMask.hide(); + } + var me = this; + this.addListener("show", function () { + me.modalMask.show(this.getDom().style.zIndex - 2); + }); + this.addListener("hide", function () { + me.modalMask.hide(); + }); + if (this.buttons) { + for (var i = 0; i < this.buttons.length; i++) { + this.buttons[i].postRender(); + } + } + domUtils.on(window, "resize", function () { + setTimeout(function () { + if (!me.isHidden()) { + me.safeSetOffset(uiUtils.getClientRect(me.getDom())); + } + }); + }); + + //hold住scroll事件,防止dialog的滚动影响页面 + // if( this.holdScroll ) { + // + // if( !me.iframeUrl ) { + // domUtils.on( document.getElementById( me.id + "_iframe"), !browser.gecko ? "mousewheel" : "DOMMouseScroll", function(e){ + // domUtils.preventDefault(e); + // } ); + // } else { + // me.addListener('dialogafterreset', function(){ + // window.setTimeout(function(){ + // var iframeWindow = document.getElementById( me.id + "_iframe").contentWindow; + // + // if( browser.ie ) { + // + // var timer = window.setInterval(function(){ + // + // if( iframeWindow.document && iframeWindow.document.body ) { + // window.clearInterval( timer ); + // timer = null; + // domUtils.on( iframeWindow.document.body, !browser.gecko ? "mousewheel" : "DOMMouseScroll", function(e){ + // domUtils.preventDefault(e); + // } ); + // } + // + // }, 100); + // + // } else { + // domUtils.on( iframeWindow, !browser.gecko ? "mousewheel" : "DOMMouseScroll", function(e){ + // domUtils.preventDefault(e); + // } ); + // } + // + // }, 1); + // }); + // } + // + // } + this._hide(); + }, + mesureSize: function () { + var body = this.getDom("body"); + var width = uiUtils.getClientRect(this.getDom("content")).width; + var dialogBodyStyle = body.style; + dialogBodyStyle.width = width; + // console.log('getClientRect', body) + return uiUtils.getClientRect(body); + }, + _onTitlebarMouseDown: function (evt, el) { + if (this.draggable) { + var rect; + var vpRect = uiUtils.getViewportRect(); + var me = this; + uiUtils.startDrag(evt, { + ondragstart: function () { + rect = uiUtils.getClientRect(me.getDom()); + me.getDom("contmask").style.visibility = "visible"; + me.dragMask.show(me.getDom().style.zIndex - 1); + }, + ondragmove: function (x, y) { + var left = rect.left + x; + var top = rect.top + y; + me.safeSetOffset({ + left: left, + top: top + }); + }, + ondragstop: function () { + me.getDom("contmask").style.visibility = "hidden"; + domUtils.removeClasses(me.getDom(), ["edui-state-centered"]); + me.dragMask.hide(); + } + }); + } + }, + reset: function () { + this.getDom("content").innerHTML = this.getContentHtml(); + this.fireEvent("dialogafterreset"); + }, + _show: function () { + if (this._hidden) { + this.getDom().style.display = ""; + + //要高过编辑器的zindxe + this.editor.container.style.zIndex && + (this.getDom().style.zIndex = + this.editor.container.style.zIndex * 1 + 10); + this._hidden = false; + this.fireEvent("show"); + baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex = + this.getDom().style.zIndex - 4; + } + }, + isHidden: function () { + return this._hidden; + }, + _hide: function () { + if (!this._hidden) { + var wrapNode = this.getDom(); + wrapNode.style.display = "none"; + wrapNode.style.zIndex = ""; + wrapNode.style.width = ""; + wrapNode.style.height = ""; + this._hidden = true; + this.fireEvent("hide"); + } + }, + open: function () { + if (this.autoReset) { + //有可能还没有渲染 + try { + this.reset(); + } catch (e) { + this.render(); + this.open(); + } + } + this.showAtCenter(); + if (this.iframeUrl) { + try { + this.getDom("iframe").focus(); + } catch (ex) { + } + } + activeDialog = this; + }, + _onCloseButtonClick: function (evt, el) { + this.close(false); + }, + close: function (ok) { + if (this.fireEvent("close", ok) !== false) { + //还原环境 + if (this.fullscreen) { + document.documentElement.style.overflowX = this._originalContext.html.overflowX; + document.documentElement.style.overflowY = this._originalContext.html.overflowY; + document.body.style.overflowX = this._originalContext.body.overflowX; + document.body.style.overflowY = this._originalContext.body.overflowY; + delete this._originalContext; + } + this._hide(); + + //销毁content + var content = this.getDom("content"); + var iframe = this.getDom("iframe"); + if (content && iframe) { + var doc = iframe.contentDocument || iframe.contentWindow.document; + doc && (doc.body.innerHTML = ""); + domUtils.remove(content); + } + } + } + }; + utils.inherits(Dialog, UIBase); + })(); + + +// ui/menubutton.js +///import core +///import uicore +///import ui/menu.js +///import ui/splitbutton.js + (function () { + var utils = baidu.editor.utils, + Menu = baidu.editor.ui.Menu, + SplitButton = baidu.editor.ui.SplitButton, + MenuButton = (baidu.editor.ui.MenuButton = function (options) { + this.initOptions(options); + this.initMenuButton(); + }); + MenuButton.prototype = { + initMenuButton: function () { + var me = this; + this.uiName = "menubutton"; + this.popup = new Menu({ + items: me.items, + className: me.className, + editor: me.editor + }); + this.popup.addListener("show", function () { + var list = this; + for (var i = 0; i < list.items.length; i++) { + list.items[i].removeState("checked"); + if (list.items[i].value == me._value) { + list.items[i].addState("checked"); + this.value = me._value; + } + } + }); + this.initSplitButton(); + }, + setValue: function (value) { + this._value = value; + } + }; + utils.inherits(MenuButton, SplitButton); + })(); + + +// ui/multiMenu.js +///import core +///import uicore +///commands 表情 + (function () { + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + SplitButton = baidu.editor.ui.SplitButton, + MultiMenuPop = (baidu.editor.ui.MultiMenuPop = function (options) { + this.initOptions(options); + this.initMultiMenu(); + }); + + MultiMenuPop.prototype = { + initMultiMenu: function () { + var me = this; + this.popup = new Popup({ + content: "", + editor: me.editor, + iframe_rendered: false, + onshow: function () { + if (!this.iframe_rendered) { + this.iframe_rendered = true; + this.getDom("content").innerHTML = + ''; + me.editor.container.style.zIndex && + (this.getDom().style.zIndex = + me.editor.container.style.zIndex * 1 + 1); + } + } + // canSideUp:false, + // canSideLeft:false + }); + this.onbuttonclick = function () { + this.showPopup(); + }; + this.initSplitButton(); + } + }; + + utils.inherits(MultiMenuPop, SplitButton); + })(); + + +// ui/shortcutmenu.js + (function () { + var UI = baidu.editor.ui, + UIBase = UI.UIBase, + uiUtils = UI.uiUtils, + utils = baidu.editor.utils, + domUtils = baidu.editor.dom.domUtils; + + var allMenus = [], //存储所有快捷菜单 + timeID, + isSubMenuShow = false; //是否有子pop显示 + + var ShortCutMenu = (UI.ShortCutMenu = function (options) { + this.initOptions(options); + this.initShortCutMenu(); + }); + + ShortCutMenu.postHide = hideAllMenu; + + ShortCutMenu.prototype = { + isHidden: true, + SPACE: 5, + initShortCutMenu: function () { + this.items = this.items || []; + this.initUIBase(); + this.initItems(); + this.initEvent(); + allMenus.push(this); + }, + initEvent: function () { + var me = this, + doc = me.editor.document; + + /* + domUtils.on(doc, "mousemove", function(e) { + if (me.isHidden === false) { + //有pop显示就不隐藏快捷菜单 + if (me.getSubMenuMark() || me.eventType == "contextmenu") return; + + var flag = true, + el = me.getDom(), + wt = el.offsetWidth, + ht = el.offsetHeight, + distanceX = wt / 2 + me.SPACE, //距离中心X标准 + distanceY = ht / 2, //距离中心Y标准 + x = Math.abs(e.screenX - me.left), //离中心距离横坐标 + y = Math.abs(e.screenY - me.top); //离中心距离纵坐标 + + clearTimeout(timeID); + timeID = setTimeout(function() { + if (y > 0 && y < distanceY) { + me.setOpacity(el, "1"); + } else if (y > distanceY && y < distanceY + 70) { + me.setOpacity(el, "0.5"); + flag = false; + } else if (y > distanceY + 70 && y < distanceY + 140) { + me.hide(); + } + + if (flag && x > 0 && x < distanceX) { + me.setOpacity(el, "1"); + } else if (x > distanceX && x < distanceX + 70) { + me.setOpacity(el, "0.5"); + } else if (x > distanceX + 70 && x < distanceX + 140) { + console.log('hide') + me.hide(); + } + }); + } + }); + */ + //ie\ff下 mouseout不准 + /* + if (browser.chrome) { + domUtils.on(doc, "mouseout", function(e) { + var relatedTgt = e.relatedTarget || e.toElement; + + if (relatedTgt == null || relatedTgt.tagName == "HTML") { + me.hide(); + } + }); + } + */ + + me.editor.addListener("afterhidepop", function () { + if (!me.isHidden) { + isSubMenuShow = true; + } + }); + }, + initItems: function () { + if (utils.isArray(this.items)) { + for (var i = 0, len = this.items.length; i < len; i++) { + if ('string' !== typeof this.items[i]) { + continue; + } + var item = this.items[i].toLowerCase(); + + if (UI[item]) { + this.items[i] = new UI[item](this.editor); + this.items[i].className += " edui-short-cut-sub-menu "; + } + } + } + }, + setOpacity: function (el, value) { + if (browser.ie && browser.version < 9) { + el.style.filter = "alpha(opacity = " + parseFloat(value) * 100 + ");"; + } else { + el.style.opacity = value; + } + }, + getSubMenuMark: function () { + isSubMenuShow = false; + var layerEle = uiUtils.getFixedLayer(); + var list = domUtils.getElementsByTagName(layerEle, "div", function (node) { + return domUtils.hasClass(node, "edui-short-cut-sub-menu edui-popup"); + }); + + for (var i = 0, node; (node = list[i++]);) { + if (node.style.display !== "none") { + isSubMenuShow = true; + } + } + return isSubMenuShow; + }, + show: function (e, hasContextmenu) { + var me = this, + offset = {}, + el = this.getDom(), + fixedlayer = uiUtils.getFixedLayer(); + + for (let item of this.items) { + if ('shouldUiShow' in item) { + item.uiShow(item.shouldUiShow()); + } + } + + function setPos(offset) { + if (offset.left < 0) { + offset.left = 0; + } + if (offset.top < 0) { + offset.top = 0; + } + el.style.cssText = + "position:absolute;left:" + + offset.left + + "px;top:" + + offset.top + + "px;"; + } + + function setPosByCxtMenu(menu) { + if (!menu.tagName) { + menu = menu.getDom(); + } + offset.left = parseInt(menu.style.left); + offset.top = parseInt(menu.style.top); + offset.top -= el.offsetHeight + 15; + setPos(offset); + } + + me.eventType = e.type; + el.style.cssText = "display:block;left:-9999px"; + + // if (e.type === "contextmenu" && hasContextmenu) { + // var menu = domUtils.getElementsByTagName( + // fixedlayer, + // "div", + // "edui-contextmenu" + // )[0]; + // if (menu) { + // setPosByCxtMenu(menu); + // } else { + // me.editor.addListener("aftershowcontextmenu", function (type, menu) { + // setPosByCxtMenu(menu); + // }); + // } + // } else { + offset = uiUtils.getViewportOffsetByEvent(e); + offset.top -= el.offsetHeight + me.SPACE; + offset.left += me.SPACE + 20; + setPos(offset); + me.setOpacity(el, 1); + // } + + me.isHidden = false; + me.left = e.screenX + el.offsetWidth / 2 - me.SPACE; + me.top = e.screenY - el.offsetHeight / 2 - me.SPACE; + + if (me.editor) { + el.style.zIndex = me.editor.container.style.zIndex * 1 + 10; + fixedlayer.style.zIndex = el.style.zIndex - 1; + } + }, + hide: function () { + if (this.getDom()) { + this.getDom().style.display = "none"; + } + this.isHidden = true; + }, + postRender: function () { + if (utils.isArray(this.items)) { + for (var i = 0, item; (item = this.items[i++]);) { + item.postRender(); + } + } + }, + getHtmlTpl: function () { + var buff; + if (utils.isArray(this.items)) { + buff = []; + for (var i = 0; i < this.items.length; i++) { + buff[i] = this.items[i].renderHtml(); + } + buff = buff.join(""); + } else { + buff = this.items; + } + + return ( + '
              ' + + buff + + "
              " + ); + } + }; + + utils.inherits(ShortCutMenu, UIBase); + + function hideAllMenu(e) { + var tgt = e.target || e.srcElement, + cur = domUtils.findParent( + tgt, + function (node) { + return ( + domUtils.hasClass(node, "edui-shortcutmenu") || + domUtils.hasClass(node, "edui-popup") + ); + }, + true + ); + + if (!cur) { + for (var i = 0, menu; (menu = allMenus[i++]);) { + menu.hide(); + } + } + } + + domUtils.on(document, "mousedown", function (e) { + hideAllMenu(e); + }); + + domUtils.on(window, "scroll", function (e) { + hideAllMenu(e); + }); + })(); + + +// ui/breakline.js + (function () { + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase, + Breakline = (baidu.editor.ui.Breakline = function (options) { + this.initOptions(options); + this.initSeparator(); + }); + Breakline.prototype = { + uiName: "Breakline", + initSeparator: function () { + this.initUIBase(); + }, + getHtmlTpl: function () { + return "
              "; + } + }; + utils.inherits(Breakline, UIBase); + })(); + + +// ui/message.js +///import core +///import uicore + (function () { + var utils = baidu.editor.utils, + domUtils = baidu.editor.dom.domUtils, + UIBase = baidu.editor.ui.UIBase, + Message = (baidu.editor.ui.Message = function (options) { + this.initOptions(options); + this.initMessage(); + }); + + Message.prototype = { + initMessage: function () { + this.initUIBase(); + }, + getHtmlTpl: function () { + return ( + '
              ' + + '
              ×
              ' + + '
              ' + + ' ' + + '
              ' + + '
              ' + + "
              " + + "
              " + + "
              " + ); + }, + reset: function (opt) { + var me = this; + if (!opt.keepshow) { + clearTimeout(this.timer); + me.timer = setTimeout(function () { + me.hide(); + }, opt.timeout || 4000); + } + + opt.content !== undefined && me.setContent(opt.content); + opt.type !== undefined && me.setType(opt.type); + + me.show(); + }, + postRender: function () { + var me = this, + closer = this.getDom("closer"); + closer && + domUtils.on(closer, "click", function () { + me.hide(); + }); + }, + setContent: function (content) { + this.getDom("content").innerHTML = content; + }, + setType: function (type) { + type = type || "info"; + var body = this.getDom("body"); + body.className = body.className.replace( + /edui-message-type-[\w-]+/, + "edui-message-type-" + type + ); + }, + getContent: function () { + return this.getDom("content").innerHTML; + }, + getType: function () { + var arr = this.getDom("body").match(/edui-message-type-([\w-]+)/); + return arr ? arr[1] : ""; + }, + show: function () { + this.getDom().style.display = "block"; + }, + hide: function () { + var dom = this.getDom(); + if (dom) { + dom.style.display = "none"; + dom.parentNode && dom.parentNode.removeChild(dom); + } + } + }; + + utils.inherits(Message, UIBase); + })(); + + +// adapter/editorui.js +//ui跟编辑器的适配層 +//那个按钮弹出是dialog,是下拉筐等都是在这个js中配置 +//自己写的ui也要在这里配置,放到baidu.editor.ui下边,当编辑器实例化的时候会根据ueditor.config中的toolbars找到相应的进行实例化 + (function () { + var utils = baidu.editor.utils; + var editorui = baidu.editor.ui; + var _Dialog = editorui.Dialog; + editorui.buttons = {}; + + editorui.Dialog = function (options) { + var dialog = new _Dialog(options); + dialog.addListener("hide", function () { + if (dialog.editor) { + var editor = dialog.editor; + try { + if (browser.gecko) { + var y = editor.window.scrollY, + x = editor.window.scrollX; + editor.body.focus(); + editor.window.scrollTo(x, y); + } else { + editor.focus(); + } + } catch (ex) { + } + } + }); + return dialog; + }; + + //为工具栏添加按钮,以下都是统一的按钮触发命令,所以写在一起 + var btnCmds = [ + "undo", + "redo", + "formatmatch", + "bold", + "italic", + "underline", + "fontborder", + "touppercase", + "tolowercase", + "strikethrough", + "subscript", + "superscript", + "source", + "indent", + "outdent", + "blockquote", + "pasteplain", + "pagebreak", + "selectall", + "print", + "horizontal", + "removeformat", + "time", + "date", + "unlink", + "insertparagraphbeforetable", + "insertrow", + "insertcol", + "mergeright", + "mergedown", + "deleterow", + "deletecol", + "splittorows", + "splittocols", + "splittocells", + "mergecells", + "deletetable", + ]; + + for (var i = 0, ci; (ci = btnCmds[i++]);) { + ci = ci.toLowerCase(); + editorui[ci] = (function (cmd) { + return function (editor) { + var ui = new editorui.Button({ + className: "edui-for-" + cmd, + title: + editor.options.labelMap[cmd] || + editor.getLang("labelMap." + cmd) || + "", + onclick: function () { + editor.execCommand(cmd); + }, + theme: editor.options.theme, + showText: false + }); + switch (cmd) { + case 'bold': + case 'italic': + case 'underline': + case 'strikethrough': + case 'fontborder': + ui.shouldUiShow = (function (cmdInternal) { + return function () { + if (!editor.selection.getText()) { + return false; + } + return editor.queryCommandState(cmdInternal) !== UE.constants.STATEFUL.DISABLED; + } + })(cmd); + break; + } + editorui.buttons[cmd] = ui; + editor.addListener("selectionchange", function ( + type, + causeByUi, + uiReady + ) { + var state = editor.queryCommandState(cmd); + if (state === -1) { + ui.setDisabled(true); + ui.setChecked(false); + } else { + if (!uiReady) { + ui.setDisabled(false); + ui.setChecked(state); + } + } + }); + return ui; + }; + })(ci); + } + + //清除文档 + editorui.cleardoc = function (editor) { + var ui = new editorui.Button({ + className: "edui-for-cleardoc", + title: + editor.options.labelMap.cleardoc || + editor.getLang("labelMap.cleardoc") || + "", + theme: editor.options.theme, + onclick: function () { + if (confirm(editor.getLang("confirmClear"))) { + editor.execCommand("cleardoc"); + } + } + }); + editorui.buttons["cleardoc"] = ui; + editor.addListener("selectionchange", function () { + ui.setDisabled(editor.queryCommandState("cleardoc") == -1); + }); + return ui; + }; + + var imageTypeSet = [ + 'none', 'left', 'center', 'right' + ]; + for (let value of imageTypeSet) { + (function (value) { + editorui['image' + value] = function (editor) { + var ui = new editorui.Button({ + className: "edui-for-" + 'image' + value, + title: + editor.options.labelMap['image' + value] || + editor.getLang( + "labelMap." + 'image' + value + ) || + "", + theme: editor.options.theme, + onclick: function () { + editor.execCommand('imagefloat', value); + }, + shouldUiShow: function () { + let closedNode = editor.selection.getRange().getClosedNode(); + if (!closedNode || closedNode.tagName !== "IMG") { + return false; + } + if (domUtils.hasClass(closedNode, "uep-loading") || domUtils.hasClass(closedNode, "uep-loading-error")) { + return false; + } + return editor.queryCommandState('imagefloat') !== UE.constants.STATEFUL.DISABLED; + } + }); + editorui.buttons['image' + value] = ui; + editor.addListener("selectionchange", function ( + type, + causeByUi, + uiReady + ) { + ui.setDisabled(editor.queryCommandState('imagefloat') === UE.constants.STATEFUL.DISABLED); + ui.setChecked(editor.queryCommandValue('imagefloat') === value && !uiReady); + }); + return ui; + }; + })(value); + } + + //排版,图片排版,文字方向 + var typeset = { + justify: ["left", "right", "center", "justify"], + directionality: ["ltr", "rtl"] + }; + for (var p in typeset) { + (function (cmd, val) { + for (var i = 0, ci; (ci = val[i++]);) { + (function (cmd2) { + editorui[cmd.replace("float", "") + cmd2] = function (editor) { + var ui = new editorui.Button({ + className: "edui-for-" + cmd.replace("float", "") + cmd2, + title: + editor.options.labelMap[cmd.replace("float", "") + cmd2] || + editor.getLang( + "labelMap." + cmd.replace("float", "") + cmd2 + ) || + "", + theme: editor.options.theme, + onclick: function () { + editor.execCommand(cmd, cmd2); + } + }); + editorui.buttons[cmd] = ui; + editor.addListener("selectionchange", function ( + type, + causeByUi, + uiReady + ) { + ui.setDisabled(editor.queryCommandState(cmd) == -1); + ui.setChecked(editor.queryCommandValue(cmd) == cmd2 && !uiReady); + }); + return ui; + }; + })(ci); + } + })(p, typeset[p]); + } + + //字体颜色和背景颜色 + for (var i = 0, ci; (ci = ["backcolor", "forecolor"][i++]);) { + editorui[ci] = (function (cmd) { + return function (editor) { + var ui = new editorui.ColorButton({ + className: "edui-for-" + cmd, + color: "default", + title: + editor.options.labelMap[cmd] || + editor.getLang("labelMap." + cmd) || + "", + editor: editor, + onpickcolor: function (t, color) { + editor.execCommand(cmd, color); + }, + onpicknocolor: function () { + editor.execCommand(cmd, "default"); + this.setColor("transparent"); + this.color = "default"; + }, + onbuttonclick: function () { + editor.execCommand(cmd, this.color); + }, + shouldUiShow: function () { + if (!editor.selection.getText()) { + return false; + } + return editor.queryCommandState(cmd) !== UE.constants.STATEFUL.DISABLED; + } + }); + + editorui.buttons[cmd] = ui; + editor.addListener("selectionchange", function () { + ui.setDisabled(editor.queryCommandState(cmd) == -1); + }); + return ui; + }; + })(ci); + } + + var dialogIframeUrlMap = { + anchor: "~/dialogs/anchor/anchor.html?2f10d082", + insertimage: "~/dialogs/image/image.html?4bce17a0", + link: "~/dialogs/link/link.html?ccbfcf18", + spechars: "~/dialogs/spechars/spechars.html?3bbeb696", + searchreplace: "~/dialogs/searchreplace/searchreplace.html?2cb782d2", + insertvideo: "~/dialogs/video/video.html?7fde01cd", + insertaudio: "~/dialogs/audio/audio.html?d264cea1", + help: "~/dialogs/help/help.html?05c0c8bf", + preview: "~/dialogs/preview/preview.html?5d9a0847", + emotion: "~/dialogs/emotion/emotion.html?a7bc0989", + wordimage: "~/dialogs/wordimage/wordimage.html?11da452e", + formula: "~/dialogs/formula/formula.html?9a5a1511", + attachment: "~/dialogs/attachment/attachment.html?d632fa7c", + insertframe: "~/dialogs/insertframe/insertframe.html?807119a5", + edittip: "~/dialogs/table/edittip.html?fa0ea189", + edittable: "~/dialogs/table/edittable.html?134e2f06", + edittd: "~/dialogs/table/edittd.html?9fe1a06e", + scrawl: "~/dialogs/scrawl/scrawl.html?c8323e43", + template: "~/dialogs/template/template.html?3c8090b7", + background: "~/dialogs/background/background.html?c2bb8b05", + contentimport: "~/dialogs/contentimport/contentimport.html?e298f77b", + }; + var dialogBtns = { + noOk: ["searchreplace", "help", "spechars", "preview"], + ok: [ + "attachment", + "anchor", + "link", + "insertimage", + "insertframe", + "wordimage", + "insertvideo", + "insertaudio", + "edittip", + "edittable", + "edittd", + "scrawl", + "template", + "formula", + "background", + "contentimport", + ] + }; + for (var p in dialogBtns) { + (function (type, vals) { + for (var i = 0, ci; (ci = vals[i++]);) { + //todo opera下存在问题 + if (browser.opera && ci === "searchreplace") { + continue; + } + (function (cmd) { + editorui[cmd] = function (editor, iframeUrl, title) { + iframeUrl = + iframeUrl || + (editor.options.dialogIframeUrlMap || {})[cmd] || + dialogIframeUrlMap[cmd]; + title = + editor.options.labelMap[cmd] || + editor.getLang("labelMap." + cmd) || + ""; + + var dialog; + //没有iframeUrl不创建dialog + if (iframeUrl) { + dialog = new editorui.Dialog( + utils.extend( + { + iframeUrl: editor.ui.mapUrl(iframeUrl), + editor: editor, + className: "edui-for-" + cmd, + title: title, + holdScroll: cmd === "insertimage", + fullscreen: /preview/.test(cmd), + closeDialog: editor.getLang("closeDialog") + }, + type === "ok" + ? { + buttons: [ + { + className: "edui-okbutton", + label: editor.getLang("ok"), + editor: editor, + onclick: function () { + dialog.close(true); + } + }, + { + className: "edui-cancelbutton", + label: editor.getLang("cancel"), + editor: editor, + onclick: function () { + dialog.close(false); + } + } + ] + } + : {} + ) + ); + + editor.ui._dialogs[cmd + "Dialog"] = dialog; + } + + var ui = new editorui.Button({ + className: "edui-for-" + cmd, + title: title, + onclick: function () { + if (editor.options.toolbarCallback) { + if (true === editor.options.toolbarCallback(cmd, editor)) { + return; + } + } + if (dialog) { + switch (cmd) { + case "wordimage": + var images = editor.execCommand("wordimage"); + if (images && images.length) { + dialog.render(); + dialog.open(); + } + break; + case "scrawl": + if (editor.queryCommandState("scrawl") !== -1) { + dialog.render(); + dialog.open(); + } + break; + default: + dialog.render(); + dialog.open(); + } + } + }, + theme: editor.options.theme, + disabled: (cmd === "scrawl" && editor.queryCommandState("scrawl") === -1) + }); + switch (cmd) { + case 'insertimage': + case 'formula': + ui.shouldUiShow = (function (cmd) { + return function () { + let closedNode = editor.selection.getRange().getClosedNode(); + if (!closedNode || closedNode.tagName !== "IMG") { + return false; + } + if ('formula' === cmd && closedNode.getAttribute('data-formula-image') !== null) { + return true; + } + if ('insertimage' === cmd) { + return true; + } + return false; + }; + })(cmd); + break; + } + editorui.buttons[cmd] = ui; + editor.addListener("selectionchange", function () { + //只存在于右键菜单而无工具栏按钮的ui不需要检测状态 + var unNeedCheckState = {edittable: 1}; + if (cmd in unNeedCheckState) return; + + var state = editor.queryCommandState(cmd); + if (ui.getDom()) { + ui.setDisabled(state === -1); + ui.setChecked(state); + } + }); + + return ui; + }; + })(ci.toLowerCase()); + } + })(p, dialogBtns[p]); + } + + editorui.insertcode = function (editor, list, title) { + list = editor.options["insertcode"] || []; + title = + editor.options.labelMap["insertcode"] || + editor.getLang("labelMap.insertcode") || + ""; + // if (!list.length) return; + var items = []; + utils.each(list, function (key, val) { + items.push({ + label: key, + value: val, + theme: editor.options.theme, + renderLabelHtml: function () { + return ( + '
              ' + (this.label || "") + "
              " + ); + } + }); + }); + + var ui = new editorui.Combox({ + editor: editor, + items: items, + onselect: function (t, index) { + editor.execCommand("insertcode", this.items[index].value); + }, + onbuttonclick: function () { + this.showPopup(); + }, + title: title, + initValue: title, + className: "edui-for-insertcode", + indexByValue: function (value) { + if (value) { + for (var i = 0, ci; (ci = this.items[i]); i++) { + if (ci.value.indexOf(value) != -1) return i; + } + } + + return -1; + } + }); + editorui.buttons["insertcode"] = ui; + editor.addListener("selectionchange", function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState("insertcode"); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue("insertcode"); + if (!value) { + ui.setValue(title); + return; + } + //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 + value && (value = value.replace(/['"]/g, "").split(",")[0]); + ui.setValue(value); + } + } + }); + return ui; + }; + + editorui.fontfamily = function (editor, list, title) { + list = editor.options["fontfamily"] || []; + title = + editor.options.labelMap["fontfamily"] || + editor.getLang("labelMap.fontfamily") || + ""; + if (!list.length) return; + for (var i = 0, ci, items = []; (ci = list[i]); i++) { + var langLabel = editor.getLang("fontfamily")[ci.name] || ""; + (function (key, val) { + items.push({ + label: key, + value: val, + theme: editor.options.theme, + renderLabelHtml: function () { + return ( + '
              ' + + (this.label || "") + + "
              " + ); + } + }); + })(ci.label || langLabel, ci.val); + } + var ui = new editorui.Combox({ + editor: editor, + items: items, + onselect: function (t, index) { + editor.execCommand("FontFamily", this.items[index].value); + }, + onbuttonclick: function () { + this.showPopup(); + }, + title: title, + initValue: title, + className: "edui-for-fontfamily", + indexByValue: function (value) { + if (value) { + for (var i = 0, ci; (ci = this.items[i]); i++) { + if (ci.value.indexOf(value) != -1) return i; + } + } + return -1; + } + }); + editorui.buttons["fontfamily"] = ui; + editor.addListener("selectionchange", function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState("FontFamily"); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue("FontFamily"); + //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 + value && (value = value.replace(/['"]/g, "").split(",")[0]); + ui.setValue(value); + } + } + }); + return ui; + }; + + editorui.fontsize = function (editor, list, title) { + title = + editor.options.labelMap["fontsize"] || + editor.getLang("labelMap.fontsize") || + ""; + list = list || editor.options["fontsize"] || []; + if (!list.length) return; + var items = []; + for (var i = 0; i < list.length; i++) { + var size = list[i] + "px"; + items.push({ + label: size, + value: size, + theme: editor.options.theme, + renderLabelHtml: function () { + return ( + '
              ' + + (this.label || "") + + "
              " + ); + } + }); + } + var ui = new editorui.Combox({ + editor: editor, + items: items, + title: title, + initValue: title, + onselect: function (t, index) { + editor.execCommand("FontSize", this.items[index].value); + }, + onbuttonclick: function () { + this.showPopup(); + }, + className: "edui-for-fontsize" + }); + editorui.buttons["fontsize"] = ui; + editor.addListener("selectionchange", function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState("FontSize"); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + ui.setValue(editor.queryCommandValue("FontSize")); + } + } + }); + return ui; + }; + + editorui.paragraph = function (editor, list, title) { + title = + editor.options.labelMap["paragraph"] || + editor.getLang("labelMap.paragraph") || + ""; + list = editor.options["paragraph"] || []; + if (utils.isEmptyObject(list)) return; + var items = []; + for (var i in list) { + items.push({ + value: i, + label: list[i] || editor.getLang("paragraph")[i], + theme: editor.options.theme, + renderLabelHtml: function () { + return ( + '
              ' + + (this.label || "") + + "
              " + ); + } + }); + } + var ui = new editorui.Combox({ + editor: editor, + items: items, + title: title, + initValue: title, + className: "edui-for-paragraph", + onselect: function (t, index) { + editor.execCommand("Paragraph", this.items[index].value); + }, + onbuttonclick: function () { + this.showPopup(); + } + }); + editorui.buttons["paragraph"] = ui; + editor.addListener("selectionchange", function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState("Paragraph"); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue("Paragraph"); + var index = ui.indexByValue(value); + if (index != -1) { + ui.setValue(value); + } else { + ui.setValue(ui.initValue); + } + } + } + }); + return ui; + }; + + //自定义标题 + editorui.customstyle = function (editor) { + var list = editor.options["customstyle"] || [], + title = + editor.options.labelMap["customstyle"] || + editor.getLang("labelMap.customstyle") || + ""; + if (!list.length) return; + var langCs = editor.getLang("customstyle"); + for (var i = 0, items = [], t; (t = list[i++]);) { + (function (t) { + var ck = {}; + ck.label = t.label ? t.label : langCs[t.name]; + ck.style = t.style; + ck.className = t.className; + ck.tag = t.tag; + items.push({ + label: ck.label, + value: ck, + theme: editor.options.theme, + renderLabelHtml: function () { + return ( + '
              ' + + "<" + + ck.tag + + " " + + (ck.className ? ' class="' + ck.className + '"' : "") + + (ck.style ? ' style="' + ck.style + '"' : "") + + ">" + + ck.label + + "" + + "
              " + ); + } + }); + })(t); + } + + var ui = new editorui.Combox({ + editor: editor, + items: items, + title: title, + initValue: title, + className: "edui-for-customstyle", + onselect: function (t, index) { + editor.execCommand("customstyle", this.items[index].value); + }, + onbuttonclick: function () { + this.showPopup(); + }, + indexByValue: function (value) { + for (var i = 0, ti; (ti = this.items[i++]);) { + if (ti.label == value) { + return i - 1; + } + } + return -1; + } + }); + editorui.buttons["customstyle"] = ui; + editor.addListener("selectionchange", function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState("customstyle"); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue("customstyle"); + var index = ui.indexByValue(value); + if (index != -1) { + ui.setValue(value); + } else { + ui.setValue(ui.initValue); + } + } + } + }); + return ui; + }; + + editorui.inserttable = function (editor, iframeUrl, title) { + title = + editor.options.labelMap["inserttable"] || + editor.getLang("labelMap.inserttable") || + ""; + var ui = new editorui.TableButton({ + editor: editor, + title: title, + className: "edui-for-inserttable", + onpicktable: function (t, numCols, numRows) { + editor.execCommand("InsertTable", { + numRows: numRows, + numCols: numCols, + border: 1 + }); + }, + onbuttonclick: function () { + this.showPopup(); + } + }); + editorui.buttons["inserttable"] = ui; + editor.addListener("selectionchange", function () { + ui.setDisabled(editor.queryCommandState("inserttable") == -1); + }); + return ui; + }; + + editorui.lineheight = function (editor) { + var val = editor.options.lineheight || []; + if (!val.length) return; + for (var i = 0, ci, items = []; (ci = val[i++]);) { + items.push({ + //todo:写死了 + label: ci, + value: ci, + theme: editor.options.theme, + onclick: function () { + editor.execCommand("lineheight", this.value); + } + }); + } + var ui = new editorui.MenuButton({ + editor: editor, + className: "edui-for-lineheight", + title: + editor.options.labelMap["lineheight"] || + editor.getLang("labelMap.lineheight") || + "", + items: items, + onbuttonclick: function () { + var value = editor.queryCommandValue("LineHeight") || this.value; + editor.execCommand("LineHeight", value); + } + }); + editorui.buttons["lineheight"] = ui; + editor.addListener("selectionchange", function () { + var state = editor.queryCommandState("LineHeight"); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue("LineHeight"); + value && ui.setValue((value + "").replace(/cm/, "")); + ui.setChecked(state); + } + }); + return ui; + }; + + var rowspacings = ["top", "bottom"]; + for (var r = 0, ri; (ri = rowspacings[r++]);) { + (function (cmd) { + editorui["rowspacing" + cmd] = function (editor) { + var val = editor.options["rowspacing" + cmd] || []; + if (!val.length) return null; + for (var i = 0, ci, items = []; (ci = val[i++]);) { + items.push({ + label: ci, + value: ci, + theme: editor.options.theme, + onclick: function () { + editor.execCommand("rowspacing", this.value, cmd); + } + }); + } + var ui = new editorui.MenuButton({ + editor: editor, + className: "edui-for-rowspacing" + cmd, + title: + editor.options.labelMap["rowspacing" + cmd] || + editor.getLang("labelMap.rowspacing" + cmd) || + "", + items: items, + onbuttonclick: function () { + var value = + editor.queryCommandValue("rowspacing", cmd) || this.value; + editor.execCommand("rowspacing", value, cmd); + } + }); + editorui.buttons[cmd] = ui; + editor.addListener("selectionchange", function () { + var state = editor.queryCommandState("rowspacing", cmd); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue("rowspacing", cmd); + value && ui.setValue((value + "").replace(/%/, "")); + ui.setChecked(state); + } + }); + return ui; + }; + })(ri); + } + + //有序,无序列表 + var lists = ["insertorderedlist", "insertunorderedlist"]; + for (var l = 0, cl; (cl = lists[l++]);) { + (function (cmd) { + editorui[cmd] = function (editor) { + var vals = editor.options[cmd], + _onMenuClick = function () { + editor.execCommand(cmd, this.value); + }, + items = []; + for (var i in vals) { + items.push({ + label: vals[i] || editor.getLang()[cmd][i] || "", + value: i, + theme: editor.options.theme, + onclick: _onMenuClick + }); + } + var ui = new editorui.MenuButton({ + editor: editor, + className: "edui-for-" + cmd, + title: editor.getLang("labelMap." + cmd) || "", + items: items, + onbuttonclick: function () { + var value = editor.queryCommandValue(cmd) || this.value; + editor.execCommand(cmd, value); + } + }); + editorui.buttons[cmd] = ui; + editor.addListener("selectionchange", function () { + var state = editor.queryCommandState(cmd); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue(cmd); + ui.setValue(value); + ui.setChecked(state); + } + }); + return ui; + }; + })(cl); + } + + editorui.fullscreen = function (editor, title) { + title = + editor.options.labelMap["fullscreen"] || + editor.getLang("labelMap.fullscreen") || + ""; + var ui = new editorui.Button({ + className: "edui-for-fullscreen", + title: title, + theme: editor.options.theme, + onclick: function () { + if (editor.ui) { + editor.ui.setFullScreen(!editor.ui.isFullScreen()); + } + this.setChecked(editor.ui.isFullScreen()); + } + }); + editorui.buttons["fullscreen"] = ui; + editor.addListener("selectionchange", function () { + var state = editor.queryCommandState("fullscreen"); + ui.setDisabled(state == -1); + ui.setChecked(editor.ui.isFullScreen()); + }); + return ui; + }; + + // 表情 + editorui['emotion'] = function (editor, iframeUrl) { + var cmd = "emotion"; + var ui = new editorui.MultiMenuPop({ + title: + editor.options.labelMap[cmd] || + editor.getLang("labelMap." + cmd + "") || + "", + editor: editor, + className: "edui-for-" + cmd, + iframeUrl: editor.ui.mapUrl( + iframeUrl || + (editor.options.dialogIframeUrlMap || {})[cmd] || + dialogIframeUrlMap[cmd] + ) + }); + editorui.buttons[cmd] = ui; + + editor.addListener("selectionchange", function () { + ui.setDisabled(editor.queryCommandState(cmd) == -1); + }); + return ui; + }; + + editorui['autotypeset'] = function (editor) { + var ui = new editorui.AutoTypeSetButton({ + editor: editor, + title: + editor.options.labelMap["autotypeset"] || + editor.getLang("labelMap.autotypeset") || + "", + className: "edui-for-autotypeset", + onbuttonclick: function () { + editor.execCommand("autotypeset"); + } + }); + editorui.buttons["autotypeset"] = ui; + editor.addListener("selectionchange", function () { + ui.setDisabled(editor.queryCommandState("autotypeset") == -1); + }); + return ui; + }; + + /* 简单上传插件 */ + editorui['simpleupload'] = function (editor) { + var name = "simpleupload", + ui = new editorui.Button({ + className: "edui-for-" + name, + title: + editor.options.labelMap[name] || + editor.getLang("labelMap." + name) || + "", + onclick: function () { + }, + theme: editor.options.theme, + showText: false + }); + editorui.buttons[name] = ui; + editor.addListener("ready", function () { + var b = ui.getDom("body"), + iconSpan = b.children[0]; + editor.fireEvent("simpleuploadbtnready", iconSpan); + }); + editor.addListener("selectionchange", function (type, causeByUi, uiReady) { + var state = editor.queryCommandState(name); + if (state == -1) { + ui.setDisabled(true); + ui.setChecked(false); + } else { + if (!uiReady) { + ui.setDisabled(false); + ui.setChecked(state); + } + } + }); + return ui; + }; + + })(); + + +// adapter/editor.js +///import core +///commands 全屏 +///commandsName FullScreen +///commandsTitle 全屏 + (function () { + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase, + domUtils = baidu.editor.dom.domUtils; + var nodeStack = []; + + function EditorUI(options) { + this.initOptions(options); + this.initEditorUI(); + } + + EditorUI.prototype = { + uiName: "editor", + initEditorUI: function () { + this.editor.ui = this; + this._dialogs = {}; + this.initUIBase(); + this._initToolbars(); + var editor = this.editor, + me = this; + + editor.addListener("ready", function () { + //提供getDialog方法 + editor.getDialog = function (name) { + return editor.ui._dialogs[name + "Dialog"]; + }; + domUtils.on(editor.window, "scroll", function (evt) { + baidu.editor.ui.Popup.postHide(evt); + }); + //提供编辑器实时宽高(全屏时宽高不变化) + editor.ui._actualFrameWidth = editor.options.initialFrameWidth; + + UE.browser.ie && + UE.browser.version === 6 && + editor.container.ownerDocument.execCommand( + "BackgroundImageCache", + false, + true + ); + + //display bottom-bar label based on config + if (editor.options.elementPathEnabled) { + editor.ui.getDom("elementpath").innerHTML = + '
              ' + + editor.getLang("elementPathTip") + + ":
              "; + } + if (editor.options.wordCount) { + function countFn() { + setCount(editor, me); + domUtils.un(editor.document, "click", arguments.callee); + } + + domUtils.on(editor.document, "click", countFn); + editor.ui.getDom("wordcount").innerHTML = editor.getLang( + "wordCountTip" + ); + } + editor.ui._scale(); + if (editor.options.scaleEnabled) { + if (editor.autoHeightEnabled) { + editor.disableAutoHeight(); + } + me.enableScale(); + } else { + me.disableScale(); + } + if ( + !editor.options.elementPathEnabled && + !editor.options.wordCount && + !editor.options.scaleEnabled + ) { + editor.ui.getDom("elementpath").style.display = "none"; + editor.ui.getDom("wordcount").style.display = "none"; + editor.ui.getDom("scale").style.display = "none"; + } + + if (!editor.selection.isFocus()) return; + editor.fireEvent("selectionchange", false, true); + }); + + editor.addListener("mousedown", function (t, evt) { + var el = evt.target || evt.srcElement; + baidu.editor.ui.Popup.postHide(evt, el); + baidu.editor.ui.ShortCutMenu.postHide(evt); + }); + + editor.addListener("delcells", function () { + if (UE.ui["edittip"]) { + new UE.ui["edittip"](editor); + } + editor.getDialog("edittip").open(); + }); + + var pastePop, + isPaste = false, + timer; + editor.addListener("afterpaste", function () { + if (editor.queryCommandState("pasteplain")) return; + if (baidu.editor.ui.PastePicker) { + pastePop = new baidu.editor.ui.Popup({ + content: new baidu.editor.ui.PastePicker({editor: editor}), + editor: editor, + className: "edui-wordpastepop" + }); + pastePop.render(); + } + isPaste = true; + }); + + editor.addListener("afterinserthtml", function () { + clearTimeout(timer); + timer = setTimeout(function () { + if (pastePop && (isPaste || editor.ui._isTransfer)) { + if (pastePop.isHidden()) { + var span = domUtils.createElement(editor.document, "span", { + style: "line-height:0px;", + innerHTML: "\ufeff" + }), + range = editor.selection.getRange(); + range.insertNode(span); + var tmp = getDomNode(span, "firstChild", "previousSibling"); + tmp && + pastePop.showAnchor(tmp.nodeType == 3 ? tmp.parentNode : tmp); + domUtils.remove(span); + } else { + pastePop.show(); + } + delete editor.ui._isTransfer; + isPaste = false; + } + }, 200); + }); + editor.addListener("contextmenu", function (t, evt) { + baidu.editor.ui.Popup.postHide(evt); + }); + editor.addListener("keydown", function (t, evt) { + if (pastePop) pastePop.dispose(evt); + var keyCode = evt.keyCode || evt.which; + if (evt.altKey && keyCode == 90) { + UE.ui.buttons["fullscreen"].onclick(); + } + }); + editor.addListener("wordcount", function (type) { + setCount(this, me); + }); + + function setCount(editor, ui) { + editor.setOpt({ + wordCount: true, + maximumWords: 10000, + wordCountMsg: + editor.options.wordCountMsg || editor.getLang("wordCountMsg"), + wordOverFlowMsg: + editor.options.wordOverFlowMsg || editor.getLang("wordOverFlowMsg") + }); + var opt = editor.options, + max = opt.maximumWords, + msg = opt.wordCountMsg, + errMsg = opt.wordOverFlowMsg, + countDom = ui.getDom("wordcount"); + if (!opt.wordCount) { + return; + } + var count = editor.getContentLength(true); + if (count > max) { + countDom.innerHTML = errMsg; + editor.fireEvent("wordcountoverflow"); + } else { + countDom.innerHTML = msg + .replace("{#leave}", max - count) + .replace("{#count}", count); + } + } + + editor.addListener("selectionchange", function () { + if (editor.options.elementPathEnabled) { + me[ + (editor.queryCommandState("elementpath") == -1 ? "dis" : "en") + + "ableElementPath" + ](); + } + if (editor.options.scaleEnabled) { + me[ + (editor.queryCommandState("scale") == -1 ? "dis" : "en") + + "ableScale" + ](); + } + }); + var popup = new baidu.editor.ui.Popup({ + editor: editor, + content: "", + className: "edui-bubble", + _onEditButtonClick: function () { + this.hide(); + editor.ui._dialogs.linkDialog.open(); + }, + _onImgEditButtonClick: function (name) { + this.hide(); + editor.ui._dialogs[name] && editor.ui._dialogs[name].open(); + }, + _onImgSetFloat: function (value) { + this.hide(); + editor.execCommand("imagefloat", value); + }, + _setIframeAlign: function (value) { + var frame = popup.anchorEl; + var newFrame = frame.cloneNode(true); + switch (value) { + case -2: + newFrame.setAttribute("align", ""); + break; + case -1: + newFrame.setAttribute("align", "left"); + break; + case 1: + newFrame.setAttribute("align", "right"); + break; + } + frame.parentNode.insertBefore(newFrame, frame); + domUtils.remove(frame); + popup.anchorEl = newFrame; + popup.showAnchor(popup.anchorEl); + }, + _updateIframe: function () { + var frame = (editor._iframe = popup.anchorEl); + if (domUtils.hasClass(frame, "ueditor_baidumap")) { + editor.selection.getRange().selectNode(frame).select(); + editor.ui._dialogs.mapDialog.open(); + popup.hide(); + } else { + editor.ui._dialogs.insertframeDialog.open(); + popup.hide(); + } + }, + _onRemoveButtonClick: function (cmdName) { + editor.execCommand(cmdName); + this.hide(); + }, + queryAutoHide: function (el) { + if (el && el.ownerDocument == editor.document) { + if ( + el.tagName.toLowerCase() == "img" || + domUtils.findParentByTagName(el, "a", true) + ) { + return el !== popup.anchorEl; + } + } + return baidu.editor.ui.Popup.prototype.queryAutoHide.call(this, el); + } + }); + popup.render(); + if (editor.options.imagePopup) { + editor.addListener("mouseover", function (t, evt) { + evt = evt || window.event; + var el = evt.target || evt.srcElement; + if ( + editor.ui._dialogs.insertframeDialog && + /iframe/gi.test(el.tagName) + ) { + var html = popup.formatHtml( + "" + + '' + + editor.getLang("default") + + '  ' + + editor.getLang("justifyleft") + + '  ' + + editor.getLang("justifyright") + + "  " + + ' ' + + editor.getLang("modify") + + "" + ); + if (html) { + popup.getDom("content").innerHTML = html; + popup.anchorEl = el; + popup.showAnchor(popup.anchorEl); + } else { + popup.hide(); + } + } + }); + editor.addListener("selectionchange", function (t, causeByUi) { + if (!causeByUi) { + return; + } + var html = "", + str = "", + closedNode = editor.selection.getRange().getClosedNode(), + dialogs = editor.ui._dialogs; + // 图片选中处理 + if (closedNode && closedNode.tagName === "IMG") { + var dialogName = "insertimageDialog"; + if ( + closedNode.className.indexOf("edui-faked-video") !== -1 || + closedNode.className.indexOf("edui-upload-video") !== -1 + ) { + dialogName = "insertvideoDialog"; + } + if ( + closedNode.className.indexOf("edui-faked-audio") !== -1 || + closedNode.className.indexOf("edui-upload-audio") !== -1 + ) { + dialogName = "insertaudioDialog"; + } + if (closedNode.getAttribute("anchorname")) { + dialogName = "anchorDialog"; + html = popup.formatHtml( + "" + + '' + + editor.getLang("modify") + + "  " + + "" + + editor.getLang("delete") + + "" + ); + } + // if (img.getAttribute("data-word-image")) { + // //todo 放到dialog去做查询 + // editor['data-word-image'] = [img.getAttribute("data-word-image")]; + // dialogName = "wordimageDialog"; + // } + if ( + domUtils.hasClass(closedNode, "uep-loading") || + domUtils.hasClass(closedNode, "uep-loading-error") + ) { + dialogName = ""; + } + if (!dialogs[dialogName]) { + return; + } + + var actions = []; + if (closedNode.getAttribute("data-word-image")) { + actions.push("" + + editor.getLang("save") + + ""); + } else { + // actions.push("' + + // editor.getLang("modify") + + // ""); + } + + if (actions.length > 0) { + // wrap with + actions.unshift(''); + actions.push(''); + } + + !html && (html = popup.formatHtml(actions.join(""))); + } + // 链接选中处理 + if (editor.ui._dialogs.linkDialog) { + var link = editor.queryCommandValue("link"); + var url; + if ( + link && + (url = link.getAttribute("_href") || link.getAttribute("href", 2)) + ) { + var txt = url; + if (url.length > 30) { + txt = url.substring(0, 20) + "..."; + } + if (html) { + html += '
              '; + } + html += popup.formatHtml( + "" + + editor.getLang("anchorMsg") + + ': ' + + txt + + "" + + ' ' + + editor.getLang("modify") + + "" + + ' ' + + editor.getLang("clear") + + "" + ); + popup.showAnchor(link); + } + } + + if (html) { + popup.getDom("content").innerHTML = html; + popup.anchorEl = closedNode || link; + popup.showAnchor(popup.anchorEl); + } else { + popup.hide(); + } + }); + } + }, + _initToolbars: function () { + var editor = this.editor; + var toolbars = this.toolbars || []; + if (toolbars[0]) { + toolbars[0].unshift( + 'message' + ); + } + var toolbarUis = []; + var extraUIs = []; + for (var i = 0; i < toolbars.length; i++) { + var toolbar = toolbars[i]; + var toolbarUi = new baidu.editor.ui.Toolbar({ + theme: editor.options.theme + }); + for (var j = 0; j < toolbar.length; j++) { + var toolbarItem = toolbar[j]; + var toolbarItemUi = null; + if (typeof toolbarItem == "string") { + toolbarItem = toolbarItem.toLowerCase(); + if (toolbarItem === "|") { + toolbarItem = "Separator"; + } + if (toolbarItem === "||") { + toolbarItem = "Breakline"; + } + var ui = baidu.editor.ui[toolbarItem]; + if (ui) { + if (utils.isFunction(ui)) { + toolbarItemUi = new baidu.editor.ui[toolbarItem](editor); + } else { + if (ui.id && ui.id !== editor.key) { + continue; + } + var itemUI = ui.execFn.call(editor, editor, toolbarItem); + if (itemUI) { + if (ui.index === undefined) { + toolbarUi.add(itemUI); + continue; + } else { + extraUIs.push({ + index: ui.index, + itemUI: itemUI + }); + } + } + } + } + //fullscreen这里单独处理一下,放到首行去 + if (toolbarItem === "fullscreen") { + if (toolbarUis && toolbarUis[0]) { + toolbarUis[0].items.splice(0, 0, toolbarItemUi); + } else { + toolbarItemUi && toolbarUi.items.splice(0, 0, toolbarItemUi); + } + continue; + } + } else { + toolbarItemUi = toolbarItem; + } + if (toolbarItemUi && toolbarItemUi.id) { + toolbarUi.add(toolbarItemUi); + } + } + toolbarUis[i] = toolbarUi; + } + + //接受外部定制的UI + + utils.each(extraUIs, function (obj) { + toolbarUi.add(obj.itemUI, obj.index); + }); + this.toolbars = toolbarUis; + }, + getHtmlTpl: function () { + return ( + '
              ' + + '
              ' + + (this.toolbars.length + ? '
              ' + + this.renderToolbarBoxHtml() + + "
              " + : "") + + '" + + '
              ' + + "
              " + + '
              ' + + "
              " + + //modify wdcount by matao + '
              ' + + '' + + '' + + '' + + "
              " + + '
              ' + + "
              " + ); + }, + showWordImageDialog: function () { + this._dialogs["wordimageDialog"].open(); + }, + renderToolbarBoxHtml: function () { + var buff = []; + for (var i = 0; i < this.toolbars.length; i++) { + buff.push(this.toolbars[i].renderHtml()); + } + return buff.join(""); + }, + setFullScreen: function (fullscreen) { + var editor = this.editor, + container = editor.container.parentNode.parentNode; + if (this._fullscreen != fullscreen) { + this._fullscreen = fullscreen; + this.editor.fireEvent("beforefullscreenchange", fullscreen); + if (baidu.editor.browser.gecko) { + var bk = editor.selection.getRange().createBookmark(); + } + if (fullscreen) { + + // add https://gitee.com/modstart-lib/ueditor-plus/issues/I85R7X + this._bakEditorContaninerWidth = editor.iframe.parentNode.style.width; + + while (container.tagName !== "BODY") { + var position = baidu.editor.dom.domUtils.getComputedStyle( + container, + "position" + ); + nodeStack.push(position); + container.style.position = "static"; + container = container.parentNode; + } + this._bakHtmlOverflow = document.documentElement.style.overflow; + this._bakBodyOverflow = document.body.style.overflow; + this._bakAutoHeight = this.editor.autoHeightEnabled; + this._bakScrollTop = Math.max( + document.documentElement.scrollTop, + document.body.scrollTop + ); + + // delete https://gitee.com/modstart-lib/ueditor-plus/issues/I85R7X + // this._bakEditorContaninerWidth = editor.iframe.parentNode.offsetWidth; + + if (this._bakAutoHeight) { + //当全屏时不能执行自动长高 + editor.autoHeightEnabled = false; + this.editor.disableAutoHeight(); + } + + document.documentElement.style.overflow = "hidden"; + //修复,滚动条不收起的问题 + + window.scrollTo(0, window.scrollY); + this._bakCssText = this.getDom().style.cssText; + this._bakCssText1 = this.getDom("iframeholder").style.cssText; + editor.iframe.parentNode.style.width = ""; + this._updateFullScreen(); + } else { + while (container.tagName !== "BODY") { + container.style.position = nodeStack.shift(); + container = container.parentNode; + } + this.getDom().style.cssText = this._bakCssText; + this.getDom("iframeholder").style.cssText = this._bakCssText1; + if (this._bakAutoHeight) { + editor.autoHeightEnabled = true; + this.editor.enableAutoHeight(); + } + + document.documentElement.style.overflow = this._bakHtmlOverflow; + document.body.style.overflow = this._bakBodyOverflow; + // modify https://gitee.com/modstart-lib/ueditor-plus/issues/I85R7X + editor.iframe.parentNode.style.width = this._bakEditorContaninerWidth + // editor.iframe.parentNode.style.width = this._bakEditorContaninerWidth + "px"; + window.scrollTo(0, this._bakScrollTop); + } + if (browser.gecko && editor.body.contentEditable === "true") { + var input = document.createElement("input"); + document.body.appendChild(input); + editor.body.contentEditable = false; + setTimeout(function () { + input.focus(); + setTimeout(function () { + editor.body.contentEditable = true; + editor.fireEvent("fullscreenchanged", fullscreen); + editor.selection.getRange().moveToBookmark(bk).select(true); + baidu.editor.dom.domUtils.remove(input); + fullscreen && window.scroll(0, 0); + }, 0); + }, 0); + } + + if (editor.body.contentEditable === "true") { + this.editor.fireEvent("fullscreenchanged", fullscreen); + this.triggerLayout(); + } + } + }, + _updateFullScreen: function () { + if (this._fullscreen) { + var vpRect = uiUtils.getViewportRect(); + this.getDom().style.cssText = + "border:0;position:absolute;left:0;top:var(--ueditor-top-offset," + + (this.editor.options.topOffset || 0) + + "px);width:" + + vpRect.width + + "px;height:" + + vpRect.height + + "px;z-index:" + + (this.getDom().style.zIndex * 1 + 100); + uiUtils.setViewportOffset(this.getDom(), { + left: 0, + // top: this.editor.options.topOffset || 0 + }); + this.editor.setHeight( + vpRect.height - + this.getDom("toolbarbox").offsetHeight - + this.getDom("bottombar").offsetHeight - + (this.editor.options.topOffset || 0), + true + ); + //不手动调一下,会导致全屏失效 + if (browser.gecko) { + try { + window.onresize(); + } catch (e) { + } + } + } + }, + _updateElementPath: function () { + var bottom = this.getDom("elementpath"), + list; + if ( + this.elementPathEnabled && + (list = this.editor.queryCommandValue("elementpath")) + ) { + var buff = []; + for (var i = 0, ci; (ci = list[i]); i++) { + buff[i] = this.formatHtml( + '' + + ci + + "" + ); + } + bottom.innerHTML = + '
              ' + + this.editor.getLang("elementPathTip") + + ": " + + buff.join(" > ") + + "
              "; + } else { + bottom.style.display = "none"; + } + }, + disableElementPath: function () { + var bottom = this.getDom("elementpath"); + bottom.innerHTML = ""; + bottom.style.display = "none"; + this.elementPathEnabled = false; + }, + enableElementPath: function () { + var bottom = this.getDom("elementpath"); + bottom.style.display = ""; + this.elementPathEnabled = true; + this._updateElementPath(); + }, + _scale: function () { + var doc = document, + editor = this.editor, + editorHolder = editor.container, + editorDocument = editor.document, + toolbarBox = this.getDom("toolbarbox"), + bottombar = this.getDom("bottombar"), + scale = this.getDom("scale"), + scalelayer = this.getDom("scalelayer"); + + var isMouseMove = false, + position = null, + minEditorHeight = 0, + minEditorWidth = editor.options.minFrameWidth, + pageX = 0, + pageY = 0, + scaleWidth = 0, + scaleHeight = 0; + + function down() { + position = domUtils.getXY(editorHolder); + + if (!minEditorHeight) { + minEditorHeight = + editor.options.minFrameHeight + + toolbarBox.offsetHeight + + bottombar.offsetHeight; + } + + scalelayer.style.cssText = + "position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:" + + editorHolder.offsetWidth + + "px;height:" + + editorHolder.offsetHeight + + "px;z-index:" + + (editor.options.zIndex + 1); + + domUtils.on(doc, "mousemove", move); + domUtils.on(editorDocument, "mouseup", up); + domUtils.on(doc, "mouseup", up); + } + + var me = this; + //by xuheng 全屏时关掉缩放 + this.editor.addListener("fullscreenchanged", function (e, fullScreen) { + if (fullScreen) { + me.disableScale(); + } else { + if (me.editor.options.scaleEnabled) { + me.enableScale(); + var tmpNode = me.editor.document.createElement("span"); + me.editor.body.appendChild(tmpNode); + me.editor.body.style.height = + Math.max( + domUtils.getXY(tmpNode).y, + me.editor.iframe.offsetHeight - 20 + ) + "px"; + domUtils.remove(tmpNode); + } + } + }); + + function move(event) { + clearSelection(); + var e = event || window.event; + pageX = e.pageX || doc.documentElement.scrollLeft + e.clientX; + pageY = e.pageY || doc.documentElement.scrollTop + e.clientY; + scaleWidth = pageX - position.x; + scaleHeight = pageY - position.y; + + if (scaleWidth >= minEditorWidth) { + isMouseMove = true; + scalelayer.style.width = scaleWidth + "px"; + } + if (scaleHeight >= minEditorHeight) { + isMouseMove = true; + scalelayer.style.height = scaleHeight + "px"; + } + } + + function up() { + if (isMouseMove) { + isMouseMove = false; + editor.ui._actualFrameWidth = scalelayer.offsetWidth - 2; + editorHolder.style.width = editor.ui._actualFrameWidth + "px"; + + editor.setHeight( + scalelayer.offsetHeight - + bottombar.offsetHeight - + toolbarBox.offsetHeight - + 2, + true + ); + } + if (scalelayer) { + scalelayer.style.display = "none"; + } + clearSelection(); + domUtils.un(doc, "mousemove", move); + domUtils.un(editorDocument, "mouseup", up); + domUtils.un(doc, "mouseup", up); + } + + function clearSelection() { + if (browser.ie) doc.selection.clear(); + else window.getSelection().removeAllRanges(); + } + + this.enableScale = function () { + //trace:2868 + if (editor.queryCommandState("source") == 1) return; + scale.style.display = ""; + this.scaleEnabled = true; + domUtils.on(scale, "mousedown", down); + }; + this.disableScale = function () { + scale.style.display = "none"; + this.scaleEnabled = false; + domUtils.un(scale, "mousedown", down); + }; + }, + isFullScreen: function () { + return this._fullscreen; + }, + postRender: function () { + UIBase.prototype.postRender.call(this); + for (var i = 0; i < this.toolbars.length; i++) { + this.toolbars[i].postRender(); + } + var me = this; + var timerId, + domUtils = baidu.editor.dom.domUtils, + updateFullScreenTime = function () { + clearTimeout(timerId); + timerId = setTimeout(function () { + me._updateFullScreen(); + }); + }; + domUtils.on(window, "resize", updateFullScreenTime); + + me.addListener("destroy", function () { + domUtils.un(window, "resize", updateFullScreenTime); + clearTimeout(timerId); + }); + }, + showToolbarMsg: function (msg, flag) { + this.getDom("toolbarmsg_label").innerHTML = msg; + this.getDom("toolbarmsg").style.display = ""; + // + if (!flag) { + var w = this.getDom("upload_dialog"); + w.style.display = "none"; + } + }, + hideToolbarMsg: function () { + this.getDom("toolbarmsg").style.display = "none"; + }, + mapUrl: function (url) { + return url + ? url.replace("~/", this.editor.options.UEDITOR_CORS_URL || "") + : ""; + }, + triggerLayout: function () { + var dom = this.getDom(); + if (dom.style.zoom == "1") { + dom.style.zoom = "100%"; + } else { + dom.style.zoom = "1"; + } + } + }; + utils.inherits(EditorUI, baidu.editor.ui.UIBase); + + var instances = {}; + + UE.ui.Editor = function (options) { + var editor = new UE.Editor(options); + editor.options.editor = editor; + utils.loadFile(document, { + href: + editor.options.themePath + editor.options.theme + "/css/ueditor.css?69e258a4", + tag: "link", + type: "text/css", + rel: "stylesheet" + }); + + var oldRender = editor.render; + editor.render = function (holder) { + if (holder.constructor === String) { + editor.key = holder; + instances[holder] = editor; + } + utils.domReady(function () { + editor.langIsReady + ? renderUI() + : editor.addListener("langReady", renderUI); + + function renderUI() { + editor.setOpt({ + labelMap: editor.options.labelMap || editor.getLang("labelMap") + }); + new EditorUI(editor.options); + if (holder) { + if (holder.constructor === String) { + holder = document.getElementById(holder); + } + holder && + holder.getAttribute("name") && + (editor.options.textarea = holder.getAttribute("name")); + if (holder && /script|textarea/gi.test(holder.tagName)) { + var newDiv = document.createElement("div"); + holder.parentNode.insertBefore(newDiv, holder); + var cont = holder.value || holder.innerHTML; + editor.options.initialContent = /^[\t\r\n ]*$/.test(cont) + ? editor.options.initialContent + : cont + .replace(/>[\n\r\t]+([ ]{4})+/g, ">") + .replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<"); + holder.className && (newDiv.className = holder.className); + holder.style.cssText && + (newDiv.style.cssText = holder.style.cssText); + if (/textarea/i.test(holder.tagName)) { + editor.textarea = holder; + editor.textarea.style.display = "none"; + } else { + holder.parentNode.removeChild(holder); + } + if (holder.id) { + newDiv.id = holder.id; + domUtils.removeAttributes(holder, "id"); + } + holder = newDiv; + holder.innerHTML = ""; + } + } + domUtils.addClass(holder, "edui-" + editor.options.theme); + editor.ui.render(holder); + var opt = editor.options; + //给实例添加一个编辑器的容器引用 + editor.container = editor.ui.getDom(); + var parents = domUtils.findParents(holder, true); + var displays = []; + for (var i = 0, ci; (ci = parents[i]); i++) { + displays[i] = ci.style.display; + ci.style.display = "block"; + } + if (opt.initialFrameWidth) { + opt.minFrameWidth = opt.initialFrameWidth; + } else { + opt.minFrameWidth = opt.initialFrameWidth = holder.offsetWidth; + var styleWidth = holder.style.width; + if (/%$/.test(styleWidth)) { + opt.initialFrameWidth = styleWidth; + } + } + if (opt.initialFrameHeight) { + opt.minFrameHeight = opt.initialFrameHeight; + } else { + opt.initialFrameHeight = opt.minFrameHeight = holder.offsetHeight; + } + for (var i = 0, ci; (ci = parents[i]); i++) { + ci.style.display = displays[i]; + } + //编辑器最外容器设置了高度,会导致,编辑器不占位 + //todo 先去掉,没有找到原因 + if (holder.style.height) { + holder.style.height = ""; + } + editor.container.style.width = + opt.initialFrameWidth + + (/%$/.test(opt.initialFrameWidth) ? "" : "px"); + editor.container.style.zIndex = opt.zIndex; + oldRender.call(editor, editor.ui.getDom("iframeholder")); + editor.fireEvent("afteruiready"); + } + }); + }; + return editor; + }; + + /** + * @file + * @name UE + * @short UE + * @desc UEditor的顶部命名空间 + */ + /** + * @name getEditor + * @since 1.2.4+ + * @grammar UE.getEditor(id,[opt]) => Editor实例 + * @desc 提供一个全局的方法得到编辑器实例 + * + * * ''id'' 放置编辑器的容器id, 如果容器下的编辑器已经存在,就直接返回 + * * ''opt'' 编辑器的可选参数 + * @example + * UE.getEditor('containerId',{onready:function(){//创建一个编辑器实例 + * this.setContent('hello') + * }}); + * UE.getEditor('containerId'); //返回刚创建的实例 + * + */ + UE.getEditor = function (id, opt) { + var editor = instances[id]; + if (!editor) { + editor = instances[id] = new UE.ui.Editor(opt); + editor.render(id); + } + return editor; + }; + + UE.delEditor = function (id) { + var editor; + if ((editor = instances[id])) { + editor.key && editor.destroy(); + delete instances[id]; + } + }; + + UE.registerUI = function (uiName, fn, index, editorId) { + utils.each(uiName.split(/\s+/), function (name) { + baidu.editor.ui[name] = { + id: editorId, + execFn: fn, + index: index + }; + }); + }; + })(); + + +// adapter/message.js + UE.registerUI("message", function (editor) { + var editorui = baidu.editor.ui; + var Message = editorui.Message; + var holder; + var _messageItems = []; + var me = editor; + + me.setOpt("enableMessageShow", true); + if (me.getOpt("enableMessageShow") === false) { + return; + } + + me.addListener("ready", function () { + holder = document.getElementById(me.ui.id + "_message_holder"); + updateHolderPos(); + setTimeout(function () { + updateHolderPos(); + }, 500); + }); + + me.addListener("showmessage", function (type, opt) { + opt = utils.isString(opt) + ? { + content: opt + } + : opt; + var message = new Message({ + timeout: opt.timeout, + type: opt.type, + content: opt.content, + keepshow: opt.keepshow, + editor: me + }), + mid = opt.id || "msg_" + (+new Date()).toString(36); + message.render(holder); + _messageItems[mid] = message; + message.reset(opt); + updateHolderPos(); + return mid; + }); + + me.addListener("updatemessage", function (type, id, opt) { + opt = utils.isString(opt) + ? { + content: opt + } + : opt; + var message = _messageItems[id]; + message.render(holder); + message && message.reset(opt); + }); + + me.addListener("hidemessage", function (type, id) { + var message = _messageItems[id]; + message && message.hide(); + }); + + function updateHolderPos() { + if (!holder || !me.ui) return; + var toolbarbox = me.ui.getDom("toolbarbox"); + if (toolbarbox) { + holder.style.top = toolbarbox.offsetHeight + 3 + "px"; + } + holder.style.zIndex = + Math.max(me.options.zIndex, me.iframe.style.zIndex) + 1; + } + }); + + + +})(); \ No newline at end of file diff --git a/public/static/plugs/ueditor/ueditor.config.js b/public/static/plugs/ueditor/ueditor.config.js new file mode 100644 index 0000000..2b4d856 --- /dev/null +++ b/public/static/plugs/ueditor/ueditor.config.js @@ -0,0 +1,694 @@ +/** + * ueditor plus 完整配置项 + * 可以在这里配置整个编辑器的特性 + */ +/**************************提示******************************** + * 所有被注释的配置项均为UEditor默认值。 + * 修改默认配置请首先确保已经完全明确该参数的真实用途。 + * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。 + * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。 + **************************提示********************************/ + +(function () { + // 资源文件根路径,如果你的页面不是放在根目录下,请注意修改这个路径 + // 通常情况下这个可以配置成静态资源CDN的地址 + window.UEDITOR_HOME_URL = "/static/plugs/ueditor/"; + var URL, CORS_URL; + if (window.UEDITOR_HOME_URL) { + URL = window.UEDITOR_HOME_URL; + } else if (window.__msCDN) { + URL = window.__msCDN + 'asset/vendor/ueditor/'; + } else if (window.__msRoot) { + URL = window.__msRoot + 'asset/vendor/ueditor/'; + } else { + URL = getUEBasePath(); + } + // 需要能跨域的静态资源请求,主要用户弹窗页面等静态资源 + // 通常情况下这个可以配置成静态资源CDN的地址 + if (window.UEDITOR_CORS_URL) { + CORS_URL = window.UEDITOR_CORS_URL; + } else if (window.__msRoot) { + CORS_URL = window.__msRoot + 'asset/vendor/ueditor/'; + } else if (window.UEDITOR_HOME_URL) { + CORS_URL = window.UEDITOR_HOME_URL; + } else { + CORS_URL = getUEBasePath(); + } + + /** + * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。 + */ + window.UEDITOR_CONFIG = { + + // 为编辑器实例添加一个路径,这个不能被注释 + UEDITOR_HOME_URL: URL, + // 需要能跨域的静态资源请求,主要用户弹窗页面等静态资源 + UEDITOR_CORS_URL: CORS_URL, + + // 是否开启Debug模式 + debug: false, + + // 服务器统一请求接口路径 + serverUrl: "/" + (window.CONFIG.ADMIN || 'admin') + "/ajax/uploadUEditor", + + // 从服务器获取配置 + loadConfigFromServer: true, + + // 服务器统一请求头信息,会在所有请求中带上该信息 + serverHeaders: { + // 'Authorization': 'Bearer xxx' + }, + // 服务器返回参数统一转换方法,可以在这里统一处理返回参数 + serverResponsePrepare: function (res) { + // console.log('serverResponsePrepare', res); + return res; + }, + + //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 + toolbars: [ + [ + "fullscreen", // 全屏 + "source", // 源代码 + "|", + "undo", // 撤销 + "redo", // 重做 + "|", + "bold", // 加粗 + "italic", // 斜体 + "underline", // 下划线 + "fontborder", // 字符边框 + "strikethrough",// 删除线 + "superscript", // 上标 + "subscript", // 下标 + "removeformat", // 清除格式 + "formatmatch", // 格式刷 + "autotypeset", // 自动排版 + "blockquote", // 引用 + "pasteplain", // 纯文本粘贴模式 + "|", + "forecolor", // 字体颜色 + "backcolor", // 背景色 + "insertorderedlist", // 有序列表 + "insertunorderedlist", // 无序列表 + "selectall", // 全选 + "cleardoc", // 清空文档 + "|", + "rowspacingtop",// 段前距 + "rowspacingbottom", // 段后距 + "lineheight", // 行间距 + "|", + "customstyle", // 自定义标题 + "paragraph", // 段落格式 + "fontfamily", // 字体 + "fontsize", // 字号 + "|", + "directionalityltr", // 从左向右输入 + "directionalityrtl", // 从右向左输入 + "indent", // 首行缩进 + "|", + "justifyleft", // 居左对齐 + "justifycenter", // 居中对齐 + "justifyright", + "justifyjustify", // 两端对齐 + "|", + "touppercase", // 字母大写 + "tolowercase", // 字母小写 + "|", + "link", // 超链接 + "unlink", // 取消链接 + "anchor", // 锚点 + "|", + "imagenone", // 图片默认 + "imageleft", // 图片左浮动 + "imagecenter", // 图片居中 + "imageright", // 图片右浮动 + "|", + "simpleupload", // 单图上传 + "insertimage", // 多图上传 + "emotion", // 表情 + "scrawl", // 涂鸦 + "insertvideo", // 视频 + "insertaudio", // 音频 + "attachment", // 附件 + "insertframe", // 插入Iframe + "insertcode", // 插入代码 + "pagebreak", // 分页 + "template", // 模板 + "background", // 背景 + "formula", // 公式 + "|", + "horizontal", // 分隔线 + "date", // 日期 + "time", // 时间 + "spechars", // 特殊字符 + "wordimage", // Word图片转存 + "|", + "inserttable", // 插入表格 + "deletetable", // 删除表格 + "insertparagraphbeforetable", // 表格前插入行 + "insertrow", // 前插入行 + "deleterow", // 删除行 + "insertcol", // 前插入列 + "deletecol", // 删除列 + "mergecells", // 合并多个单元格 + "mergeright", // 右合并单元格 + "mergedown", // 下合并单元格 + "splittocells", // 完全拆分单元格 + "splittorows", // 拆分成行 + "splittocols", // 拆分成列 + "|", + "print", // 打印 + "preview", // 预览 + "searchreplace", // 查询替换 + "|", + "contentimport", + "help", // 帮助 + ] + ] + + // 自定义工具栏按钮点击,返回 true 表示已经处理点击,会阻止默认事件 + , toolbarCallback: function (cmd, editor) { + // console.log('toolbarCallback',cmd, editor); + // switch(cmd){ + // case 'insertimage': + // editor.execCommand('insertHtml', '

              '); + // console.log('toolbarCallback',cmd, editor) + // return true; + // case 'insertvideo': + // editor.execCommand('insertHtml', '