diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..8a7039134b10b3281fce709dd551cb564ce86684 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.js linguist-language=Groovy +*.css linguist-language=Groovy +*.html linguist-language=Groovy diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d96f3d28d1cf9c8dd52628704873e6d3c7e99e8e --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +/build +/classes +/out +.gradle/ +.settings/ +.idea/ +*.iml +.project +.classpath +nohup.out +/upload +/log +/lib +/h2 +*.log +hs_err_pid* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ccddb83a6913fa376d1ee115dd476f80a4d03825 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM gradle:7.1.1-jdk8 +ENV TZ Asia/Shanghai + +RUN mkdir -p /srv/grule + +ADD bin /srv/grule/bin +ADD conf /srv/grule/conf +ADD src /srv/grule/src +ADD build.gradle /srv/grule/build.gradle +ADD start.sh /srv/grule/start.sh + +WORKDIR /srv/grule/ + +RUN gradle deps + +ENTRYPOINT exec sh start.sh $JAVA_OPTS \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..34037536631e5c3d8426059a85e9ca833d596a84 --- /dev/null +++ b/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 23 March 2022 + + Copyright (C) 2007 hubert-樂xx, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 34a316fd73ef07663b7b318f5195c4adb77f0422..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# gy - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) \ No newline at end of file diff --git a/README.md b/README.md index e34b7d4751a4c660887f004ce9adc031e5946b8a..3bff63356f7ef3bc73f2265cd0c0647c069de699 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,402 @@ -# gy +# Groovy DSL 动态规则(rule)执行引擎 -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +> ___DSL___(特定领域语言): 开发 和 业务 共识的语言. 方便业务表达需求, 方便开发理解业务 -#### 软件架构 -软件架构说明 +> 一个业务需求(一般程序,一个接口)可以抽象成为: 按一定业务逻辑规则处理数据,然后返回数据 +> > + 一个人可以用成百上千个属性组成,由这些属性衍生出新的属性(例如,好人/坏人) 返回一个业务结果(0..多个属性值) +> > + 一般接口: 查询数据库或接口,对数据进行简单逻辑计算,最后返回一些属性 +> 此框架可以执行成千上万的一般程序逻辑, 可以动态修改逻辑, 可以动态修改数据 -#### 安装教程 +> 可用于风控规则, 电商价格规则, 其它业务规则 -1. xxxx -2. xxxx -3. xxxx +# 框架概念 +* 框架抽象一个业务需求(一般程序,一个接口)为一条决策,一条决策包含多个业务规则 +* 框架用自创 ___DSL___ 策略 ___规则___ 语言表达业务逻辑 +``` + 规则 { + 规则名 = '芝麻分限制' + 拒绝 { 芝麻分 < 620 } + } +``` +* 框架抽象数据为指标(字段), 即是变量 +* 指标值来源于数据源配置(收集器)包含: 接口,SQL,脚本3种类型 -#### 使用说明 +> 例子 http://39.104.28.131:9090/ test:test -1. xxxx -2. xxxx -3. xxxx +# ___规则___ 定义 +* 由 ___规则名___ 和多个 ___拒绝___, ___通过___, ___人工___, ___操作___ 组成(按顺序依次执行) +``` +规则 { + 规则名 = '大小比较' + 拒绝 { 年龄 > 40 || 年龄 < 25 } +} +``` +``` +规则 { + 规则名 = '通过规则' + 通过 { 年龄 == 30 } +} +``` +``` +规则 { + 规则名 = '赋值规则' + 操作 { 产品代码 = 'xx' } +} +``` +``` +规则 { // 电商价格规则 + 规则名 = '条件赋值规则' + 操作 { + if (当前时间 > '2021-03-02 00:00:00') { + 单价 = 10 + } + } +} +``` +``` +规则 { + 规则名 = '列表判断规则' -#### 参与贡献 + 风险地 = ["成都", "巴中"] -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request + 拒绝 { 工作地 in 风险地 } +} +``` +``` +规则 { + 规则名 = '包含规则' + 拒绝 { "$姓名".contains("xx") } +} +``` +# ___策略___ 定义 +* 由 ___策略名___ 和多个 ___操作___, ___条件___, ___规则___, ___评分卡___, ___决策___ 组成(按顺序依次执行) +* ___条件___ 函数返回false, 则跳出, 继续执行下一个策略 +## ___规则___ 策略 +``` +策略 { + 策略名 = '004244' + + 操作 { jj_代码 = '004244' } + 条件 { jj_名 } + + 规则 { + 拒绝 { true } + } +} +``` +## ___评分卡___ 策略 +___模型___ : 是由多个评分条目组成 +* 普通评分条目: 由 属性名, 值匹配范围, 分值 组成 + * 例: ['年龄', 18..24, 40] + * 例: ['工作成市', ['成都', '巴中'], 99] +* 函数分条目: 一个求值函数 组成 + * 例: [{ -> 100}] +* 变量分条目: 一个数值变量 组成 + * 例: ['芝麻分'] +* 动态分条目: 一个数值变量,及其值计算函数 组成 + * 例: ['逾期次数', {次数 -> -((次数?:0) * 100)}] +* 模型分计算: 依次遍历每个评分条目, 得到匹配的分值相加 +* 最终评分 = ___基础分___ + 模型计算得分 -#### 码云特技 +___赋值变量___ : 把评分结果赋值给的变量 +``` +策略 { + 策略名 = '测试评分卡' + + 评分卡 { + 评分卡名 = "测试评分卡" + 基础分 = 600 + 模型 = [ + ['年龄', 18..24, 40], + ['年龄', 25..45, 80], + ['年龄', 46..60, 50], + ['性别', 'F', 50], + ['性别', 'M', 60], + [{ -> 100}], // 函数分 + ['芝麻分'], //变量值分 + ['逾期次数', {次数 -> -((次数?:0) * 100)}], // 动态分 + ['工作成市', ['成都', '巴中'], 99] + ] + 赋值变量 = '评分结果' + } + + 规则 { + 规则名 = "评分判断" + 拒绝 { 评分结果 < 60 } + } +} +``` +## 委托子 ___决策___ 策略 +* 嵌套其它决策执行(_注意不要循环嵌套_) +* 会形成一条单独的决策执行记录(id为父决策的id为前缀) +* ___决策id___: 指定要执行的子决策id +* ___异步___: + * 不配置默认为false; 为true时, ___输出___ 配置不生效 + * 值为false: 并且 当子决策执行结果为Reject的时,会结束当前决策执行 +* ___传参___: 共享当前决策数据给子决策使用 +* ___输出___: 会设置 到当前执行上下文, 可以使用. 没有配置时: 则使用子决策的返回属性作为 ___输出___ +``` +策略 { + 策略名 = '测试子决策' + + 决策 { + 决策id = "test2" + // 不配置默认为false, 异步为true时, 输出则不生效 + // 异步 = true + + // 左(子决策) = 右(父决策) + 传参 { + p1 = 1 + p2 = "aa" + p3 = p3 // p3的值从父决策来 + } + + // 左(父决策) = 右(子决策) + 输出 { + p111 = p1 // p1的值从子决策来 + p222 = p3 // p3的值从子决策来 + } + } +} +``` -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) \ No newline at end of file +# 决策定义 +* 由 ___决策id___, ___决策名___, ___决策描述___ 和多个 ___操作___, ___策略___ 组成(按顺序依次执行) +* 触发当前决策: http://ip:port/decision?decisionId=test1 +* 接口返回: 3种结果(Accept, Reject, Review) 和多个返回属性值(由配置指定) +```json +// 返回示例 +{ + "decideId": "647f297a2e4540dfa93991b5b6e7b44d", + "result": "Accept", + "decisionId": "jj_analyse", + "status": "0000", + "desc": null, + "data": { + "jj_code": "165525" + } +} +``` +* 依次从上往下执行 +``` +决策id = 'test1' +决策名 = '测试1' +决策描述 = '' + +// 返回的调用决策方的结果属性值 +// 返回属性 '身份证号码' + +// 预操作执行 +操作 {} + +策略 { + 策略名 = '预处理' + // 条件 { true } + + 规则 { + 规则名 = '年龄限制' + 拒绝 { 年龄 > 40 || 年龄 < 25 } + } +} +``` +## ___函数定义___: 自定义决策函数 +``` +决策id = 'test1' +决策名 = '测试1' + +策略 { + 策略名 = '测试策略' + 规则 { + 规则名 = '使用函数' + 操作 { + 钉钉消息("发个消息") + } + } +} + +函数定义("钉钉消息") {String msg -> + Utils.http() + .post("https://oapi.dingtalk.com/robot/send?access_token=7e9d8d97e6b5e76a6a07b0c5d7c31e82f0fbdb8ced1ac23168f9fd5c28c57f1a") + .jsonBody(JSON.toJSONString( + [msgtype: 'text', text: [content: "Fund: " + msg], at: ['isAtAll': false]] + )).debug().execute() +} +``` + +![Image text](https://gitee.com/xnat/tmp/raw/master/img/decisions.png) + + +# 指标/字段/属性 +## 使用 '年龄' 指标 +``` +拒绝 { 年龄 > 50 } +``` + +## 指标值获取 + +![Image text](http://www.plantuml.com/plantuml/png/SoWkIImgAStDuIhEpimhI2nAp5LmpizBoIp9pCzppKi9BgdCILN8oCdCI-MoUjRJ_cn1-zC9lTPScMaA6iywbxzOsFDaHzUJ7TtFfhLhAfHafEOfQ3pTlkdfsXbFvwnush17aqj10QGKo7msT-cpNHEUpLZ_TCAo9pjsFPkoxUNijgSpLy2q0MM0ge702Yvb3UIdvXIdAcW0zO0ahLxid_9qzZoWQI2fbDIInEGCa1gWUzEu82gVxEZ5jBrrwTF-9fX5S6ceTK_spmKAGVm657tQiK4XFXxDR_7n80lH7O3a13JBCNm2ToM4rBNJrt-nRk7pTTFrzQrX0GisbMZd83l50MWgC0u1) + +## 指标列表 +![Image text](https://gitee.com/xnat/tmp/raw/master/img/rule_fields.png) + +# 收集器(数据源) +> 支持从SQL(数据库),http(接口),script(自定义groovy脚本函数)获取数据 +## 收集器执行 + +![Image text](http://www.plantuml.com/plantuml/png/PLBDpX8n5DttARhaM_W2Cudv4kFIbGymcOG2pJSKmjG5Eup40M6KH404H4W8eWa_ApEeX9UPTcRUmjkMZAXTDQVdd7lklRttkTlWBweUyXyegxiDjugVr5YHSbfZJrdnEMzw15SyoWYoP3-Goq0CGXizUeopLbVslje03xzdizVYurR3SdcIuJwEtiHHJuw3TBzAzXyKQtG4_84qRSHgd62Fb3Z2E1bkunzlHMSjnpivEOZ19fktqitBB0Z5EZHgH5WHAn6Y9LoGtI_fgfyNkCEyGbX1x2PYlWNxEp2zHaf-lfUBkOs8vnDSYAFGa3J3kDn41oo-V0B6hLPqZjXn_gdeE8gjcsZGSWMwWFENwjqXVNLMtQodSVJDZ2sPjaNhbvminR6j5V7fynzYECg9m8Btl6Muq192VjsZKCa2ozmcZm6p_3y5s8BdCxT-wuOnhAXCk9AgOUObhsCq8X6SOLqm9tqiU3Q8MOVIwbGc57RBBcKgMZW2fgstPUBcNqR1LdePYjb2t--10v_kDm00) + +## 决策执行过程中生产的数据收集 +![Image text](https://gitee.com/xnat/tmp/raw/master/img/collect_records.png) + +# 决策执行 +## 决策执行记录 +![Image text](https://gitee.com/xnat/tmp/raw/master/img/decision_records.png) + +## 决策执行详情 +![Image text](https://gitee.com/xnat/tmp/raw/master/img/decision_result_detail.png) + +# 统计图 +## 决策执行统计 +![Image text](https://gitee.com/xnat/tmp/raw/master/img/decision_dashbrod.png) + +## 决策规则统计 +![Image text](https://gitee.com/xnat/tmp/raw/master/img/countRule.png) + + +# 权限 +> 静态权限: 权限管理, 用户管理, 用户登陆, 新增用户, 删除用户, 决策创建, 查看字段, 新增字段, 更新字段, 删除字段, 查看收集器, 新增收集器, 更新收集器, 删除收集器, 查看操作历史, 查看决策结果, 查看收集记录 + +> 动态资源(决策)权限: 每添加一个决策 就会生成3个与之对应的动态权限(读, 删, 改) + +## 用户分类 +* 超级用户(系统管理员): 拥有 权限管理 的用户 +* 用户管理员(组管理员: 管理组相同的用户): 拥有 用户管理 的用户 +* 普通用户: 非 权限管理 和 用户管理 的用户 + +![Image text](https://gitee.com/xnat/tmp/raw/master/img/userlist.png) + +## 权限作用域 +* 超级用户: 可以 修改任何 用户的任何权限 +* 用户管理员: + * 可以 修改同组 用户的 可分配(自身拥有的)的权限 + * 可以分配同组用户创建的动态权限 +* 普通用户: 可以 操作 拥的每个权限对的 操作 + +![Image text](https://gitee.com/xnat/tmp/raw/master/img/userchange.png) + +# 使用说明 +> 系统基于java轻量级框架: [Tiny](https://gitee.com/xnat/tiny) +1. git clone https://gitee.com/xnat/grule.git +2. + >+ linux: sh start.sh -Xmx512m -Xms512m -Dlog.totalSizeCap=50G + >+ windows: ./start -Xmx512m -Xms512m + +* api文档地址: http://localhost:9090/api-doc/ + +### 环境要求 +jdk8, gradle7+ + +### 可以更换自已的数据库 (默认用的h2) +> 数据库要求: mysql5.7+, MariaDB10.2+ + +```sql +-- 创建数据库 +CREATE DATABASE IF NOT EXISTS rule DEFAULT CHARSET utf8 COLLATE utf8_general_ci; +``` +```properties +# 替换 conf/app.properties 中的 jpa_rule.url 配置项 +jpa_rule.url=jdbc:mysql://localhost:3306/rule?useSSL=false&user=root&password=root&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true +``` + +### 开发环境运行 +> 需要添加Groovy sdk 3.0.8 + + +IntelliJ IDEA 运行 main.groovy 启动 + +# v1.2.10 ing... +- [x] refactor: 用 tiny DB 替换 groovy-sql +- [ ] upgrade: tiny:1.1.3 +- [ ] upgrade: remoter:1.0.6 +- [ ] refactor: 接口地址: 去 mnt 前缀化 +- [ ] refactor: 接口地址: decision -> decision/decide/{decisionId} +- [ ] refactor: 接口地址: findDecideResult -> decision/decide/result/{decideId} +- [ ] refactor: 接口地址: xx/page?page= -> xx/page/{page} +- [ ] refactor: 用户权限关系独立一张表 +- [ ] refactor: 接口 去mnt 公用化 +- [ ] feat: 新增 DSL SPEC: 接口 +- [ ] opt: 收集器缓存时间界面函数化 +- [ ] feat: vue2 -> vue3 +- [ ] feat: 创建用户 添加默认权限 +- [ ] feat: redis 收集器 +- [ ] upgrade: groovy 3.0.9 +- [ ] feat: 字符串 in 或者 contains 操作符 + + +# 参与贡献 +xnatural@msn.cn \ No newline at end of file diff --git a/bin/grape b/bin/grape new file mode 100755 index 0000000000000000000000000000000000000000..0a5878b159480ae6376f1eb3ad6994cb760e66ee --- /dev/null +++ b/bin/grape @@ -0,0 +1,48 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +## use -cp or -classpath just as in java to use a custom classpath ## +## ## +############################################################################## + +export GROOVY_APP_NAME=Grape + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy org.codehaus.groovy.tools.GrapeMain "$@" diff --git a/bin/grape.bat b/bin/grape.bat new file mode 100644 index 0000000000000000000000000000000000000000..066a116c24950f0630d3fbf21987c4b7ac9579ae --- /dev/null +++ b/bin/grape.bat @@ -0,0 +1,34 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" org.codehaus.groovy.tools.GrapeMain %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/grape_completion b/bin/grape_completion new file mode 100755 index 0000000000000000000000000000000000000000..1c59b0c1435f582401711df9985022afedb81578 --- /dev/null +++ b/bin/grape_completion @@ -0,0 +1,181 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- +# +# grape Bash Completion +# ======================= +# +# Bash completion support for the `grape` command, +# generated by [picocli](http://picocli.info/) version 3.0.2. +# +# Installation +# ------------ +# +# 1. Source all completion scripts in your .bash_profile +# +# cd $GROOVY_HOME/bin +# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done +# +# 2. Open a new bash console, and type `grape [TAB][TAB]` +# +# Documentation +# ------------- +# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after +# 'grape (..)'. By reading entered command line parameters, +# it determines possible bash completions and writes them to the COMPREPLY variable. +# Bash then completes the user input if only one entry is listed in the variable or +# shows the options if more than one is listed in COMPREPLY. +# +# References +# ---------- +# [1] http://stackoverflow.com/a/12495480/1440785 +# [2] http://tiswww.case.edu/php/chet/bash/FAQ +# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html +# [4] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655 +# [5] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion +# + +# Enable programmable completion facilities (see [3]) +shopt -s progcomp + +# ArrContains takes two arguments, both of which are the name of arrays. +# It creates a temporary hash from lArr1 and then checks if all elements of lArr2 +# are in the hashtable. +# +# Returns zero (no error) if all elements of the 2nd array are in the 1st array, +# otherwise returns 1 (error). +# +# Modified from [4] +function ArrContains() { + local lArr1 lArr2 + declare -A tmp + eval lArr1=("\"\${$1[@]}\"") + eval lArr2=("\"\${$2[@]}\"") + for i in "${lArr1[@]}";{ [ -n "$i" ] && ((++tmp[$i]));} + for i in "${lArr2[@]}";{ [ -n "$i" ] && [ -z "${tmp[$i]}" ] && return 1;} + return 0 +} + +# Bash completion entry point function. +# _complete_grape finds which commands and subcommands have been specified +# on the command line and delegates to the appropriate function +# to generate possible options and subcommands for the last specified subcommand. +function _complete_grape() { + CMDS0=(install) + CMDS1=(uninstall) + CMDS2=(list) + CMDS3=(resolve) + CMDS4=(help) + + ArrContains COMP_WORDS CMDS4 && { _picocli_grape_help; return $?; } + ArrContains COMP_WORDS CMDS3 && { _picocli_grape_resolve; return $?; } + ArrContains COMP_WORDS CMDS2 && { _picocli_grape_list; return $?; } + ArrContains COMP_WORDS CMDS1 && { _picocli_grape_uninstall; return $?; } + ArrContains COMP_WORDS CMDS0 && { _picocli_grape_install; return $?; } + + # No subcommands were specified; generate completions for the top-level command. + _picocli_grape; return $?; +} + +# Generates completions for the options and subcommands of the `grape` command. +function _picocli_grape() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="install uninstall list resolve help" + FLAG_OPTS="-q --quiet -w --warn -i --info -V --verbose -d --debug -h --help -v --version" + ARG_OPTS="-D --define -r --resolver" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Generates completions for the options and subcommands of the `install` subcommand. +function _picocli_grape_install() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-h --help -v --version" + ARG_OPTS="" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Generates completions for the options and subcommands of the `uninstall` subcommand. +function _picocli_grape_uninstall() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-h --help -v --version" + ARG_OPTS="" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Generates completions for the options and subcommands of the `list` subcommand. +function _picocli_grape_list() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-h --help -v --version" + ARG_OPTS="" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Generates completions for the options and subcommands of the `resolve` subcommand. +function _picocli_grape_resolve() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-a --ant -d --dos -s --shell -i --ivy -h --help -v --version" + ARG_OPTS="" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Generates completions for the options and subcommands of the `help` subcommand. +function _picocli_grape_help() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-h --help" + ARG_OPTS="" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Define a completion specification (a compspec) for the +# `grape`, `grape.sh`, and `grape.bash` commands. +# Uses the bash `complete` builtin (see [5]) to specify that shell function +# `_complete_grape` is responsible for generating possible completions for the +# current word on the command line. +# The `-o default` option means that if the function generated no matches, the +# default Bash completions and the Readline default filename completions are performed. +complete -F _complete_grape -o default grape grape.sh grape.bash diff --git a/bin/groovy b/bin/groovy new file mode 100755 index 0000000000000000000000000000000000000000..3ecca63463190fc8ac247a6e667d9e38f932d451 --- /dev/null +++ b/bin/groovy @@ -0,0 +1,48 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +## use -cp or -classpath just as in java to use a custom classpath ## +## ## +############################################################################## + +export GROOVY_APP_NAME=Groovy + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy groovy.ui.GroovyMain "$@" diff --git a/bin/groovy.bat b/bin/groovy.bat new file mode 100644 index 0000000000000000000000000000000000000000..836e56ae1b328ed9bb68ea92fa112f7a0f6e1313 --- /dev/null +++ b/bin/groovy.bat @@ -0,0 +1,34 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" groovy.ui.GroovyMain %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/groovy.ico b/bin/groovy.ico new file mode 100644 index 0000000000000000000000000000000000000000..9e9b8d81a21db6c99daf3cd76320407a45a1b0d5 Binary files /dev/null and b/bin/groovy.ico differ diff --git a/bin/groovyConsole b/bin/groovyConsole new file mode 100755 index 0000000000000000000000000000000000000000..b4fe404368f6058c0225de47e000599182ddfd23 --- /dev/null +++ b/bin/groovyConsole @@ -0,0 +1,46 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy Console script for UN*X ## +## ## +############################################################################## + +export GROOVY_APP_NAME=GroovyConsole + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy groovy.console.ui.Console "$@" diff --git a/bin/groovyConsole.bat b/bin/groovyConsole.bat new file mode 100644 index 0000000000000000000000000000000000000000..770910266dee072720bc8e3fbb24f925eba4f8ae --- /dev/null +++ b/bin/groovyConsole.bat @@ -0,0 +1,34 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" groovy.console.ui.Console %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/groovyConsole_completion b/bin/groovyConsole_completion new file mode 100755 index 0000000000000000000000000000000000000000..9803661a71ef3d72af12becce9dca090a7e68921 --- /dev/null +++ b/bin/groovyConsole_completion @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- +# +# groovyConsole Bash Completion +# ======================= +# +# Bash completion support for the `groovyConsole` command, +# generated by [picocli](http://picocli.info/) version 3.0.2. +# +# Installation +# ------------ +# +# 1. Source all completion scripts in your .bash_profile +# +# cd $GROOVY_HOME/bin +# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done +# +# 2. Open a new bash console, and type `groovyConsole [TAB][TAB]` +# +# Documentation +# ------------- +# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after +# 'groovyConsole (..)'. By reading entered command line parameters, +# it determines possible bash completions and writes them to the COMPREPLY variable. +# Bash then completes the user input if only one entry is listed in the variable or +# shows the options if more than one is listed in COMPREPLY. +# +# References +# ---------- +# [1] http://stackoverflow.com/a/12495480/1440785 +# [2] http://tiswww.case.edu/php/chet/bash/FAQ +# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html +# [4] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655 +# [5] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion +# + +# Enable programmable completion facilities (see [3]) +shopt -s progcomp + +# ArrContains takes two arguments, both of which are the name of arrays. +# It creates a temporary hash from lArr1 and then checks if all elements of lArr2 +# are in the hashtable. +# +# Returns zero (no error) if all elements of the 2nd array are in the 1st array, +# otherwise returns 1 (error). +# +# Modified from [4] +function ArrContains() { + local lArr1 lArr2 + declare -A tmp + eval lArr1=("\"\${$1[@]}\"") + eval lArr2=("\"\${$2[@]}\"") + for i in "${lArr1[@]}";{ [ -n "$i" ] && ((++tmp[$i]));} + for i in "${lArr2[@]}";{ [ -n "$i" ] && [ -z "${tmp[$i]}" ] && return 1;} + return 0 +} + +# Bash completion entry point function. +# _complete_groovyConsole finds which commands and subcommands have been specified +# on the command line and delegates to the appropriate function +# to generate possible options and subcommands for the last specified subcommand. +function _complete_groovyConsole() { + + + # No subcommands were specified; generate completions for the top-level command. + _picocli_groovyConsole; return $?; +} + +# Generates completions for the options and subcommands of the `groovyConsole` command. +function _picocli_groovyConsole() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-cp -classpath --classpath -h --help -V --version -pa --parameters -pr --enable-preview -i --indy" + ARG_OPTS="-D --define --configscript" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Define a completion specification (a compspec) for the +# `groovyConsole`, `groovyConsole.sh`, and `groovyConsole.bash` commands. +# Uses the bash `complete` builtin (see [5]) to specify that shell function +# `_complete_groovyConsole` is responsible for generating possible completions for the +# current word on the command line. +# The `-o default` option means that if the function generated no matches, the +# default Bash completions and the Readline default filename completions are performed. +complete -F _complete_groovyConsole -o default groovyConsole groovyConsole.sh groovyConsole.bash diff --git a/bin/groovy_completion b/bin/groovy_completion new file mode 100755 index 0000000000000000000000000000000000000000..9fc1fa7eac7442e1e81e5bb725bbe58082c11e17 --- /dev/null +++ b/bin/groovy_completion @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- +# +# groovy Bash Completion +# ======================= +# +# Bash completion support for the `groovy` command, +# generated by [picocli](http://picocli.info/) version 3.0.2. +# +# Installation +# ------------ +# +# 1. Source all completion scripts in your .bash_profile +# +# cd $GROOVY_HOME/bin +# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done +# +# 2. Open a new bash console, and type `groovy [TAB][TAB]` +# +# Documentation +# ------------- +# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after +# 'groovy (..)'. By reading entered command line parameters, +# it determines possible bash completions and writes them to the COMPREPLY variable. +# Bash then completes the user input if only one entry is listed in the variable or +# shows the options if more than one is listed in COMPREPLY. +# +# References +# ---------- +# [1] http://stackoverflow.com/a/12495480/1440785 +# [2] http://tiswww.case.edu/php/chet/bash/FAQ +# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html +# [4] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655 +# [5] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion +# + +# Enable programmable completion facilities (see [3]) +shopt -s progcomp + +# ArrContains takes two arguments, both of which are the name of arrays. +# It creates a temporary hash from lArr1 and then checks if all elements of lArr2 +# are in the hashtable. +# +# Returns zero (no error) if all elements of the 2nd array are in the 1st array, +# otherwise returns 1 (error). +# +# Modified from [4] +function ArrContains() { + local lArr1 lArr2 + declare -A tmp + eval lArr1=("\"\${$1[@]}\"") + eval lArr2=("\"\${$2[@]}\"") + for i in "${lArr1[@]}";{ [ -n "$i" ] && ((++tmp[$i]));} + for i in "${lArr2[@]}";{ [ -n "$i" ] && [ -z "${tmp[$i]}" ] && return 1;} + return 0 +} + +# Bash completion entry point function. +# _complete_groovy finds which commands and subcommands have been specified +# on the command line and delegates to the appropriate function +# to generate possible options and subcommands for the last specified subcommand. +function _complete_groovy() { + + + # No subcommands were specified; generate completions for the top-level command. + _picocli_groovy; return $?; +} + +# Generates completions for the options and subcommands of the `groovy` command. +function _picocli_groovy() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-d --debug -n -p -pa --parameters -pr --enable-preview --indy -h --help -v --version" + ARG_OPTS="-cp -classpath --classpath -D --define --disableopt -c --encoding -e -i -l -a --autosplit --configscript -b --basescript" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Define a completion specification (a compspec) for the +# `groovy`, `groovy.sh`, and `groovy.bash` commands. +# Uses the bash `complete` builtin (see [5]) to specify that shell function +# `_complete_groovy` is responsible for generating possible completions for the +# current word on the command line. +# The `-o default` option means that if the function generated no matches, the +# default Bash completions and the Readline default filename completions are performed. +complete -F _complete_groovy -o default groovy groovy.sh groovy.bash diff --git a/bin/groovyc b/bin/groovyc new file mode 100755 index 0000000000000000000000000000000000000000..b224f3fb35a3f720ce6a34415b7890655e3e85fa --- /dev/null +++ b/bin/groovyc @@ -0,0 +1,46 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +############################################################################## + +export GROOVY_APP_NAME=GroovyC + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy org.codehaus.groovy.tools.FileSystemCompiler "$@" diff --git a/bin/groovyc.bat b/bin/groovyc.bat new file mode 100644 index 0000000000000000000000000000000000000000..df3bd1934f15fda8062cfcb92a0878109d2ec106 --- /dev/null +++ b/bin/groovyc.bat @@ -0,0 +1,34 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" org.codehaus.groovy.tools.FileSystemCompiler %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/groovyc_completion b/bin/groovyc_completion new file mode 100755 index 0000000000000000000000000000000000000000..d4591f1782b2e2c1407324da37cf8800a3fd3006 --- /dev/null +++ b/bin/groovyc_completion @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- +# +# groovyc Bash Completion +# ======================= +# +# Bash completion support for the `groovyc` command, +# generated by [picocli](http://picocli.info/) version 3.0.2. +# +# Installation +# ------------ +# +# 1. Source all completion scripts in your .bash_profile +# +# cd $GROOVY_HOME/bin +# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done +# +# 2. Open a new bash console, and type `groovyc [TAB][TAB]` +# +# Documentation +# ------------- +# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after +# 'groovyc (..)'. By reading entered command line parameters, +# it determines possible bash completions and writes them to the COMPREPLY variable. +# Bash then completes the user input if only one entry is listed in the variable or +# shows the options if more than one is listed in COMPREPLY. +# +# References +# ---------- +# [1] http://stackoverflow.com/a/12495480/1440785 +# [2] http://tiswww.case.edu/php/chet/bash/FAQ +# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html +# [4] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655 +# [5] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion +# + +# Enable programmable completion facilities (see [3]) +shopt -s progcomp + +# ArrContains takes two arguments, both of which are the name of arrays. +# It creates a temporary hash from lArr1 and then checks if all elements of lArr2 +# are in the hashtable. +# +# Returns zero (no error) if all elements of the 2nd array are in the 1st array, +# otherwise returns 1 (error). +# +# Modified from [4] +function ArrContains() { + local lArr1 lArr2 + declare -A tmp + eval lArr1=("\"\${$1[@]}\"") + eval lArr2=("\"\${$2[@]}\"") + for i in "${lArr1[@]}";{ [ -n "$i" ] && ((++tmp[$i]));} + for i in "${lArr2[@]}";{ [ -n "$i" ] && [ -z "${tmp[$i]}" ] && return 1;} + return 0 +} + +# Bash completion entry point function. +# _complete_groovyc finds which commands and subcommands have been specified +# on the command line and delegates to the appropriate function +# to generate possible options and subcommands for the last specified subcommand. +function _complete_groovyc() { + + + # No subcommands were specified; generate completions for the top-level command. + _picocli_groovyc; return $?; +} + +# Generates completions for the options and subcommands of the `groovyc` command. +function _picocli_groovyc() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-e --exception -pa --parameters -pr --enable-preview -j --jointCompilation --indy -h --help -v --version" + ARG_OPTS="-cp -classpath --classpath -sourcepath --sourcepath --temp --encoding -d -b --basescript -J -F --configscript" + + case ${CURR_WORD} in + -sourcepath|--sourcepath) + compopt -o filenames + COMPREPLY=( $( compgen -f -- "" ) ) # files + return $? + ;; + --temp) + compopt -o filenames + COMPREPLY=( $( compgen -f -- "" ) ) # files + return $? + ;; + -d) + compopt -o filenames + COMPREPLY=( $( compgen -f -- "" ) ) # files + return $? + ;; + *) + case ${PREV_WORD} in + -sourcepath|--sourcepath) + compopt -o filenames + COMPREPLY=( $( compgen -f -- $CURR_WORD ) ) # files + return $? + ;; + --temp) + compopt -o filenames + COMPREPLY=( $( compgen -f -- $CURR_WORD ) ) # files + return $? + ;; + -d) + compopt -o filenames + COMPREPLY=( $( compgen -f -- $CURR_WORD ) ) # files + return $? + ;; + esac + esac + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Define a completion specification (a compspec) for the +# `groovyc`, `groovyc.sh`, and `groovyc.bash` commands. +# Uses the bash `complete` builtin (see [5]) to specify that shell function +# `_complete_groovyc` is responsible for generating possible completions for the +# current word on the command line. +# The `-o default` option means that if the function generated no matches, the +# default Bash completions and the Readline default filename completions are performed. +complete -F _complete_groovyc -o default groovyc groovyc.sh groovyc.bash diff --git a/bin/groovydoc b/bin/groovydoc new file mode 100755 index 0000000000000000000000000000000000000000..094ac0e7e87bb960048b25a8a9e78225a1fedaeb --- /dev/null +++ b/bin/groovydoc @@ -0,0 +1,46 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +############################################################################## + +export GROOVY_APP_NAME=GroovyDoc + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy org.codehaus.groovy.tools.groovydoc.Main "$@" diff --git a/bin/groovydoc.bat b/bin/groovydoc.bat new file mode 100644 index 0000000000000000000000000000000000000000..a1ad6c37e096ddde6508e48d27c889894d6467fc --- /dev/null +++ b/bin/groovydoc.bat @@ -0,0 +1,34 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" org.codehaus.groovy.tools.groovydoc.Main %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/groovydoc_completion b/bin/groovydoc_completion new file mode 100755 index 0000000000000000000000000000000000000000..afcdfc3e3dceb583cf2a287272df45f26adeb3df --- /dev/null +++ b/bin/groovydoc_completion @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- +# +# groovydoc Bash Completion +# ======================= +# +# Bash completion support for the `groovydoc` command, +# generated by [picocli](http://picocli.info/) version 3.0.2. +# +# Installation +# ------------ +# +# 1. Source all completion scripts in your .bash_profile +# +# cd $GROOVY_HOME/bin +# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done +# +# 2. Open a new bash console, and type `groovydoc [TAB][TAB]` +# +# Documentation +# ------------- +# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after +# 'groovydoc (..)'. By reading entered command line parameters, +# it determines possible bash completions and writes them to the COMPREPLY variable. +# Bash then completes the user input if only one entry is listed in the variable or +# shows the options if more than one is listed in COMPREPLY. +# +# References +# ---------- +# [1] http://stackoverflow.com/a/12495480/1440785 +# [2] http://tiswww.case.edu/php/chet/bash/FAQ +# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html +# [4] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655 +# [5] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion +# + +# Enable programmable completion facilities (see [3]) +shopt -s progcomp + +# ArrContains takes two arguments, both of which are the name of arrays. +# It creates a temporary hash from lArr1 and then checks if all elements of lArr2 +# are in the hashtable. +# +# Returns zero (no error) if all elements of the 2nd array are in the 1st array, +# otherwise returns 1 (error). +# +# Modified from [4] +function ArrContains() { + local lArr1 lArr2 + declare -A tmp + eval lArr1=("\"\${$1[@]}\"") + eval lArr2=("\"\${$2[@]}\"") + for i in "${lArr1[@]}";{ [ -n "$i" ] && ((++tmp[$i]));} + for i in "${lArr2[@]}";{ [ -n "$i" ] && [ -z "${tmp[$i]}" ] && return 1;} + return 0 +} + +# Bash completion entry point function. +# _complete_groovydoc finds which commands and subcommands have been specified +# on the command line and delegates to the appropriate function +# to generate possible options and subcommands for the last specified subcommand. +function _complete_groovydoc() { + + + # No subcommands were specified; generate completions for the top-level command. + _picocli_groovydoc; return $?; +} + +# Generates completions for the options and subcommands of the `groovydoc` command. +function _picocli_groovydoc() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-h -help --help --version -verbose -quiet --debug -classpath -cp --classpath -author -noscripts -nomainforscripts -notimestamp -noversionstamp -public -protected -package -private" + ARG_OPTS="-d --destdir -overview -charset -fileEncoding -windowtitle -doctitle -header -footer -exclude -stylesheetfile -sourcepath" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Define a completion specification (a compspec) for the +# `groovydoc`, `groovydoc.sh`, and `groovydoc.bash` commands. +# Uses the bash `complete` builtin (see [5]) to specify that shell function +# `_complete_groovydoc` is responsible for generating possible completions for the +# current word on the command line. +# The `-o default` option means that if the function generated no matches, the +# default Bash completions and the Readline default filename completions are performed. +complete -F _complete_groovydoc -o default groovydoc groovydoc.sh groovydoc.bash diff --git a/bin/groovysh b/bin/groovysh new file mode 100755 index 0000000000000000000000000000000000000000..d1d01ba43549d107b121ccfe1e3c4b491f21a87c --- /dev/null +++ b/bin/groovysh @@ -0,0 +1,46 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy Shell script for UN*X ## +## ## +############################################################################## + +export GROOVY_APP_NAME=GroovyShell + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy org.apache.groovy.groovysh.Main "$@" diff --git a/bin/groovysh.bat b/bin/groovysh.bat new file mode 100644 index 0000000000000000000000000000000000000000..e23e8a553a3f887974cd0ba36cf413a8c8ab73bb --- /dev/null +++ b/bin/groovysh.bat @@ -0,0 +1,36 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +set CLASSNAME=org.apache.groovy.groovysh.Main + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" %CLASSNAME% %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/groovysh_completion b/bin/groovysh_completion new file mode 100755 index 0000000000000000000000000000000000000000..a175fbe59d42af000c70192c06f1ef3904e691bd --- /dev/null +++ b/bin/groovysh_completion @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- +# +# groovysh Bash Completion +# ======================= +# +# Bash completion support for the `groovysh` command, +# generated by [picocli](http://picocli.info/) version 3.0.2. +# +# 1. Source all completion scripts in your .bash_profile +# +# cd $GROOVY_HOME/bin +# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done +# +# 2. Open a new bash console, and type `groovysh [TAB][TAB]` +# +# Documentation +# ------------- +# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after +# 'groovysh (..)'. By reading entered command line parameters, +# it determines possible bash completions and writes them to the COMPREPLY variable. +# Bash then completes the user input if only one entry is listed in the variable or +# shows the options if more than one is listed in COMPREPLY. +# +# References +# ---------- +# [1] http://stackoverflow.com/a/12495480/1440785 +# [2] http://tiswww.case.edu/php/chet/bash/FAQ +# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html +# [4] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655 +# [5] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion +# + +# Enable programmable completion facilities (see [3]) +shopt -s progcomp + +# ArrContains takes two arguments, both of which are the name of arrays. +# It creates a temporary hash from lArr1 and then checks if all elements of lArr2 +# are in the hashtable. +# +# Returns zero (no error) if all elements of the 2nd array are in the 1st array, +# otherwise returns 1 (error). +# +# Modified from [4] +function ArrContains() { + local lArr1 lArr2 + declare -A tmp + eval lArr1=("\"\${$1[@]}\"") + eval lArr2=("\"\${$2[@]}\"") + for i in "${lArr1[@]}";{ [ -n "$i" ] && ((++tmp[$i]));} + for i in "${lArr2[@]}";{ [ -n "$i" ] && [ -z "${tmp[$i]}" ] && return 1;} + return 0 +} + +# Bash completion entry point function. +# _complete_groovysh finds which commands and subcommands have been specified +# on the command line and delegates to the appropriate function +# to generate possible options and subcommands for the last specified subcommand. +function _complete_groovysh() { + + + # No subcommands were specified; generate completions for the top-level command. + _picocli_groovysh; return $?; +} + +# Generates completions for the options and subcommands of the `groovysh` command. +function _picocli_groovysh() { + # Get completion data + CURR_WORD=${COMP_WORDS[COMP_CWORD]} + PREV_WORD=${COMP_WORDS[COMP_CWORD-1]} + + COMMANDS="" + FLAG_OPTS="-cp -classpath --classpath -h --help -V --version -v --verbose -q --quiet -d --debug -pr --enable-preview -pa --parameters" + ARG_OPTS="-e --evaluate -C --color -D --define -T --terminal" + + COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS} ${COMMANDS}" -- ${CURR_WORD}) ) +} + +# Define a completion specification (a compspec) for the +# `groovysh`, `groovysh.sh`, and `groovysh.bash` commands. +# Uses the bash `complete` builtin (see [5]) to specify that shell function +# `_complete_groovysh` is responsible for generating possible completions for the +# current word on the command line. +# The `-o default` option means that if the function generated no matches, the +# default Bash completions and the Readline default filename completions are performed. +complete -F _complete_groovysh -o default groovysh groovysh.sh groovysh.bash diff --git a/bin/java2groovy b/bin/java2groovy new file mode 100755 index 0000000000000000000000000000000000000000..c4801933d84b581daf6bcdfea9d7c522f1d1dec3 --- /dev/null +++ b/bin/java2groovy @@ -0,0 +1,51 @@ +#!/usr/bin/env sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +############################################################################## + +## +## $Revision: 4241 $ +## $Date: 2006-11-16 17:30:40 +0000 (Thu, 16 Nov 2006) $ +## + +export GROOVY_APP_NAME=Java2Groovy + +# resolve links - $0 may be a soft-link +PRG="$0" + +while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")"/"$link" + fi +done + +DIRNAME="$(dirname "$PRG")" + +. "$DIRNAME/startGroovy" + +startGroovy org.codehaus.groovy.antlr.java.Java2GroovyMain "$@" diff --git a/bin/java2groovy.bat b/bin/java2groovy.bat new file mode 100644 index 0000000000000000000000000000000000000000..c137b393f001058c085763d9f027ed5f698382bb --- /dev/null +++ b/bin/java2groovy.bat @@ -0,0 +1,38 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off + +@rem +@rem $Revision: 2770 $ $Date: 2005-08-29 11:49:42 +0100 (Mon, 29 Aug 2005) $ +@rem + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +:begin +@rem Determine what directory it is in. +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=.\ + +"%DIRNAME%\startGroovy.bat" "%DIRNAME%" org.codehaus.groovy.antlr.java.Java2GroovyMain %* + +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal +%COMSPEC% /C exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/bin/startGroovy b/bin/startGroovy new file mode 100755 index 0000000000000000000000000000000000000000..d072626d7d6cf30d0267deb5566dc587be7cf6dc --- /dev/null +++ b/bin/startGroovy @@ -0,0 +1,309 @@ +#!/usr/bin/env sh +# -*- mode:sh -*- +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +############################################################################## + +PROGNAME="$(basename "$0")" + +SCRIPT_PATH="$0" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "${PROGNAME}: $*" +} + +die ( ) { + warn "$*" + exit 1 +} + +earlyInit ( ) { + return +} + +lateInit ( ) { + return +} + +GROOVY_STARTUP="$HOME/.groovy/startup" +if [ -r "$GROOVY_STARTUP" ] ; then + . "$GROOVY_STARTUP" +fi + +earlyInit + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +linux=false +case "$(uname)" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; + Linux* ) + linux=true + ;; +esac + +if [ "$1" = "-cp" ] || [ "$1" = "-classpath" ] || [ "$1" = "--classpath" ] ; then + CP=$2 + shift 2 +fi + +REPLACE_PREVIEW= +if [ "$1" = "-pr" ] || [ "$1" = "--enable-preview" ] ; then + JAVA_OPTS="$JAVA_OPTS --enable-preview -Dgroovy.preview.features=true" + # for now, also remember arg to pass through + REPLACE_PREVIEW="--enable-preview" + shift 1 +fi + +# Attempt to set JAVA_HOME if it's not already set. +if [ -z "$JAVA_HOME" ] ; then + if $darwin ; then + [ -z "$JAVA_HOME" ] && [ -f "/usr/libexec/java_home" ] && JAVA_HOME="$(/usr/libexec/java_home)" + [ -z "$JAVA_HOME" ] && [ -d "/Library/Java/Home" ] && JAVA_HOME="/Library/Java/Home" + [ -z "$JAVA_HOME" ] && [ -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home" + else + javaExecutable="$(which javac)" + [ -z "$javaExecutable" ] || [ "$(expr "$javaExecutable" : '\([^ ]*\)')" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME." + # readlink(1) is not available as standard on Solaris 10. + readLink="$(which readlink)" + [ "$(expr "$readLink" : '\([^ ]*\)')" = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME." + javaExecutable="$(readlink -f "$javaExecutable")" + javaHome="$(dirname "$javaExecutable")" + javaHome="$(expr "$javaHome" : '\(.*\)/bin')" + JAVA_HOME="$javaHome" + fi + + export JAVA_HOME +fi + +# GROOVY-9875: backspace does not work in the SecureCRT connecting Linux +if $linux ; then + export TERM=linux +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$GROOVY_HOME" ] && GROOVY_HOME="$(cygpath --unix "$GROOVY_HOME")" + [ -n "$JAVACMD" ] && JAVACMD="$(cygpath --unix "$JAVACMD")" + [ -n "$JAVA_HOME" ] && JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + [ -n "$CP" ] && CP=$(cygpath --path --unix "$CP") +else + if [ -n "$GROOVY_HOME" ] && [ "$(expr "$GROOVY_HOME" : '\/$')" ] ; then + GROOVY_HOME="$(echo "$GROOVY_HOME" | sed -e 's/\/$//')" + fi +fi + +# For MSYS, ensure paths are in appropriate format. +if $msys +then + [ -n "$JAVA_HOME" ] && JAVA_HOME="$(cd "$JAVA_HOME" ; pwd)" +fi + +# Attempt to set GROOVY_HOME if it is not already set. +if [ -z "$GROOVY_HOME" ] || [ ! -d "$GROOVY_HOME" ] ; then + # Resolve links: $0 may be a link to groovy's home. + PRG="$0" + # Need this for relative symlinks. + while [ -h "$PRG" ] ; do + ls="$(ls -ld "$PRG")" + link="$(expr "$ls" : '.*-> \(.*\)$')" + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="$(dirname "$PRG")""/$link" + fi + done + SAVED="$(pwd)" + cd "$(dirname "$PRG")/.." + GROOVY_HOME="$(pwd -P)" + cd "$SAVED" +fi + +# Set the default Groovy config if no specific one is mentioned. +if [ -z "$GROOVY_CONF" ] ; then + GROOVY_CONF="$GROOVY_HOME/conf/groovy-starter.conf" +fi +STARTER_CLASSPATH="$GROOVY_HOME/lib/groovy-3.0.8.jar" + +# Create the final classpath. Setting a classpath using the -cp or -classpath option means not to use the +# global classpath. Groovy behaves then the same as the java interpreter +if [ -n "$CP" ] ; then + CP="$CP":. +elif [ -n "$CLASSPATH" ] ; then + CP="$CLASSPATH":. +else + CP=. +fi + +# Determine the Java command to use to start the JVM. +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="java" + fi +fi +if [ ! -x "$JAVACMD" ] ; then + die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD" +fi +if [ -z "$JAVA_HOME" ] ; then + warn "JAVA_HOME environment variable is not set" +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" ] && [ "$darwin" = "false" ] && [ "$nonstop" = "false" ] ; then + # disable ulimit shellcheck warnings. while only ulimit -f is technicaly + # POSIX correct virtually every shell on every *nix supports these options + # shellcheck disable=SC2039 + MAX_FD_LIMIT="$(ulimit -H -n)" + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" ] || [ "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + # shellcheck disable=SC2039 + ulimit -n "$MAX_FD" + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# Setup Profiler +useprofiler=false +if [ "$PROFILER" != "" ] ; then + if [ -r "$PROFILER" ] ; then + . "$PROFILER" + useprofiler=true + else + die "Profiler file not found: $PROFILER" + fi +fi + +# For Darwin, use classes.jar for TOOLS_JAR +TOOLS_JAR="$JAVA_HOME/lib/tools.jar" +#if $darwin; then +# TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" +#fi + +# For Darwin, add GROOVY_APP_NAME to the JAVA_OPTS as -Xdock:name +if "$darwin"; then + JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GROOVY_APP_NAME -Xdock:icon=$GROOVY_HOME/lib/groovy.icns" +fi + +# For Cygwin, switch paths to Windows format before running java +if "$cygwin"; then + GROOVY_HOME="$(cygpath --mixed "$GROOVY_HOME")" + JAVA_HOME="$(cygpath --mixed "$JAVA_HOME")" + GROOVY_CONF="$(cygpath --mixed "$GROOVY_CONF")" + CP="$(cygpath --path --mixed "$CP")" + TOOLS_JAR="$(cygpath --mixed "$TOOLS_JAR")" + STARTER_CLASSPATH="$(cygpath --path --mixed "$STARTER_CLASSPATH")" + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW="$(find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null)" + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GROOVY_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + argsstr='' + for arg in "$@" ; do + CHECK="$(echo "$arg"|egrep -c "$OURCYGPATTERN" -)" + if [ "$CHECK" -ne 0 ] ; then + patched="$(cygpath --path --ignore --mixed "$arg")" + else + patched="$arg" + fi + argsstr="$argsstr \"$patched\"" + done + + eval "set -- $argsstr" +fi + +startGroovy ( ) { + JAVA_VERSION="$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}' | cut -d "_" -f1)" + if [ "$(expr "$JAVA_VERSION" \> "1.8.0")" ]; then + JAVA_OPTS="$JAVA_OPTS -Dgroovy.jaxb=jaxb" + [ "$GROOVY_TURN_OFF_JAVA_WARNINGS" = "true" ] && JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.border=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED" + # sun.awt.windows just on windows platforms + if [ $msys = 'true' ] || [ $cygwin = 'true' ]; then + [ "$GROOVY_TURN_OFF_JAVA_WARNINGS" = "true" ] && JAVA_OPTS="$JAVA_OPTS --add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED" + fi + fi + + CLASS="$1" + shift + # Start the Profiler or the JVM + if [ "$useprofiler" = true ] ; then + runProfiler + else + # shellcheck disable=SC2086 + exec "$JAVACMD" $JAVA_OPTS \ + -classpath "$STARTER_CLASSPATH" \ + -Dscript.name="$SCRIPT_PATH" \ + -Dprogram.name="$PROGNAME" \ + -Dgroovy.starter.conf="$GROOVY_CONF" \ + -Dgroovy.home="$GROOVY_HOME" \ + -Dtools.jar="$TOOLS_JAR" \ + "$STARTER_MAIN_CLASS" \ + --main "$CLASS" \ + --conf "$GROOVY_CONF" \ + --classpath "$CP" $REPLACE_PREVIEW \ + "$@" + fi +} + +STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter + +lateInit diff --git a/bin/startGroovy.bat b/bin/startGroovy.bat new file mode 100644 index 0000000000000000000000000000000000000000..04d7ef6976053065cc6dcd4646dab436c855d076 --- /dev/null +++ b/bin/startGroovy.bat @@ -0,0 +1,309 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem ## +@rem Groovy JVM Bootstrap for Windows ## +@rem ## +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal enabledelayedexpansion + +set DIRNAME=%~1 +shift + +set CLASS=%~1 +shift + +if exist "%USERPROFILE%/.groovy/preinit.bat" call "%USERPROFILE%/.groovy/preinit.bat" + +@rem Determine the command interpreter to execute the "CD" later +set COMMAND_COM="cmd.exe" +if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe" +if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com" + +@rem Use explicit find.exe to prevent cygwin and others find.exe from being used +set FIND_EXE="find.exe" +if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe" +if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe" + +:check_JAVA_HOME +@rem Make sure we have a valid JAVA_HOME +if not "%JAVA_HOME%" == "" goto have_JAVA_HOME +set PATHTMP=%PATH% +:loop +for /f "delims=; tokens=1*" %%i in ("!PATHTMP!") do ( + if exist "%%i\..\bin\java.exe" ( + set "JAVA_HOME=%%i\.." + goto found_JAVA_HOME + ) + set PATHTMP=%%j + goto loop +) +goto check_default_JAVA_EXE + +:found_JAVA_HOME +@rem Remove trailing \bin\.. from JAVA_HOME +if "%JAVA_HOME:~-7%"=="\bin\.." SET "JAVA_HOME=%JAVA_HOME:~0,-7%" +set JAVA_EXE=%JAVA_HOME%\bin\java.exe + +:check_default_JAVA_EXE +if not "%JAVA_HOME%" == "" goto valid_JAVA_HOME +java -version 2>NUL +if not ERRORLEVEL 1 goto default_JAVA_EXE + +echo. +echo ERROR: Environment variable JAVA_HOME has not been set. +echo Attempting to find JAVA_HOME from PATH also failed. +goto common_error + +:have_JAVA_HOME +@rem Remove trailing slash from JAVA_HOME if found +if "%JAVA_HOME:~-1%"=="\" SET JAVA_HOME=%JAVA_HOME:~0,-1% + +@rem Validate JAVA_HOME +%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul +if not errorlevel 1 goto valid_JAVA_HOME_DIR + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% + +:common_error +echo Please set the JAVA_HOME variable in your environment +echo to match the location of your Java installation. +goto end + +:default_JAVA_EXE +set JAVA_EXE=java.exe +goto check_GROOVY_HOME + +:valid_JAVA_HOME_DIR +set JAVA_EXE=%JAVA_HOME%\bin\java.exe +if exist "%JAVA_EXE%" goto valid_JAVA_HOME + +echo. +echo ERROR: No java.exe found at: %JAVA_EXE% +goto common_error + +:valid_JAVA_HOME +if exist "%JAVA_HOME%\lib\tools.jar" set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar + +:check_GROOVY_HOME +@rem Define GROOVY_HOME if not set +if "%GROOVY_HOME%" == "" set GROOVY_HOME=%DIRNAME%.. + +@rem Remove trailing slash from GROOVY_HOME if found +if "%GROOVY_HOME:~-1%"=="\" SET GROOVY_HOME=%GROOVY_HOME:~0,-1% + +@rem classpath handling +set _SKIP=2 +set CP= +if "x%~1" == "x-cp" set CP=%~2 +if "x%~1" == "x-classpath" set CP=%~2 +if "x%~1" == "x--classpath" set CP=%~2 +if "x" == "x%CP%" goto preview_check +set _SKIP=4 +shift +shift + +:preview_check +@rem classpath handling +set PREV= +set REPLACE_PREVIEW= +if "x%~1" == "x-pr" goto preview_enable +if "x%~1" == "x--enable-preview" goto preview_enable +goto init + +:preview_enable +set JAVA_OPTS=%JAVA_OPTS% --enable-preview -Dgroovy.preview.features=true +@rem for now, also remember arg to pass through +set REPLACE_PREVIEW=--enable-preview +if "%_SKIP%" == "4" set _SKIP=5 +if "%_SKIP%" == "2" set _SKIP=3 +shift + +:init +@rem get name of script to launch with full path +set GROOVY_SCRIPT_NAME=%~f1 +@rem Get command-line arguments, handling Windows variants +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +rem horrible roll your own arg processing inspired by jruby equivalent + +rem escape minus (-d), quotes (-q), star (-s). +set _ARGS=%* +if not defined _ARGS goto execute +set _ARGS=%_ARGS:-=-d% +set _ARGS=%_ARGS:"=-q% +set _ARGS=%_ARGS:?=-n% +rem Windows will try to match * with files so we escape it here +rem but it is also a meta char for env var string substitution +rem so it can't be first char here, hack just for common cases. +rem If in doubt use a space or bracket before * if using -e. +set _ARGS=%_ARGS: *= -s% +set _ARGS=%_ARGS:)*=)-s% +set _ARGS=%_ARGS:0*=0-s% +set _ARGS=%_ARGS:1*=1-s% +set _ARGS=%_ARGS:2*=2-s% +set _ARGS=%_ARGS:3*=3-s% +set _ARGS=%_ARGS:4*=4-s% +set _ARGS=%_ARGS:5*=5-s% +set _ARGS=%_ARGS:6*=6-s% +set _ARGS=%_ARGS:7*=7-s% +set _ARGS=%_ARGS:8*=8-s% +set _ARGS=%_ARGS:9*=9-s% + +rem prequote all args for 'for' statement +set _ARGS="%_ARGS%" + +set _ARG= +:win9xME_args_loop +rem split args by spaces into first and rest +for /f "tokens=1,*" %%i in (%_ARGS%) do call :get_arg "%%i" "%%j" +goto process_arg + +:get_arg +rem remove quotes around first arg and don't expand wildcards +for /f %%i in (%1) do set _ARG=%_ARG% %%~i +rem set the remaining args +set _ARGS=%2 +rem remove the leading space we'll add the first time +if "x%_ARG:~0,1%" == "x " set _ARG=%_ARG:~1% +rem return +goto :EOF + +:process_arg +if "%_ARG%" == "" goto execute + +rem collect all parts of a quoted argument containing spaces +if not "%_ARG:~0,2%" == "-q" goto :argIsComplete +if "%_ARG:~-2%" == "-q" goto :argIsComplete +rem _ARG starts with a quote but does not end with one: +rem add the next part to _ARG until the matching quote is found +goto :win9xME_args_loop + +:argIsComplete +if "x5" == "x%_SKIP%" goto skip_5 +if "x4" == "x%_SKIP%" goto skip_4 +if "x3" == "x%_SKIP%" goto skip_3 +if "x2" == "x%_SKIP%" goto skip_2 +if "x1" == "x%_SKIP%" goto skip_1 + +rem now unescape -s, -q, -n, -d +rem -d must be the last to be unescaped +set _ARG=%_ARG:-s=*% +set _ARG=%_ARG:-q="% +set _ARG=%_ARG:-n=?% +set _ARG=%_ARG:-d=-% + +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %_ARG% +set _ARG= +goto win9xME_args_loop + +:skip_5 +set _ARG= +set _SKIP=4 +goto win9xME_args_loop + +:skip_4 +set _ARG= +set _SKIP=3 +goto win9xME_args_loop + +:skip_3 +set _ARG= +set _SKIP=2 +goto win9xME_args_loop + +:skip_2 +set _ARG= +set _SKIP=1 +goto win9xME_args_loop + +:skip_1 +set _ARG= +set _SKIP=0 +goto win9xME_args_loop + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line +set STARTER_CLASSPATH=%GROOVY_HOME%\lib\groovy-3.0.8.jar + +if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat" + +@rem Setting a classpath using the -cp or -classpath option means not to use +@rem the global classpath. Groovy behaves then the same as the java +@rem interpreter +if "x" == "x%CP%" goto empty_cp +:non_empty_cp +set CP=%CP%;. +goto after_cp +:empty_cp +set CP=. +if "x" == "x%CLASSPATH%" goto after_cp +set CP=%CLASSPATH%;%CP% +:after_cp + +set STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter +set STARTER_CONF=%GROOVY_HOME%\conf\groovy-starter.conf + +set GROOVY_OPTS=-Dprogram.name="%PROGNAME%" +set GROOVY_OPTS=%GROOVY_OPTS% -Dgroovy.home="%GROOVY_HOME%" +if not "%TOOLS_JAR%" == "" set GROOVY_OPTS=%GROOVY_OPTS% -Dtools.jar="%TOOLS_JAR%" +set GROOVY_OPTS=%GROOVY_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%" +set GROOVY_OPTS=%GROOVY_OPTS% -Dscript.name="%GROOVY_SCRIPT_NAME%" + +for /f "tokens=3" %%g in ('call "%JAVA_EXE%" -version 2^>^&1 ^| findstr /i "version"') do ( + SET JAVA_VERSION=%%g +) +for /f "useback tokens=*" %%a in ('%JAVA_VERSION%') do set JAVA_VERSION=%%~a +set JAVA_VERSION=%JAVA_VERSION:~0,5% +set ADD_MODULES_OPT=--add-modules +if "%JAVA_VERSION%" gtr "1.8.0" set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.jaxb=jaxb +if "%JAVA_VERSION%" gtr "1.8.0" if "%GROOVY_TURN_OFF_JAVA_WARNINGS%" == "true" set JAVA_OPTS=%JAVA_OPTS% --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.border=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED + +if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat" + +@rem GROOVY-6453: groovysh in Windows 7/8/10 doesn't support arrow keys and Del +set JAVA_OPTS=%JAVA_OPTS% -Djline.terminal=none + +@rem Execute Groovy +"%JAVA_EXE%" %GROOVY_OPTS% %JAVA_OPTS% -classpath "%STARTER_CLASSPATH%" %STARTER_MAIN_CLASS% --main %CLASS% --conf "%STARTER_CONF%" --classpath "%CP%" %REPLACE_PREVIEW% %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" endlocal + +@rem Optional pause the batch file +if "%GROOVY_BATCH_PAUSE%" == "on" pause +%COMSPEC% /C exit /B %ERRORLEVEL% diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..9969bea162fe2241210a5118e37c6303397e45dd --- /dev/null +++ b/build.gradle @@ -0,0 +1,130 @@ +repositories { + mavenLocal() + maven { url 'https://maven.aliyun.com/repository/central' } + maven { url 'https://maven.aliyun.com/repository/public' } + mavenCentral() +} + +version = '1.2.10' + +//apply plugin: 'java' +apply plugin: 'groovy' + + +compileGroovy { // 保留方法参数的名字(非arg0/arg1...) + groovyOptions.parameters = true +} + + +// 修改源目录 +sourceSets { + main { + groovy { + srcDir 'src' + } + resources { + srcDir 'src/static' + } + } +} + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + + +ext { + groovyVersion = '3.0.8' +} +dependencies { + implementation fileTree(dir: 'sysLib', include: ['*.jar']) + implementation "org.codehaus.groovy:groovy:$groovyVersion" + implementation "org.codehaus.groovy:groovy-templates:$groovyVersion" + // implementation "org.codehaus.groovy:groovy-sql:$groovyVersion" + implementation "org.codehaus.groovy:groovy-json:$groovyVersion" + // implementation "org.codehaus.groovy:groovy-jmx:$groovyVersion" + + //implementation 'com.alibaba:fastjson:1.2.73' + + implementation 'cn.xnatural:tiny:1.1.2' + implementation 'cn.xnatural:http:1.1.0' + implementation 'cn.xnatural:jpa:1.0.8' + implementation 'cn.xnatural:sched:1.0.3' + implementation 'cn.xnatural:remoter:1.0.5' + implementation 'cn.xnatural.task:task:1.0.2' + + // 连接池 + // implementation 'com.alibaba:druid:1.1.23' + // implementation 'com.zaxxer:HikariCP:3.4.1' + // implementation 'org.apache.commons:commons-dbcp2:2.7.0' + implementation 'mysql:mysql-connector-java:8.0.23' + // implementation 'mysql:mysql-connector-java:5.1.49' + implementation 'org.mariadb.jdbc:mariadb-java-client:2.1.2' + implementation 'com.h2database:h2:1.4.199' + + // implementation 'org.apache.commons:commons-email:1.5' + // implementation 'io.netty:netty-all:4.1.49.Final' + implementation 'com.squareup.okhttp3:okhttp:3.14.9' + // implementation('org.apache.httpcomponents:httpclient:4.5.12') + // implementation ('org.ehcache:ehcache:3.8.1') {exclude group:'org.slf4j'} + implementation 'redis.clients:jedis:3.3.0' + implementation 'org.jsoup:jsoup:1.13.1' + + // 分布式数据一致框架 + // implementation 'io.atomix:atomix:3.1.8' + // implementation 'org.apache.zookeeper:zookeeper:3.6.2' + + // 工作流 +// implementation('org.activiti:activiti-engine:7.0.0.GA') { +// exclude group: 'org.mybatis' +// exclude group: 'org.springframework' +// } + + // 规则引擎 +// implementation('org.drools:drools-core:7.37.0.Final') +// implementation('com.alibaba:QLExpress:3.2.4') + + // jvm 脚本语言 + // implementation('com.googlecode.aviator:aviator:5.2.3') +} + + +// 依赖copy +task deps(type: Copy) { + new File('lib').deleteDir() + from configurations.runtimeClasspath + into 'lib' +} + + +task tgz(dependsOn: ['deps'], type: Tar) { + new File("${buildDir}/grule.tgz").deleteOnExit() + + into("bin") {from("bin")} + into("conf") {from "conf"} + into("src") {from("src")} + into("lib") {from "lib"} + from "Dockerfile" + from "build.gradle" + from "start.bat" + from("start.sh") + + archiveFileName = "grule.tgz" + compression(Compression.GZIP) + destinationDirectory = file("${buildDir}") +} + + +task tarDir(dependsOn: ['deps'], type: Copy) { + new File("${buildDir}/grule").deleteDir() + + into("bin") {from("bin")} + into("conf") {from "conf"} + into("src") {from("src")} + into("lib") {from "lib"} + from "Dockerfile" + from "build.gradle" + from "start.bat" + from("start.sh") + + into "${buildDir}/grule" +} \ No newline at end of file diff --git a/conf/app-ali.properties b/conf/app-ali.properties new file mode 100644 index 0000000000000000000000000000000000000000..6763038c8c1584f7d4a92ccc2aef62aeb6c0ba97 --- /dev/null +++ b/conf/app-ali.properties @@ -0,0 +1,38 @@ +sys.exec.corePoolSize=4 +sys.exec.maximumPoolSize=4 + +#### 文件上传本地存放目录 +fileUploader.accessUrlPrefix=//xnatural.cn/rule/file/ + + +#### rule 数据源 +jpa_rule.url=jdbc:mariadb://localhost:3306/rule?useSSL=false&user=root&password=root&useUnicode=true&characterEncoding=utf-8 +jpa_rule.minIdle=1 +jpa_rule.maxActive=5 +jpa_rule.hibernate.hbm2ddl.auto=update +#jpa_rule.hibernate.show_sql=true +jpa_rule.druid.timeBetweenEvictionRunsMillis=7200000 +#生成sql的时候会将字段,也就是操作的列自动加上`,就不存在和mysql关键字冲突了 +#jpa_rule.hibernate.globally_quoted_identifiers=true + + +#### web 配置 +web.hp=:9090 +# web.session.type=redis + + +#### 集群(remoter)配置 +remoter.hp=:9001 +remoter.masterHps=xnatural.cn:8001 +#remoter.master=true +remoter.exposeTcp=xnatural.cn${remoter.hp} +remoter.exposeHttp=xnatural.cn${web.hp} + + +#### cache配置 +# 最大缓存条数 +cacheSrv.itemLimit=100 + +#### 历史记录清理配置 +decisionSrv.decideRecord.keepCount=70000 +decisionSrv.optimizeTable=true \ No newline at end of file diff --git a/conf/app.properties b/conf/app.properties new file mode 100644 index 0000000000000000000000000000000000000000..153631ca61735e0b2b9120fab0c20e8235d390c0 --- /dev/null +++ b/conf/app.properties @@ -0,0 +1,55 @@ +#### 系统名字(集群时会用到) +sys.name=grule + + +#### 系统线程池(工作能力)大小配置 +sys.exec.corePoolSize=8 +sys.exec.maximumPoolSize=32 + + +#### rule 数据源 +jpa_rule.url=jdbc:h2:${user.dir}/../h2/data;user=root;password=root +#jpa_rule.url=jdbc:mysql://localhost:3306/rule?useSSL=false&user=root&password=root&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true +jpa_rule.minIdle=1 +jpa_rule.maxActive=5 +jpa_rule.testWhileIdle=true +jpa_rule.validationQuery=select 1 +jpa_rule.hibernate.hbm2ddl.auto=update +# druid 连接池多久过期一个连接 DruidAbstractDataSource#testConnectionInternal +jpa_rule.druid.timeBetweenEvictionRunsMillis=1800000 +### 是否打印sql +#jpa_rule.hibernate.show_sql=true + + +#### 文件上传本地存放目录 +#fileUploader.localDir=d:/tmp/upload + + +#### 事件追踪(调试) +#ep.track=bean.get + + +#### web 配置 +web.hp=:9090 +# web.session.type=redis +# session 过期时间. 单位: 分钟 +web.session.expire=2880 +# 接口超时日志告警时间. 一般比较长. 1分钟 +web.logWarnTimeout=60000 + + +#### redis 相关配置 +# redis.host=localhost +# redis.password=xxx +# redis.database=1 + + +#### 集群(remoter)配置 +remoter.hp=:9001 +remoter.masterHps= + + +#### 历史记录清理配置 +decisionSrv.decideRecord.keepCount=999999 +# 数据清理后 是否 optimize table +decisionSrv.optimizeTable=false \ No newline at end of file diff --git a/conf/groovy-starter.conf b/conf/groovy-starter.conf new file mode 100644 index 0000000000000000000000000000000000000000..7f9d2f3852f37c98de075c3d821a697c8da44a23 --- /dev/null +++ b/conf/groovy-starter.conf @@ -0,0 +1,39 @@ +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. + +############################################################################## +## ## +## Groovy Classloading Configuration ## +## ## +############################################################################## + +## Note: do not add classes from java.lang here. No rt.jar and on some +## platforms no tools.jar +## +## See http://docs.groovy-lang.org/docs/latest/html/api/org/codehaus/groovy/tools/LoaderConfiguration.html +## for the file format + + # load required libraries + load !{groovy.home}/lib/*.jar + + # load jaxb libraries if needed (ignored if not found) + load !{groovy.home}/lib/extras-${groovy.jaxb}/*.jar + + # load user specific libraries + load !{user.home}/.groovy/lib/*.jar + + # tools.jar for ant tasks + load ${tools.jar} + diff --git a/conf/openApi.json b/conf/openApi.json new file mode 100644 index 0000000000000000000000000000000000000000..6e748d4e610a9735fd8858e6cc6f0d9c7a5ed955 --- /dev/null +++ b/conf/openApi.json @@ -0,0 +1,533 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "GRule API", + "description": "GRule", + "contact": { + "email": "xnatural@msn.cn" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost:9090", + "description": "local" + } + ], + "tags": [ + { + "name": "rule", + "description": "rule api" + }, + { + "name": "test", + "description": "test api" + }, + { + "name": "main", + "description": "main api" + } + ], + "paths": { + "/decision": { + "post": { + "tags": ["rule"], + "summary": "决策执行", + "description": "决策执行", + "requestBody": { + "description": "表单数据", + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "decisionId": { + "type": "string", "required": true, "description": "决策id" + }, + "async": { + "type": "boolean", "required": false, "description": "是否异步执行决策" + }, + "callback": { + "type": "string", "required": false, "description": "异步执行决策完成后的回调接口地址" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/findDecideResult": { + "get": { + "tags": ["rule"], + "summary": "查询决策结果", + "description": "一般用于异步决策查询", + "parameters": [ + { + "name": "decideId", + "in": "query", + "description": "决策结果id", + "required": true, + "style": "form", + "explode": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/dao": { + "post": { + "tags": ["test"], + "summary": "数据库操作接口", + "description": "数据库操作接口", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "type=file 就查文件那个表", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/form": { + "post": { + "tags": ["test"], + "summary": "表单接口", + "description": "接收表单提交", + "requestBody": { + "description": "表单数据", + "required": false, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "param1": { + "type": "string" + }, + "p2": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/json": { + "post": { + "tags": ["test"], + "summary": "json接口", + "description": "接收json提交", + "requestBody": { + "description": "json数据", + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "p1": { + "type": "number" + }, + "p2": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/upload": { + "post": { + "tags": ["test"], + "summary": "文件上传", + "description": "文件上传", + "requestBody": { + "description": "文件", + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "required": true, + "type": "file", + "format": "binary" + }, + "version": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/pieceUpload": { + "post": { + "tags": ["test"], + "summary": "分片上传", + "description": "文件上传: 持续上传/分片上传", + "requestBody": { + "description": "文件", + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "filePiece": { + "required": true, + "type": "file", + "format": "binary" + }, + "fileId": { + "type": "string" + }, + "originName": { + "type": "string" + }, + "totalPiece": { + "type": "number", + "format": "int" + }, + "currentPiece": { + "type": "number", + "format": "int" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/remote": { + "get": { + "tags": ["test"], + "summary": "远程调用", + "description": "ep 远程调用", + "parameters": [ + { + "name": "app", + "in": "query", + "description": "app 应用名", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "string" + } + }, + { + "name": "event", + "in": "query", + "description": "事件名", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "string" + } + }, + { + "name": "p1", + "in": "query", + "description": "参数p1", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/http": { + "get": { + "tags": ["test"], + "summary": "http 代理请求", + "description": "http 代理请求", + "parameters": [ + { + "name": "url", + "in": "query", + "description": "代理发送http请求的地址", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/async": { + "get": { + "tags": ["test"], + "summary": "异步响应", + "description": "后台 异步响应", + "parameters": [ + + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/cus": { + "get": { + "tags": ["test"], + "summary": "自定义返回接口", + "description": "返回自定义数据结构", + "parameters": [ + + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/error": { + "get": { + "tags": ["test"], + "summary": "测试抛出错误", + "description": "抛出错误 接口", + "parameters": [ + + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + }, + "/test/timeout": { + "get": { + "tags": ["test"], + "summary": "超时接口", + "description": "测试超时接口 让接口超时返回", + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "设置超时时间(接口多久返回) 默认10秒", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "成功返回", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ApiResp" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ApiResp": { + "required": ["code"], + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "00" + }, + "desc": { + "type": "string", + "example": "成功" + }, + "data": { + "type": "object" + }, + "traceNo": { + "type": "string", + "format": "uuid", + "example": "2d59326c4ad844a6b3c866fba159a44a" + } + } + } + } + } +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..05679dc3c18669869e21a57ce911ccfe56352d0d --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000000000000000000000000000000000000..744e882ed57263a19bf3a504977da292d009345f --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MSYS* | MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..107acd32c4e687021ef32db511e8a206129b88ec --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/core/HttpSrv.groovy b/src/core/HttpSrv.groovy new file mode 100644 index 0000000000000000000000000000000000000000..3e49ab6eec374fbf2f00e82b615940c4667162c5 --- /dev/null +++ b/src/core/HttpSrv.groovy @@ -0,0 +1,187 @@ +package core + +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL +import cn.xnatural.http.HttpContext +import cn.xnatural.http.HttpServer +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import entity.UserSession + +import java.time.Duration +import java.util.function.Supplier + +/** + * web 服务 + */ +class HttpSrv extends ServerTpl { + @Lazy protected cacheSrv = bean(CacheSrv) + @Lazy protected repo = bean(Repo, 'jpa_rule_repo') + @Lazy protected sessionCookieName = getStr("sessionCookieName", "sessionId") + // 用户session过期 + @Lazy protected expire = Duration.ofMinutes(getInteger('session.expire', 30)) + // 用户session最迟过期时间 + @Lazy protected continuousExpire = Duration.ofMinutes(getInteger('session.continuousExpire', 60 * 24 * 5)) + // 用户session数据保存时间 + @Lazy protected keep = Duration.ofMinutes(getInteger('session.keep', 60 * 24 * 180)) + // Controller层 Class + protected final ctrlClzs = new LinkedList() + @Lazy protected server = new HttpServer(attrs(), exec()) { + @Override + protected Map sessionDelegate(HttpContext hCtx) { getSessionDelegate(hCtx) } + } + + + HttpSrv(String name) { super(name) } + + HttpSrv() {super('web')} + + + @EL(name = 'sys.starting', async = true) + void start() { + ctrlClzs.each {server.ctrls(it)} + server.start() + server.enabled = false + ep.fire("${name}.started") + } + + + @EL(name = 'sys.started', async = true) + protected void started() { + server.ctrls.each {exposeBean(it)} + server.enabled = true + } + + + @EL(name = 'sys.stopping') + void stop() { server.stop() } + + + /** + * 提供session 数据操作 + */ + protected Map getSessionDelegate(HttpContext hCtx) { + Map sData + String sId = hCtx.request.getCookie(sessionCookieName) + if ('redis' == getStr('session.type', null)) { // session的数据, 用redis 保存 session 数据 + def redis = bean(RedisClient) + String cKey + if (!sId || ((cKey = 'session:' + sId) && !redis.exists(cKey))) { + sId = UUID.randomUUID().toString().replace('-', '') + cKey = 'session:' + sId + log.info("New session '{}'", sId) + } + sData = new Map() { + @Override + int size() { redis.exec {jedis -> jedis.hkeys(cKey).size()} } + @Override + boolean isEmpty() { redis.exec {jedis -> jedis.hkeys(cKey).isEmpty()} } + @Override + boolean containsKey(Object key) { redis.hexists(cKey, key?.toString()) } + @Override + boolean containsValue(Object value) { redis.exec {jedis-> jedis.hvals(cKey).contains(value)} } + @Override + Object get(Object key) { redis.hget(cKey, key?.toString()) } + @Override + Object put(String key, Object value) { redis.hset(cKey, key?.toString(), value instanceof Collection ? value.join(',') : value?.toString(), expire.seconds.intValue()) } + @Override + Object remove(Object key) { redis.hdel(cKey, key?.toString()) } + @Override + void putAll(Map m) { m?.each {e -> redis.hset(cKey, e.key, e.value.toString(), expire.seconds.intValue())} } + @Override + void clear() { redis.del(cKey) } + @Override + Set keySet() { redis.exec {jedis-> jedis.hkeys(cKey)} } + @Override + Collection values() { redis.exec {jedis-> jedis.hvals(cKey)} } + @Override + Set> entrySet() { + redis.exec {jedis -> jedis.hgetAll(cKey).entrySet()} + } + } + } else { // 默认用数据库做session 数据管理 + return dbSessionDelegate(hCtx) +// String cKey +// if (!sId || ((cKey = 'session_' + sId) && (sData = cacheSrv.get(cKey)) == null)) { +// sId = UUID.randomUUID().toString().replace('-', '') +// cKey = 'session_' + sId +// log.info("New session '{}'", sId) +// } +// +// if (sData == null) { +// sData = new ConcurrentHashMap<>() +// cacheSrv.set(cKey, sData, expire) +// } else { +// cacheSrv.expire(cKey, expire) +// } + } + sData.put("id", sId) + hCtx.response.cookie(sessionCookieName, sId, expire.seconds as Integer, null, "/", false, false) + return sData + } + + + /** + * 数据库session + */ + protected Map dbSessionDelegate(HttpContext hCtx) { + Map sData + String sessionId = hCtx.request.getCookie(sessionCookieName) + UserSession session + if (sessionId) { + session = repo.findById(UserSession, sessionId) + if (session) { + // 一段时间不操作过期 + if (System.currentTimeMillis() - session.updateTime.time > expire.toMillis()) { + session.valid = false + async { // 删除过期session数据 + def e = repo.find(UserSession) {root, query, cb -> + cb.and( + cb.equal(root.get("valid"), false), + cb.lessThan(root.get("updateTime"), new Date(System.currentTimeMillis() - keep.toMillis())) + ) + } + if (e) repo.delete(e) + } + } + // 如果一直操作, 则等超出continuousExpire时间后的下一天过期(在下一天第一次重新登录) + else if ( + System.currentTimeMillis() - session.createTime.time > continuousExpire.toMillis() && + (int) (System.currentTimeMillis() / (1000 * 60 * 60 * 24)) > (int) (session.updateTime.time / (1000 * 60 * 60 * 24)) + ) { + session.valid = false + } + else { + session.updateTime = new Date() + sData = session.data ? JSON.parseObject(session.data) : new JSONObject() + } + hCtx.regFinishedFn { + session.data = JSON.toJSONString(sData.findAll {e -> e.value !instanceof Supplier}) + repo.saveOrUpdate(session) + } + } + } + sessionId = session && session.valid ? session.sessionId : UUID.randomUUID().toString().replace('-', '') + sData = sData == null ? new JSONObject() : sData + sData.put("id", sessionId) + hCtx.response.cookie(sessionCookieName, sessionId, expire.seconds as Integer, null, "/", false, false) + return sData + } + + + /** + * 添加 + * @param clzs + */ + HttpSrv ctrls(Class...clzs) { clzs?.each {ctrlClzs.add(it)}; this } + + + @EL(name = "sys.heartbeat", async = true) + protected void clean() { server.clean() } + + + @EL(name = ['http.hp', 'web.hp'], async = false) + String getHp() { server.hp } +} diff --git a/src/core/OkHttpSrv.groovy b/src/core/OkHttpSrv.groovy new file mode 100644 index 0000000000000000000000000000000000000000..2fed0571743a2638e16cfb3ac69db38d2f0bea00 --- /dev/null +++ b/src/core/OkHttpSrv.groovy @@ -0,0 +1,328 @@ +package core + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.enet.event.EL +import cn.xnatural.enet.event.EP +import cn.xnatural.sched.Sched +import com.alibaba.fastjson.JSON +import okhttp3.* + +import java.time.Duration +import java.util.concurrent.ConcurrentHashMap +import java.util.function.BiConsumer +import java.util.function.Consumer + +import static java.util.Collections.emptyList + +/** + * 封装常用的http请求方式: + * 1. get + * 2. post json + * 3. post form + * 4. post multi form + */ +class OkHttpSrv extends ServerTpl { + + final Map> cookieStore = new ConcurrentHashMap<>() + final Map> shareCookie = new ConcurrentHashMap<>() + + OkHttpSrv() {super('okHttp')} + OkHttpSrv(String name) {super(name)} + + + @EL(name = 'sys.starting', async = true) + void init() { + if (ep == null) {ep = new EP(); ep.addListenerSource(this)} + exposeBean(client, name + "_client") + } + + + /** + * OkHttpClient + */ + @Lazy OkHttpClient client = { + new OkHttpClient.Builder() + .connectTimeout(Duration.ofSeconds(getLong('connectTimeout', 5L))) + .readTimeout(Duration.ofSeconds(getLong('readTimeout', 20L))) + .writeTimeout(Duration.ofSeconds(getLong('writeTimeout', 32L))) + .dispatcher(new Dispatcher(exec())) + .cookieJar(new CookieJar() {// 共享cookie + @Override + void saveFromResponse(HttpUrl url, List cookies) { + def cs = cookieStore.get(url.host) + if (cs == null) { + cookieStore.put(url.host, new LinkedList(cookies)) // 可更改 + } else {// 更新cookie + for (def itt = cs.iterator(); itt.hasNext(); ) { + Cookie coo = itt.next() + for (Cookie c: cookies) { + if (c.name() == coo.name()) { + itt.remove() + break + } + } + } + cs.addAll(cookies) + } + } + @Override + List loadForRequest(HttpUrl url) { + List cookies = cookieStore.get(url.host) + if (shareCookie[(url.host)]) { + def rLs = new LinkedList<>((cookies?:emptyList())) + shareCookie[(url.host)].each { + rLs.addAll(cookieStore.get(it)?:emptyList()) + } + return rLs + } else { + return cookies?:emptyList() + } + } + }).build() + }() + + + /** + * get 请求 + * @param urlStr + * @return + */ + OkHttp get(String urlStr) { + if (!urlStr) throw new IllegalArgumentException('url must not be empty') + def b = new Request.Builder() + def h = new OkHttp(urlStr, b) + b.method = 'GET' + h + } + + + /** + * post 请求 + * @param urlStr + * @return + */ + OkHttp post(String urlStr) { + if (!urlStr) throw new IllegalArgumentException('url must not be empty') + def b = new Request.Builder() + def h = new OkHttp(urlStr, b) + b.method = 'POST' + h + } + + + /** + * 创建 WebSocket + * @param urlStr 连接地址 + * @param tryInterval 重连接时间间隔. 秒 + * @param msgFn 消息处理函数 + */ + WebSocket ws(String urlStr, Integer tryInterval, BiConsumer msgFn = null) { + def req = new Request.Builder().url(urlStr).build() + def listener = new WebSocketListener() { + @Override + void onOpen(WebSocket webSocket, Response resp) { + log.info("WebSocket onOpen. url: " + urlStr) + } + @Override + void onMessage(WebSocket webSocket, String msg) { + msgFn?.accept(msg, webSocket) + } + @Override + void onFailure(WebSocket ws, Throwable t, Response resp) { + log.error("WS Error. url: " + urlStr + ", res: " + resp?.body()?.toString(), t) + if (tryInterval) { + def sched = bean(Sched) + if (sched) { + sched.after(Duration.ofSeconds(tryInterval), { client.newWebSocket(req, this) }) + } else { + log.warn("重连接WebSocket, 依赖于 sched 服务") + } + } + } + } + client.newWebSocket(req, listener) + } + + + class OkHttp { + // 宿主 + protected final Request.Builder builder + protected String urlStr + protected Map params + // 文件流:(属性名, 文件名, 文件内容) + protected List> fileStreams + protected Map cookies + protected String contentType + protected String bodyStr + protected boolean debug + protected Integer respCode + + protected OkHttp(String urlStr, Request.Builder builder) { + if (builder == null) throw new NullPointerException('builder == null') + this.builder = builder + this.urlStr = urlStr + } + OkHttp param(String pName, Object pValue) { + if (pName == null) throw new NullPointerException('pName == null') + if (params == null) params = new LinkedHashMap<>() + params.put(pName, pValue) + if (pValue instanceof File) { + if (contentType == null) contentType = 'multipart/form-data;charset=utf-8' + } + this + } + OkHttp fileStream(String pName, String fileName, Object body) { + if (pName == null) throw new NullPointerException('pName == null') + if (body == null) throw new NullPointerException('body == null') + if (body instanceof byte[] || body instanceof String || body instanceof InputStream || body instanceof File) { + if (fileStreams == null) fileStreams = new LinkedList<>() + fileStreams.add(Tuple.tuple(pName, fileName, body)) + if (contentType == null) contentType = 'multipart/form-data;charset=utf-8' + } else throw new IllegalArgumentException("Not support file body type: " + body.class.name) + this + } + OkHttp jsonBody(String bodyStr) { + this.bodyStr = bodyStr + if (contentType == null) contentType = 'application/json;charset=utf-8' + this + } + OkHttp textBody(String bodyStr) { + this.bodyStr = bodyStr + if (contentType == null) contentType = 'text/plain;charset=utf-8' + this + } + OkHttp contentType(String contentType) { + this.contentType = contentType + this + } + OkHttp cookie(String name, Object value) { + if (name == null) throw new NullPointerException('name == null') + if (cookies == null) cookies = new HashMap<>(7) + cookies.put(name, value) + this + } + OkHttp header(String name, Object value) { + if (value == null) throw new NullPointerException('value == null') + builder.addHeader(name, value.toString()) + this + } + OkHttp debug() {this.debug = true; this} + + Integer getRespCode() { return respCode } + // 请求执行 + def execute(Consumer okFn = null, BiConsumer failFn = {throw it}) { + List tmpFile = null + if ('GET' == builder.method) { // get 请求拼装参数 + urlStr = Utils.buildUrl(urlStr, params) + builder.get() + // okHttp get 不能body + } + else if ('POST' == builder.method) { + if (contentType && + (contentType.containsIgnoreCase('application/json') || + contentType.containsIgnoreCase('text/plain')) + ) { + if (bodyStr) builder.post(RequestBody.create(MediaType.get(contentType), (bodyStr == null ? '' : bodyStr))) + else if (params) builder.post(RequestBody.create(MediaType.get(contentType), JSON.toJSONString(params))) + } else if (contentType && contentType.containsIgnoreCase('multipart/form-data')) { + def b = new MultipartBody.Builder().setType(MediaType.get(contentType)) + fileStreams?.each { + def v = it.v3 + if (it.v3 instanceof InputStream) { + v = new File(getStr('tmpDir', Utils.baseDir('tmp').canonicalPath)) + v.mkdirs() + v = new File(v, "/" + UUID.randomUUID().toString().replace("-", '')) + v.append((InputStream) it.v3) + if (tmpFile == null) tmpFile = new LinkedList<>() + tmpFile.add(v) + } + b.addFormDataPart(it.v1, it.v2, RequestBody.create(MediaType.get('application/octet-stream'), v)) + } + params?.each { + if (it.value instanceof File) { + b.addFormDataPart(it.key, ((File) it.value).name, RequestBody.create(MediaType.get('application/octet-stream'), (File) it.value)) + } else { + b.addFormDataPart(it.key, (it.value == null ? '': it.value).toString()) + } + } + builder.post(b.build()) + } else { + String bodyStr = params?.collect { it.key + '=' + URLEncoder.encode((it.value == null ? '': it.value).toString(), 'utf-8') + '&' }?.join('')?:'' + if (bodyStr.endsWith('&') && bodyStr.length() > 2) bodyStr = bodyStr.substring(0, bodyStr.length() - 1) + builder.post(RequestBody.create(MediaType.get('application/x-www-form-urlencoded;charset=utf-8'), bodyStr)) + } + } + else throw new RuntimeException("not support http method '$builder.method'") + + // 删除url最后的&符号 + if (urlStr.endsWith('&') && urlStr.length() > 2) urlStr = urlStr.substring(0, urlStr.length() - 1) + + URI uri = URI.create(urlStr) + if (getBoolean('enabledIntervalResolve', false)) { + // 替换集群中的appName 对应的http地址,例: http://gy/test/cus, 找集群中对应gy的应用名所对应的http地址 + String hp = ep.fire("resolveHttp", uri.host) + if (hp) { + String[] arr = hp.split(":") + uri.host = arr[0] + // 原始url中没有端口, 则设值 + if (-1 == uri.port) uri.port = Integer.valueOf(arr[1]) + uri.string = null + urlStr += ", hp: ${uri.host + ':' + uri.port}" + } + } + + HttpUrl url = HttpUrl.get(uri) + // 添加cookie + if (cookies) { + def ls = cookieStore.computeIfAbsent(url.host(), {new LinkedList()}) + cookies.each { ls.add(Cookie.parse(url, "$it.key=$it.value")) } + } + + def result + def ex + // 日志消息 + def logMsg = "Send http(${builder.method}): ${url.toString()}${ -> bodyStr ? ', body: ' + bodyStr : ''}${ -> params ? ', params: ' + params : ''}${ -> fileStreams ? "fileStreams: " + fileStreams.join(",") : ''}${ -> respCode == null ? '' : ' respCode: ' + respCode}${ -> result == null ? '' : ' result: ' + result}" + try { + // 发送请求 + def call = client.newCall(builder.url(url).build()) + if (okFn) { // 异步请求 + call.enqueue(new Callback() { + @Override + void onFailure(Call c, IOException e) { + log.error(logMsg.toString(), e) + tmpFile?.each {it.delete()} + failFn?.accept(respCode, e) + } + + @Override + void onResponse(Call c, Response resp) throws IOException { + result = resp.body()?.string() + respCode = resp.code() + if (debug) log.info(logMsg.toString()) + tmpFile?.each {it.delete()} + okFn?.accept(result) + } + }) + null + } else { // 同步请求 + def resp = call.execute() + result = resp.body()?.string() + tmpFile?.each {it.delete()} + respCode = resp.code() + } + } catch(Exception t) { + ex = t + } + if (debug && !okFn) { + if (ex) { + log.error(logMsg.toString(), ex) + } else { + log.info(logMsg.toString()) + } + } + if (ex) throw ex + return result + } + } +} \ No newline at end of file diff --git a/src/core/RedisClient.groovy b/src/core/RedisClient.groovy new file mode 100644 index 0000000000000000000000000000000000000000..4dccfce9528e547cd87bd719a0cf75f7b0ac2a51 --- /dev/null +++ b/src/core/RedisClient.groovy @@ -0,0 +1,143 @@ +package core + +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL +import cn.xnatural.enet.event.EP +import redis.clients.jedis.Jedis +import redis.clients.jedis.JedisPool +import redis.clients.jedis.JedisPoolConfig +import redis.clients.jedis.Protocol + +import java.time.Duration +import java.util.function.Function + +/** + * redis 客户端 + */ +class RedisClient extends ServerTpl { + protected JedisPool pool + + RedisClient() { super('redis') } + RedisClient(String name) { super(name) } + + + @EL(name = 'sys.starting', async = true) + void start() { + if (pool) throw new RuntimeException("$name is already running") + if (ep == null) {ep = new EP(); ep.addListenerSource(this)} + + // 连接池配置 + JedisPoolConfig poolCfg = new JedisPoolConfig( + minIdle: getInteger("minIdle", 1), maxIdle: getInteger("maxIdle", 5), + maxTotal: getInteger("maxTotal", 7), maxWaitMillis: getInteger("maxWaitMillis", 5000) + ) + pool = new JedisPool( + poolCfg, getStr("host", "localhost"), getInteger("port", 6379), + getInteger("connectionTimeout", 3000), + getInteger("soTimeout", 7000), + getStr("password", null), + getInteger("database", Protocol.DEFAULT_DATABASE), + getStr("clientName", app().id()) + ) + + exposeBean(pool) + log.info("Created '{}' Client", name) + ep.fire("${name}.started") + } + + + @EL(name = "sys.stopping", async = true, order = 2f) + void stop() { + log.info("Close '{}' Client", name) + pool?.close(); pool = null + } + + @EL(name = '${name}.get') + String get(String key) { + log.trace(name + ".get. key: {}", key) + exec{it.get(key)} + } + + + @EL(name = '${name}.expire') + void expire(String key, Integer seconds) { + log.trace(name + ".hset.expire, key: {}, seconds: {}", key, seconds) + exec{ it.expire(key, seconds == null ? getExpire(key).seconds.intValue() : seconds)} + } + + + def set(String key, String value, Integer seconds) { + log.trace(name + ".set. key: {}, value: {}, seconds: " + seconds, key, value) + if (value != null) { + exec{c -> + c.set(key, value) + c.expire(key, seconds == null ? getExpire(key).seconds.intValue() : seconds) + } + } + } + + + @EL(name = '${name}.set') + def set(String key, String value) { + log.trace(name + ".set. key: {}, value: {}", key, value) + if (value != null) { + exec{it.set(key, value)} + } + } + + + def hset(String cName, String key, String value, Integer seconds) { + log.trace(name + ".hset. cName: "+ cName +", key: {}, value: {}, seconds: " + seconds, key, value) + if (value != null) { + exec{c -> + c.hset(cName, key, value) + c.expire(cName, seconds == null ? getExpire(cName).seconds.intValue() : seconds) + } + } + } + + + @EL(name = '${name}.hset') + def hset(String cName, String key, String value) { + log.trace(name + ".hset. cName: "+ cName +", key: {}, value: {}", key, value) + if (value != null) { + exec{ it.hset(cName, key, value)} + } + } + + + @EL(name = '${name}.hget', async = false) + String hget(String cName, String key) { exec{it.hget(cName, key)} } + + + @EL(name = '${name}.hexists', async = false) + boolean hexists(String cName, String key) { if (key == null) false else exec{it.hexists(cName, key)} } + + + @EL(name = '${name}.exists', async = false) + boolean exists(String key) { exec{it.exists(key)} } + + + @EL(name = '${name}.hdel', async = false) + def hdel(String cName, String key) { + log.debug(name + ".hdel. cName: {}, key: {}", cName, key) + exec{it.hdel(cName, key)} + } + + + @EL(name = '${name}.del') + def del(String key) { + log.info("{}.del. key: {}", name, key) + exec{it.del(key)} + } + + + @EL(name = '${name}.exec', async = false) + def exec(Function fn) { try (Jedis c = pool.getResource()) { fn.apply(c) } } + + + // 默认12小时过期 + protected Duration getExpire(String cName) { + Duration.ofMinutes(getLong("expire." + cName, getLong("defaultExpire", 12 * 60L))) + } +} diff --git a/src/core/mode/builder/Builder.groovy b/src/core/mode/builder/Builder.groovy new file mode 100644 index 0000000000000000000000000000000000000000..ac304e3b9c609abe5487c45bc85c13549b52f3eb --- /dev/null +++ b/src/core/mode/builder/Builder.groovy @@ -0,0 +1,59 @@ +package core.mode.builder + +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * This abstract class is a template which build any kind of value and return it + * + * @param + * @author hubert + */ +abstract class Builder { + protected static final Logger log = LoggerFactory.getLogger(Builder.class) + /** + * Enable or disable this generator. Usually it is used for feature + * controlling. + */ + protected boolean enabled = true + + + /** + * Generate any Object and return it. If isEnabled() == false. Return null. + * If isValid() == false return null. + * + * @param ctx . It contains the information needed to build the value. + */ + T build(Map ctx = null) { + if (!enabled || !isValid(ctx)) return null + return doBuild(ctx) + } + + + + + /** + * do build javaBean by context. + * + * @param ctx context + * @return javaBean + */ + protected abstract T doBuild(Map ctx) + + + /** + * Validate the current context. Return false if fails + * + * @param ctx GeneratorContext + * @return true if can continue to build + */ + protected boolean isValid(Map ctx) { + return true + } + + + @Override + String toString() { + return getClass().getSimpleName() + "@" + Integer.toHexString(hashCode()) + } +} diff --git a/src/core/mode/builder/MultiPropertyBuilder.groovy b/src/core/mode/builder/MultiPropertyBuilder.groovy new file mode 100644 index 0000000000000000000000000000000000000000..5c15fe5ad82ff61301ed40adb1bfa4efbfc60995 --- /dev/null +++ b/src/core/mode/builder/MultiPropertyBuilder.groovy @@ -0,0 +1,4 @@ +package core.mode.builder + +abstract class MultiPropertyBuilder extends Builder> { +} diff --git a/src/core/mode/builder/ObjBuilder.groovy b/src/core/mode/builder/ObjBuilder.groovy new file mode 100644 index 0000000000000000000000000000000000000000..ab674012f3f12491babbac667f6ce1e8cac274d5 --- /dev/null +++ b/src/core/mode/builder/ObjBuilder.groovy @@ -0,0 +1,115 @@ +package core.mode.builder +/** + * JavaBean对象构建器, 从一个运行上下文中, 构建一个结果对象. + * 一般用于: rest 接口, 即service 方法返回一个对象, 对象的一些属性需要复杂计算的结果 + * + * @param + * @author hubert + */ +class ObjBuilder extends Builder { + /** + * 一个javaBean. + */ + private Class targetClz + /** + * 属性的计算是可以依赖顺序的(先计算某个属性, 再根据这个属性的值, 计算另一个属性的值) + * NOTE: 尽量每个属性的计算不会相互依赖 + */ + private final Map> fieldGenerators = new LinkedHashMap<>() + + + static final ObjBuilder of(Class javaBeanClz) { + return new ObjBuilder().setJavaBeanClz(javaBeanClz) + } + + + @Override + protected boolean isValid(Map ctx) { + if (!super.isValid(ctx)) return false + if (getJavaBeanClz() == null) { + log.error("property javaBeanClz must not be null") + return false + } + if (!fieldGenerators) log.warn("fieldGenerators is empty!") + return true + } + + + @Override + protected T doBuild(Map ctx) { + T retObj = instance(ctx) + if (retObj == null) return null + fieldGenerators.each{propName, builder -> + if (builder == null) { + log.warn("属性 " + propName + " 对应的Builder为空!") + return + } + boolean multi = (builder instanceof MultiPropertyBuilder) + try { + if (multi) { + Map ps = ((MultiPropertyBuilder) builder).build(ctx) + log.debug("builder: {} populate propertyValues: {}", builder, ps) + ps.each { retObj[(it.key)] = it.value } + } else { + if (!propName) { + log.warn("属性名为空, 忽略!") + return + } + Object value = builder.build(ctx) + log.debug("builder: {} populate value: {} for property: " + propName, builder, value) + retObj[(propName)] = value + } + } catch(Exception ex) { + log.error("属性build错误. builder: " + builder + (multi ? (", propName: " + propName) : ""), ex) + } + } + return retObj + } + + + ObjBuilder add(String propName, Builder builder) { + if (builder instanceof MultiPropertyBuilder && propName != null && !propName.isEmpty()) { + log.warn("MultiPropertyGenerator 对应多个属性所以不需要有属性名: ({}), 请用add(MultiPropertyGenerator builder)", propName) + } + fieldGenerators.put(propName, builder) + return this + } + + + ObjBuilder add(MultiPropertyBuilder builder) { + fieldGenerators.put(UUID.randomUUID().toString(), builder) + return this + } + + + /** + * 创建目前对象 + * @param ctx + * @return + */ + protected T instance(Map ctx) { + T targetObj = null + Class targetClass = getJavaBeanClz() + if (Map.class == (targetClass)) { + targetObj = (T) new LinkedHashMap<>() + } else if (Set.class == (targetClass)) { + targetObj = (T) new LinkedHashSet<>() + } else if (List.class == (targetClass)) { + targetObj = (T) new ArrayList<>() + } else { + targetObj = targetClass.newInstance() + } + return targetObj + } + + + Class getJavaBeanClz() { + return targetClz + } + + + ObjBuilder setJavaBeanClz(Class pDTOClass) { + targetClz = pDTOClass + return this + } +} diff --git a/src/core/mode/pipeline/PipeNode.groovy b/src/core/mode/pipeline/PipeNode.groovy new file mode 100644 index 0000000000000000000000000000000000000000..390ec83c3e5615ed89bc4e0d56cae57dccaea2d2 --- /dev/null +++ b/src/core/mode/pipeline/PipeNode.groovy @@ -0,0 +1,24 @@ +package core.mode.pipeline + +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 管道节点 + */ +abstract class PipeNode { + protected final Logger log = LoggerFactory.getLogger(getClass()) + + String key + + + abstract R run(T input) + + + String getKey() { + if (key == null) { + key = getClass().simpleName + "@" + Integer.toHexString(hashCode()) + } + key + } +} diff --git a/src/core/mode/pipeline/Pipeline.groovy b/src/core/mode/pipeline/Pipeline.groovy new file mode 100644 index 0000000000000000000000000000000000000000..caaa1fa93f834ec48aed7730d648ddb8d355a1cd --- /dev/null +++ b/src/core/mode/pipeline/Pipeline.groovy @@ -0,0 +1,36 @@ +package core.mode.pipeline + +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +class Pipeline { + final Logger log = LoggerFactory.getLogger(getClass()) + String key + final List> nodes = new LinkedList<>() + + + R run(T input) { + log.info("Start pipe '{}', input: {}", getKey(), input) + nodes.each{ fn -> + log.debug("Start pipe node '{}', input: {}", fn.key, input) + input = fn.run(input) + log.debug("End pipe node '{}', result: {}", fn.key, input) + } + log.info("End pipe '{}', result: {}", getKey(), input) + input + } + + + Pipeline add(PipeNode node) { + nodes.add(node) + this + } + + + String getKey() { + if (key == null) { + key = getClass().simpleName + "@" + Integer.toHexString(hashCode()) + } + key + } +} diff --git a/src/core/mode/pool/ObjPool.groovy b/src/core/mode/pool/ObjPool.groovy new file mode 100644 index 0000000000000000000000000000000000000000..b4a448f59c6b99eef3e82ae76b5b083593215d7e --- /dev/null +++ b/src/core/mode/pool/ObjPool.groovy @@ -0,0 +1,4 @@ +package core.mode.pool + +class ObjPool { +} diff --git a/src/core/mode/tree/Tree.groovy b/src/core/mode/tree/Tree.groovy new file mode 100644 index 0000000000000000000000000000000000000000..c8fd49e023563d827f92f7e6d7bdf01d27f52d06 --- /dev/null +++ b/src/core/mode/tree/Tree.groovy @@ -0,0 +1,48 @@ +package core.mode.tree + +class Tree { + String id + String name + @Lazy TNode root = new TNode(id: id, name: name) + + static TNode create(String id, String name) { + new Tree(id: id, name: name).root + } + + + static TNode node(String id, String name, Closure fn = null) {new TNode(id: id, name: name, fn: fn)} + + + def run(Object...args) { + root + } + + public static void main(String[] args) { + Tree.create("tree1", "test").sub( + node("n1_left", "", {println(id)}), + node("n1_right", "", {println(id)}) + ) + } + + class TNode { + String id + String name + Closure fn + TNode parent + TNode subLeft + TNode subRight + + TNode of(String id, String name) { new TNode(id: id, name: name) } + + TNode sub(TNode left, TNode right) { + subLeft = left; subRight = right + if (subLeft) subLeft.parent = this + if (subRight) subRight.parent = this + this + } + + def run() { + fn.run() + } + } +} diff --git a/src/ctrl/MainCtrl.groovy b/src/ctrl/MainCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..97b66ea194e608427f73616892839a7372bf8c1c --- /dev/null +++ b/src/ctrl/MainCtrl.groovy @@ -0,0 +1,168 @@ +package ctrl + +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.http.* +import cn.xnatural.jpa.Repo +import entity.User +import service.FileUploader + +import java.util.function.Supplier + +@Ctrl +class MainCtrl extends ServerTpl { + + @Lazy protected fileUploader = bean(FileUploader) + @Lazy protected cacheSrv = bean(CacheSrv) + @Lazy protected repo = bean(Repo, 'jpa_rule_repo') + // 需要登录权限的页面 + protected final Map auth_page = [ + "config/OpHistory.vue": "opHistory-read", "config/FieldConfig.vue": "field-read", + "config/DataCollectorConfig.vue": "dataCollector-read", "config/Permission.vue": "grant", + "data/DecideResult.vue": "decideResult-read", "data/CollectResult.vue": "collectResult-read" + ] + + @Filter + void filter(HttpContext hCtx) { + // 需要登录权限的请求路径过虑判断 + if ( + (hCtx.pieces?[0] == 'mnt' && !(hCtx.pieces?[1] == 'login')) || + auth_page.keySet().find {hCtx.request.path.endsWith(it)} + ) { + def uId = hCtx.getSessionAttr('uId') + if (uId) { + // 设置用户权限绑定到请求 + hCtx.setAttr('permissions', { + def pIds = cacheSrv?.get("permission_" + uId) + if (pIds == null) { + def permissions = repo.findById(User, Utils.to(uId, Long)).permissions + pIds = permissions?.split(',')?.toList()?.toSet()?:Collections.emptySet() + cacheSrv?.set("permission_" + uId, pIds) + } + return pIds + } as Supplier) + } else { + hCtx.response.status(401) + hCtx.render(ApiResp.fail('用户会话已失效, 请重新登录')) + } + } + } + + + @Path(path = ['index.html', '/']) + File index(HttpContext hCtx) { + hCtx.response.cacheControl(10) + Utils.baseDir("static/index.html") + } + + @Path(path = 'test.html') + File testHtml(HttpContext hCtx) { + hCtx.response.cacheControl(3) + Utils.baseDir("static/test.html") + } + + @Path(path = 'favicon.ico') + File favicon(HttpContext hCtx) { + hCtx.response.cacheControl(3000) + hCtx.response.contentType("image/x-icon") + Utils.baseDir("static/favicon.ico") + } + + + @Path(path = 'health') + ApiResp health() { + ApiResp.ok( + ['status': 'GREEN', 'detail': + [ + 'db': ['status': 'UP'], + ], + ] + ) + } + + + @Path(path = 'file/{fName}') + File file(String fName, HttpContext hCtx) { + if (app().profile == 'pro') { + hCtx.response.cacheControl(1800) + } + fileUploader.findFile(fName) + } + + + // ====================== api-doc ========================= + + @Path(path = 'api-doc/{fName}.json', produce = 'application/json') + String swagger_data(String fName, HttpContext hCtx) { + def f = Utils.baseDir("../conf/${fName}.json") + if (f.exists()) { + return f.getText('utf-8') + } + null + } + @Path(path = 'api-doc/{fName}') + File swagger_ui(String fName, HttpContext hCtx) { + hCtx.response.cacheControl(1800) + Utils.baseDir("static/swagger-ui/${fName == '/' ? 'index.html' : fName}") + } + + // ==========================js ===================== + + @Path(path = 'js/{fName}') + File js(String fName, HttpContext hCtx) { + if (app().profile == 'pro') { + hCtx.response.cacheControl(1800) + } + Utils.baseDir("static/js/$fName") + } + + @Path(path = 'js/lib/{fName}') + File js_lib(String fName, HttpContext hCtx) { + hCtx.response.cacheControl(86400) // 一天 + Utils.baseDir("static/js/lib/$fName") + } + + + @Path(path = 'components/{fName}') + File components(String fName, HttpContext hCtx) { + if (app().profile == 'pro') hCtx.response.cacheControl(1800) + Utils.baseDir("static/components/$fName") + } + + @Path(path = 'views/{fName}') + File views(String fName, HttpContext hCtx) { + if (app().profile == 'pro') hCtx.response.cacheControl(1800) + def permission = auth_page.get(fName) + if (permission) hCtx.auth(permission) + Utils.baseDir("static/views/$fName") + } + + + // =======================css ======================== + + @Path(path = 'css/{fName}') + File css(String fName, HttpContext hCtx) { + if (app().profile == 'pro') hCtx.response.cacheControl(1800) + Utils.baseDir("static/css/$fName") + } + + @Path(path = 'css/fonts/{fName}') + File css_fonts(String fName, HttpContext hCtx) { + hCtx.response.cacheControl(86400) // 一天 + Utils.baseDir("static/css/fonts/$fName") + } + + @Path(path = 'css/lib/{fName}') + File css_lib(String fName, HttpContext hCtx) { + hCtx.response.cacheControl(86400) // 一天 + Utils.baseDir("static/css/lib/$fName") + } + + // ================= 图片 ====================== + @Path(path = 'img/{fName}') + File img(String fName, HttpContext hCtx) { + hCtx.response.cacheControl(172800) + Utils.baseDir("static/img/$fName") + } +} diff --git a/src/ctrl/MntCollectorCtrl.groovy b/src/ctrl/MntCollectorCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..f820adb5787d046b382fe530ab477cd6762ddec9 --- /dev/null +++ b/src/ctrl/MntCollectorCtrl.groovy @@ -0,0 +1,216 @@ +package ctrl + +import cn.xnatural.app.Inject +import cn.xnatural.app.ServerTpl +import cn.xnatural.http.ApiResp +import cn.xnatural.http.Ctrl +import cn.xnatural.http.HttpContext +import cn.xnatural.http.Path +import cn.xnatural.jpa.Repo +import entity.DataCollector +import service.rule.CollectorManager +import service.rule.DecisionManager + + +@Ctrl(prefix = 'mnt/collector') +class MntCollectorCtrl extends ServerTpl { + + @Inject(name = 'jpa_rule_repo') protected Repo repo + @Inject protected DecisionManager decisionManager + @Inject protected CollectorManager collectorManager + + + + @Path(path = 'page') + ApiResp page(HttpContext hCtx, Integer page, Integer pageSize, String kw, String id, String type) { + if (pageSize && pageSize > 50) return ApiResp.fail("Param pageSize <=50") + hCtx.auth("dataCollector-read") + ApiResp.ok( + repo.findPage(DataCollector, page, pageSize?:10) { root, query, cb -> + query.orderBy(cb.desc(root.get('updateTime'))) + def ps = [] + if (kw) { + ps << cb.or( + cb.like(root.get('name'), '%' + kw + '%'), + cb.like(root.get('comment'), '%' + kw + '%') + ) + } + if (id) ps << cb.equal(root.get("id"), id) + if (type) ps << cb.equal(root.get('type'), type) + ps ? ps.inject {p1, p2 -> cb.and(p1, p2)} : null + } + ) + } + + + @Path(path = '/', method = 'put') + ApiResp add( + HttpContext hCtx, String name, String type, String url, String bodyStr, Boolean recordResult, + String method, String parseScript, String contentType, String comment, String computeScript, String dataSuccessScript, + String sqlScript, Integer minIdle, Integer maxActive, Integer timeout, Boolean enabled, String cacheKey, String cacheTimeoutFn + ) { + hCtx.auth('dataCollector-add') + DataCollector collector = new DataCollector(name: name, type: type, comment: comment, enabled: (enabled == null ? true : enabled), recordResult: recordResult == null ? true : recordResult) + if (!collector.name) return ApiResp.fail('Param name required') + if (!collector.type) return ApiResp.fail('Param type required') + if ('http' == collector.type) { + if (!url) return ApiResp.fail('Param url required') + if (!method) return ApiResp.fail('Param method required') + if (!contentType && !'get'.equalsIgnoreCase(method)) return ApiResp.fail('Param contentType required') + if (!url.startsWith("http") && !url.startsWith('${')) return ApiResp.fail('Param url incorrect') + collector.parseScript = parseScript?.trim() + if (collector.parseScript && !collector.parseScript.startsWith("{") && !collector.parseScript.endsWith("}")) { + return ApiResp.fail('Param parseScript a function, must startWith {, endWith }') + } + collector.dataSuccessScript = dataSuccessScript?.trim() + if (collector.dataSuccessScript && !collector.dataSuccessScript.startsWith("{") && !collector.dataSuccessScript.endsWith("}")) { + return ApiResp.fail('Param dataSuccessScript a function, must startWith {, endWith }') + } + collector.url = url + collector.method = method + collector.bodyStr = bodyStr + collector.contentType = contentType + collector.timeout = timeout + } else if ('script' == collector.type) { + if (!computeScript) return ApiResp.fail('Param computeScript required') + collector.computeScript = computeScript + } else if ('sql' == collector.type) { + if (!url) return ApiResp.fail('Param url required') + if (!sqlScript) return ApiResp.fail('Param sqlScript required') + if (!url.startsWith("jdbc")) return ApiResp.fail('url incorrect') + if (minIdle < 0 || collector.minIdle > 20) return ApiResp.fail('Param minIdle >=0 and <= 20') + if (maxActive < 1 || collector.maxActive > 50) ApiResp.fail('Param maxActive >=1 and <= 50') + collector.url = url + collector.sqlScript = sqlScript + collector.minIdle = minIdle + collector.maxActive = maxActive + } else return ApiResp.fail('Not support type: ' + collector.type) + collector.creator = hCtx.getSessionAttr("uName") + collector.cacheKey = cacheKey + collector.cacheTimeoutFn = cacheTimeoutFn + try { + repo.saveOrUpdate(collector) + } catch (ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + return ApiResp.fail("$name aleady exist") + } + cause = cause.cause + } + throw ex + } + ep.fire('dataCollectorChange', collector.id) + ep.fire('enHistory', collector, hCtx.getSessionAttr('uName')) + ApiResp.ok(collector) + } + + + @Path(path = ':id', method = 'post') + ApiResp update( + HttpContext hCtx, String id, String name, String url, String bodyStr, Boolean recordResult, + String method, String parseScript, String contentType, String comment, String computeScript, String dataSuccessScript, + String sqlScript, Integer minIdle, Integer maxActive, Integer timeout, Boolean enabled, String cacheKey, String cacheTimeoutFn + ) { + hCtx.auth('dataCollector-update') + if (!id) return ApiResp.fail("Param id required") + if (!name) return ApiResp.fail("Param name required") + def collector = repo.findById(DataCollector, id) + if (collector == null) return ApiResp.fail("Param id: $id not found") + if ('http' == collector.type) { + if (!url) return ApiResp.fail('Param url required') + if (!method) return ApiResp.fail('Param method required') + if ('post'.equalsIgnoreCase(method) && !contentType) { + return ApiResp.fail('Param contentType required') + } + if (!url.startsWith("http") && !url.startsWith('${')) return ApiResp.fail('Param url incorrect') + collector.parseScript = parseScript?.trim() + if (collector.parseScript && (!collector.parseScript.startsWith('{') || !collector.parseScript.endsWith('}'))) { + return ApiResp.fail('Param parseScript is function, must startWith {, endWith }') + } + collector.dataSuccessScript = dataSuccessScript?.trim() + if (collector.dataSuccessScript && !collector.dataSuccessScript.startsWith("{") && !collector.dataSuccessScript.endsWith("}")) { + return ApiResp.fail('Param dataSuccessScript is function, must startWith {, endWith }') + } + collector.url = url + collector.method = method + collector.contentType = contentType + collector.bodyStr = bodyStr + collector.timeout = timeout + } else if ('script' == collector.type) { + if (!computeScript) return ApiResp.fail('Param computeScript required') + collector.computeScript = computeScript?.trim() + if (collector.computeScript && (collector.computeScript.startsWith('{') || collector.computeScript.endsWith('}'))) { + return ApiResp.fail('Param computeScript is pure script. cannot startWith { or endWith }') + } + } else if ('sql' == collector.type) { + if (!url) return ApiResp.fail('Param url required') + if (!sqlScript) return ApiResp.fail('Param sqlScript required') + if (!url.startsWith("jdbc")) return ApiResp.fail('Param url incorrect') + if (minIdle < 0 || minIdle > 20) return ApiResp.fail('Param minIdle >=0 and <= 20') + if (maxActive < 1 || maxActive > 50) return ApiResp.fail('Param maxActive >=1 and <= 50') + collector.url = url + collector.minIdle = minIdle + collector.maxActive = maxActive + collector.sqlScript = sqlScript + } + collector.name = name + collector.comment = comment + collector.enabled = enabled == null ? true : enabled + collector.recordResult = recordResult == null ? true : recordResult + collector.cacheKey = cacheKey + collector.cacheTimeoutFn = cacheTimeoutFn + collector.updater = hCtx.getSessionAttr("uName") + + try { + repo.saveOrUpdate(collector) + } catch (ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + return ApiResp.fail("$name aleady exist") + } + cause = cause.cause + } + throw ex + } + ep.fire('dataCollectorChange', collector.id) + ep.fire('enHistory', collector, hCtx.getSessionAttr('uName')) + ApiResp.ok(collector) + } + + + @Path(path = 'enable/{id}/{enabled}', method = 'post') + ApiResp enable(HttpContext hCtx, String id, Boolean enabled) { + hCtx.auth('dataCollector-update') + if (!id) return ApiResp.fail("Param id required") + if (enabled == null) return ApiResp.fail("Param enabled required") + def collector = repo.findById(DataCollector, id) + if (collector == null) return ApiResp.fail("Param id: $id not found") + collector.enabled = enabled + repo.saveOrUpdate(collector) + ep.fire('dataCollectorChange', collector.id) + ep.fire('enHistory', collector, hCtx.getSessionAttr('uName')) + ApiResp.ok(collector) + } + + + @Path(path = '{id}', method = 'delete') + ApiResp del(HttpContext hCtx, String id) { + if (!id) return ApiResp.fail("Param id required") + hCtx.auth('dataCollector-del') + def collector = repo.findById(DataCollector, id) + if (collector == null) return ApiResp.fail("Param id: $id not found") + repo.delete(collector) + ep.fire('dataCollectorChange', id) + ep.fire('enHistory', collector, hCtx.getSessionAttr('uName')) + ApiResp.ok() + } + + + @Path(path = 'test/{id}') + ApiResp testCollector(String id, HttpContext hCtx) { + if (!id) return ApiResp.fail("Param id required") + ApiResp.ok(collectorManager.testCollector(id, hCtx.params())) + } +} diff --git a/src/ctrl/MntCtrl.groovy b/src/ctrl/MntCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..6c7cc5cddf9aafaa4e627efdb770c7699ed49b42 --- /dev/null +++ b/src/ctrl/MntCtrl.groovy @@ -0,0 +1,121 @@ +package ctrl + +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL +import cn.xnatural.http.* +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import entity.Decision +import entity.OpHistory +import entity.User +import entity.UserSession + +import java.text.SimpleDateFormat +import java.util.concurrent.ConcurrentHashMap + +@Ctrl(prefix = 'mnt') +class MntCtrl extends ServerTpl { + + @Lazy def repo = bean(Repo, 'jpa_rule_repo') + protected final Set wss = ConcurrentHashMap.newKeySet() + + + @EL(name = 'wsMsg_rule') + void wsMsgBroadcast(String msg) { wss.each {ws -> ws.send(msg)} } + + @WS(path = 'ws') + void receiveWs(WebSocket ws) { + log.info('WS connect. {}', ws.session.getRemoteAddress()) + ws.listen(new WsListener() { + + @Override + void onClose(WebSocket wst) { wss.remove(wst) } + + @Override + void onText(String msg) { + log.info('rule mnt ws receive client msg: {}', msg) + } + }) + wss.add(ws) + } + + + /** + * 登录 + * @param username 用户名 + * @param password 密码 + */ + @Path(path = 'login') + ApiResp login(String username, String password, HttpContext hCtx) { + if (!username) return ApiResp.fail('Param username not empty') + if (!password) return ApiResp.fail('Param password not empty') + def user = repo.find(User) {root, query, cb -> cb.equal(root.get('name'), username)} + if (!user) return ApiResp.fail("用户不存在") + def pIds = user.permissions?.split(',')?.toList()?.toSet()?:Collections.emptySet() + hCtx.setAttr('permissions', pIds) + hCtx.auth("mnt-login") + if (password != user.password) return ApiResp.fail('密码错误') + bean(CacheSrv)?.set("permission_" + user.id, pIds) + + hCtx.setSessionAttr('uId', user.id) + hCtx.setSessionAttr('uName', user.name) + hCtx.setSessionAttr('uGroup', user.group) + + user.login = new Date() + repo.saveOrUpdate(user) + repo.saveOrUpdate(new UserSession(valid: true, sessionId: hCtx.sessionId, userId: user.id, data: JSON.toJSONString([uId: user.id, uName: user.name, uGroup: user.group]))) + currentUser(hCtx) + } + + + /** + * 获取当前 会话 中的用户信息 + */ + @Path(path = 'currentUser', method = 'get') + ApiResp currentUser(HttpContext hCtx) { + return ApiResp.ok().attr('id', hCtx.getSessionAttr('uId')) + .attr('name', hCtx.getSessionAttr('uName')) + .attr('permissionIds', hCtx.getAttr('permissions', Set)) + } + + + /** + * 退出会话 + */ + @Path(path = 'logout') + ApiResp logout(HttpContext hCtx) { + hCtx.removeSessionAttr('uId') + hCtx.removeSessionAttr('uName') + hCtx.regFinishedFn { + def session = repo.findById(UserSession, hCtx.sessionId) + if (session && session.valid) { + session.valid = false + repo.saveOrUpdate(session) + } + } + ApiResp.ok() + } + + + @Path(path = 'opHistoryPage') + ApiResp opHistoryPage(HttpContext hCtx, Integer page, Integer pageSize, String kw, String type, String startTime, String endTime) { + if (pageSize && pageSize > 20) return ApiResp.fail("Param pageSize <=20") + hCtx.auth("opHistory-read") + Date start = startTime ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime) : null + Date end = endTime ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime) : null + ApiResp.ok( + repo.findPage(OpHistory, page, pageSize?:5) { root, query, cb -> + query.orderBy(cb.desc(root.get('createTime'))) + def ps = [] + if (kw) ps << cb.like(root.get('content'), '%' + kw + '%') + if (start) ps << cb.greaterThanOrEqualTo(root.get('createTime'), start) + if (end) ps << cb.lessThanOrEqualTo(root.get('createTime'), end) + if (type) { + ps << cb.equal(root.get('tbName'), repo.tbName(Class.forName(Decision.package.name + "." + type)).replace("`", "")) + } + ps ? ps.inject {p1, p2 -> cb.and(p1, p2)} : null + } + ) + } +} diff --git a/src/ctrl/MntDataCtrl.groovy b/src/ctrl/MntDataCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..bc24c6349f0578a62fc842829d0ba3ad51e5845a --- /dev/null +++ b/src/ctrl/MntDataCtrl.groovy @@ -0,0 +1,335 @@ +package ctrl + +import cn.xnatural.app.Inject +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.http.ApiResp +import cn.xnatural.http.Ctrl +import cn.xnatural.http.HttpContext +import cn.xnatural.http.Path +import cn.xnatural.jpa.Page +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import com.alibaba.fastjson.parser.Feature +import entity.CollectRecord +import entity.DecideRecord +import service.rule.* + +import java.text.SimpleDateFormat +import java.util.Map.Entry +import java.util.function.Supplier + +@Ctrl(prefix = 'mnt/data') +class MntDataCtrl extends ServerTpl { + + @Inject(name = "jpa_rule_repo") protected Repo repo + @Inject protected DecisionManager decisionManager + @Inject protected FieldManager fieldManager + @Inject protected CollectorManager collectorManager + + + + @Path(path = 'decisionResultPage') + ApiResp decisionResultPage( + HttpContext hCtx, Integer page, Integer pageSize, String id, String decisionId, DecideResult result, + Long spend, String exception, String attrConditions, String startTime, String endTime + ) { + hCtx.auth("decideResult-read") + if (pageSize && pageSize > 10) return ApiResp.fail("Param pageSize <=10") + def ids = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-read-")} + .findResults {String p -> p.replace("decision-read-", "")} + .findAll {it} + if (!ids) return ApiResp.ok() + Date start = startTime ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime) : null + Date end = endTime ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime) : null + ApiResp.ok( + repo.findPage(DecideRecord, page, pageSize?:10) { root, query, cb -> + def ps = [] + if (id) ps << cb.like(root.get('id'), id + "%") + if (start) ps << cb.greaterThanOrEqualTo(root.get('occurTime'), start) + if (end) ps << cb.lessThanOrEqualTo(root.get('occurTime'), end) + if (decisionId) ps << cb.equal(root.get('decisionId'), decisionId) + ps << root.get('decisionId').in(ids) + if (spend) ps << cb.ge(root.get('spend'), spend) + if (result) ps << cb.equal(root.get('result'), result) + if (exception) ps << cb.like(root.get('exception'), '%' + exception + '%') + def orders = [] + if (attrConditions) { // json查询 暂时只支持mysql5.7+,MariaDB 10.2.3+ + JSON.parseArray(attrConditions).each {JSONObject jo -> + def fieldId = jo.getLong('fieldId') + if (!fieldId) return + def field = fieldManager.fieldHolders.find {it.value.field.id == fieldId}?.value?.field + if (field == null) return + + def exp = cb.function("JSON_EXTRACT", String, root.get('data'), cb.literal('$.' + field.enName)) + def op = jo['op'] + if (op == "desc") { //降序 + orders << cb.desc(exp.as(field.type.clzType)) + return + } else if (op == 'asc') { //升序 + orders << cb.asc(exp.as(field.type.clzType)) + return + } + def value = jo['value'] + if (value == null || value.empty) return + + if (op == '=') { + ps << cb.equal(exp, value) + } else if (op == '>') { + ps << cb.gt(exp.as(field.type.clzType), Utils.to(value, field.type.clzType)) + } else if (op == '<') { + ps << cb.lt(exp.as(field.type.clzType), Utils.to(value, field.type.clzType)) + } else if (op == '>=') { + ps << cb.ge(exp.as(field.type.clzType), Utils.to(value, field.type.clzType)) + } else if (op == '<=') { + ps << cb.le(exp.as(field.type.clzType), Utils.to(value, field.type.clzType)) + } else if (op == 'contains') { + ps << cb.like(exp, '%' + value + '%') + } else throw new IllegalArgumentException("Param attrCondition op('$op') unknown") + } + } + if (orders) { // 按照data中的属性进行排序 + query.orderBy(orders) + } else { // 默认时间降序 + query.orderBy(cb.desc(root.get('occurTime'))) + } + ps ? ps.inject {p1, p2 -> cb.and(p1, p2)} : null + }.to{record -> + Utils.copier(record, [:]).ignore("metaClass") + .addConverter('data', {String jsonStr -> + jsonStr == null ? null : JSON.parseObject(jsonStr, Feature.OrderedField).collect { e -> + [enName: e.key, cnName: fieldManager.fieldHolders.get(e.key)?.field?.cnName, value: e.value] + } + }) + .addConverter('input', {String jsonStr -> + jsonStr == null ? null : JSON.parseObject(jsonStr) + }) + .addConverter('dataCollectResult', {String jsonStr -> + jsonStr == null ? null : JSON.parseObject(jsonStr, Feature.OrderedField).collectEntries { e -> + // 格式为: collectorId[_数据key], 把collectorId替换为收集器名字 + String collectorId + def arr = e.key.split("_") + if (arr.length == 1) collectorId = e.key + else collectorId = arr[0] + [ + (collectorManager.collectorHolders.findResult { + it.value.collector.id == collectorId ? it.value.collector.name + (arr.length > 1 ? '_' + arr.drop(1).join('_') : '') : null + }?:e.key): e.value + ] + } + }) + .addConverter('detail', {String detailJsonStr -> + if (!detailJsonStr) return null + def detailJo = JSON.parseObject(detailJsonStr, Feature.OrderedField) + // 数据转换 + detailJo.put('data', detailJo.getJSONObject('data')?.collect { Entry e -> + [enName: e.key, cnName: fieldManager.fieldHolders.get(e.key)?.field?.cnName, value: e.value] + }?:null) + detailJo.getJSONArray('policies')?.each {JSONObject pJo -> + pJo.put('data', pJo.getJSONObject('data')?.collect { Entry e -> + [enName: e.key, cnName: fieldManager.fieldHolders.get(e.key)?.field?.cnName, value: e.value] + }?:null) + pJo.getJSONArray('items')?.each {JSONObject rJo -> + rJo.put('data', rJo.getJSONObject('data')?.collect { Entry e -> + [enName: e.key, cnName: fieldManager.fieldHolders.get(e.key)?.field?.cnName, value: e.value] + }?:null) + } + } + detailJo + }) + .add('decisionName', { + decisionManager.decisionMap.find {it.value.decision.id == record.decisionId}?.value?.decision?.name + } as Supplier) + .build() + } + ) + } + + + @Path(path = 'collectResultPage') + ApiResp collectResultPage( + HttpContext hCtx, Integer page, Integer pageSize, String decideId, String collectorType, String collector, String decisionId, + Long spend, Boolean success, Boolean dataSuccess, Boolean cache, String startTime, String endTime + ) { + hCtx.auth("collectResult-read") + def ids = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-read-")} + .findResults {String p -> p.replace("decision-read-", "")} + .findAll {it} + if (!ids) return ApiResp.ok() + Date start = startTime ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime) : null + Date end = endTime ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime) : null + if (pageSize && pageSize > 50) return ApiResp.fail("Param pageSize <=50") + ApiResp.ok( + repo.findPage(CollectRecord, page, pageSize?:10) { root, query, cb -> + query.orderBy(cb.desc(root.get('collectDate'))) + def ps = [] + if (start) ps << cb.greaterThanOrEqualTo(root.get('collectDate'), start) + if (end) ps << cb.lessThanOrEqualTo(root.get('collectDate'), end) + if (decideId) ps << cb.like(root.get('decideId'), decideId + "%") + ps << root.get('decisionId').in(ids) + if (decisionId) ps << cb.equal(root.get('decisionId'), decisionId) + if (collectorType) ps << cb.equal(root.get('collectorType'), collectorType) + if (collector) ps << cb.equal(root.get('collector'), collector) + if (spend) ps << cb.ge(root.get('spend'), spend) + if (success != null) { + if (success) { + ps << cb.equal(root.get('status'), '0000') + } else { + ps << cb.notEqual(root.get('status'), '0000') + } + } + if (dataSuccess != null) { + if (dataSuccess) { + ps << cb.equal(root.get('dataStatus'), '0000') + } else { + ps << cb.notEqual(root.get('dataStatus'), '0000') + } + } + if (cache != null) { + if (cache) { + ps << cb.equal(root.get('cache'), true) + } else { + ps << cb.notEqual(root.get('cache'), true) + } + } + ps ? ps.inject {p1, p2 -> cb.and(p1, p2)} : null + }.to{record -> Utils.copier(record, [:]).ignore("metaClass") + .add("decisionName", { + decisionManager.decisionMap.find {it.value.decision.id == record.decisionId}?.value?.decision?.name + } as Supplier) + .add("collectorName", { + collectorManager.collectorHolders.get(record.collector)?.collector?.name + } as Supplier) + .add("collectorType", { + collectorManager.collectorHolders.get(record.collector)?.collector?.type + } as Supplier) + .build() + } + ) + } + + + /** + * 统计一段时间的决策结果 + * @param startTime required yyyy-MM-dd HH:mm:ss + * @param endTime yyyy-MM-dd HH:mm:ss + */ + @Path(path = 'countDecide') + ApiResp countDecide(HttpContext hCtx, String startTime, String endTime) { + if (startTime == null) return ApiResp.fail("Param startTime required") + Date start = startTime ? new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').parse(startTime) : null + Date end = endTime ? new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').parse(endTime) : null + def ids = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-read-")} + .findResults {String p -> p.replace("decision-read-", "")} + .findAll {it} + if (!ids) return ApiResp.ok() + hCtx.response.cacheControl(2) // 缓存2秒 + String sql = """ + select t1.decision_id, t2.name decisionName, t1.result, count(1) total from ${repo.tbName(DecideRecord).replace("`", '')} t1 + left join decision t2 on t1.decision_id = t2.id + where t1.occur_time>=:start${end ? " and t1.occur_time<=:end" : ""} and t1.decision_id in (:ids) and t1.result is not null + group by t1.decision_id, t1.result + """.trim() + ApiResp.ok(end ? repo.rows(sql, start, end, ids) : repo.rows(sql, start, ids)) + } + + + /** + * 统计一段时间的规则结果 + * @param decisionId 决策id + * @param startTime required yyyy-MM-dd HH:mm:ss + * @param endTime yyyy-MM-dd HH:mm:ss + */ + @Path(path = 'countRule') + ApiResp countRule(HttpContext hCtx, String decisionId, String startTime, String endTime) { + if (startTime == null) return ApiResp.fail("Param startTime required") + Date start = startTime ? new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').parse(startTime) : null + Date end = endTime ? new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').parse(endTime) : null + def ids = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-read-")} + .findResults {String p -> p.replace("decision-read-", "")} + .findAll {it} + if (!ids) return ApiResp.ok().desc("无可查看的决策") + ids = decisionId ? ids.findAll {it == decisionId} : ids + if (!ids) return ApiResp.ok().desc("无可查看的决策") + hCtx.response.cacheControl(60) // 缓存60秒 + + // mysql 8.0.4+ or mariaDb 10.6+ 有json_table函数 + def verArr = repo.getDBVersion().split("\\.") + if ( + (repo.dialect.containsIgnoreCase("mysql") && verArr[0].toInteger() >= 8 && verArr[2].toInteger() >= 4) || + (repo.dialect.containsIgnoreCase("maria") && verArr[0].toInteger() >= 10 && verArr[1].toInteger() >= 6) + ) { + String sql = """ + SELECT + t1.decision_id decisionId, t3.name decisionName, t2.policyName, t2.ruleName, t2.result, count(1) total + FROM decide_record t1 + join json_table(JSON_SET(t1.detail, '\$.id', t1.id), + '\$' COLUMNS ( + id varchar(50) path '\$.id', + NESTED PATH '\$.policies[*]' COLUMNS ( + policyName varchar(200) path '\$.attrs."策略名"', + NESTED PATH '\$.rules[*]' COLUMNS ( + ruleName varchar(200) path '\$.attrs."规则名"', + result varchar(20) path '\$.result' + ))) + ) t2 on t2.id=t1.id + left join decision t3 on t1.decision_id = t3.id + where + t1.occur_time>=:start${end ? " and t1.occur_time<=:end" : ""} and t1.decision_id in (:ids) + and t1.detail is not null and t1.result is not null + group by decisionId, policyName, ruleName, result + order by case t2.result when 'Reject' then 3 when 'Review' then 2 when 'Accept' then 1 when isnull(t2.result) then 0 end desc, total desc + limit 30 + """ + return ApiResp.ok(end ? repo.rows(sql, start, end, ids) : repo.rows(sql, start, ids)) + } + + String sql = """ + select t1.decision_id decisionId, t2.name decisionName, t1.detail + from ${repo.tbName(DecideRecord).replace("`", '')} t1 + left join decision t2 on t1.decision_id = t2.id + where + t1.occur_time>=:start${end ? " and t1.occur_time<=:end" : ""} and t1.decision_id in (:ids) + and t1.detail is not null and t1.result is not null + """.trim() + + def ls = [] as LinkedList + for (int page = 1, pageSize = 100; ;page++) { + Page rPage = end ? repo.sqlPage(sql, page, pageSize, start, end, ids) : repo.sqlPage(sql, page, pageSize, start, ids) + ls.addAll(rPage.list) + if (page >= rPage.totalPage) break + } + // decisionId, decisionName, policyName, ruleName, result, total + ApiResp.ok( + ls.findResults {Map record -> + record["detail"] ? JSON.parseObject(record["detail"])?.getJSONArray("policies")?.findResults {JSONObject pJo -> + pJo.getJSONArray("items")?.findAll {JSONObject rJo -> rJo['attrs']['规则名']}?.findResults { JSONObject rJo -> + record['decisionId'] + '||' + record['decisionName'] + '||' + pJo['attrs']['策略名'] +'||' + rJo['attrs']['规则名'] + '||' + (rJo['result']?:DecideResult.Accept) + }?:[] + }?.flatten() : [] + }.flatten().countBy {it}.findResults {e -> + def arr = e.key.split("\\|\\|") + return [decisionId: arr[0], decisionName: arr[1], policyName: arr[2], ruleName: arr[3], result: arr[4], total: e.value] + }.sort {o1, o2 -> + // 把拒绝多的排前面 + if (o1['result'] == "Reject" && o2['result'] == "Reject") return o2['total'] - o1['total'] + else if (o1['result'] == "Reject") return -1 + else if (o2['result'] == "Reject") return 1 + else return 0 + }.takeRight(decisionId ? Integer.MAX_VALUE : 30) // 如果是指定某个决策, 则全部显示, 如果是查所有则限制显示(有可能会得多) + ) + } + + + @Path(path = 'cleanExpire') + ApiResp cleanExpire(HttpContext hCtx) { + hCtx.auth("grant") + bean(DecisionSrv).cleanDecideRecord() + return ApiResp.ok().desc("等待后台清理完成...") + } +} diff --git a/src/ctrl/MntDecisionCtrl.groovy b/src/ctrl/MntDecisionCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..019d76a7422fa1e59d596b848ec333b6e9307934 --- /dev/null +++ b/src/ctrl/MntDecisionCtrl.groovy @@ -0,0 +1,214 @@ +package ctrl + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.http.ApiResp +import cn.xnatural.http.Ctrl +import cn.xnatural.http.HttpContext +import cn.xnatural.http.Path +import cn.xnatural.jpa.Page +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONArray +import com.alibaba.fastjson.JSONObject +import entity.Decision +import service.rule.CollectorManager +import service.rule.spec.DecisionSpec + +import java.util.function.Supplier + +@Ctrl(prefix = 'mnt/decision') +class MntDecisionCtrl extends ServerTpl { + + @Lazy protected repo = bean(Repo, 'jpa_rule_repo') + @Lazy protected collectorManager = bean(CollectorManager) + + + @Path(path = 'page') + ApiResp decisionPage(HttpContext hCtx, Integer page, Integer pageSize, String kw, String nameLike, String decisionId) { + if (pageSize && pageSize > 20) return ApiResp.fail("Param pageSize <=20") + // 允许访问的决策id + def ids = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-read-")} + .findResults {String p -> p.replace("decision-read-", "")} + .findAll {it} + if (!ids) return ApiResp.ok(Page.empty()) + def delIds = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-del-")} + .findResults {String p -> p.replace("decision-del-", "")} + .findAll {it} + def updateIds = hCtx.getAttr("permissions", Set) + .findAll {String p -> p.startsWith("decision-update-")} + .findResults {String p -> p.replace("decision-update-", "")} + .findAll {it} + ApiResp.ok( + repo.findPage(Decision, page, pageSize?:10) {root, query, cb -> + query.orderBy(cb.desc(root.get('updateTime'))) + def ps = [] + ps << root.get("id").in(ids) + if (decisionId) ps << cb.equal(root.get('id'), decisionId) + if (nameLike) ps << cb.or(cb.like(root.get('name'), '%' + nameLike + '%'), cb.like(root.get('decisionId'), '%' + nameLike + '%')) + if (kw) ps << cb.like(root.get('dsl'), '%' + kw + '%') + ps ? ps.inject {p1, p2 -> cb.and(p1, p2)} : null + }.to{decision -> + Utils.copier(decision, [:]).ignore("metaClass") + .add("_deletable", { delIds?.contains(decision.id) } as Supplier) + .add("_readonly", { !updateIds?.contains(decision.id) } as Supplier) + .build() + } + ) + } + + + /** + * 添加一条决策 + * @param dsl 决策DSL + * @param apiConfig api配置 + * @param hCtx {@link HttpContext} + */ + @Path(path = '/', method = 'put') + ApiResp add(HttpContext hCtx, String dsl, String apiConfig) { + if (!dsl) return ApiResp.fail("Param dsl required") + hCtx.auth('decision-add') + DecisionSpec spec + try { + spec = DecisionSpec.of(dsl) + } catch (ex) { + log.error("语法错误", ex) + return ApiResp.fail('语法错误: ' + ex.message) + } + //dsl 验证 + if (!spec.决策id) return ApiResp.fail("决策id 不能为空") + if (!spec.决策名) return ApiResp.fail("决策名 不能为空") + // TODO 验证子决策是否存在 + + final decision = new Decision( + decisionId: spec.决策id, name: spec.决策名, comment: spec.决策描述, + dsl: dsl, creator: hCtx.getSessionAttr("uName") + ) + adjustApiConfig(decision, apiConfig) + + try { + repo.saveOrUpdate(decision) + } catch (ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + if (cause.message.contains("decisionId")) { + return ApiResp.fail("决策id($spec.决策id)已存在") + } + } + cause = cause.cause + } + throw ex + } + ep.fire("decision.create", decision.id) + ep.fire('enHistory', decision, decision.creator) + ApiResp.ok(decision) + } + + + @Path(path = "updateDsl/{id}", method = "post") + ApiResp updateDsl(HttpContext hCtx, String id, String dsl) { + if (!id) return ApiResp.fail("Param id required") + if (!dsl) return ApiResp.fail("Param dsl required") + def decision = repo.findById(Decision, id) + if (!decision) return ApiResp.fail("Param id not found") + hCtx.auth('decision-update-' + id) + + DecisionSpec spec + try { + spec = DecisionSpec.of(dsl) + } catch (ex) { + log.error("语法错误", ex) + return ApiResp.fail('语法错误: ' + ex.message) + } + //dsl 验证 + if (!spec.决策id) return ApiResp.fail("决策id 不能为空") + if (!spec.决策名) return ApiResp.fail("决策名 不能为空") + decision.dsl = dsl + decision.name = spec.决策名 + decision.decisionId = spec.决策id + decision.comment = spec.决策描述 + decision.updater = hCtx.getSessionAttr('uName') + + try { + repo.saveOrUpdate(decision) + } catch (ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + if (cause.message.contains("decisionId")) { + return ApiResp.fail("决策id($spec.决策id)已存在") + } + } + cause = cause.cause + } + throw ex + } + + ep.fire("decision.update", decision.id) + ep.fire('enHistory', decision, decision.updater) + ApiResp.ok(decision) + } + + + @Path(path = "updateApiConfig/{id}", method = "post") + ApiResp updateApiConfig(HttpContext hCtx, String id, String apiConfig) { + if (!id) return ApiResp.fail("Param id required") + def decision = repo.findById(Decision, id) + if (!decision) return ApiResp.fail("Param id not found") + hCtx.auth('decision-update-' + id) + + adjustApiConfig(decision, apiConfig) + decision.updater = hCtx.getSessionAttr('uName') + repo.saveOrUpdate(decision) + + ep.fire("decision.update", decision.id) + ep.fire('enHistory', decision, decision.updater) + ApiResp.ok(decision) + } + + + @Path(path = ':id', method = "delete") + ApiResp del(HttpContext hCtx, String id) { + if (!id) return ApiResp.fail("Param id required") + def decision = repo.findById(Decision, id) + if (!decision) return ApiResp.fail("Param id not found") + hCtx.auth( 'decision-del-' + id) + repo.delete(decision) + + ep.fire('decision.delete', decision.id) + // ep.fire('enHistory', decision, hCtx.getSessionAttr('uName')) + ApiResp.ok() + } + + + // 更新 适配 api配置 参数 + protected void adjustApiConfig(Decision decision, String apiConfig) { + if (apiConfig) { + def params = JSON.parseArray(apiConfig) + JSONObject param = params.find {JSONObject jo -> "decisionId" == jo.getString("code")} + if (param) { + param.fluentPut("fixValue", decision.decisionId).fluentPut("type", "Str").fluentPut("require", true) + } else { + params.add(0, new JSONObject().fluentPut("code", "decisionId").fluentPut("type", "Str") + .fluentPut("fixValue", decision.decisionId).fluentPut("name", "决策id").fluentPut("require", true) + ) + } + for (def itt = params.iterator(); itt.hasNext(); ) { + JSONObject jo = itt.next() + if (!jo.getString("code") || !jo.getString("name")) itt.remove() + for (def ittt = jo.iterator(); ittt.hasNext(); ) { + if (ittt.next().key.startsWith('_')) ittt.remove() + } + } + decision.apiConfig = params.toString() + } else { + decision.apiConfig = new JSONArray().add( + new JSONObject().fluentPut("code", "decisionId").fluentPut("type", "Str") + .fluentPut("fixValue", decision.decisionId).fluentPut("name", "决策id").fluentPut("require", true) + ).toString() + } + } +} diff --git a/src/ctrl/MntFieldCtrl.groovy b/src/ctrl/MntFieldCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..2dc5370d3befd40c3e5f163523d64d17f623e915 --- /dev/null +++ b/src/ctrl/MntFieldCtrl.groovy @@ -0,0 +1,179 @@ +package ctrl + +import cn.xnatural.app.Inject +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.http.ApiResp +import cn.xnatural.http.Ctrl +import cn.xnatural.http.HttpContext +import cn.xnatural.http.Path +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import entity.DataCollector +import entity.FieldType +import entity.RuleField +import service.rule.CollectorManager +import service.rule.DecisionManager +import service.rule.FieldManager + +import java.util.function.Supplier + + +@Ctrl(prefix = 'mnt/field') +class MntFieldCtrl extends ServerTpl { + + @Inject(name = "jpa_rule_repo") protected Repo repo + @Inject protected DecisionManager decisionManager + @Inject protected FieldManager fieldManager + @Inject protected CollectorManager collectorManager + // 指标字符限制: 字母,中文开头,可包含字数,字母,下划线,中文 + @Lazy protected fieldNamePattern = /^[a-zA-Z\u4E00-\u9FA5]+[0-9a-zA-Z\u4E00-\u9FA5_]*$/ + + + @Path(path = 'page') + ApiResp page(HttpContext hCtx, Integer page, Integer pageSize, String collector, String kw) { + if (pageSize && pageSize > 50) return ApiResp.fail("Param pageSize <=50") + hCtx.auth("field-read") + ApiResp.ok(repo.findPage(RuleField, page, (pageSize?:10)) { root, query, cb -> + query.orderBy(cb.desc(root.get('updateTime'))) + def ps = [] + if (kw) { + ps << cb.or( + cb.like(root.get('enName'), '%' + kw + '%'), + cb.like(root.get('cnName'), '%' + kw + '%'), + cb.like(root.get('comment'), '%' + kw + '%') + ) + } + if (collector) { + ps << cb.function("JSON_SEARCH", String, root.get('collectorOptions'), cb.literal('one'), cb.literal(collector)).isNotNull() + } + ps ? ps.inject {p1, p2 -> cb.and(p1, p2)} : null + }.to{field -> Utils.copier(field, [:]).ignore("metaClass") + .addConverter("collectorOptions") {String opts -> + opts == null ? null : JSON.parseArray(opts).collect {JSONObject jo -> + jo.fluentPut( + "collectorName", + collectorManager.collectorHolders.find {it.key == jo['collectorId']}?.value?.collector?.name + ) + } + } + .build() + }) + } + + + @Path(path = '/', method = 'put') + ApiResp add(HttpContext hCtx, String enName, String cnName, FieldType type, String comment, String collectorOptions) { + hCtx.auth('field-add') + if (!enName) return ApiResp.fail("Param enName required") + if (!cnName) return ApiResp.fail("Param cnName required") + if (!type) return ApiResp.fail("Param type required") + if (!(enName ==~ fieldNamePattern)) { + return ApiResp.fail("Param enName illegal: 字母或中文开头,可包含字数,字母,下划线,中文") + } + if (!(cnName ==~ fieldNamePattern)) { + return ApiResp.fail("Param enName illegal: 字母或中文开头,可包含字数,字母,下划线,中文") + } + // 验证 collectorOptions + if (collectorOptions) { + JSON.parseArray(collectorOptions).each {JSONObject jo -> + if (!jo['collectorId']) throw new IllegalArgumentException("Param collectorOptions.collectorId required") + if (!repo.count(DataCollector) {root, query, cb -> cb.equal(root.get("id"), jo['collectorId'])}) { + throw new IllegalArgumentException("Param collectorOptions.collectorId not found") + } + } + } + def field = new RuleField( + enName: enName, cnName: cnName, type: type, comment: comment, + collectorOptions: collectorOptions, creator: hCtx.getSessionAttr('uName') + ) + try { + repo.saveOrUpdate(field) + } catch(ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + if (cause.message.contains("cnName")) { + return ApiResp.fail("$cnName aleady exist") + } + if (cause.message.contains("enName")) { + return ApiResp.fail("$enName aleady exist") + } + } + cause = cause.cause + } + throw ex + } + ep.fire('fieldChange', field.id) + ep.fire('enHistory', field, hCtx.getSessionAttr('uName')) + ApiResp.ok(field) + } + + + @Path(path = ':id', method = 'post') + ApiResp update(HttpContext hCtx, Long id, String enName, String cnName, FieldType type, String comment, String collectorOptions) { + hCtx.auth('field-update') + if (!id) return ApiResp.fail("Param id required") + if (!enName) return ApiResp.fail("Param enName required") + if (!cnName) return ApiResp.fail("Param cnName required") + if (!type) return ApiResp.fail("Param type required") + if (!(enName ==~ fieldNamePattern)) { + return ApiResp.fail("Param enName illegal: 字母或中文开头,可包含字数,字母,下划线,中文") + } + if (!(cnName ==~ fieldNamePattern)) { + return ApiResp.fail("Param enName illegal: 字母或中文开头,可包含字数,字母,下划线,中文") + } + def field = repo.findById(RuleField, id) + if (field == null) return ApiResp.fail("Param id: $id not found") + + // 验证 collectorOptions + if (collectorOptions) { + JSON.parseArray(collectorOptions).each {JSONObject jo -> + if (!jo['collectorId']) throw new IllegalArgumentException("Param collectorOptions.collectorId required") + if (!repo.count(DataCollector) {root, query, cb -> cb.equal(root.get("id"), jo['collectorId'])}) { + throw new IllegalArgumentException("Param collectorOptions.collectorId not found") + } + } + } + field.enName = enName + field.cnName = cnName + field.type = type + field.comment = comment + field.collectorOptions = collectorOptions + field.updater = hCtx.getSessionAttr("uName") + try { + repo.saveOrUpdate(field) + } catch (ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + if (cause.message.contains("cnName")) { + return ApiResp.fail("$cnName aleady exist") + } + if (cause.message.contains("enName")) { + return ApiResp.fail("$enName aleady exist") + } + } + cause = cause.cause + } + throw ex + } + ep.fire('fieldChange', field.id) + ep.fire('enHistory', field, hCtx.getSessionAttr('uName')) + ApiResp.ok(field) + } + + + @Path(path = ':id', method = "delete") + ApiResp del(HttpContext hCtx, Long id) { + if (!id) return ApiResp.fail("Param id required") + hCtx.auth('field-del') + def field = repo.findById(RuleField, id) + if (!field) return ApiResp.fail("Param id not found") + repo.delete(field) + ep.fire('fieldChange', id) + ep.fire('enHistory', field, hCtx.getSessionAttr('uName')) + ApiResp.ok() + } +} diff --git a/src/ctrl/MntUserCtrl.groovy b/src/ctrl/MntUserCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..5715adbe324f7e1bf72234d1b2f39dabb2e94dd5 --- /dev/null +++ b/src/ctrl/MntUserCtrl.groovy @@ -0,0 +1,466 @@ +package ctrl + +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.http.ApiResp +import cn.xnatural.http.Ctrl +import cn.xnatural.http.HttpContext +import cn.xnatural.http.Path +import cn.xnatural.jpa.Page +import cn.xnatural.jpa.Repo +import entity.Permission +import entity.User + +import javax.persistence.criteria.Predicate +import java.util.function.Supplier + +/** + * 用户, 权限相关接口 + */ +@Ctrl(prefix = 'mnt/user') +class MntUserCtrl extends ServerTpl { + @Lazy protected cacheSrv = bean(CacheSrv) + @Lazy protected repo = bean(Repo, 'jpa_rule_repo') + + + /** + * 用户分页查询接口 + * @param hCtx + * @param page >= 1 + * @param pageSize <= 50 + * @param kw 搜索关键字 + * @return + */ + @Path(path = 'page') + ApiResp page(HttpContext hCtx, Integer page, Integer pageSize, String kw) { + if (pageSize && pageSize > 50) return ApiResp.fail("Param pageSize <=50") + boolean hasGrant = hCtx.hasAuth("grant") + boolean hasGrantUser = hCtx.hasAuth("grant-user") + boolean hasUserDel = hCtx.hasAuth("user-del") + ApiResp.ok( + repo.findPage(User, page, pageSize?:8) {root, query, cb -> + query.orderBy(cb.asc(root.get('createTime'))) + def ps = [] + //1. 非grant,grant-user用户: 只能看自己的信息 + if (!hasGrant && !hasGrantUser) { + ps << cb.equal(root.get("id"), hCtx.getSessionAttr("uId")) + } + //2. 只grant-user用户: 能看到同一组的所有用户 + else if (!hasGrant && hasGrantUser) { + if (hCtx.getSessionAttr("uGroup")) { + ps << cb.equal(root.get("group"), hCtx.getSessionAttr("uGroup")) + } else { + ps << cb.equal(root.get("id"), hCtx.getSessionAttr("uId")) + } + } + //3. grant用户: 默认可以看所有用户 + else {} + + if (kw) { + ps << cb.like(root.get("name"), "%" + kw + "%") + } + cb.and(ps.toArray(new Predicate[ps.size()])) + }.to {user -> + Utils.copier(user, [:]).ignore("metaClass", "password") + .addConverter("permissions", {String pIdStr -> + def pIds = pIdStr?.split(",") + if (!pIds) return [] + def ps = repo.findList(Permission) {root, query, cb -> root.get("enName").in(pIds)} + pIds.collect {pId -> + if (!pId) return null + for (def p : ps ) { + if (p.enName == pId) { + return [(pId): p.cnName] + } + } + }.findAll {it} + }) + .add("_readonly", { + if (hasGrant) return false + if (hasGrantUser) { + if (user.permissions?.split(",")?.contains("grant")) return true + else if (user.permissions?.contains("grant-user")) { + if (Utils.to(hCtx.getSessionAttr("uId"), Long) == user.id) return false + else return true + } else return false + } + return true + } as Supplier) + .add("_deletable", { + if (!hasUserDel) return false + if (hasGrant) return true + if (hasGrantUser) { + if (user.permissions?.split(",")?.contains("grant")) return false + else if (user.permissions?.contains("grant-user")) return false + else return true + } + return false + } as Supplier) + .add("_restPassword", { + if (hasGrant) return true + if (hasGrantUser) { + if (user.permissions?.contains("grant")) return false + else return true + } + return false + } as Supplier) + .build() + } + ) + } + + + /** + * 添加用户 + * @param hCtx + * @param name 用户名 + * @param password 密码 + * @param group 组名 + * @param permissionIds 权限标识 + */ + @Path(path = 'add') + ApiResp add(HttpContext hCtx, String name, String password, String group, String[] permissionIds) { + //1. grant, grant-user 可以添加用户 + hCtx.auth("grant", "grant-user", "user-add") + if (!name) return ApiResp.fail("Param name not empty") + name = name.trim() + if (name.length() < 2) return ApiResp.fail("Param name length >= 2") + if (!password) return ApiResp.fail("Param password not empty") + password = password.trim() + if (password.length() < 2) return ApiResp.fail("Param password length >= 2") + ApiResp resp = ApiResp.ok() + + //2. 只grant-user: 不能分配grant, grant-user; 添加的用户默认同一组, 忽略group参数 + if (!hCtx.hasAuth("grant") && hCtx.hasAuth("grant-user")) { + if (permissionIds?.contains("grant") || permissionIds?.contains("grant-user")) { + return ApiResp.fail("Not permission") + } + // 验证是否都是可以分配的权限 + for (def pId: permissionIds) { + if (!(permissionPage(hCtx, 1, 1, null, pId, null).data?.list?.find {it.enName == pId})) { + return ApiResp.fail("Not permission, $pId") + } + } + + if (group) resp.desc("Param group unnecessary, ignore") + group = hCtx.getSessionAttr("uGroup") // grant-user权限 创建的用户 自动同组 + } + + def eUser = repo.saveOrUpdate( + new User(name: name, password: password, group: group, permissions: permissionIds?.findAll {it?.trim()}?.unique()?.join(',')) + ) + resp.setData(eUser.id) + return resp + } + + + /** + * 删除用户 + * @param hCtx + * @param id id + */ + @Path(path = 'del/{id}') + ApiResp del(HttpContext hCtx, Long id) { + //1. grant, grant-user 可以删除用户 + hCtx.auth("grant", "grant-user", "user-del") + if (!id) return ApiResp.fail("Param id required") + + //2. 只grant-user: 只能删除同组用户(不包括自己,不包括grant-user,grant) + if (!hCtx.hasAuth("grant") && hCtx.hasAuth("grant-user")) { + // 不能删除自己 + if (id == Utils.to(hCtx.getSessionAttr("uId"), Long)) { + ApiResp.fail("Not permission, delete self") + } + // 没有组,不能删除任何用户 + if (!hCtx.getSessionAttr("uGroup")) { + ApiResp.fail("Not permission, no deletable user") + } + def eUser = repo.findById(User, id) + // 不能删除非同组的用户 + if (eUser.group != hCtx.getSessionAttr("uGroup")) { + return ApiResp.fail("Not permission, not same group") + } + // 不能删除grant,grant-user用户 + if (eUser.permissions?.contains("grant")) { + return ApiResp.fail("Not permission, has grant") + } + } + //3. grant用户: 随便删 + + cacheSrv?.remove("permission_" + id) + return ApiResp.ok(repo.delete(User, id)) + } + + + /** + * 更新用户信息 + * @param hCtx + * @param id id + * @param group 组 + * @param permissionIds 权限标识 + */ + @Path(path = 'update') + ApiResp update(HttpContext hCtx, Long id, String group, String[] permissionIds) { + //1. grant, grant-user 可以更新用户 + hCtx.auth("grant", "grant-user") + if (!id) return ApiResp.fail("Param id required") + def user = repo.findById(User, id) + if (!user) return ApiResp.fail("用户不存在") + ApiResp resp = ApiResp.ok() + //更新用户是否是自己 + boolean targetUserIsMe = id == Utils.to(hCtx.getSessionAttr("uId"), Long) + + //2. 只grant-user: 只能分配同组用户(包括自己,非grant,grant-user)的权限(自己拥有的(除grant,grant-user),同组用户产生的动态权限); 忽略group参数 + String originGroup //原来的group + if (!hCtx.hasAuth("grant") && hCtx.hasAuth("grant-user")) { + // 没有组, 则只能为自己分配权限 + if (!hCtx.getSessionAttr("uGroup") && !targetUserIsMe) { + return ApiResp.fail("Not permission, only allow self") + } + // 不能为非同组分配权限 + if (user.group != hCtx.getSessionAttr("uGroup")) { + return ApiResp.fail("Not permission, not same group") + } + def targetUserPIds = user.permissions?.split(",") + // 不能为grant-user用户(除自己)分配权限 + if (targetUserPIds?.contains("grant-user") && !targetUserIsMe) { + return ApiResp.fail("Not permission, has grant-user") + } + // 不能为grant的用户分配权限 + if (targetUserPIds?.contains("grant")) { + return ApiResp.fail("Not permission, has grant") + } + + // 不能分配grant-user权限(除自己) + if (permissionIds?.contains("grant-user") && !targetUserIsMe) { + return ApiResp.fail("Not permission, other grant-user") + } + // 不能分配grant权限 + if (permissionIds?.contains("grant")) { + return ApiResp.fail("Not permission, grant") + } + // 验证是否都是可以分配的权限 + for (def pId : permissionIds) { + // 自己已有的权限不必验证 + if (targetUserPIds?.contains(pId)) continue + + if (!(permissionPage(hCtx, 1, 1, null, pId, null).data?.list?.find {it.enName == pId})) { + return ApiResp.fail("Not permission, " + pId) + } + } + + // 忽略group参数 + if (group && group != hCtx.getSessionAttr("uGroup")) { + resp.desc("Param group unnecessary, ignore") + } + } + + //3. grant用户: 如果修改了 组管理员(即有grant-user权限)用户 的组名, 则需要把同一组的其它用户的group同步修改 + if (hCtx.hasAuth("grant")) { + if (group && user.group != group) { // 修改用户所属组 + if (user.permissions?.contains("grant-user")) { + originGroup = user.group + } + user.group = group + } + } + user.permissions = permissionIds?.findAll {it?.trim()}?.join(',') + + if (originGroup) { //如果修改了 组管理员(即有grant-user权限)用户 的组名, 则需要把同一组的其它用户的group同步修改 + repo.trans {se -> + repo.saveOrUpdate(user) + se.createQuery("update User set group=:newGroup where group=:oldGroup") + .setParameter("newGroup", group).setParameter("oldGroup", originGroup) + .executeUpdate() + } + } else { + repo.saveOrUpdate(user) + } + cacheSrv?.remove("permission_" + user.id) + return resp.attr('id', user.id).attr('name', user.name) + .attr('permissions', user.permissions?.split(",")) + } + + + @Path(path = 'changePwd') + ApiResp changePwd(HttpContext hCtx, Long id, String newPassword, String oldPassword) { + if (!id) return ApiResp.fail("Param id required") + if (!newPassword) return ApiResp.fail("Param newPassword required") + if (Utils.to(hCtx.getSessionAttr("uId"), Long) != id) { + return ApiResp.fail("Not permission, only allow change self password") + } + def user = repo.findById(User, id) + if (!user) return ApiResp.fail("用户不存在") + if (oldPassword != user.password) return ApiResp.fail('密码错误') + user.password = newPassword + repo.saveOrUpdate(user) + ApiResp.ok() + } + + + @Path(path = 'restPassword') + ApiResp restPassword(HttpContext hCtx, Long id, String newPassword) { + //1. grant, grant-user 可以重置密码 + hCtx.auth("grant", "grant-user") + if (!id) return ApiResp.fail("Param id required") + if (!newPassword) return ApiResp.fail("Param newPassword required") + def user = repo.findById(User, id) + if (!user) return ApiResp.fail("用户不存在") + + //2. 只grant-user: 只能重置同组(非自己,非grant,grant-user)的密码 + if (!hCtx.hasAuth("grant") && hCtx.hasAuth("grant-user")) { + if (user.group != hCtx.getSessionAttr("uGroup")) { + return ApiResp.fail("Not permission, not same group") + } + if (user.permissions?.contains("grant")) { + return ApiResp.fail("Not permission, grant or grant-user") + } + } + user.password = newPassword + repo.saveOrUpdate(user) + ApiResp.ok() + } + + + @Path(path = 'delPermission/{id}', method = 'post') + ApiResp delPermission(HttpContext hCtx, Long id) { + hCtx.auth("grant") + if (!id) return ApiResp.fail("Param id required") + def permission = repo.findById(Permission, id) + if (permission.mark) return ApiResp.fail("Not allow delete dynamic permission") + repo.delete(permission) + ApiResp.ok(permission) + } + + + @Path(path = 'updatePermission', method = 'post') + ApiResp updatePermission(HttpContext hCtx, Long id, String enName, String cnName, String comment) { + hCtx.auth("grant") + if (!id) return ApiResp.fail("Param id required") + def p = repo.findById(Permission, id) + if (!p) return ApiResp.fail('未找到权限: ' + id) + if (p.enName != enName && repo.find(Permission) {root, query, cb -> cb.equal(root.get('enName'), enName)}) { + return ApiResp.fail("权限名'$enName'已存在") + } + if (p.cnName != cnName && repo.find(Permission) {root, query, cb -> cb.equal(root.get('cnName'), cnName)}) { + return ApiResp.fail("权限名'$cnName'已存在") + } + p.enName = enName + p.cnName = cnName + p.comment = comment + ApiResp.ok(repo.saveOrUpdate(p)) + } + + + @Path(path = 'addPermission', method = 'post') + ApiResp addPermission(HttpContext hCtx, String enName, String cnName, String comment) { + hCtx.auth("grant") + if (!enName) return ApiResp.fail("Param enName required") + if (!cnName) return ApiResp.fail("Param cnName required") + def p = new Permission(enName: enName, cnName: cnName, comment: comment) + if (repo.find(Permission) {root, query, cb -> cb.equal(root.get('enName'), enName)}) { + return ApiResp.fail("权限名'$enName'已存在") + } + if (repo.find(Permission) {root, query, cb -> cb.equal(root.get('cnName'), cnName)}) { + return ApiResp.fail("权限名'$cnName'已存在") + } + repo.saveOrUpdate(p) + ApiResp.ok(p) + } + + + @Path(path = 'permissionPage') + ApiResp> permissionPage(HttpContext hCtx, Integer page, Integer pageSize, String kw, String permissionId, String[] notPermissionIds) { + if (page != null && page < 1) return ApiResp.fail("Param page >=1") + if (pageSize != null && pageSize > 20) return ApiResp.fail("Param pageSize <=20 and >=1") + //1. grant: 查看所有 + if (hCtx.hasAuth("grant")) { + return ApiResp.ok( + repo.findPage(Permission, page?:1, pageSize?:10) {root, query, cb -> + query.orderBy(cb.desc(root.get('updateTime'))) + def ps = [] + if (permissionId) { + ps << cb.equal(root.get("enName"), permissionId) + } + if (notPermissionIds) { + ps << root.get("enName").in(notPermissionIds).not() + } + if (kw) { + ps << cb.or(cb.like(root.get("enName"), "%" + kw + "%"), cb.like(root.get("cnName"), "%" + kw + "%")) + } + cb.and(ps.toArray(new Predicate[ps.size()])) + } + ) + } + //2. grant-user: 只能看到同一组所有用户创建的动态权限, 和自己的权限(除grant,grant-user) + else if (hCtx.hasAuth("grant-user")) { // 组管理员 + List uNames = [hCtx.getSessionAttr("uName")] + if (hCtx.getSessionAttr("uGroup")) { // 组名存在, 则把组内所有用户名找出来 + uNames = repo.trans{se -> se.createQuery("select name from User where group=:gp").setParameterList("gp", hCtx.getSessionAttr("uGroup")).list()} + } + def marks = repo.trans{se -> se.createQuery("select id from Decision where creator in (:creator)").setParameterList("creator", uNames).list()} + def myPIds = hCtx.getAttr("permissions", Set)?.findAll {String pId -> pId != "grant" && pId != "grant-user" && !pId.startsWith("user-")} // 当前用户的所有权限 + if (!marks && !myPIds) return ApiResp.ok(Page.empty()) + return ApiResp.ok( + repo.findPage(Permission, page?:1, pageSize?:10) {root, query, cb -> + query.orderBy(cb.desc(root.get('updateTime'))) + def ps = [] + if (marks && myPIds) { + ps << cb.or(root.get("mark").in(marks), root.get("enName").in(myPIds)) + } else if (marks) { + ps << root.get("mark").in(marks) + } else if (myPIds) { + ps << root.get("enName").in(myPIds) + } + if (permissionId) { + ps << cb.equal(root.get("enName"), permissionId) + } + if (notPermissionIds) { + ps << root.get("enName").in(notPermissionIds).not() + } + if (kw) { + ps << cb.or(cb.like(root.get("enName"), "%" + kw + "%"), cb.like(root.get("cnName"), "%" + kw + "%")) + } + cb.and(ps.toArray(new Predicate[ps.size()])) + } + ) + } + //3. 其他: 普通用户只能看到自己创建的动态权限 + else { + def marks = repo.trans{se -> se.createQuery("select id from Decision where creator=:creator").setParameter("creator", hCtx.getSessionAttr("uName")).list()} + if (!marks) return ApiResp.ok(Page.empty()) + return ApiResp.ok( + repo.findPage(Permission, page?:1, pageSize?:10) {root, query, cb -> + query.orderBy(cb.desc(root.get('updateTime'))) + def ps = [] + ps << root.get("mark").in(marks) + if (permissionId) { + ps << cb.equal(root.get("enName"), permissionId) + } + if (notPermissionIds) { + ps << root.get("enName").in(notPermissionIds).not() + } + if (kw) { + ps << cb.or(cb.like(root.get("enName"), "%" + kw + "%"), cb.like(root.get("cnName"), "%" + kw + "%")) + } + cb.and(ps.toArray(new Predicate[ps.size()])) + } + ) + } + } + + + /** + * 组 分页查询 + */ + @Path(path = 'groupPage') + ApiResp> groupPage(HttpContext hCxt, Integer page, Integer pageSize, String kw) { + if (page != null && page < 1) return ApiResp.fail("Param page >=1") + if (pageSize != null && pageSize > 20) return ApiResp.fail("Param pageSize <=20 and >=1") + ApiResp.ok( + repo.sqlPage("select gp from ${repo.tbName(User)} ${kw ? 'where gp like ?' : ''} group by gp", page?:1, pageSize?:10, (kw ? ("%" + kw + "%"): null)) + .to {it.get("gp")?:it.get("GP")} + ) + } +} \ No newline at end of file diff --git a/src/ctrl/RuleCtrl.groovy b/src/ctrl/RuleCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..af4f738de2e60125cbaf8f45a1282b95033c00af --- /dev/null +++ b/src/ctrl/RuleCtrl.groovy @@ -0,0 +1,65 @@ +package ctrl + +import cn.xnatural.app.Inject +import cn.xnatural.app.ServerTpl +import cn.xnatural.http.ApiResp +import cn.xnatural.http.Ctrl +import cn.xnatural.http.HttpContext +import cn.xnatural.http.Path +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import entity.DecideRecord +import service.rule.DecisionManager +import service.rule.DecisionSrv +import service.rule.FieldManager + + +@Ctrl +class RuleCtrl extends ServerTpl { + + @Inject + protected FieldManager fieldManager + @Inject + protected DecisionSrv decisionSrv + @Inject(name = "jpa_rule_repo") + protected Repo repo + + + /** + * 执行一条决策 + */ + @Path(path = 'decision') + ApiResp decision(String decisionId, Boolean async, HttpContext ctx) { + def dCtx = decisionSrv.decide(decisionId, ctx.request.id, async == null ? false : async, ctx.params()) + return ApiResp.ok(dCtx.result()) + } + + + /** + * 查询决策结果 + */ + @Path(path = 'findDecideResult') + ApiResp findDecisionResult(String decideId) { + if (!decideId) return ApiResp.fail("decideId must required") + def dr = repo.findById(DecideRecord, decideId) + if (!dr) return ApiResp.fail("Not found decide record: " + decideId) + def dm = bean(DecisionManager) + def decisionHolder = dm.decisionMap.find {it.value.decision.id == dr.decisionId}.value + def attrs = dr.data ? JSON.parseObject(dr.data) : [:] + ApiResp.ok( + [ + decideId: decideId, decision: dr.decisionId, decisionId: decisionHolder.decision.decisionId, + status : dr.status, + desc : dr.exception, + attrs : decisionHolder.spec.returnAttrs.collectEntries { name -> + def field = fieldManager.fieldHolders.get(name)?.field + def v = attrs.containsKey(name) ? attrs.get(name) : attrs.get(fieldManager.alias(name)) + if (v instanceof Optional) {v = v.orElse( null)} + //如果key是中文, 则翻译成对应的英文名 + if (field && field.cnName == name) return [field.enName, v] + else return [name, v] + } + ] + ) + } +} diff --git a/src/ctrl/TestCtrl.groovy b/src/ctrl/TestCtrl.groovy new file mode 100644 index 0000000000000000000000000000000000000000..92d5fa3760192c801393aec81763ea02e2b1bf23 --- /dev/null +++ b/src/ctrl/TestCtrl.groovy @@ -0,0 +1,207 @@ +package ctrl + +import cn.xnatural.aio.AioClient +import cn.xnatural.aio.AioServer +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.enet.event.EL +import cn.xnatural.http.* +import cn.xnatural.jpa.Page +import cn.xnatural.jpa.Repo +import core.OkHttpSrv +import entity.Permission +import entity.Test +import entity.UploadFile +import entity.VersionFile +import service.FileUploader +import service.TestService + +import java.text.SimpleDateFormat +import java.util.concurrent.ConcurrentHashMap + +import static cn.xnatural.http.ApiResp.fail +import static cn.xnatural.http.ApiResp.ok + +@Ctrl(prefix = 'test') +class TestCtrl extends ServerTpl { + @Lazy def ts = bean(TestService) + @Lazy def repo = bean(Repo) + @Lazy def fu = bean(FileUploader) + @Lazy def http = bean(OkHttpSrv) + + final Set wss = ConcurrentHashMap.newKeySet() + + + @Filter(order = 1) + void filter1(HttpContext ctx) { + log.info('test filter1 ============') + } + + @Filter(order = 0) + void filter2(HttpContext ctx) { + // log.info('test filter2 ============') + } + + + @EL(name = 'testWsMsg') + void wsMsgBroadcast(String msg) { + wss.each {ws -> ws.send(msg)} + } + + + @WS(path = 'msg') + void wsMsg(WebSocket ws) { + log.info('WS connect. {}', ws.session.remoteAddress) + ws.listen(new WsListener() { + + @Override + void onClose(WebSocket wst) { + wss.remove(wst) + } + + @Override + void onText(String msg) { + log.info('test ws receive client msg: {}', msg) + } + }) + wsMsgBroadcast('上线: ' + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())) + wss.add(ws) + } + + + // 测试抛出错误 + @Path(path = 'error', produce = "application/json") + def error() { + throw new Exception('错误测试') + } + + + // dao 测试 + @Path(path = 'dao') + ApiResp dao(String type) { + if ('file' == type) { + return ok(Page.of( + repo.findPage(VersionFile, 1, 10, { root, query, cb -> query.orderBy(cb.desc(root.get('id')))}), + {UploadFile e -> + Utils.copier(e, [:]).ignore("metaClass") + .addConverter("createTime", {Date d -> d?.getTime()}) + .build() + } + )) + } else { + return ok(ts?.findTestData()) + } + return + + // 非数字比较大小(时间大小比较) + repo.find(Test, { root, query, cb -> cb.greaterThanOrEqualTo(root.get("createTime"), new Date())}) + } + + + // 接收form 表单提交 + @Path(path = 'form', consumer = 'application/x-www-form-urlencoded') + ApiResp form(String param1, HttpContext ctx) { + ok(ctx.request.formParams) + } + + + // json 参数 + @Path(path = 'json', consumer = 'application/json') + ApiResp json(String param1, HttpContext ctx) { + ok(ctx.request.jsonParams) + } + + + // 接收post string + @Path(path = 'string') + ApiResp string(HttpContext ctx) { + ok(ctx.request.bodyStr) + } + + + // 文件上传 + @Path(path = 'upload') + ApiResp upload(FileData file, String version) { + if (file == null) return ApiResp.fail('文件未上传') + fu.save(file) + repo.saveOrUpdate(new VersionFile(version: version, finalName: file.finalName, originName: file.originName, size: file.size)) + ok(fu.toFullUrl(file.finalName)) + } + + + // 异步响应(手动ctx.render) + @Path(path = 'async') + void async(String p1, HttpContext ctx) { + ctx.render( + ok('p1: ' + p1 + ", " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())) + ) + } + + + // 测试登录 + @Path(path = 'login') + ApiResp login(String username, HttpContext hCtx) { + hCtx.setSessionAttr('permissions', repo.findList(Permission, null).collect {it.enName}.toSet()) + ok(hCtx.getSessionAttr("permissions")) + } + + + // 权限测试 + @Path(path = 'auth') + ApiResp auth(String auth, HttpContext ctx) { + ok(ctx.auth(auth?:'auth1')) + } + + + // 远程事件调用 + @Path(path = 'remote') + void remote(HttpContext ctx, String app, String event, String p1) { + ts.remote(app?:"gy", event?:'eName1', p1?:'p1',{ + if (it instanceof Exception) ctx.render(fail(it.message)) + else ctx.render ok(it) + }) + } + + + // 远程http调用 + @Path(path = 'http') + ApiResp http(String url) { + ok(http.get(url?:'http://gy/test/cus').debug().execute()) + } + + + // aio 测试发送 + @Path(path = 'aio') + ApiResp aio(String host, Integer port, String msg) { + bean(AioClient).send( + host?:'localhost', port?:bean(AioServer).port, + msg?:("send " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())) + ) + ok() + } + + + //故意超时接口 + @Path(path = 'timeout') + ApiResp timeout(Long wait) { + Thread.sleep(wait?:1) + ok().desc("超时: ${wait}ms" ) + } + + + // 下载excel文件 + void downXlsx(HttpContext ctx) { + ctx.response.contentType('application/vnd.ms-excel;charset=utf-8') + ctx.response.header('Content-Disposition', "attachment;filename=${new SimpleDateFormat("yyyyMMddHHmmss").format(new Date())}.xlsx") + def wb = org.apache.poi.ss.usermodel.WorkbookFactory.create(true) + def bos = new ByteArrayOutputStream(); wb.write(bos) + ctx.render(bos.toByteArray()) + } + + + @Path(path = 'cus') + ApiResp cus(String p1) { + log.info("here ================") + return ok('p1: ' + p1 + ", " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())) + } +} diff --git a/src/entity/CollectRecord.groovy b/src/entity/CollectRecord.groovy new file mode 100644 index 0000000000000000000000000000000000000000..ea3d0a0ea0af684c1a7a61e7edd12f0fe362b410 --- /dev/null +++ b/src/entity/CollectRecord.groovy @@ -0,0 +1,100 @@ +package entity + +import cn.xnatural.jpa.IEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.* + +/** + * 决策结果保存地 + */ +@Entity +@Table(indexes = [ + @Index(name = "idx_collectDate", columnList = "collectDate"), + @Index(name = "idx_decideId", columnList = "decideId") +]) +@DynamicUpdate +class CollectRecord implements IEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + Long id + /** + * 执行决策流水id + * 关联 {@link DecideRecord#id} + */ + @Column(length = 36) + String decideId + /** + * 决策id + * 关联 {@link Decision#id} + */ + @Column(length = 36) + String decisionId + /** + * 收集器id + * 关联 {@link DataCollector#id} + */ + String collector + /** + * 执行结果状态 + */ + String status + /** + * http是否查得(数据是否成功) + */ + String dataStatus + /** + * 收集时间 + */ + @Column(nullable = false) + Date collectDate + /** + * 执行时长 + */ + Long spend + /** + * 是否取的缓存 + */ + Boolean cache + /** + * http 调用 url + */ + @Column(length = 1000) + String url + /** + * http 请求 body + */ + @Lob + @Basic + @Type(type = "text") + String body + /** + * 收集的结果 + */ + @Lob + @Basic + @Type(type = "text") + String result + /** + * 收集器执行异常 + */ + @Lob + @Basic + @Type(type = "text") + String exception + /** + * 解析结果 + */ + @Lob + @Basic + @Type(type = "text") + String resolveResult + /** + * 解析异常 + */ + @Lob + @Basic + @Type(type = "text") + String resolveException +} diff --git a/src/entity/DataCollector.groovy b/src/entity/DataCollector.groovy new file mode 100644 index 0000000000000000000000000000000000000000..9e5b324c75bd12ed7deddb15ac4e53023d28d164 --- /dev/null +++ b/src/entity/DataCollector.groovy @@ -0,0 +1,138 @@ +package entity + + +import cn.xnatural.jpa.UUIDEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.* + +/** + * 数据收集器 + */ +@Entity +@DynamicUpdate +@Table(indexes = [ + @Index(name = idx_name_type, columnList = "name,type", unique = true), +]) +class DataCollector extends UUIDEntity { + static final String idx_name_type = "idx_name_type" + /** + * 是否可用 + */ + Boolean enabled + /** + * 收集器名 + */ + @Column(nullable = false) + String name + /** + * http, script, sql + */ + @Column(nullable = false) + String type + /** + * 备注说明 + */ + @Column(length = 2000) + String comment + /** + * 创建者 + */ + String creator + /** + * 更新人 + */ + String updater + /** + * 超时(ms) + */ + Integer timeout + /** + * 缓存key + */ + String cacheKey + /** + * 缓存时间计算函数 + * 1. 返回数字: 单位分钟 + * 2. 返回 {@link java.time.Duration} + * 3. 返回 {@link Date}: 过期具体时间 + */ + @Column(length = 1000) + String cacheTimeoutFn + /** + * 是否记录收集结果 + */ + boolean recordResult + + + /** + * 接口url, jdbc url + */ + String url + + // ======================== http ======================= + + /** + * http method + */ + String method + /** + * 请求body 字符串 模板 + */ + @Lob + @Basic + @Type(type = "text") + String bodyStr + /** + * application/json,multipart/form-data,application/x-www-form-urlencoded + */ + String contentType + /** + * 值解析脚本 + * 格式为: + * {String resultStr -> // 接口返回的字符串 + * + * } + */ + @Lob + @Basic + @Type(type = "text") + String parseScript + + /** + * 是否查得(数据是否成功)判断函数 + */ + @Lob + @Basic + @Type(type = "text") + String dataSuccessScript + + + // ======================= script ====================== + /** + * 值计算函数 + */ + @Lob + @Basic + @Type(type = "text") + String computeScript + + + // ========================= sql ======================== + /** + * groovy Sql 执行脚本 + */ + @Lob + @Basic + @Type(type = "text") + String sqlScript + /** + * sql 连接池的最小连接 + */ + Integer minIdle + /** + * sql 连接池的最大连接 + */ + Integer maxActive +} diff --git a/src/entity/DecideRecord.groovy b/src/entity/DecideRecord.groovy new file mode 100644 index 0000000000000000000000000000000000000000..1996c61779768c45cdd310bcb3ec46091a4945ec --- /dev/null +++ b/src/entity/DecideRecord.groovy @@ -0,0 +1,82 @@ +package entity + + +import cn.xnatural.jpa.IEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type +import service.rule.DecideResult + +import javax.persistence.* + +/** + * 决策记录 + */ +@Entity +@DynamicUpdate +@Table(indexes = [@Index(name = "idx_occurTime", columnList = "occurTime")]) +class DecideRecord implements IEntity { + /** + * 决策流水id + */ + @Id + @Column(length = 50) + String id + /** + * 决策id + * 关联 {@link Decision#id} + */ + @Column(length = 36) + String decisionId + /** + * 执行结果状态 + */ + String status + /** + * 决策结果 + */ + @Column(length = 30) + @Enumerated(EnumType.STRING) + DecideResult result + /** + * 决策时间 + */ + @Column(nullable = false) + Date occurTime + /** + * 执行花费时间 + */ + Integer spend + /** + * 异常信息 + */ + @Column(length = 1000) + String exception + /** + * 输入参数 json 字符串 + */ + @Lob + @Basic + @Type(type = "text") + String input + /** + * 最终数据集 + */ + @Lob + @Basic + @Type(type = "text") + String data + /** + * 执行过程描述详情 + */ + @Lob + @Basic + @Type(type = "text") + String detail + /** + * 数据收集结果集 + */ + @Lob + @Basic + @Type(type = "text") + String dataCollectResult +} diff --git a/src/entity/Decision.groovy b/src/entity/Decision.groovy new file mode 100644 index 0000000000000000000000000000000000000000..b5b75659bed0c4c2deee16675dc3357321f0162c --- /dev/null +++ b/src/entity/Decision.groovy @@ -0,0 +1,70 @@ +package entity + +import cn.xnatural.jpa.UUIDEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.* + +/** + * 决策 + */ +@Entity +@DynamicUpdate +@Table(indexes = [ + @Index(name = "idx_decisionId", columnList = "decisionId", unique = true), +]) +class Decision extends UUIDEntity { + /** + * 决策id + */ + @Column(nullable = false, length = 100) + String decisionId + /** + * 决策名 + */ + String name + /** + * 描述说明 + */ + String comment + /** + * 完整 DSL + */ + @Lob + @Basic + @Type(type = "text") + String dsl + /** + * api 接口配置 + [ + { + "code": "decisionId", "name": "决策id", "type": "Str", "require": true, "fixValue": "decision_1" + }, + { + "code": "async", "name": "是否异步", "type": "Bool", "require": false, "defaultValue": false + }, + { + "code": "idNumber", "name": "身份证", "type": "Str", "require": true, "fixLength": 18 + }, + { + "code": "mobileNo", "name": "手机号", "type": "Str", "require": true, "fixLength": 11 + }, + { + "code": "name", "name": "姓名", "type": "Str", "require": true, "maxLength": 100 + } + ] + */ + @Lob + @Basic + @Type(type = "text") + String apiConfig + /** + * 创建者 + */ + String creator + /** + * 更新人 + */ + String updater +} diff --git a/src/entity/FieldType.groovy b/src/entity/FieldType.groovy new file mode 100644 index 0000000000000000000000000000000000000000..739f1402138d2aa3bddfb66b488e3cfc518640e0 --- /dev/null +++ b/src/entity/FieldType.groovy @@ -0,0 +1,13 @@ +package entity + +enum FieldType { + // 默认高精度计算 + Str("字符串", String), Decimal("小数", BigDecimal), Int("整数", Long), Bool("布尔", Boolean), Time("时间", Date) + String cnName + Class clzType + + FieldType(String cnName, Class clzType) { + this.cnName = cnName + this.clzType = clzType + } +} diff --git a/src/entity/GlobalConfig.groovy b/src/entity/GlobalConfig.groovy new file mode 100644 index 0000000000000000000000000000000000000000..ddb7063b6c7f4bb3e44b2807c562cdce06daf106 --- /dev/null +++ b/src/entity/GlobalConfig.groovy @@ -0,0 +1,30 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.* + +/** + * 全局配置 key value形式 + */ +@Entity +@DynamicUpdate +@Table(indexes = [ + @Index(name = "idx_name", columnList = "name", unique = true), +]) +class GlobalConfig extends LongIdEntity { + /** + * 属性名 + */ + @Column(nullable = false) + String name + /** + * 值 + */ + @Lob + @Basic + @Type(type = "text") + String value +} diff --git a/src/entity/Lock.groovy b/src/entity/Lock.groovy new file mode 100644 index 0000000000000000000000000000000000000000..a80ef8ccbb3357ba47c6101c77927957ff104726 --- /dev/null +++ b/src/entity/Lock.groovy @@ -0,0 +1,22 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity + +import javax.persistence.Column +import javax.persistence.Entity +import javax.persistence.Index +import javax.persistence.Table + +@Entity +@Table(name = 'tb_lock', indexes = [@Index(name = "idx_name", columnList = "name", unique = true)]) +class Lock extends LongIdEntity { + /** + * 锁 的 唯一标识 + */ + @Column(nullable = false) + String name + /** + * 描述 + */ + String comment +} diff --git a/src/entity/OpHistory.groovy b/src/entity/OpHistory.groovy new file mode 100644 index 0000000000000000000000000000000000000000..f51779660c962fd8a4ee4761601140ed102c8678 --- /dev/null +++ b/src/entity/OpHistory.groovy @@ -0,0 +1,29 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity +import org.hibernate.annotations.Type + +import javax.persistence.* + +/** + * 操作历史记录 + */ +@Entity +@Table(indexes = [@Index(name = "idx_createTime", columnList = "createTime")]) +class OpHistory extends LongIdEntity { + /** + * 表名 + */ + String tbName + /** + * 操作员 + */ + String operator + /** + * 保存各个字段的 json 字符串 + */ + @Lob + @Basic + @Type(type = "text") + String content +} diff --git a/src/entity/Permission.groovy b/src/entity/Permission.groovy new file mode 100644 index 0000000000000000000000000000000000000000..8bfb54395b20f71150e79ba339c1603a1491f6c3 --- /dev/null +++ b/src/entity/Permission.groovy @@ -0,0 +1,39 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity +import org.hibernate.annotations.DynamicUpdate + +import javax.persistence.Column +import javax.persistence.Entity +import javax.persistence.Index +import javax.persistence.Table + + +/** + * 权限表 + */ +@Entity +@DynamicUpdate +@Table(indexes = [ + @Index(name = "idx_enName", columnList = "enName", unique = true), +]) +class Permission extends LongIdEntity { + /** + * 权限标识 + */ + @Column(nullable = false) + String enName + /** + * 权限显示名 + */ + String cnName + /** + * 权限说明 + */ + @Column(length = 500) + String comment + /** + * 动态创建权限时, 此字段标识 + */ + String mark +} diff --git a/src/entity/RuleField.groovy b/src/entity/RuleField.groovy new file mode 100644 index 0000000000000000000000000000000000000000..a1c039b1600795291eb3dc682b2ab0d92a99cad2 --- /dev/null +++ b/src/entity/RuleField.groovy @@ -0,0 +1,49 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.* + +@Table(indexes = [ + @Index(name = "idx_enName", columnList = "enName", unique = true), + @Index(name = "idx_cnName", columnList = "cnName", unique = true), +]) +@Entity +@DynamicUpdate +class RuleField extends LongIdEntity { + /** + * 英文名 唯一 + */ + @Column(nullable = false) + String enName + /** + * 中文名 唯一 + */ + @Column(nullable = false) + String cnName + /** + * 备注说明 + */ + String comment + @Column(nullable = false) + @Enumerated(EnumType.STRING) + FieldType type + /** + * 收集器选项 + * [{collectorId: '收集器id', chooseFn: '选择函数,返回true则使用此收集器'}] + */ + @Lob + @Basic + @Type(type = "text") + String collectorOptions + /** + * 创建者 + */ + String creator + /** + * 更新人 + */ + String updater +} diff --git a/src/entity/Test.groovy b/src/entity/Test.groovy new file mode 100644 index 0000000000000000000000000000000000000000..68e7baeac566268f757e29f1207a734edee0088e --- /dev/null +++ b/src/entity/Test.groovy @@ -0,0 +1,11 @@ +package entity + +import cn.xnatural.jpa.UUIDEntity + +import javax.persistence.Entity + +@Entity +class Test extends UUIDEntity { + String name + Integer age +} \ No newline at end of file diff --git a/src/entity/UploadFile.groovy b/src/entity/UploadFile.groovy new file mode 100644 index 0000000000000000000000000000000000000000..629713723ca72361b53072a369612a55cf909d4e --- /dev/null +++ b/src/entity/UploadFile.groovy @@ -0,0 +1,33 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity +import org.hibernate.annotations.DynamicUpdate + +import javax.persistence.MappedSuperclass + +/** + * 文件上传基本信息实体 + * @author xiangxb, 2018-10-07 + */ +//@Inheritance(strategy = InheritanceType.JOINED) +//@Entity +@MappedSuperclass +@DynamicUpdate +class UploadFile extends LongIdEntity { + /** + * 系统生产的唯一文件名(可用作第3方文件服务器的文件id) + */ + String finalName + /** + * 原始文件名 + */ + String originName + /** + * 文件大小 + */ + Long size + /** + * 备注 + */ + String comment +} diff --git a/src/entity/User.groovy b/src/entity/User.groovy new file mode 100644 index 0000000000000000000000000000000000000000..ea0679f95300e02456adbbd634e3e59f00a04c26 --- /dev/null +++ b/src/entity/User.groovy @@ -0,0 +1,45 @@ +package entity + +import cn.xnatural.jpa.LongIdEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.Basic +import javax.persistence.Column +import javax.persistence.Entity +import javax.persistence.Index +import javax.persistence.Lob +import javax.persistence.Table + +@Entity +@DynamicUpdate +@Table(indexes = [ + @Index(name = "idx_name", columnList = "name", unique = true), +]) +class User extends LongIdEntity { + /** + * 用户登录名 + */ + @Column(nullable = false) + String name + /** + * 用户组 + */ + @Column(name = "gp") + String group + /** + * 登录的密码 + */ + String password + /** + * 权限标识列表, 用豆号分割 + */ + @Lob + @Basic + @Type(type = "text") + String permissions + /** + * 上次登录时间 + */ + Date login +} diff --git a/src/entity/UserSession.groovy b/src/entity/UserSession.groovy new file mode 100644 index 0000000000000000000000000000000000000000..15b9b14d6ff8282b0df57965a045bec49154a288 --- /dev/null +++ b/src/entity/UserSession.groovy @@ -0,0 +1,46 @@ +package entity + +import cn.xnatural.jpa.BaseEntity +import org.hibernate.annotations.DynamicUpdate +import org.hibernate.annotations.Type + +import javax.persistence.Basic +import javax.persistence.Column +import javax.persistence.Entity +import javax.persistence.Id +import javax.persistence.Index +import javax.persistence.Lob +import javax.persistence.Table + +/** + * 用户会话记录 + */ +@Entity +@DynamicUpdate +@Table(indexes = [ + @Index(name = "idx_userId", columnList = "userId"), +]) +class UserSession extends BaseEntity { + /** + * 会话id + */ + @Id + @Column(length = 128) + String sessionId + /** + * 关联用户id + */ + @Column(nullable = false) + Long userId + /** + * 是否有效. 主动退出 valid: false + */ + Boolean valid + /** + * 当前会话属性 + */ + @Lob + @Basic + @Type(type = "text") + String data +} diff --git a/src/entity/VersionFile.groovy b/src/entity/VersionFile.groovy new file mode 100644 index 0000000000000000000000000000000000000000..4a104bcdd456d29d98586a7430419c530dc0fb20 --- /dev/null +++ b/src/entity/VersionFile.groovy @@ -0,0 +1,11 @@ +package entity + +import javax.persistence.Entity + +@Entity +class VersionFile extends UploadFile { + // 1.0.1 + String version + // 用于比较大小 + Integer versionNum +} diff --git a/src/logback.groovy b/src/logback.groovy new file mode 100644 index 0000000000000000000000000000000000000000..7384c1c04688809724ffd8c027d56611f346093e --- /dev/null +++ b/src/logback.groovy @@ -0,0 +1,68 @@ +import ch.qos.logback.classic.Level +import ch.qos.logback.classic.encoder.PatternLayoutEncoder +import ch.qos.logback.core.util.FileSize +import cn.xnatural.app.Utils + +import java.nio.charset.Charset +import java.nio.charset.StandardCharsets + +// 日志文件名 +def logFileName = System.getProperty('log.file.name', 'app') + +// 日志文件路径. 配了路径才会输出到文件. 默认输出到项目根目录下的log目录 +def logPath = System.properties.containsKey('log.path') ? System.getProperty('log.path') : Utils.baseDir("../log").canonicalPath + +// 去掉最后的 / +if ('/' != logPath && logPath.endsWith('/')) logPath = logPath.substring(0, logPath.length() - 1) + +// 默认只输出:标准输出,文件 +def appenders = System.getProperty('log.appenders', 'console,file') +if (appenders instanceof String) { + appenders = appenders.split(',').collect {it.trim()}.findAll {String s -> + if (s) return true + else false + } +} else if (appenders !instanceof Collection) throw new RuntimeException('log.appenders 配置错误') + +if (appenders.contains('console')) { // 标准输出 + appender('console', ConsoleAppender) { + encoder(PatternLayoutEncoder) { + // 控制台日志格式配置 + delegate.pattern = "%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-7thread] [%-40.40C :%-3L] => %m%n" + delegate.charset = Charset.forName("utf8") + } + } +} + +if (logPath) { // 有日志输出目录配置 + if (appenders.contains('file')) { // 日志文件 + appender('file', RollingFileAppender) { + encoder(PatternLayoutEncoder) { + // 文件日志格式配置 + delegate.pattern = "%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-7thread] [%-40.40C :%-3L] => %m%n" + delegate.charset = StandardCharsets.UTF_8 + } + if ("/" == logPath) file = "/${logFileName}.log" + else file = "$logPath/${logFileName}.log" + rollingPolicy(SizeAndTimeBasedRollingPolicy) { + if ("/" == logPath) delegate.fileNamePattern = "/${logFileName}.%d{yyyy-MM-dd}.%i.log" + else delegate.fileNamePattern = "${logPath}/${logFileName}.%d{yyyy-MM-dd}.%i.log" + delegate.maxFileSize = FileSize.valueOf(System.getProperty("log.maxFileSize", '50MB')) + delegate.maxHistory = Integer.valueOf(System.getProperty("log.maxHistory", '500')) + delegate.totalSizeCap = FileSize.valueOf(System.getProperty("log.totalSizeCap", '50GB')) + } + } + } +} else appenders.remove('file') + + +root(Level.valueOf(System.getProperty('log.level', 'info')), appenders) + +// 日志等级设置 +logger('ch.qos.logback', WARN) +logger('org.hibernate.tool.hbm2ddl.SchemaUpdate', INFO) +System.properties.each {String k, v-> + if (k.startsWith("log.level.") && v) { + logger(k.replace('log.level.', ''), Level.valueOf((String) v)) + } +} \ No newline at end of file diff --git a/src/logback.xml b/src/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..132f82f9881fbfbf0528a1981b667f75967c83ee --- /dev/null +++ b/src/logback.xml @@ -0,0 +1,34 @@ + + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-7thread] [%-40.40C :%-3L] => %m%n + + + + + ${log_path}/${log_file_name}.log + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%-7thread] [%-40.40C :%-3L] => %m%n + utf-8 + + + ${log_path}/${log_file_name}.%d{yyyyMMdd}.%i.log + ${log.maxHistory:-500} + ${log.maxFileSize:-50MB} + ${log.totalSizeCap:-100GB} + + + + + + + + + + \ No newline at end of file diff --git a/src/main.groovy b/src/main.groovy new file mode 100644 index 0000000000000000000000000000000000000000..74850db6e9a1019717688573443ccce30c576660 --- /dev/null +++ b/src/main.groovy @@ -0,0 +1,137 @@ +import cn.xnatural.app.AppContext +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Repo +import cn.xnatural.remoter.Remoter +import cn.xnatural.sched.Sched +import core.HttpSrv +import core.OkHttpSrv +import core.RedisClient +import ctrl.* +import entity.* +import groovy.transform.Field +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import service.FileUploader +import service.TestService +import service.rule.* + +import java.time.Duration + +System.setProperty("configdir", "../conf") +@Field final Logger log = LoggerFactory.getLogger("ROOT") +@Field final AppContext app = new AppContext() //应用上下文 +// @Lazy @Field EP ep = app.bean(EP, null) + + +// 系统功能添加区 +app.addSource( + new OkHttpSrv(), // http 客户端 + new CacheSrv(), // 对象缓存 + sched(), // 时间任务调度管理 + remoter(), // 集群分布式 + jpa_rule(), // 数据源rule + new HttpSrv().ctrls( // 接口层 + TestCtrl, MainCtrl, RuleCtrl, MntCtrl, MntUserCtrl, + MntDecisionCtrl, MntCollectorCtrl, MntFieldCtrl, MntDataCtrl + ), + new FileUploader(), new CollectorManager(), new TestService(), + new FieldManager(), new DecisionSrv(), new DecisionManager(), + new OpHistorySrv(), new UserSrv(), this +).start() // 启动系统 + + +@EL(name = 'sys.inited') +void sysInited() { + if (app.attrs('redis')) { //根据配置是否有redis,创建redis客户端工具 + app.addSource(new RedisClient()) + } +} + + +@EL(name = 'sys.started', async = true) +void sysStarted() { + try { + } finally { + // System.exit(0) + } +} + + +def jpa_rule() { + new ServerTpl("jpa_rule") { //数据库 jpa_rule + Repo repo + @EL(name = "sys.starting", async = true) + void start() { + repo = new Repo(attrs()).entities( // jpa封装 + Decision, RuleField, DataCollector, OpHistory, DecideRecord, CollectRecord, + User, Permission, GlobalConfig, Lock, UserSession + ).init() + exposeBean(repo, name + "_repo") + ep.fire("${name}.started") + } + + // 数据库 最后再关闭 + @EL(name = "sys.stopping", async = true, order = 2f) + void stop() { repo?.close() } + } +} + + +def sched() { + new ServerTpl("sched") { // 定时任务 + Sched sched + @EL(name = "sys.starting", async = true) + void start() { + sched = new Sched(attrs(), exec()).init() + exposeBean(sched) + ep.fire("${name}.started") + } + + @EL(name = "sched.after") + void after(Duration duration, Runnable fn) {sched.after(duration, fn)} + + @EL(name = "sys.stopping", async = true, order = 1f) + void stop() { sched?.stop() } + } +} + + +def remoter() { + new ServerTpl("remoter") { // 集群配置 + Remoter remoter + @EL(name = "sched.started") + void start() { + remoter = new Remoter(app.name(), app.id(), attrs(), exec(), ep, bean(Sched)) + exposeBean(remoter) + exposeBean(remoter.aioClient) + ep.fire("${name}.started") + } + + @EL(name = 'sys.heartbeat', async = true) + void heartbeat() { + remoter.sync() + remoter.aioServer.clean() + } + @EL(name = "sys.stopping", async = true) + void stop() { remoter.stop() } + } +} + + +/** + * 系统心跳 清理 + */ +@EL(name = 'sys.heartbeat', async = true) +void heartbeat() { + // 删除 Classloader 中只进不出的 parallelLockMap + def field = ClassLoader.getDeclaredField('parallelLockMap') + field.setAccessible(true) + field.get(Thread.currentThread().contextClassLoader.parent.parent).clear() + field.get(Thread.currentThread().contextClassLoader.parent.parent.parent).clear() + // 删除 Classloader 中只进不出的 classes + field = ClassLoader.getDeclaredField('classes') + field.setAccessible(true) + field.get(Thread.currentThread().contextClassLoader.parent).clear() +} \ No newline at end of file diff --git a/src/service/EmailSrv.groovy b/src/service/EmailSrv.groovy new file mode 100644 index 0000000000000000000000000000000000000000..82b07c5cb9698967a88a995987ac673b90f4f413 --- /dev/null +++ b/src/service/EmailSrv.groovy @@ -0,0 +1,39 @@ +package service + +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL + +class EmailSrv extends ServerTpl { + + @Lazy String host = getStr('host', 'smtp.qq.com') + @Lazy String sender = getStr('sender', 'xnatural@msn.cn') + @Lazy String password = getStr('password', null) + + + @EL(name = 'sys.starting', async = true) + def start() { + + } + + + def email(@DelegatesTo(EmailSpec) Closure cl) { + def email = new EmailSpec() + def code = cl.rehydrate(email, this, this) + code.resolveStrategy = Closure.DELEGATE_ONLY + code() + send(email) + } + + + protected send(EmailSpec spec) { + + } + + + class EmailSpec { + String from + List to + String subject + String body + } +} diff --git a/src/service/FileUploader.groovy b/src/service/FileUploader.groovy new file mode 100644 index 0000000000000000000000000000000000000000..e0025c5983d9cd0e37a30d822f5eb60667323b77 --- /dev/null +++ b/src/service/FileUploader.groovy @@ -0,0 +1,106 @@ +package service + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.enet.event.EL +import cn.xnatural.http.FileData +import core.OkHttpSrv + +import java.util.concurrent.ExecutorService +import java.util.concurrent.Executors + +/** + * 文件上传 + */ +class FileUploader extends ServerTpl { + /** + * 文件上传的 本地保存目录 + */ + @Lazy String localDir = new URL('file:' + (getStr("localDir", Utils.baseDir('../upload').canonicalPath))).getFile() + /** + * 文件上传 的访问url前缀 + */ + @Lazy URI accessUrlPrefix = URI.create(getStr("accessUrlPrefix", ("//${ep.fire('http.hp')}/file/")) + "/").normalize() + /** + * 远程文件服务器url地址 + */ + @Lazy String remoteUrl = getStr("remoteUrl", '') + @Lazy def http = bean(OkHttpSrv) + + + @EL(name = 'web.started', async = false) + protected init() { + log.info('save upload file local dir: {}', localDir) + log.info('access upload file url prefix: {}', accessUrlPrefix) + if (remoteUrl) {log.info('remote file server http url: {}', remoteUrl)} + } + + + /** + * 映射 文件名 到一个 url + * @param fileName 完整的文件名 + * @return 文件访问的url + */ + String toFullUrl(String fileName) { + accessUrlPrefix.resolve(fileName).toString() + } + + + /** + * 查找文件 + * @param fileName 文件名 + * @return 文件 + */ + File findFile(String fileName) { new File(localDir, fileName) } + + + @EL(name = 'deleteFile', async = true) + void delete(String fileName) { + File f = new File(localDir, fileName) + if (f.exists()) f.delete() + else log.warn("delete file '{}' not exists", fileName) + } + + + /** + * 保存文件 + * @param fd + * @param forwardRemote + * @return {@link FileData} + */ + FileData save(FileData fd, boolean forwardRemote = false) { save([fd])?[0] } + + + /** + * 多文件 多线程保存 + * @param fds + */ + // @Monitor(warnTimeOut = 7000) + List save(List fds, boolean forwardRemote = false) { + if (!fds) return fds + + // 文件流copy + def doSave = {FileData fd -> + if (fd == null) return fd + if (forwardRemote) { // http上传到远程文件服务 + // 1. 阿里OSS文件服务器例子 + // def oss = new OSSClient(endpoint, accessKeyId, accessKeySecret) + // oss.putObject('path', fd.generatedName, fd.inputStream) + + // 2. 个人http文件服务器例子 + if (remoteUrl) http?.post(remoteUrl).fileStream('file', fd.finalName, fd.inputStream).execute() + } else { + // 创建本地文件并写入 + def dir = new File(localDir) + dir.mkdirs() + fd.transferTo(dir) + log.info('Saved file: {}, originName: {}, size: ' + fd.size, dir.canonicalPath + File.separator + fd.finalName, fd.originName) + } + fd + } + + // 并发上传 + fds.findResults {fd -> exec().submit {doSave(fd)}}.each {it.get()} + fds + } +} diff --git a/src/service/TestService.groovy b/src/service/TestService.groovy new file mode 100644 index 0000000000000000000000000000000000000000..c5330a53f7d8c4e09574a7758a55af8968f6bf37 --- /dev/null +++ b/src/service/TestService.groovy @@ -0,0 +1,189 @@ +package service + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.v.VChain +import cn.xnatural.app.v.VProcessor +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Page +import cn.xnatural.jpa.Repo +import cn.xnatural.remoter.Remoter +import cn.xnatural.task.TaskContext +import cn.xnatural.task.TaskWrapper +import com.alibaba.fastjson.JSON +import core.OkHttpSrv +import core.mode.builder.ObjBuilder +import core.mode.pipeline.Pipeline +import entity.Test + +import java.text.SimpleDateFormat +import java.util.function.Consumer + +class TestService extends ServerTpl { + @Lazy def repo = bean(Repo) + @Lazy def http = bean(OkHttpSrv) + + + @EL(name = 'sys.heartbeat', async = true) + void timeNotify() { + // 向测试 web socket 每分钟发送消息 + ep.fire("testWsMsg", '系统时间: ' + new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(new Date())) + } + + + Page findTestData() { + repo.trans{ s -> + repo.saveOrUpdate( + new Test( + name: new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(new Date()), + age: Integer.valueOf(new SimpleDateFormat('ss').format(new Date())) + ) + ) + repo.findPage(Test, 1, 10, { root, query, cb -> query.orderBy(cb.desc(root.get('createTime')))}) + } + } + + + def hibernateTest() { + repo?.trans{s -> + println '=============' +// println s.createNativeQuery('select name, age from test where age>10') +// .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP) +// .setMaxResults(1).uniqueResult() +// println s.createQuery('select name,age from Test where age>10') +// // .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP) +// .setMaxResults(1).singleResult['age'] + println s.createQuery('from Test where age>10').setMaxResults(1).list() + } + + findTestData() + println "total: " + repo.count(Test) + } + + + def wsClientTest() { + def i = 1 + http.ws('ws://localhost:7100/test/ws', 90,{msg, ws -> + log.info("消息" + (i++) + ": " + msg) + }) + } + + + def okHttpTest() { + def hp = ep.fire('http.hp') + // hp = '39.104.28.131/gy' + if (hp) { + // log.info '接口访问xxx: ' + okHttp.http().get("http://$hp/test/xxx").execute() + log.info '接口访问dao: ' + http.get("http://$hp/test/dao").cookie('sId', '222').param('type', 'file').execute() + log.info '接口访问form: ' + http.post("http://$hp/test/form?sss=22").param('p1', '中文').execute() + log.info '接口访问json: ' + http.post("http://$hp/test/json").contentType('application/json').param('p1', '中文 123').execute() + log.info '接口访问json: ' + http.post("http://$hp/test/json").jsonBody(JSON.toJSONString([a:'1', b:2])).execute() + http.post("http://$hp/test/upload?cus=11111").param('p2', 'abc 怎么') + .param('f1', new File('C:\\Users\\xiangxb\\Desktop\\新建文本文档.txt')) + .execute({log.info '接口访问upload: ' + it}) + } + } + + + @EL(name = "eName11") + void taskTest() { + new TaskContext<>('test ctx', null, exec()) + .addTask(new TaskWrapper().step {param, me -> me.info("执行任务....")}) + .addTask(new TaskWrapper().step {param, me -> + me.info("执行任务") + }.step { param, me -> + me.task().ctx().addTask(new TaskWrapper().step{param1, mee -> mee.info("执行衍生任务....")}) + }) + .start() + } + + + @EL(name = "eName10") + def testObjBuilder() { + println ObjBuilder.of(Map).add("a", {"b"}).build() + } + + + @EL(name = "eName9") + def testPipe() { + println new Pipeline(key: 'test pipe').add({ i -> i + "xxx"}).run("qqq") + } + + + @EL(name = "eName8") + def testVChain() { + new VChain().add(new VProcessor() { + @Override + def pre(Object param) { + log.info('down1') + } + + @Override + def post(Object param) { + log.info('up1') + } + }).add(new VProcessor() { + @Override + def pre(Object param) { + log.info('down2') + } + + @Override + def post(Object param) { + log.info('up2') + } + }).run() + } + + + def remote(String app, String eName, String param = 'xx', Consumer fn) { + // 远程调用 + fn.accept(bean(Remoter).fire(app?:'gy', eName?:'eName1', ['p1'])) + // bean(Remoter).fireAsync(app?:'gy', eName?:'eName1', fn, []) + } + + + @EL(name = "eName1", async = false) + private String testEvent1(String p) { + Test e = new Test() + e.setName("aaaa" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + e.setAge(111) + Test t = repo.saveOrUpdate(e); + // if (true) throw new IllegalArgumentException("xxx"); + return "new entity : " + t.getId() + } + + + @EL(name = "eName2") + def testEvent2(String p) { + repo.findPage(Test, 1, 10, { root, query, cb -> query.orderBy(cb.desc(root.get("id")))}) + } + + + @EL(name = "eName3") + long testEvent3(String p) { + repo.count(Test, {root, query, cb -> query.orderBy(cb.desc(root.get("id")))}) + } + + + @EL(name = "eName4") + def testEvent4(String p) { + ep.fire("cache.get","java","java") + } + + + @EL(name = "eName5") + void testEvent5(String p) { + ep.fire("cache.set","java","java", p?:(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()))) + } + + @EL(name = "eName6") + def testEvent6(String p) { + throw new RuntimeException("抛个错 $p") + } + + @EL(name = "eName7") + def testEvent7(String i) { + Thread.sleep(5000L) + "eName7_"+System.currentTimeMillis() + } +} diff --git a/src/service/rule/CollectorManager.groovy b/src/service/rule/CollectorManager.groovy new file mode 100644 index 0000000000000000000000000000000000000000..cd15d0ddbf51ab9f07e29e6a68679aa22327df37 --- /dev/null +++ b/src/service/rule/CollectorManager.groovy @@ -0,0 +1,828 @@ +package service.rule + +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.app.util.DB +import cn.xnatural.enet.event.EC +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Repo +import cn.xnatural.remoter.Remoter +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import com.alibaba.fastjson.serializer.SerializerFeature +import core.OkHttpSrv +import core.RedisClient +import entity.CollectRecord +import entity.DataCollector +import groovy.text.GStringTemplateEngine +import org.codehaus.groovy.control.CompilerConfiguration +import org.codehaus.groovy.control.customizers.ImportCustomizer +import org.slf4j.LoggerFactory + +import java.time.Duration +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.atomic.AtomicInteger +import java.util.function.Function + +import static service.rule.spec.BaseSpec.rehydrate2 + +/** + * 收集器 + */ +class CollectorManager extends ServerTpl { + protected static final String DATA_COLLECTED = "data_collected" + @Lazy protected repo = bean(Repo, 'jpa_rule_repo') + @Lazy protected redis = bean(RedisClient) + @Lazy protected cacheSrv = bean(CacheSrv) + @Lazy protected fieldManager = bean(FieldManager) + // 是否异步保存决策结果 + @Lazy protected asyncSave = getBoolean("asyncSave", true) + /** + * 数据获取函数. 收集器id -> 收集器 + */ + final Map collectorHolders = new ConcurrentHashMap(100) + /** + * 决策id -> 保存延迟计算的收集器记录函数 + */ + protected final Map> lazyCollectRecords = new ConcurrentHashMap<>() + + + @EL(name = 'jpa_rule.started', async = true) + void init() { + load() + + if (asyncSave) { + Long lastWarn // 上次告警时间 + queue(DATA_COLLECTED) + .failMaxKeep(getInteger(DATA_COLLECTED + ".failMaxKeep", 10000)) + .parallel(getInteger("saveResult.parallel", 10)) + .errorHandle {ex, me -> + if (lastWarn == null || (System.currentTimeMillis() - lastWarn >= Duration.ofSeconds(getLong(DATA_COLLECTED + ".warnInterval", 60 * 5L)).toMillis())) { + lastWarn = System.currentTimeMillis() + log.error("保存数据收集结果到数据库错误", ex) + ep.fire("globalMsg", "保存数据收集结果到数据库错误: " + (ex.message?:ex.class.simpleName)) + } + // 暂停一会 + me.suspend(Duration.ofMillis(500 + new Random().nextInt(1000))) + } + } + + ep.fire("${name}.started") + } + + + @EL(name = 'sys.stopping', async = true) + protected void stop() { + collectorHolders.each {it.value.close()} + // 尽量等到 对列中的 数据都持久化完成 + long start = System.currentTimeMillis() + if (queue(DATA_COLLECTED).waitingCount > 0) log.warn("等待数据收集结果数据保存完...") + while (queue(DATA_COLLECTED).waitingCount > 0 && System.currentTimeMillis() - start < 1000 * 60 * 2) { + Thread.sleep(1000) + } + } + + + @EL(name = 'decision.end') + void endDecision(DecisionContext ctx) { + if (asyncSave) async { lazyCollectRecords.remove(ctx.id)?.each { it.call() } } + else lazyCollectRecords.remove(ctx.id)?.each { it.call() } + } + + + @EL(name = ['dataCollectorChange', 'dataCollector.dataVersion'], async = true) + protected void listenDataCollectorChange(EC ec, String id) { + def collector = repo.findById(DataCollector, id) + if (collector == null) { + collectorHolders.remove(id)?.close() + log.info("del dataCollector: " + id) + } else { + log.info("dataCollectorChanged: " + collector.name + ", " + id) + initDataCollector(collector) + } + def remoter = bean(Remoter) + if (remoter && ec?.source() != remoter) { // 不是远程触发的事件 + remoter.dataVersion('dataCollector').update(id, collector ? collector.updateTime.time : System.currentTimeMillis(), null) + } + } + + + def populate(String collectorId, String aName, DecisionContext ctx) { + // 得到收集器 + def collectorHolder = collectorHolders.get(collectorId) + if (collectorHolder == null) { + // 重新去数据库中查找 + initDataCollector(repo.findById(DataCollector, collectorId)) + collectorHolder = collectorHolders.get(collectorId) + } + // 未找到收集器 + if (!collectorHolder) { + log.warn(ctx.logPrefix() + "Not fund '${aName}' mapped getter function '${collectorHolder.collector.name}($collectorId)'".toString()) + return null + } + + return collectorHolder.populate(aName, ctx) + } + + + /** + * 测试 收集器 + * @param id 收集器id + * @param param 参数 + */ + def testCollector(String id, Map param) { collectorHolders.get(id)?.testComputeFn?.apply(param) } + + + // 决策产生的数据收集 + protected void dataCollected( + DataCollector collector, DecisionContext ctx, Boolean cache, Date collectDate, Long spend, String dataStatus, + Object result, Exception ex, def resolveResult, Exception resolveException, String url = null, String body = null + ) { + if (!collector.recordResult) return + final Runnable save = () -> { + // 是否有延迟计算值 + boolean hasLazyValue + def resolveResultStrFn = { + if (resolveResult instanceof Map) { + return JSON.toJSONString( + resolveResult.findAll {e -> + if (e.value instanceof Closure) { + hasLazyValue = true + return false + } + else true + }, + SerializerFeature.WriteMapNullValue + ) + } else { + return resolveResult?.toString() + } + } + + String status = '0000' + if (ex instanceof ConnectException) status = 'E001' + else if (ex != null) status = 'EEEE' + else if (resolveException != null) status = 'E002' + def record = new CollectRecord( + decideId: ctx.id, decisionId: ctx.decisionHolder.decision.id, collector: collector.id, + status: status, dataStatus: dataStatus, + collectDate: collectDate, cache: cache, spend: spend, url: url, body: body, + result: result, exception: ex == null ? null : ex.message?:ex.class.simpleName, + resolveResult: resolveResultStrFn(), + resolveException: resolveException == null ? null : resolveException.message?:resolveException.class.simpleName + ) + if (hasLazyValue) { // 如果有延迟计算值, 则在决策结束后更新收集器结果 + lazyCollectRecords.computeIfAbsent(ctx.id, { new LinkedList<>() }).add({ + record.resolveResult = resolveResultStrFn() + repo.saveOrUpdate(record) + }) + } else { + repo.saveOrUpdate(record) + } + } + if (asyncSave) queue(DATA_COLLECTED, save) + else save.run() + } + + + /** + * 加载所有数据收集器 + */ + void load() { + initDefaultCollector() + final Set ids = (collectorHolders ? ConcurrentHashMap.newKeySet(collectorHolders.size()) : null) + final def threshold = new AtomicInteger(1) + final def tryComplete = { + if (threshold.decrementAndGet() > 0) return + if (ids) { // 重新加载, 要删除内存中有, 但库中没有 + collectorHolders.findAll {!ids.contains(it.key)}.each { e -> + collectorHolders.remove(e.key) + } + } + log.info("加载数据收集器 {}个", collectorHolders.size()) + } + for (int page = 0, limit = 20; ; page++) { + def ls = repo.findList(DataCollector, page * limit, limit) + threshold.incrementAndGet() + async { + ls.each {collector -> + initDataCollector(collector) + ids?.add(collector.id) + } + tryComplete() + } + if (!ls || ls.size() < limit) { + tryComplete(); break + } + } + } + + + /** + * 初始化默认数据集 + */ + protected void initDefaultCollector() { + if (repo.count(DataCollector) == 0) { + log.info("初始化默认数据收集器") + repo.saveOrUpdate(new DataCollector(type: 'script', name: '星期几', enabled: true, comment: '值: 1,2,3,4,5,6,7', computeScript: """ +def week = Calendar.getInstance().get(Calendar.DAY_OF_WEEK) +if (week == 1) 7 +else week - 1 + """.trim())) + + repo.saveOrUpdate(new DataCollector(type: 'script', name: '当前日期时间', enabled: true, comment: '值: yyyy-MM-dd HH:mm:ss', cacheKey: '${(long) (System.currentTimeMillis() / 1000)}', computeScript: """ +new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + """.trim())) + repo.saveOrUpdate(new DataCollector(type: 'script', name: '当前日期', enabled: true, comment: '值: yyyy-MM-dd', cacheKey: '${(long) (System.currentTimeMillis() / (1000 * 60 * 60 * 24))}', computeScript: """ +new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date()) + """.trim())) + repo.saveOrUpdate(new DataCollector(type: 'script', name: '当前时间', enabled: true, comment: '值: HH:mm:ss', cacheKey: '${(long) (System.currentTimeMillis() / 1000)}', computeScript: """ +new java.text.SimpleDateFormat("HH:mm:ss").format(new Date()) + """.trim())) + + repo.saveOrUpdate(new DataCollector(type: 'script', name: '性别', enabled: true, comment: '根据身份证计算. 值: F,M', computeScript: """ +if (idNumber && idNumber.length() > 17) { + Integer.parseInt(idNumber.substring(16, 17)) % 2 == 0 ? 'F' : 'M' +} else null + """.trim())) + + repo.saveOrUpdate(new DataCollector(type: 'script', name: '年龄', enabled: true, comment: '根据身份证计算', computeScript: """ +if (idNumber && idNumber.length() > 17) { + Calendar cal = Calendar.getInstance() + int yearNow = cal.get(Calendar.YEAR) + int monthNow = cal.get(Calendar.MONTH) + 1 + int dayNow = cal.get(Calendar.DATE) + + int birthday = Integer.valueOf(idNumber.substring(6, 14)) + int year = Integer.valueOf(idNumber.substring(6, 10)) + int month = Integer.valueOf(idNumber.substring(10,12)) + int day = Integer.valueOf(idNumber.substring(12,14)) + + if ((month < monthNow) || (month == monthNow && day <= dayNow)) { + yearNow - year + } else { + yearNow - year - 1 + } +} else null + """.trim())) + } + } + + + /** + * 初始全数据收集器 + */ + void initDataCollector(DataCollector collector) { + if (!collector) return + try { + collectorHolders.remove(collector.id)?.close() + if (!collector.enabled) return + if ('http' == collector.type) { // http 接口 + initHttpCollector(collector) + } else if ('script' == collector.type) { // groovy 脚本 + initScriptCollector(collector) + } else if ('sql' == collector.type) { // 数据库查询脚本 + initSqlCollector(collector) + } else throw new Exception("Not support type: $collector.type") + } catch (ex) { + log.error("初始化收集器'$collector.name($collector.id)' 错误".toString(), ex) + } + } + + + /** + * 初始化 sql 收集器 + */ + protected void initSqlCollector(DataCollector collector) { + if ('sql' != collector.type) return + if (!collector.enabled) return + if (!collector.url) { + log.warn('sql url must not be empty'); return + } + if (!collector.sqlScript) { + log.warn('sqlScript must not be empty'); return + } + if (collector.minIdle < 0 || collector.minIdle > 50) { + log.warn('0 <= minIdle <= 50'); return + } + if (collector.maxActive < 1 || collector.maxActive > 100) { + log.warn('1 <= minIdle <= 100'); return + } + + def db = new DB(Repo.createDataSource([ //创建一个DB. 用于界面配置sql脚本 + url: collector.url, jdbcUrl: collector.url, + minIdle: collector.minIdle, maxActive: collector.maxActive, + minimumIdle: collector.minIdle, maximumPoolSize: collector.maxActive + ])) + + Binding binding = new Binding() + def config = new CompilerConfiguration() + binding.setProperty('DB', db) + binding.setProperty('LOG', LoggerFactory.getLogger("ROOT")) + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(JSON.class.name, JSONObject.class.name, Utils.class.name) + Closure sqlScript = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("{ -> $collector.sqlScript }") + + // 缓存时间计算函数 + Closure cacheTimeoutFn = buildCacheTimeoutFn(collector) + collectorHolders.put(collector.id, new CollectorHolder(collector: collector, db: db, dataKeyFn: { DecisionContext ctx -> //数据结果唯一性key计算逻辑 + computeCollectDataKey(collector, ctx) + }, computeFn: { DecisionContext ctx -> //sql脚本执行函数 + Object result // 结果 + Exception exx //异常 + String dataKey //数据缓存key + boolean cache = false //结果是否取自缓存 + Date start //取数据开始时间 + long spend + def logMsg = "${ctx.logPrefix()}${ -> cache ? '(缓存)' : ''}Sql收集器'${collector.name}(${collector.id})'${ -> spend ? ', spend: ' + spend : ''}, result: ${ -> result}" + + //1. 先从缓存中取 + if (cacheTimeoutFn) { + dataKey = computeCollectDataKey(collector, ctx) + if (redis) { + start = new Date() // 调用时间 + result = redis.get(getStr("collectorCacheKeyPrefix", "collector") + ":" + dataKey) + spend = System.currentTimeMillis() - start.time + } else if (cacheSrv) { + start = new Date() // 调用时间 + result = cacheSrv.get(getStr("collectorCacheKeyPrefix", "collector") +":"+ dataKey)?.toString() + spend = System.currentTimeMillis() - start.time + } + } + //2. 执行sql脚本 + if (result == null || result.toString().isEmpty()) { + try { + start = new Date() // 调用时间 + result = rehydrate2(sqlScript, ctx.data, this)() + spend = System.currentTimeMillis() - start.time + log.info(logMsg.toString()) + } catch (ex) { + exx = ex + log.error(logMsg.toString(), ex) + } + } else { + cache = true + log.info(logMsg.toString()) + } + //3. 缓存结果 + if (result != null && !result.toString().isEmpty() && dataKey && !cache) { //缓存结果 + setCache(ctx, cacheTimeoutFn, dataKey, result) + } + //4. 保存结果 + dataCollected(collector, ctx, cache, start, spend, (exx ? '0001' : '0000'), result, exx, null, null) + return result + }, testComputeFn: {param -> // 测试:sql脚本执行函数 + def result = rehydrate2(sqlScript, param, this)() + if (result instanceof Map) { + return result.collectEntries {e -> [e.key, e.value instanceof Closure ? e.value() : e.value]} + } + return result + })) + } + + + /** + * 初始化 script 收集器 + */ + protected void initScriptCollector(DataCollector collector) { + if ('script' != collector.type) return + if (!collector.enabled) return + if (!collector.computeScript) { + log.warn("Script collector'$collector.name' script must not be empty".toString()); return + } + Binding binding = new Binding() + binding.setProperty('LOG', LoggerFactory.getLogger("ROOT")) + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(JSON.class.name, JSONObject.class.name, Utils.class.name) + Closure script = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("{ -> $collector.computeScript}") + + // 缓存时间计算函数 + Closure cacheTimeoutFn = buildCacheTimeoutFn(collector) + collectorHolders.put(collector.id, new CollectorHolder(collector: collector, dataKeyFn: { ctx -> //数据结果唯一性key计算逻辑 + computeCollectDataKey(collector, ctx) + }, computeFn: { DecisionContext ctx -> + def result + Date start + long spend + String dataKey // 缓存key + boolean cache = false // 是否取自缓存 + Exception ex + def logMsg = "${ctx.logPrefix()}${ -> cache ? '(缓存)' : ''}脚本收集器'${collector.name}(${collector.id})'${ -> ', spend: ' + spend}, result: ${ -> result}" + + //1. 先从缓存中取 + if (cacheTimeoutFn) { + dataKey = computeCollectDataKey(collector, ctx) + if (redis) { + start = new Date() // 调用时间 + result = redis.get(getStr("collectorCacheKeyPrefix", "collector") + ":" +dataKey) + spend = System.currentTimeMillis() - start.time + } else if (cacheSrv) { + start = new Date() // 调用时间 + result = cacheSrv.get(getStr("collectorCacheKeyPrefix", "collector") + ":" +dataKey)?.toString() + spend = System.currentTimeMillis() - start.time + } + } + //2. 调用脚本 + if (!result) { + try { + start = new Date() // 调用时间 + result = rehydrate2(script, ctx.data, this)() + spend = System.currentTimeMillis() - start.time + log.info(logMsg.toString()) + } catch (e) { + ex = e + log.error(logMsg.toString(), ex) + } + } else { + cache = true + log.error(logMsg.toString(), ex) + } + //3. 缓存结果 + if (!cache && result != null && !result.toString().isEmpty() && dataKey) { + setCache(ctx, cacheTimeoutFn, dataKey, result) + } + //4. 保存结果 + dataCollected(collector, ctx, cache, start, spend, (ex ? '0001' : '0000'), result, ex, null, null) + return result + }, testComputeFn: {param -> + def result = rehydrate2(script, param, this)() + if (result instanceof Map) { + return result.collectEntries {e -> [e.key, e.value instanceof Closure ? e.value() : e.value]} + } + return result + })) + } + + + /** + * 初始化 http 收集器 + */ + protected void initHttpCollector(DataCollector collector) { + if ('http' != collector.type) return + if (!collector.enabled) return + // 创建 http 客户端 + def http = new OkHttpSrv('okHttp_' + collector.id); app().inject(http) + http.setAttr('connectTimeout', getLong("http.connectTimeout." + collector.id, getLong('http.connectTimeout', 3L))) + http.setAttr('readTimeout', getLong("http.readTimeout." + collector.id, getLong('http.readTimeout', Long.valueOf(collector.timeout?:20)))) + http.init() + + // 结果解析函数 + Closure parseFn + if (collector.parseScript) { + Binding binding = new Binding() + binding.setProperty('LOG', LoggerFactory.getLogger("ROOT")) + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(JSON.class.name, JSONObject.class.name, Utils.class.name) + parseFn = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("$collector.parseScript") + } + // 缓存时间计算函数 + Closure cacheTimeoutFn = buildCacheTimeoutFn(collector) + // 是否成功判断函数 + Closure successFn + if (collector.dataSuccessScript) { + Binding binding = new Binding() + binding.setProperty('LOG', LoggerFactory.getLogger("ROOT")) + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(JSON.class.name, JSONObject.class.name, Utils.class.name) + successFn = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("$collector.dataSuccessScript") + } + + // GString 模板替换 + def tplEngine = new GStringTemplateEngine(Thread.currentThread().contextClassLoader) + collectorHolders.put(collector.id, new CollectorHolder(collector: collector, dataKeyFn: { ctx -> //数据结果唯一性key计算逻辑 + computeCollectDataKey(collector, ctx) + }, computeFn: { DecisionContext ctx -> // 数据集成中3方接口访问过程 + String result // 接口返回结果字符串 + Object resolveResult // 解析接口返回结果 + long spend = 0 // 取数据,(网络)耗时时长 + Date start //取数据开始时间 + String url = collector.url // http请求 url + String bodyStr = collector.bodyStr // http 请求 body字符串 + String dataKey // 数据缓存key + boolean cache = false //结果是否取自缓存 + Integer respCode // http响应码 + + String retryMsg = '' //重试消息 + // 日志字符串 + def logMsg = "${ctx.logPrefix()}${ -> cache ? '(缓存)' : ''}接口收集器'$collector.name(${collector.id})'${ -> retryMsg}, url: ${ -> url}${ -> bodyStr == null ? '' : ', body: ' + bodyStr}${ -> spend ? ', spend: ' + spend : ''}${ -> respCode ? ', respCode: ' + respCode : ''}${ -> ', result: ' + result}${ -> resolveResult == null ? '' : ', resolveResult: ' + (resolveResult instanceof Map ? resolveResult.findAll {e -> !(e.value instanceof Closure)} : (resolveResult instanceof Closure ? '' : resolveResult))}" + + //1. 先从缓存中取 + if (cacheTimeoutFn) { + dataKey = computeCollectDataKey(collector, ctx) + if (redis) { + start = new Date() // 调用时间 + result = redis.get(getStr("collectorCacheKeyPrefix", "collector") + ":" +dataKey) + spend = System.currentTimeMillis() - start.time + } else if (cacheSrv) { + start = new Date() // 调用时间 + result = cacheSrv.get(getStr("collectorCacheKeyPrefix", "collector") + ":" +dataKey)?.toString() + spend = System.currentTimeMillis() - start.time + } + } + + //2. 未从缓存中取到结果, 则调接口, 网络连接错误,主动重试3次 + if (!result) { + // url 替换 ${} 变量 + for (int i = 0; i < 2; i++) { + if (!url.contains('${')) break + url = tplEngine.createTemplate(url).make(new HashMap(7) { + int paramIndex + @Override + boolean containsKey(Object key) { return true } // 加这行是为了 防止 MissingPropertyException + @Override + Object get(Object key) { + paramIndex++ // 获取个数记录 + if (super.containsKey(key)) return super.get(key) + def v = ctx.data.get(key) + // url前缀不必编码, 其它参数需要编码 + return v == null ? '' : (paramIndex==1 && v.toString().startsWith("http") && collector.url.startsWith('${') ? v : URLEncoder.encode(v.toString(), 'utf-8')) + } + }).toString() + } + + // body 替换 ${} 变量 + for (int i = 0; i < 2; i++) { + if (!bodyStr || !bodyStr.contains('${')) break + bodyStr = tplEngine.createTemplate(bodyStr).make(new HashMap(7) { + @Override + boolean containsKey(Object key) { return true } // 加这行是为了 防止 MissingPropertyException + @Override + Object get(Object key) { super.containsKey(key) ? super.get(key) : (ctx.data.get(key)?:"") } + }).toString() + } + try { + start = new Date() // 调用时间 + for (int i = 0, times = getInteger('http.retry', 2) + 1; i < times; i++) { // 接口一般遇网络错重试2次 + try { + retryMsg = i > 0 ? "(重试第${i}次)" : '' + if ('get'.equalsIgnoreCase(collector.method)) { + def h = http.get(url) + result = h.execute() + respCode = h.respCode + } else if ('post'.equalsIgnoreCase(collector.method)) { + def h = http.post(url) + result = h.textBody(bodyStr).contentType(collector.contentType).execute() + respCode = h.respCode + } else throw new Exception("Not support http method $collector.method") + break + } catch (ex) { + // ConnectException | ConnectionResetException | NoRouteToHostException | UnknownHostException + if ((ex instanceof ConnectException) && (i + 1) < times) { + log.warn(logMsg.toString() + ", 异常: " + (ex.class.simpleName + ': ' + ex.message)) + continue + } else throw ex + } finally { + spend = System.currentTimeMillis() - start.time + } + } + } catch (ex) { + log.error(logMsg.toString(), ex) + dataCollected(collector, ctx, cache, start, spend, '0001', result, ex, null, null, url, bodyStr) + return null + } finally { + retryMsg = '' + } + } else { + cache = true + } + + //3. 判断http返回结果是否为有效数据. 默认有效(0000) + String dataStatus = successFn ? (rehydrate2(successFn, ctx.data, this)(result, respCode) ? '0000' : '0001') : '0000' + + //4. 如果接口返回的是有效数据, 则缓存 + if ('0000' == dataStatus && dataKey && !cache) setCache(ctx, cacheTimeoutFn, dataKey, result) + + //5. 解析接口返回结果 + if (parseFn && dataStatus == '0000') { + Exception ex + try { + resolveResult = rehydrate2(parseFn, ctx.data, this)(result, respCode) + } catch (e) { + ex = e + } finally { + if (ex) log.error(logMsg.toString() + ", 解析函数执行失败", ex) + else log.info(logMsg.toString()) + dataCollected(collector, ctx, cache, start, spend, dataStatus, result, null, resolveResult, ex, url, bodyStr) + } + return resolveResult + } + + log.info(logMsg.toString()) + dataCollected(collector, ctx, cache, start, spend, dataStatus, result, null, resolveResult, null, url, bodyStr) + return dataStatus == '0000' ? result : null + }, testComputeFn: {param -> + // http请求 url + String url = collector.url + for (int i = 0; i < 2; i++) { // 替换 ${} 变量 + if (!url.contains('${')) break + url = tplEngine.createTemplate(url).make(new HashMap(7) { + int paramIndex + @Override + boolean containsKey(Object key) { return true } // 加这行是为了 防止 MissingPropertyException + @Override + Object get(Object key) { + paramIndex++ // 获取个数记录 + if (super.containsKey(key)) return super.get(key) + def v = param.get(key) + // url前缀不必编码, 其它参数需要编码 + return v == null ? '' : (paramIndex==1 && v.toString().startsWith("http") && collector.url.startsWith('${') ? v : URLEncoder.encode(v.toString(), 'utf-8')) + } + }).toString() + } + + // http 请求 body字符串 + String bodyStr = collector.bodyStr + for (int i = 0; i < 2; i++) { // 替换 ${} 变量 + if (!bodyStr || !bodyStr.contains('${')) break + bodyStr = tplEngine.createTemplate(bodyStr).make(new HashMap(7) { + @Override + boolean containsKey(Object key) { return true } // 加这行是为了 防止 MissingPropertyException + @Override + Object get(Object key) { super.containsKey(key) ? super.get(key) : (param.get(key)?:"") } + }).toString() + } + // NOTE: 如果是json 并且是,} 结尾, 则删除 最后的,(因为spring解析入参数会认为json格式错误) + // if (bodyStr.endsWith(',}')) bodyStr = bodyStr.substring(0, bodyStr.length() - 3) + '}' + + String result // 接口返回结果字符串 + def resolveResult // 解析接口返回结果 + + Integer respCode //http响应码 + if ('get'.equalsIgnoreCase(collector.method)) { + def h = http.get(url) + result = h.debug().execute() + respCode = h.respCode + } else if ('post'.equalsIgnoreCase(collector.method)) { + def h = http.post(url) + result = h.textBody(bodyStr).contentType(collector.contentType).debug().execute() + respCode = h.respCode + } else throw new Exception("Not support http method $collector.method") + + // http 返回结果成功判断. 默认成功 + String dataStatus = successFn ? (rehydrate2(successFn, param, this)(result, respCode) ? '0000' : '0001') : '0000' + + if (parseFn && dataStatus == '0000') { // 解析接口返回结果 + resolveResult = rehydrate2(parseFn, param, this)(result, respCode) + if (resolveResult instanceof Map) { + return resolveResult.collectEntries {e -> [e.key, e.value instanceof Closure ? e.value() : e.value]} + } + return resolveResult + } + return dataStatus == '0000' ? result : null + })) + } + + + /** + * 计算收集器的数据缓存key + * @param collector 收集器 + * @param ctx 当前执行上下文 + * @return dataKey + */ + protected String computeCollectDataKey(DataCollector collector, DecisionContext ctx) { + if (!collector.cacheKey) return collector.id //未配置,dataKey为收集器id + String dataKey = collector.cacheKey + if (dataKey.contains('${')) { + def tplEngine = new GStringTemplateEngine(Thread.currentThread().contextClassLoader) + for (int i = 0; i < 2; i++) { // 替换 ${} 变量 + if (!dataKey.contains('${')) break + dataKey = tplEngine.createTemplate(dataKey).make(new HashMap(1) { + @Override + boolean containsKey(Object key) { true } // 加这行是为了 防止 MissingPropertyException + @Override + Object get(Object key) { super.containsKey(key) ? super.get(key) : ctx.data.get(key) } + }).toString() + } + } + + return collector.id + '_' + dataKey + } + + + /** + * 缓存结果 + * @param ctx 当前执行上下文 + * @param timeoutFn 缓存时间计算函数 + * @param dataKey 缓存数据key + * @param result 要缓存的数据 + */ + protected void setCache(DecisionContext ctx, Closure timeoutFn, String dataKey, def result) { + def cacheTimeout = rehydrate2(timeoutFn, ctx.data, this)() + if (cacheTimeout instanceof Date) { + long v = cacheTimeout.time - System.currentTimeMillis() + if (v < 1000) { + log.debug(ctx.logPrefix() + "缓存过期时间不能小于当前时间. dataKey: " + dataKey) + return + } + cacheTimeout = Duration.ofMillis(v) + } else if (cacheTimeout instanceof Integer) { + if (cacheTimeout <= 0) return + cacheTimeout = Duration.ofMinutes(cacheTimeout) + } else if (cacheTimeout instanceof Duration) { + + } else throw new RuntimeException("缓存过期时间函数返回类型错误") + if (cacheTimeout.seconds <= 0) return + String key = getStr("collectorCacheKeyPrefix", "collector") +":"+ dataKey + if (redis) { + redis.set(key, result.toString()) + redis.expire(key, cacheTimeout.seconds) + } + else if (cacheSrv) { + cacheSrv.set(key, result, cacheTimeout) + } + } + + + /** + * 构建收集器 缓存时间计算函数 + * @param collector 收集器 + */ + protected Closure buildCacheTimeoutFn(DataCollector collector) { + if (collector.cacheTimeoutFn) { + Binding binding = new Binding() + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(JSON.class.name, JSONObject.class.name, Utils.class.name) + return new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("{ -> $collector.cacheTimeoutFn }") + } + null + } + + + /** + * 收集器 Holder + */ + class CollectorHolder { + // 对应数据库中的实体 + DataCollector collector + // 把收集器转换的执行函数 + Function computeFn + // 数据收集上下文唯一key: 用于标识当前执行上下文是否需要重复计算当前收集器的结果 + Function dataKeyFn + // 单元测试函数 + Function testComputeFn + // DB + DB db + + void close() { + db.close() + } + + + /** + * 属性值收集 + * @param aName 属性名 + * @param ctx 执行上下文 + * @return 属性值 + */ + def populate(String aName, DecisionContext ctx) { + String dataKey = dataKeyFn.apply(ctx) //数据key,判断是否需要重新执行收集器的计算函数拿结果 + // 值get函数 + def valueGetFn = { -> + def collectResult = ctx.dataCollectResult.get(dataKey) + if (collectResult instanceof Map) { //收集器有多个属性的值 + def value + String key + if (collectResult.containsKey(aName)) { + key = aName + value = collectResult.get(key) + } else { + key = fieldManager.alias(aName) + value = collectResult.get(key) + } + if (value instanceof Closure) { // 延迟计算函数,只计算一次 + value = value() + collectResult.put(key, value) + } + return value + } else if (collectResult instanceof Closure) { + log.error(ctx.logPrefix() + "收集器'${collector.name}(${collector.id})'结果不能是个函数") + } + return collectResult + } + // 收集器已经执行过 + if (ctx.dataCollectResult.containsKey(dataKey)) return valueGetFn() + + ctx.dataCollectResult.put(dataKey, null) //占位,避免循环计算 + // 函数执行 + log.debug(ctx.logPrefix() + "Get '${aName}' value apply function: '${collector.name}(${collector.id})'".toString()) + def collectResult = null + try { + collectResult = computeFn.apply(ctx) + } catch (ex) { // 接口执行报错, 默认继续往下执行规则 + log.error(ctx.logPrefix() + "数据收集器'${collector.name}(${collector.id})' 执行错误".toString(), ex) + } + ctx.dataCollectResult.put(dataKey, collectResult) + return valueGetFn() + } + } +} \ No newline at end of file diff --git a/src/service/rule/DecideResult.groovy b/src/service/rule/DecideResult.groovy new file mode 100644 index 0000000000000000000000000000000000000000..3fb24a6567a7bd206f113a09f217b0ba9c1f6961 --- /dev/null +++ b/src/service/rule/DecideResult.groovy @@ -0,0 +1,18 @@ +package service.rule + +/** + * 决策结果 + */ +enum DecideResult { + Accept("通过", false), Reject("拒绝", true), Review("人工审核", false) + String cn + /** + * 是否阻断往下执行 + */ + boolean block + + DecideResult(String cn, boolean block) { + this.cn = cn + this.block = block + } +} \ No newline at end of file diff --git a/src/service/rule/DecisionContext.groovy b/src/service/rule/DecisionContext.groovy new file mode 100644 index 0000000000000000000000000000000000000000..3279b602aa3aa64f6dfe4e41a6b89020a794773e --- /dev/null +++ b/src/service/rule/DecisionContext.groovy @@ -0,0 +1,412 @@ +package service.rule + +import cn.xnatural.enet.event.EC +import cn.xnatural.enet.event.EP +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import service.rule.spec.* + +import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.atomic.AtomicInteger + +/** + * 决策执行上下文 + */ +class DecisionContext { + public static final Logger log = LoggerFactory.getLogger(DecisionContext) + // 决策执行标识(id) + final String id + // 开始时间 + final Date startup = new Date() + // 当前正在执行的策略 + final DecisionHolder decisionHolder + // 字段管理器 + final FieldManager fieldManager + // 事件中心: 用于通知策略执行过程中的产生想事件 + final EP ep + // 输入参数 + final Map input + + // 执行过程中的产生的所有数据 + @Lazy Map data = new Data(this) + // 子决策 执行统计 + @Lazy Map delegateDecisionCount = [:] + // 执行的策略集 + final List policies = new LinkedList<>() + // 数据key -> 数据收集结果集. 不用 ConcurrentHashMap 因为不能放null值 + final Map dataCollectResult = new LinkedHashMap<>() + // 过程数据: 决策(非策略,规则) + final Map decisionData = new LinkedHashMap<>() + + // 是否已启动 + protected final def started = new AtomicBoolean(false) + // 是否执行结束 + protected final def end = new AtomicBoolean(false) + // 当前正在执行的策略 + protected PassedSpec curPassedPolicy + // 当前正在执行的规则 + protected PassedSpec curPassedRule + // 当前正在执行的评分卡 + protected PassedSpec curPassedScorecard + // 当前正在执行的子决策 + protected PassedSpec curPassedDecision + + // 执行结果 异常 + protected Throwable exception + // 执行状态 初始化status: 0001, 结束status: 0000, 错误status: EEEE + protected String status = '0001' + // 最终决策结果 + DecideResult decideResult + + + DecisionContext(String id, DecisionHolder decisionHolder, Map input, FieldManager fieldManager, EP ep) { + this.id = id?:UUID.randomUUID().toString().replace('-', '') + this.decisionHolder = decisionHolder + this.input = input + this.fieldManager = fieldManager + this.ep = ep + } + + + /** + * 开始执行流程 + */ + void start() { + if (!started.compareAndSet(false, true)) return + log.info(logPrefix() + "开始") + trigger() + } + + + /** + * 触发执行流程: 遍历策略, 遍历规则 + */ + protected final void trigger() { + if (end.get()) return + try { + decideResult = decisionHolder.spec.compute(this) + end.set(true); decideResult = decideResult?:DecideResult.Accept; status = '0000' + log.info(logPrefix() + "结束成功. 共执行: " + (summary()['spend']) + "ms. result: " + result()) + ep?.fire("decision.end", this) + } catch (Throwable ex) { + end.set(true); decideResult = DecideResult.Reject; status = 'EEEE'; this.exception = ex + log.error(logPrefix() + "结束错误. 共执行: " + (summary()['spend']) + "ms. result: " + result(), ex) + ep?.fire("decision.end", this) + } + } + + + /** + * 执行策略 + * @param spec + * @return {@link DecideResult} + */ + DecideResult run(PolicySpec spec) { + curPassedPolicy = new PassedSpec(spec: spec, attrs: [策略名: spec.策略名, *:spec.attrs]) + policies.add(curPassedPolicy) + log.debug(logPrefix() + "开始执行") + DecideResult result = spec.compute(this) + curPassedPolicy.result = result + log.info(logPrefix() + "结束执行. result: " + result + ", data: " + (curPassedPolicy.data?:null)) + curPassedPolicy = null + result + } + + + /** + * 执行规则 + * @param spec + * @return {@link DecideResult} + */ + DecideResult run(RuleSpec spec) { + curPassedRule = new PassedSpec(spec: spec, attrs: [规则名: spec.规则名, *:spec.attrs]) + curPassedPolicy.items.add(curPassedRule) + log.debug(logPrefix() + "开始执行") + DecideResult result = spec.compute(this) + curPassedRule.result = result + log.info(logPrefix() + "结束执行. result: " + result + ", data: " + (curPassedRule.data?:null)) + curPassedRule = null + result + } + + + /** + * 执行评分卡 + * @param spec + * @return {@link DecideResult} + */ + def run(ScorecardSpec spec) { + curPassedScorecard = new PassedSpec(spec: spec, attrs: [评分卡名: spec.评分卡名, *:spec.attrs]) + curPassedPolicy.items.add(curPassedScorecard) + log.debug(logPrefix() + "开始执行") + def result = spec.compute(this) + curPassedScorecard.result = result + log.info(logPrefix() + "结束执行. result: " + result + ", data: " + (curPassedScorecard.data?:null)) + curPassedScorecard = null + result + } + + + /** + * 执行子决策 + * @param spec + * @return {@link DecideResult} + */ + DecideResult run(DelegateDecisionSpec spec) { + // 根据 决策id 找到对应的 决策 + def holder = bean(DecisionManager).findDecision(spec.决策id) + if (!holder) throw new IllegalArgumentException("决策id($spec.决策id) 未找到对应的决策") + + curPassedDecision = new PassedSpec(spec: holder.spec, attrs: [决策id: spec.决策id, 决策名: holder.spec.决策名, *:holder.spec.attrs]) + curPassedPolicy.items.add(curPassedDecision) + log.debug(logPrefix() + "开始执行") + + DecideResult result = spec.compute(this) + + curPassedDecision.result = result + curPassedDecision = null + result + } + + + /** + * 设置属性 + * @param aName 属性名 + * @param value 属性值 + */ + void setAttr(String aName, Object value) { data.put(aName, value) } + + + /** + * 过程数据记录: 规则中, 策略中, 决策中 + * 当前如果是正在执行规则,则记录到规则数据 + * 当前如果是正在执行评分卡,则记录到评分卡数据 + * 当前如果是正在执行子决策,则记录到子决策数据 + * 当前如果是正在执行策略,则记录到策略数据 + * 当前如果是正在执行决策,则记录到决策数据 + * @param key 属性key + * @param value 属性值 + */ + protected void recordData(String key, Object value) { + if (end.get()) return + if (curPassedRule) curPassedRule.data.put(key, value) + else if (curPassedScorecard) curPassedScorecard.data.put(key, value) + else if (curPassedDecision) curPassedDecision.data.put(key, value) + else if (curPassedPolicy) curPassedPolicy.data.put(key, value) + else decisionData.put(key, value) + } + + + /** + * 数据存放. 用于规则闭包执行上下文 + */ + protected class Data extends LinkedHashMap { + final DecisionContext ctx + /** + * 属性值来源: 为了解决优先级,及重新获取的问题 + * 优先级: 执行上下文设置 > input > 收集器(可重复计算) + */ + final Map valueFromMap = new HashMap<>() + + Data(DecisionContext ctx) {this.ctx = ctx} + + + /** + * 查找已存在的属性 + * @param aName 属性名 + * @return 属性值 + */ + Object find(Object aName) { super.get(aName) } + + + @Override + Object get(Object aName) { + if (aName == null) return null + // 函数名 + if (ctx.decisionHolder.spec.globalFunctions.containsKey(aName)) return null + + if (!ctx.end.get()) { + // 属性值已存在 + if (super.containsKey(aName)) { + // 判断是否需要重尝试新计算 + if (valueFromMap.get(aName) == 'collector') { + safeSet((String) aName, ctx.getFieldManager().dataCollect(aName.toString(), ctx), 'collector') + } + } else { // 第一次获取属性值 + safeSet(aName.toString(), null, null) // 占位. 解决 循环属性获取链 + boolean fromInput = false + if (ctx.input) { //数据源1: 先从入参里面获取 + if (ctx.input.containsKey(aName)) { + fromInput = true + safeSet((String) aName, ctx.input.get(aName), 'input') + } else { + def alias = ctx.getFieldManager().alias(aName) + if (alias != null && ctx.input.containsKey(alias)) { + fromInput = true + safeSet((String) aName, ctx.input.get(alias), 'input') + } + } + } + if (!fromInput) { //数据源2: 再从数据收集器获取 + safeSet((String) aName, ctx.getFieldManager().dataCollect(aName.toString(), ctx), 'collector') + } + } + } + def value = super.get(aName) + if (value instanceof Optional) value = value.orElse(null) + + ctx.recordData(aName.toString(), value) + return value + } + + // 1. 转换成具体类型, 再保存; 2. 同时保存别名的值; 3. 保存值来源 + protected Object safeSet(String key, Object value, String from) { + if (value instanceof Optional) { + value = value.present ? Optional.ofNullable(ctx.getFieldManager().convert(key, value.get())) : value + } else { + value = ctx.getFieldManager().convert(key, value) // 属性值类型转换 + } + super.put(key, value) + valueFromMap.put(key, from) + + def n = ctx.getFieldManager().alias(key) + if (n && n != key) { + super.put(n, value) + valueFromMap.put(n, from) + } + + value + } + + @Override + Object put(String key, Object value) { + ctx.recordData(key, safeSet(key, value, 'byHand')) + value + } + + @Override + Object remove(Object key) { // 删除缓存 + def r = super.remove(key) + def field = ctx.getFieldManager().fieldHolders.get(key)?.field + if (field) { + super.remove(field.enName) + super.remove(field.cnName) + // ctx.dataCollectResult.remove(field.dataCollector) + valueFromMap.remove(field.enName) + valueFromMap.remove(field.cnName) + } + return r + } + } + + + /** + * 执行过的spec模块 + */ + protected class PassedSpec { + // spec + transient BaseSpec spec + // 结果 + def result + // 属性 + Map attrs + // 执行过程中产生的或用到的数据集 + final Map data = new LinkedHashMap() + // 子模块 + @Lazy List items = new LinkedList<>() + + @Override + String toString() { + return [attrs: attrs, result: result, data: data, items: items].toMapString() + } + } + + + // 日志前缀 + String logPrefix() { + "[${id? "$id, " :''}${decisionHolder.decision.decisionId? "决策: $decisionHolder.spec.决策id" :''}${ -> curPassedPolicy? ", 策略: " + curPassedPolicy.spec.name() :''}${ -> curPassedRule ? ", 规则: " + curPassedRule.spec.name() :''}${ -> curPassedScorecard ? ", 评分卡: " + curPassedScorecard.spec.name() :''}${ -> curPassedDecision ? ", 子决策: " + curPassedDecision.spec.name() + "(" + curPassedDecision.spec.决策id + ")":''}] -> " + } + + + /** + * 整条决策 所有信息 + */ + private Map _summary + Map summary() { + if (this._summary && end.get()) return this._summary + //去重复记录(去对应的中文, 保留对应的英文) + def cleanData = {Map data -> + data ? data.collect { e -> + def value = e.value instanceof Optional ? e.value.orElse(null) : e.value + def field = fieldManager.fieldHolders.get(e.key)?.field + if (field && field.cnName == e.key) return [field.enName, value] + return [e.key, value] + }.collectEntries() : null + } + this._summary = [ + id : id, //执行决策id + decisionId : decisionHolder.decision.decisionId, //决策id + spend : System.currentTimeMillis() - startup.time, //执行花费时间 + occurTime : startup, //決策发生时间 + result : decideResult, //结果 + input : input, //输入参数 + status : status, //初始化status: 0001, 结束status: 0000, 错误status: EEEE + exception : exception?.toString(), //异常信息 + data : cleanData(data), //执行过程产生的最终数据集 + detail : [ //执行详情, 过程详情 + data : cleanData(decisionData), //只和决策相关(和具体策略,规则无关)的数据 + attrs : decisionHolder.spec.attrs?:null, //决策自定义属性集 + policies: policies.collect { policy -> //执行过的策略集 + [ + attrs: policy.attrs, result: policy.result, data: cleanData(policy.data), //只和策略相关(和具体规则无关)的数据 + items: policy.items.collect { item -> + [attrs: item.attrs, result: item.result, data: cleanData(item.data) /* 和具体规则相关的数据 */] + } + ] + } + ], + // 执行过程中数据收集的结果集 + dataCollectResult: dataCollectResult?.collectEntries {e -> + if (e.value instanceof Map) { + return [e.key, ((Map) e.value).findAll {!(it.value instanceof Closure)}] + } + return e + }?:null + ] + this._summary + } + + + /** + * 决策结果输出 + */ + Map result() { + [ + decideId: id, result: decideResult, decisionId: decisionHolder.decision.decisionId, + status : status, + desc : exception?.toString(), + data : end.get() && decisionHolder.spec.returnAttrs ? decisionHolder.spec.returnAttrs.collectEntries { name -> + def v = data.get(name) + if (v instanceof Optional) {v = v.orElse(null)} + def field = fieldManager.fieldHolders.get(name)?.field + //如果key是中文, 则翻译成对应的英文名 + if (field && field.cnName == name) return [field.enName, v] + else return [name, v] + } : null + ] + } + + + /** + * 全局查找 bean + * @param type bean类型 + * @param name bean名字 + * @return bean + */ + def T bean(Class type, String name = null) { return ep == null ? null : (T) ep.fire("bean.get", EC.of(this).sync().args(type, name)) } + + + + @Override + String toString() { result().toString() } +} diff --git a/src/service/rule/DecisionHolder.groovy b/src/service/rule/DecisionHolder.groovy new file mode 100644 index 0000000000000000000000000000000000000000..dbede5b3f90836a683f39ed3741c84f0d98677e4 --- /dev/null +++ b/src/service/rule/DecisionHolder.groovy @@ -0,0 +1,18 @@ +package service.rule + +import entity.Decision +import service.rule.spec.DecisionSpec + +import java.util.function.Function + +/** + * 决策 Holder + */ +class DecisionHolder { + // 对应实体 decision + Decision decision + // dsl spec + DecisionSpec spec + // 参数验证函数 + Function, Boolean> paramValidator +} diff --git a/src/service/rule/DecisionManager.groovy b/src/service/rule/DecisionManager.groovy new file mode 100644 index 0000000000000000000000000000000000000000..d23b60b867da0daf5e4ef627028315ccc6e9d5ba --- /dev/null +++ b/src/service/rule/DecisionManager.groovy @@ -0,0 +1,262 @@ +package service.rule + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.enet.event.EC +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Repo +import cn.xnatural.remoter.Remoter +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import entity.Decision +import entity.FieldType +import org.codehaus.groovy.control.CompilerConfiguration +import org.codehaus.groovy.control.customizers.ImportCustomizer +import service.rule.spec.DecisionSpec + +import java.text.SimpleDateFormat +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.atomic.AtomicInteger +import java.util.function.Function +import java.util.regex.Pattern + +/** + * 决策管理器 + */ +class DecisionManager extends ServerTpl { + @Lazy def repo = bean(Repo, 'jpa_rule_repo') + + final Map decisionMap = new ConcurrentHashMap<>() + + + /** + * 查找 决策 + * @param decisionId + * @return DecisionHolder + */ + DecisionHolder findDecision(String decisionId) { + def holder = decisionMap.get(decisionId) + if (holder == null) { + initDecision(repo.find(Decision) { root, query, cb -> cb.equal(root.get('decisionId'), decisionId)}) + holder = decisionMap.get(decisionId) + } + return holder + } + + + @EL(name = ['decision.delete', 'decision.update', 'decision.create', 'decision.dataVersion'], async = true) + protected void listenDecisionChange(EC ec, String id) { + def decision = repo.findById(Decision, id) + if (decision == null) { + decisionMap.remove(id) + log.info("delDecision: " + id) + } else { + log.info("decisionChanged: " + decision.name + ", " + decision.decisionId + ", " + decision.id) + initDecision(decision) + } + def remoter = bean(Remoter) + if (remoter && ec?.source() != remoter) { // 不是远程触发的事件 + remoter.dataVersion('decision').update(id, decision ? decision.updateTime.time : System.currentTimeMillis(), null) + } + } + + + /** + * 加载所有决策 + */ + @EL(name = 'jpa_rule.started', async = true) + void load() { + final Set ids = (decisionMap ? ConcurrentHashMap.newKeySet(decisionMap.size()) : null) + final def threshold = new AtomicInteger(1) + final def tryComplete = { + if (threshold.decrementAndGet() > 0) return + if (ids) { // 删除库里面没有, 内存里面有的数据 + decisionMap.findAll {!ids.contains(it.key)}.each { + decisionMap.remove(it.key) + } + } + } + for (int page = 0, limit = 10; ; page++) { + def ls = repo.findList(Decision, page * limit, limit) + threshold.incrementAndGet() + async { // 异步加载 + ls.each { decision -> + ids?.add(decision.decisionId) + try { + initDecision(decision) + } catch (ex) { + log.error("加载决策'${decision.name}:${decision.decisionId}'错误", ex) + } + } + tryComplete() + } + if (!ls || ls.size() < limit) { + tryComplete(); break + } + } + } + + + /** + * 初始化决策 + */ + protected void initDecision(Decision decision) { + if (!decision || !decision.dsl) return + def spec = DecisionSpec.of(decision.dsl) + def apiConfig = decision.apiConfig ? JSON.parseArray(decision.apiConfig) : null + Map> validFunMap = [:] + Map patternMap = [:] + decisionMap.put(spec.决策id, new DecisionHolder(decision: decision, spec: spec, paramValidator: (apiConfig ? {Map params -> + apiConfig.each { JSONObject paramCfg -> + String code = paramCfg.getString('code') // 参数code + // TODO 忽略 async 后边改成用路径参数 + if (code == "async") return + def value = params.get(code) + if (paramCfg.getBoolean('require') && value == null) { // 必传验证 + throw new IllegalArgumentException("Param '$code' require") + } + def fixValue // 固定值 + def enumValues // 枚举值 + Pattern pattern // 正则验证 + Function validFun // 函数验证 + def type = FieldType.valueOf(paramCfg.getString('type')) // 参数类型. FieldType + if (type == null || !FieldType.enumConstants.find {it == type}) throw new Exception("参数验证类型配置错误. type: $type") + + if (FieldType.Bool == type) { // Boolean 值验证 + if (value == null) value = paramCfg.getBoolean('defaultValue') + if (value != null) { + if (!'true'.equalsIgnoreCase(value.toString()) && !'false'.equalsIgnoreCase(value.toString())) { + throw new IllegalArgumentException("Param '$code' type is boolean. value is 'true' or 'false'") + } + value = value instanceof Boolean ? value : Boolean.valueOf(value.toString()) + } + fixValue = paramCfg.getBoolean('fixValue') + } + if (FieldType.Int == type) { // 整数验证 + if (value == null) value = paramCfg.getLong('defaultValue') + if (value != null) { + try { + value = value instanceof Long ? value : Long.valueOf(value) + } catch (ex) { + throw new IllegalArgumentException("Param '$code' is not a number. value: $value", ex) + } + def min = paramCfg.getLong('min') + if (min != null && value < min) { + throw new IllegalArgumentException("Param '$code' must >= $min") + } + def max = paramCfg.getLong('max') + if (max != null && value > max) { + throw new IllegalArgumentException("Param '$code' must <= $max") + } + } + fixValue = paramCfg.getLong('fixValue') + enumValues = paramCfg.getJSONArray('enumValues')?.findAll{it} + } + if (FieldType.Decimal == type) { // 小数验证 + if (value == null) value = paramCfg.getBigDecimal('defaultValue') + if (value != null) { + try { + value = value instanceof BigDecimal ? value : new BigDecimal(value.toString()) + } catch (ex) { + throw new IllegalArgumentException("Param '$code' is not a decimal. value: $value", ex) + } + def min = paramCfg.getBigDecimal('min') + if (min != null && value < min) { + throw new IllegalArgumentException("Param '$code' must >= $min") + } + def max = paramCfg.getBigDecimal('max') + if (max != null && value > max) { + throw new IllegalArgumentException("Param '$code' must <= $max") + } + } + fixValue = paramCfg.getBigDecimal('fixValue') + enumValues = paramCfg.getJSONArray('enumValues')?.findAll{it} + } + if (FieldType.Str == type) { // 字符串验证 + if (value == null) value = paramCfg.getString('defaultValue') + if (value != null) { + def maxLength = paramCfg.getInteger('maxLength') + if (maxLength != null && value.toString().length() > maxLength) { + throw new IllegalArgumentException("Param '$code' length must < $maxLength") + } + def fixLength = paramCfg.getInteger('fixLength') + if (fixLength != null && value.toString().length() != fixLength) { + throw new IllegalArgumentException("Param '$code' length must equal $fixLength") + } + } + fixValue = paramCfg.getString('fixValue') + enumValues = paramCfg.getJSONArray('enumValues')?.findAll{it} + if (paramCfg.getString('regex')) { + pattern = patternMap.get(code) + if (pattern == null) { + pattern = Pattern.compile(paramCfg.getString('regex')) + patternMap.put(code, pattern) + } + } + if (paramCfg.getString('validFun')) { + validFun = validFunMap.get(code) + if (validFun == null) { + Binding binding = new Binding() + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(Utils.class.name) + validFun = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("${paramCfg.getString('validFun')}") as Function + validFunMap.put(code, validFun) + } + } + } + if (FieldType.Time == type) { // 时间验证 + if (value == null) value = paramCfg.getString('defaultValue') + if (value != null) { + String format = paramCfg.getString('format') + if (!format) throw new IllegalArgumentException("Param '$code' type is Time, format must config") + try { + // if (value.toString().length() != format.length()) throw new Exception() + new SimpleDateFormat(format).parse(value.toString()) + } catch (ex) { + throw new IllegalArgumentException("Param '$code' format error. format: $format, value: $value") + } + } +// def min = paramCfg.getDate('min') +// if (min != null && value < min) { +// throw new IllegalArgumentException("Param '$code' must >= ${paramCfg.getString('min')}") +// } +// def max = paramCfg.getDate('max') +// if (max != null && value > max) { +// throw new IllegalArgumentException("Param '$code' must <= ${paramCfg.getString('max')}") +// } +// fixValue = paramCfg.getDate('fixValue') +// enumValues = paramCfg.getJSONArray('enumValues')?.collect {JSONObject jo -> jo?.getDate('value')}?.findAll{it} + } + + if (value) { + if (fixValue != null) { // 固定值验证 + if (value != fixValue) { + throw new IllegalArgumentException("Param '$code' value fixed be '$fixValue'") + } + } + if (enumValues) { // 枚举值验证 + if (!enumValues.find {it == value}) { + throw new IllegalArgumentException("Param '$code' enum values: '${enumValues.join(",")}'") + } + } + if (pattern) { // 正则验证 + if (!pattern.matcher(value.toString()).find()) { + throw new IllegalArgumentException("Param '$code' regex not match: '$value'") + } + } + if (validFun) { + if (!validFun.apply(value)) { + throw new IllegalArgumentException("Param '$code' function valid fail: '$value'") + } + } + } + + if (value != null || params.containsKey(code)) params.put(code, value) // 类型矫正 + } + true + } : null))) + log.info("初始化决策(${decision.id}): ${decision.name}, ${decision.decisionId}".toString()) + } +} diff --git a/src/service/rule/DecisionSrv.groovy b/src/service/rule/DecisionSrv.groovy new file mode 100644 index 0000000000000000000000000000000000000000..2787d27459009180cf272aa8ee786091dbaf91ba --- /dev/null +++ b/src/service/rule/DecisionSrv.groovy @@ -0,0 +1,252 @@ +package service.rule + +import cn.xnatural.app.Inject +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.serializer.SerializerFeature +import core.OkHttpSrv +import entity.CollectRecord +import entity.DecideRecord +import entity.Lock + +import java.text.SimpleDateFormat +import java.time.Duration + +/** + * 决策Service + */ +class DecisionSrv extends ServerTpl { + protected static final String SAVE_RESULT = 'save_result' + + @Inject + protected OkHttpSrv http + @Inject(name = 'jpa_rule_repo') + protected Repo repo + @Inject + protected DecisionManager decisionManager + @Inject + protected FieldManager fieldManager + // 是否异步保存决策结果 + @Lazy + protected asyncSave = getBoolean("asyncSave", false) + + + @EL(name = 'sys.starting', async = true) + protected void init() { + // 配置 异步保存决定结果 对列执行器 + if (asyncSave) { + Long lastWarn // 上次告警时间 + queue(SAVE_RESULT) + .failMaxKeep(getInteger(SAVE_RESULT + ".failMaxKeep", 10000)) + .parallel(getInteger("saveResult.parallel", 5)) + .errorHandle {ex, me -> + if (lastWarn == null || (System.currentTimeMillis() - lastWarn >= Duration.ofSeconds(getLong(SAVE_RESULT + ".warnInterval", 60 * 3L)).toMillis())) { + lastWarn = System.currentTimeMillis() + log.error("保存决策结果到数据库错误", ex) + ep.fire("globalMsg", "保存决策结果到数据库错误: " + (ex.message?:ex.class.simpleName)) + } + // 暂停一会 + me.suspend(Duration.ofMillis(500 + new Random().nextInt(1000))) + } + } + } + + + @EL(name = 'sys.stopping', async = true) + protected void stop() { + // 尽量等到 对列中的 数据都持久化完成 + long start = System.currentTimeMillis() + if (asyncSave) { + if (queue(SAVE_RESULT).waitingCount > 0) log.warn("等待决策结果数据保存完...") + while (queue(SAVE_RESULT).waitingCount > 0 && System.currentTimeMillis() - start < 1000 * 60 * 2) { + Thread.sleep(500) + } + } + } + + + /** + * 执行一条决策 + * @param decisionId 决策id {@link entity.Decision#decisionId} + * @param decideId 决策执行id, 用于记录是哪次执行 + * @param isAsync 是否异步执行, 不等执行结果 + * @param input 输入 + * @return DecisionContext {@link DecisionContext} + */ + DecisionContext decide(String decisionId, String decideId, boolean isAsync, Map input) { + if (!decisionId) { + throw new IllegalArgumentException('Param decisionId required') + } + def decisionHolder = decisionManager.findDecision(decisionId) + if (decisionHolder == null) { + throw new IllegalArgumentException("Not found decision: $decisionId") + } + decisionHolder.paramValidator?.apply(input) // 参数验证 + decideId = decideId?:UUID.randomUUID().toString().replace("-", "") + + log.info("Run decision. decisionId: " + decisionId + ", id: " + decideId + ", input: " + input) + DecisionContext dCtx = new DecisionContext(decideId, decisionHolder, input, fieldManager, ep) + + // 初始化status: 0001, 结束status: 0000, 错误status: EEEE + repo.saveOrUpdate(new DecideRecord( + id: dCtx.id, decisionId: decisionHolder.decision.id, occurTime: dCtx.startup, status: '0001', + input: JSON.toJSONString(dCtx.input, SerializerFeature.WriteMapNullValue) + )) + + if (isAsync) async { dCtx.start() } + else dCtx.start() + return dCtx + } + + + + /** + * 系统全局消息 + * @param msg + */ + @EL(name = 'globalMsg', async = true) + void globalMsg(String msg) { + log.info("系统消息: " + msg) + ep.fire("wsMsg_rule", msg) + String url = getStr('ddMsgNotifyUrl', null) + if (url) { + http.post(url).jsonBody(JSON.toJSONString([ + msgtype: "text", + text: ["content": "GRULE(${app().profile}): $msg".toString()], + at: ["isAtAll": false] + ])).debug().execute() + } + } + + + // 决策执行结果监听 + @EL(name = 'decision.end') + void endDecision(DecisionContext ctx) { + log.info("end decision: " + JSON.toJSONString(ctx.summary(), SerializerFeature.WriteMapNullValue)) + + // 保存决策结果到数据库 + final Runnable doSave = () -> { + repo.saveOrUpdate( + repo.findById(DecideRecord, ctx.id).tap { + status = ctx.status + exception = ctx.summary()['exception'] + result = ctx.summary()['result'] + spend = ctx.summary()['spend'] + data = JSON.toJSONString(ctx.summary()['data'], SerializerFeature.WriteMapNullValue) + detail = JSON.toJSONString(ctx.summary()['detail'], SerializerFeature.WriteMapNullValue) + def dr = ctx.summary()['dataCollectResult'] + if (dr) dataCollectResult = JSON.toJSONString(dr, SerializerFeature.WriteMapNullValue) + } + ) + } + if (asyncSave) queue(SAVE_RESULT, doSave) + else doSave.run() + + // 调用如果传了 callback(回调Url), 则会在决策执行完成后把结果回给此url + String cbUrl = ctx.input['callback'] + if (cbUrl?.startsWith('http')) { + async { + def result = JSON.toJSONString(ctx.result(), SerializerFeature.WriteMapNullValue) + for (i in 0..< getInteger("callbackMaxTry", 2)) { + try { + http.post(cbUrl).jsonBody(result).debug().execute() + break + } catch (ex) { + log.error("call back result error", ex) + } + } + } + } + } + + + /** + * 计划清理过期DecideRecord数据 + */ + void cleanDecideRecord() { + def lock = new Lock(name: 'cleanDecideRecord', comment: "清理过期数据") + // 执行清理逻辑 + def doClean = { + long cleanTotal = 0 + + // DecideRecord 清理函数 + def clean = {DecideRecord dr -> + int count = repo.trans { session -> + // 删除关联的 收集器记录 + session.createQuery("delete from CollectRecord where decideId=:decideId") + .setParameter("decideId", dr.id).executeUpdate() + session.createQuery("delete from DecideRecord where id=:id") + .setParameter("id", dr.id).executeUpdate() + } + cleanTotal += count + // 持续更新锁时间 + if (cleanTotal % 20 == 0) repo.saveOrUpdate(lock) + log.info("Deleted expire decideRecord data: {}", JSON.toJSONString(dr)) + } + + //保留多少条数据 + def keepCount = getLong("decideRecord.keepCount", 0) + if (keepCount > 0) { + for (long total = repo.count(DecideRecord); total > keepCount; total--) { + clean(repo.find(DecideRecord) { root, query, cb -> query.orderBy(cb.asc(root.get("occurTime")))}) + // 为了防止有多个进程在删, 所以每隔10次 重新去统计总, 减少删除误差 + if (cleanTotal % getInteger("deleteUnit", 10) == 0) { + total = repo.count(DecideRecord) + } + } + } + + //保留多天的数据,如果 配置了decideRecord.keepCount 则不执行此清理 + def keepDay = getInteger("decideRecord.keepDay", 0) + if (keepDay > 0 && !keepCount) { + def cal = Calendar.getInstance() + cal.add(Calendar.DAY_OF_MONTH, -keepDay) + do { + def dr = repo.find(DecideRecord) { root, query, cb -> query.orderBy(cb.asc(root.get("occurTime")))} + if (dr.occurTime == null || dr.occurTime < cal.time) clean(dr) + else break + } while (true) + } + return cleanTotal + } + try { + repo.saveOrUpdate(lock) + async { + try { + def total = doClean() + ep.fire("globalMsg", "清理过期决策数据结束. 共计: " + total) + } finally { + repo.delete(lock) + } + if (getBoolean("optimizeTable", false)) { + repo.execute("optimize table " + repo.tbName(DecideRecord)) + repo.execute("optimize table " + repo.tbName(CollectRecord)) + } + } + } catch (ex) { + def cause = ex + while (cause != null) { + if (cause.message.contains("Duplicate entry")) { + def exist = repo.find(Lock) {root, query, cb -> cb.equal(root.get("name"), lock.name)} + if (exist) { + // 当锁隔一段时间没有被更新 就会删除锁, 防止系统意外down,而锁未来的及删的情况发生 + if (System.currentTimeMillis() - exist.updateTime.time > Duration.ofMinutes(getLong("lockTimeout", 30)).toMillis()) { + repo.delete(exist) + cleanDecideRecord() // 删除锁后重试 + return + } else { + throw new RuntimeException("清理中... 开始时间: " + new SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(exist.createTime)) + } + } else { + throw new RuntimeException("刚清理完") + } + } + cause = cause.cause + } + repo.delete(lock) + throw ex + } + } +} diff --git a/src/service/rule/FieldManager.groovy b/src/service/rule/FieldManager.groovy new file mode 100644 index 0000000000000000000000000000000000000000..35c096bcc29ea8bf543e450e00eb05fec48cdf3b --- /dev/null +++ b/src/service/rule/FieldManager.groovy @@ -0,0 +1,222 @@ +package service.rule + + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.enet.event.EC +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Repo +import cn.xnatural.remoter.Remoter +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import entity.DataCollector +import entity.FieldType +import entity.RuleField +import org.codehaus.groovy.control.CompilerConfiguration +import org.codehaus.groovy.control.customizers.ImportCustomizer +import org.slf4j.LoggerFactory +import service.rule.spec.BaseSpec + +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.atomic.AtomicInteger + +/** + * 属性管理 + * 属性别名 + * 属性值函数 + */ +class FieldManager extends ServerTpl { + @Lazy protected repo = bean(Repo, 'jpa_rule_repo') + @Lazy protected collectorManager = bean(CollectorManager) + /** + * RuleField(enName, cnName), RuleField + */ + final Map fieldHolders = new ConcurrentHashMap<>(500) + + + + /** + * 执行数据收集, 获取属性值 + * @param aName 属性名 + * @param ctx 决策执行上下文 + * @return 当前属性的值 + */ + def dataCollect(String aName, DecisionContext ctx) { + def fieldHolder = fieldHolders.get(aName) + if (fieldHolder == null) { + log.warn(ctx.logPrefix() + "未找到属性'$aName'对应的配置".toString()) + return null + } + String collectorId = fieldHolder.choose(ctx) // 属性对应的 值 收集器名 + if (!collectorId) { + log.warn(ctx.logPrefix() + "属性'" + aName + "'没有对应的取值配置") + return null + } + collectorManager.populate(collectorId, aName, ctx) + } + + + /** + * 得到属性对应的别名 + * @param aName 属性名 + * @return null: 没有别名 + */ + String alias(String aName) { + def field = fieldHolders.get(aName)?.field + if (field == null) return null + else if (field.cnName == aName) return field.enName + else if (field.enName == aName) return field.cnName + null + } + + + /** + * 属性值类型转换 + * @param aName 属性名 + * @param aValue 属性值 + * @return 转换后的值 + */ + Object convert(String aName, Object aValue) { + if (aValue == null) return aValue + def field = fieldHolders.get(aName)?.field + if (field == null) return aValue + Utils.to(aValue, field.type.clzType) + } + + + // ======================= 监听变化 ========================== + @EL(name = ['fieldChange', 'field.dataVersion'], async = true) + void listenFieldChange(EC ec, Long id) { + def field = repo.findById(RuleField, id) + if (field == null) { + for (def itt = fieldHolders.iterator(); itt.hasNext(); ) { + def e = itt.next() + if (e.value.field.id == id) itt.remove() + } + log.info("delField: " + id) + } else { + initField(field) + log.info("fieldChanged: ${field.cnName}, $id".toString()) + } + def remoter = bean(Remoter) + if (remoter && ec?.source() != remoter) { // 不是远程触发的事件 + remoter.dataVersion('field').update(id.toString(), field ? field.updateTime.time : System.currentTimeMillis(), null) + } + } + + + /** + * 加载所有指标 + */ + @EL(name = 'jpa_rule.started', async = true, order = 1f) + void load() { + initDefaultField() + final Set names = (fieldHolders ? ConcurrentHashMap.newKeySet(fieldHolders.size() / 2) : null) + final def threshold = new AtomicInteger(1) + final def tryComplete = { + if (threshold.decrementAndGet() > 0) return + if (names) { // 重新加载, 要删除内存中有, 但库中没有 + fieldHolders.findAll {!names.contains(it.key)}.each { e -> + fieldHolders.remove(e.key) + } + } + log.info("加载字段属性 {}个", fieldHolders.size() / 2) + } + for (int page = 0, limit = 50; ; page++) { + def ls = repo.findList(RuleField, page * limit, limit) + threshold.incrementAndGet() + async { + ls.each {field -> + initField(field) + names?.add(field.enName) + names?.add(field.cnName) + } + tryComplete() + } + if (!ls || ls.size() < limit) { + tryComplete(); break + } + } + } + + + /** + * 初始化默认属性集 + */ + protected void initDefaultField() { + if (repo.count(RuleField) == 0) { + log.info("初始化默认属性集") + repo.saveOrUpdate(new RuleField(enName: 'idNumber', cnName: '身份证号码', type: FieldType.Str)) + repo.saveOrUpdate(new RuleField(enName: 'name', cnName: '姓名', type: FieldType.Str)) + repo.saveOrUpdate(new RuleField(enName: 'mobileNo', cnName: '手机号码', type: FieldType.Str)) + repo.saveOrUpdate(new RuleField(enName: 'age', cnName: '年龄', type: FieldType.Int, comment: '根据身份整计算', + collectorOptions: JSON.toJSONString([[ + collectorId: repo.find(DataCollector) {root, query, cb -> cb.equal(root.get("name"), "年龄")}?.id, + chooseFn: 'true' + ]]))) + repo.saveOrUpdate(new RuleField(enName: 'gender', cnName: '性别', type: FieldType.Str, comment: '值: F(女),M(男)', + collectorOptions: JSON.toJSONString([[ + collectorId: repo.find(DataCollector) {root, query, cb -> cb.equal(root.get("name"), "性别")}?.id, + chooseFn: 'true' + ]]))) + repo.saveOrUpdate(new RuleField(enName: 'week', cnName: '星期几', type: FieldType.Int, comment: '值: 1,2,3,4,5,6,7', + collectorOptions: JSON.toJSONString([[ + collectorId: repo.find(DataCollector) {root, query, cb -> cb.equal(root.get("name"), "星期几")}?.id, + chooseFn: 'true' + ]]))) + repo.saveOrUpdate(new RuleField(enName: 'currentDateTime', cnName: '当前日期时间', type: FieldType.Str, comment: '值: yyyy-MM-dd HH:mm:ss', + collectorOptions: JSON.toJSONString([[ + collectorId: repo.find(DataCollector) {root, query, cb -> cb.equal(root.get("name"), "当前日期时间")}?.id, + chooseFn: 'true' + ]]))) + repo.saveOrUpdate(new RuleField(enName: 'currentDate', cnName: '当前日期', type: FieldType.Str, comment: '值: yyyy-MM-dd', + collectorOptions: JSON.toJSONString([[ + collectorId: repo.find(DataCollector) {root, query, cb -> cb.equal(root.get("name"), "当前日期")}?.id, + chooseFn: 'true' + ]]))) + repo.saveOrUpdate(new RuleField(enName: 'currentTime', cnName: '当前时间', type: FieldType.Str, comment: '值: HH:mm:ss', + collectorOptions: JSON.toJSONString([[ + collectorId: repo.find(DataCollector) {root, query, cb -> cb.equal(root.get("name"), "当前时间")}?.id, + chooseFn: 'true' + ]]))) + } + } + + + /** + * 初始化 {@link RuleField} + */ + protected void initField(RuleField field) { + Binding binding = new Binding() + def config = new CompilerConfiguration() + binding.setProperty('LOG', LoggerFactory.getLogger("ROOT")) + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(JSON.class.name, JSONObject.class.name, Utils.class.name) + + def holder = new FieldHolder(field: field, collectorChooseMap: field.collectorOptions ? JSON.parseArray(field.collectorOptions).collectEntries {JSONObject jo -> + [jo['collectorId'], new GroovyShell(Thread.currentThread().contextClassLoader, binding, config).evaluate("{ -> $jo.chooseFn }")] + } : null) + fieldHolders.put(field.enName, holder) + fieldHolders.put(field.cnName, holder) + } + + + /** + * 字段/属性/指标 Holder + */ + class FieldHolder { + RuleField field + LinkedHashMap collectorChooseMap + + /** + * 根据当前执行上下文选择出 属性的收集器 + * @param ctx 当前执行上下文 + * @return 收集器id + */ + String choose(DecisionContext ctx) { + if (collectorChooseMap == null) return null + collectorChooseMap.find {e -> BaseSpec.rehydrate2(e.value, ctx.data, this)()}?.key + } + } +} \ No newline at end of file diff --git a/src/service/rule/OpHistorySrv.groovy b/src/service/rule/OpHistorySrv.groovy new file mode 100644 index 0000000000000000000000000000000000000000..76c5175a9ed036e8f9134d43189411385535efbd --- /dev/null +++ b/src/service/rule/OpHistorySrv.groovy @@ -0,0 +1,36 @@ +package service.rule + +import cn.xnatural.app.ServerTpl +import cn.xnatural.app.Utils +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.IEntity +import cn.xnatural.jpa.Repo +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.serializer.SerializerFeature +import entity.OpHistory + +import java.text.SimpleDateFormat + +/** + * 记录实体的修改历史 + */ +class OpHistorySrv extends ServerTpl { + + @Lazy def repo = bean(Repo, 'jpa_rule_repo') + + + /** + * 操作历史 + * @param entity 实体 + */ + @EL(name = 'enHistory', async = true) + void enHistory(IEntity entity, String operator) { + def data = Utils.copier(entity, [:]).ignore("metaClass") + .addConverter('createTime', {v -> if (v instanceof Date) new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(v) else v}) + .addConverter('updateTime', {v -> if (v instanceof Date) new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(v) else v}) + .build() + repo.saveOrUpdate( + new OpHistory(tbName: repo.tbName(entity.class).replace("`", ""), operator: operator, content: JSON.toJSONString(data, SerializerFeature.WriteMapNullValue, SerializerFeature.DisableCircularReferenceDetect)) + ) + } +} diff --git a/src/service/rule/UserSrv.groovy b/src/service/rule/UserSrv.groovy new file mode 100644 index 0000000000000000000000000000000000000000..72e189342c0ab327641d2baf7a3459f0dcab7a84 --- /dev/null +++ b/src/service/rule/UserSrv.groovy @@ -0,0 +1,162 @@ +package service.rule + +import cn.xnatural.app.CacheSrv +import cn.xnatural.app.ServerTpl +import cn.xnatural.enet.event.EL +import cn.xnatural.jpa.Repo +import entity.Decision +import entity.Permission +import entity.User + +class UserSrv extends ServerTpl { + + @Lazy def repo = bean(Repo, 'jpa_rule_repo') + /** + * 默认静态权限 + */ + @Lazy def staticPermission = [ + new Permission(enName: 'grant', cnName: '权限管理'), + new Permission(enName: 'grant-user', cnName: '用户管理'), + new Permission(enName: 'mnt-login', cnName: '用户登陆'), + new Permission(enName: 'user-add', cnName: '新增用户'), + new Permission(enName: 'user-del', cnName: '删除用户'), + // new Permission(enName: 'password-reset', cnName: '密码重置'), + new Permission(enName: 'decision-add', cnName: '决策创建'), + new Permission(enName: 'field-read', cnName: '查看字段'), + new Permission(enName: 'field-add', cnName: '新增字段'), + new Permission(enName: 'field-update', cnName: '更新字段'), + new Permission(enName: 'field-del', cnName: '删除字段'), + new Permission(enName: 'dataCollector-read', cnName: '查看收集器'), + new Permission(enName: 'dataCollector-add', cnName: '新增收集器'), + new Permission(enName: 'dataCollector-update', cnName: '更新收集器'), + new Permission(enName: 'dataCollector-del', cnName: '删除收集器'), + new Permission(enName: 'opHistory-read', cnName: '查看操作历史'), + new Permission(enName: 'decideResult-read', cnName: '查看决策结果'), + new Permission(enName: 'collectResult-read', cnName: '查看收集记录') + ] + + + // 一个决策对应的所有权限 + protected List getPermissions(Decision decision) { + [ + new Permission(enName: "decision-update-" + decision.id, cnName: "更新决策:" + decision.name, mark: decision.id, comment: "动态权限-决策"), + new Permission(enName: "decision-del-" + decision.id, cnName: "删除决策:" + decision.name, mark: decision.id, comment: "动态权限-决策"), + new Permission(enName: "decision-read-" + decision.id, cnName: "查看决策:" + decision.name, mark: decision.id, comment: "动态权限-决策") + ] + } + + + /** + * 初始化 权限数据 + */ + @EL(name = "jpa_rule.started", async = true) + protected void initUserPermission() { + staticPermission.each { p -> + // ConstraintViolationException + if (!repo.count(Permission) { root, query, cb -> cb.equal(root.get("enName"), p.enName) }) { + repo.saveOrUpdate(p) + log.info("添加默认静态权限: " + p.enName + ", " + p.cnName) + } + } + + // 初始化默认用户 + if (!repo.count(User)) { + [ + new User(name: 'admin', password: 'admin', group: 'admin') + ].each {u -> + u.permissions = staticPermission.collect {it.enName}.join(",") + def p = u.password + u.password = p.md5() + repo.saveOrUpdate(u) + log.info("添加默认用户. username: " + u.name + ", password: " + p) + } + } + } + + + /** + * 添加历史未添加的权限 + */ + @EL(name = "jpa_rule.started", async = true) + protected void fixDecisionPermission() { + for (int i = 0, limit = 10; ; i++) { + def ls = repo.findList(Decision, i*limit, limit) + ls.each { decision -> + getPermissions(decision).each {p -> + if (!repo.count(Permission) {root, query, cb -> cb.equal(root.get("enName"), p.enName)}) { // 决策权限不存在,则创建 + repo.saveOrUpdate(p) + log.info("添加决策权限'$p.cnName($decision.id)'".toString()) + } + } + } + if (ls.size() < limit) break + } + } + + + // 决策创建完成 更新用户权限 + @EL(name = "decision.create", async = true) + protected void decisionCreate(String id) { + def decision = repo.findById(Decision, id) + def ps = getPermissions(decision) + + // 创建新权限 + ps.each {repo.saveOrUpdate(it)} + + if (!decision.creator) return + + // 添加创建者的权限 + def user = repo.find(User) {root, query, cb -> cb.equal(root.get("name"), decision.creator)} + LinkedHashSet alreadyPs = new LinkedHashSet(user.permissions?.split(",")?.toList()?:Collections.emptyList()) + if (!alreadyPs.containsAll(ps.findResults {it.enName})) { + ps.each {alreadyPs.add(it.enName)} + user.permissions = alreadyPs.join(",") + repo.saveOrUpdate(user) + bean(CacheSrv).remove("permission_" + user.id) + } + + // 如果创建者是普通用户, 则需要把所有权限给所在的组管理员 + if (user.group) { + async { + def gUser = repo.find(User) {root, query, cb -> cb.and(cb.equal(root.get("group"), user.group), cb.like(root.get("permissions"), "%grant-user%"))} + if (!gUser) return + LinkedHashSet ls = new LinkedHashSet(gUser.permissions?.split(",")?.toList()?:Collections.emptyList()) + ps.each {ls.add(it.enName)} + gUser.permissions = ls.join(",") + repo.saveOrUpdate(gUser) + bean(CacheSrv)?.remove("permission_" + gUser.id) + } + } + } + + // 更新决策关联的权限名 + @EL(name = "decision.update", async = true) + protected void decisionUpdate(String id) { + def decision = repo.findById(Decision, id) + def ps = getPermissions(decision) + repo.findList(Permission) { root, query, cb -> cb.equal(root.get("mark"), id)} + ?.each {p -> + p.cnName = ps.find {p.enName == it.enName}.cnName + repo.saveOrUpdate(p) + } + } + + @EL(name = "decision.delete", async = true) + protected void decisionDelete(String id) { + def ps = repo.findList(Permission) { root, query, cb -> cb.equal(root.get("mark"), id)} + .each {repo.delete(it)} + // 删除用户关联的权限 + for (int start = 0, limit = 10;; start++) { + def users = repo.findList(User, start * limit, limit) {root, query, cb -> + ps.findResults {cb.like(root.get("permissions"), "%" + it.enName + "%")} + .inject {p1, p2 -> cb.or(p1, p2)} + } + users.each {u -> + u.permissions = u.permissions.split(",").findAll {!ps.contains(it)}.join(",") + repo.saveOrUpdate(u) + bean(CacheSrv)?.remove("permission_" + u.id) + } + if (users.size() < limit) break + } + } +} diff --git a/src/service/rule/spec/BaseSpec.groovy b/src/service/rule/spec/BaseSpec.groovy new file mode 100644 index 0000000000000000000000000000000000000000..784daf1b22e7e35a9dad7f3baaa302fe83d32ae9 --- /dev/null +++ b/src/service/rule/spec/BaseSpec.groovy @@ -0,0 +1,71 @@ +package service.rule.spec + + +abstract class BaseSpec { + /** + * 自定义规则属性. 例: 自定义id, 描述 + */ + @Lazy Map attrs = new HashMap<>() + /** + * 顺序节点: 拒绝, 通过, 人工, 操作, 清除 + * 依次遍历节点执行 + */ + @Lazy List> nodes = new LinkedList<>() + + /** + * 名字 + */ + abstract String name() + + + /** + * 创建 关联执行闭包(即: 闭包的执行过程中数据存放使用传进来的执行上下文ctx) + * 读: 当前闭包, 当前执行上下文, 决策自定义函数 + * 写: 当前执行上下文 + * @param src 原闭包 + * @param ctx 当前执行上下文 + * @return 临时执行闭包 + */ + static Closure rehydrate1(Closure src, Map ctx, Object _this) { + final cl = src.rehydrate(new HashMap(1) { + @Override + Object put(Object key, Object value) { ctx.put(key, value); return value } + + @Override + Object get(Object key) { + try { + return src.getProperty(key) + } catch (MissingPropertyException | MissingFieldException ex) { + return ctx.get(key) + } + } + }, src, _this) + // 不能用 DELEGATE_ONLY 不然 调不了决策中自定义函数 + cl.setResolveStrategy(Closure.DELEGATE_FIRST) + return cl + } + + + /** + * 创建 独立执行闭包(即: 会为闭包单独创建一个数据存放空间) + * 读: 当前闭包, 独立执行空间(map), 当前执行上下文 + * 写: 独立执行空间(map) + * @param src 原闭包 + * @param ctx 当前执行上下文 + * @return 临时执行闭包 + */ + static Closure rehydrate2(Closure src, Map ctx, Object _this) { + final cl = src.rehydrate(new LinkedHashMap(7) { + @Override + Object get(Object key) { + try { + return src.getProperty(key) + } catch (MissingPropertyException | MissingFieldException ex) { + return super.containsKey(key) ? super.get(key) : ctx.get(key) + } + } + }, src, _this) + cl.setResolveStrategy(Closure.DELEGATE_ONLY) + return cl + } +} diff --git a/src/service/rule/spec/DecisionSpec.groovy b/src/service/rule/spec/DecisionSpec.groovy new file mode 100644 index 0000000000000000000000000000000000000000..3605d94cc3236721030ac5ce035d5731251fa7e7 --- /dev/null +++ b/src/service/rule/spec/DecisionSpec.groovy @@ -0,0 +1,146 @@ +package service.rule.spec + +import cn.xnatural.app.Utils +import com.alibaba.fastjson.JSON +import com.alibaba.fastjson.JSONObject +import org.codehaus.groovy.control.CompilerConfiguration +import org.codehaus.groovy.control.customizers.ImportCustomizer +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import service.rule.DecideResult +import service.rule.DecisionContext + +import java.lang.reflect.Array + +/** + * 决策 DSL + */ +class DecisionSpec extends BaseSpec { + String 决策id + String 决策名 + String 决策描述 + + /** + * 接口返回属性集 + */ + @Lazy Set returnAttrs = new LinkedHashSet<>() + /** + * 全局决策内自定义函数 + */ + @Lazy Map globalFunctions = new HashMap<>() + + + DecisionSpec() { + Logger log = LoggerFactory.getLogger("ROOT") + globalFunctions.put("INFO", { String msg -> if (msg) log.info(msg.toString()) }) + globalFunctions.put("ERROR", { String msg, Exception ex -> if (msg) log.error(msg.toString(), ex) }) + } + + + void 操作(Closure 操作) { + nodes << Tuple2.tuple("Operate", { DecisionContext ctx -> + rehydrate1(操作, ctx.data, this)() + }) + } + + + DecisionSpec 函数定义(String 函数名, Closure 函数) { + if (!函数名) throw new IllegalArgumentException("函数名 不能为空") + if (!函数) throw new IllegalArgumentException("函数 不能为空") + globalFunctions.put(函数名, 函数) + this + } + + + DecisionSpec 属性定义(String 属性名, Object 值) { + if (!属性名) throw new IllegalArgumentException("属性名 不能为空") + attrs.put(属性名, 值) + this + } + + + DecisionSpec 返回属性(String 属性名) { returnAttrs.add(属性名); this } + + + /** + * 根据 dsl 创建 策略, 并创建执行 + */ + void 策略(@DelegatesTo(PolicySpec) Closure cl) { + PolicySpec spec = new PolicySpec() + def code = cl.rehydrate(spec, cl, this) + code.resolveStrategy = Closure.DELEGATE_FIRST + code() + // 定义执行函数 + nodes << Tuple.tuple("Policy", {DecisionContext ctx -> ctx.run(spec)}) + } + + + /** + * 执行决策 + * @param ctx {@link DecisionContext} + * @return {@link DecideResult} + */ + DecideResult compute(DecisionContext ctx) { + for (def node : nodes) { + if ("Policy" == node.v1) { + DecideResult result = node.v2.call(ctx) + if (result && result.block) return result + } else if ("Operate" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[操作]开始执行") + node.v2.call(ctx) + } else throw new IllegalArgumentException("Unknown type: " + node.v1) + } + DecideResult.Accept + } + + + @Override + String name() { return 决策名 } + + + /** + * 函数拦截 调用 + * @param name 函数名 + * @param args 参数 + */ + def methodMissing(String name, def args) { + def fn = globalFunctions.get(name) + if (fn) { + int length = Array.getLength(args) + if (length == 0) return fn() + else if (length == 1) return fn(Array.get(args, 0)) + else if (length == 2) return fn(Array.get(args, 0), Array.get(args, 1)) + else if (length == 3) return fn(Array.get(args, 0), Array.get(args, 1), Array.get(args, 2)) + else if (length == 4) return fn(Array.get(args, 0), Array.get(args, 1), Array.get(args, 2), Array.get(args, 3)) + else if (length == 5) return fn(Array.get(args, 0), Array.get(args, 1), Array.get(args, 2), Array.get(args, 3), Array.get(args, 4)) + else if (length == 6) return fn(Array.get(args, 0), Array.get(args, 1), Array.get(args, 2), Array.get(args, 3), Array.get(args, 4), Array.get(args, 5)) + else throw new Exception("Custom function '$name' args length: " + length) + } + else throw new MissingMethodException(name, DecisionSpec, args) + } + + + static DecisionSpec of(@DelegatesTo(DecisionSpec) Closure cl) { + def p = new DecisionSpec() + def code = cl.rehydrate(p, cl, this) + code.resolveStrategy = Closure.DELEGATE_FIRST + code() + return p + } + + + /** + * 根据dsl字符串创建 DecisionSpec 对象 + * @param dsl dsl 字符串 + * @return DecisionSpec + */ + static DecisionSpec of(String dsl) { + Binding binding = new Binding() + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(DecisionSpec.class.name, JSON.class.name, JSONObject.class.name, Utils.class.name) + def shell = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config) + shell.evaluate("service.rule.spec.DecisionSpec.of{$dsl}") + } +} diff --git a/src/service/rule/spec/DelegateDecisionSpec.groovy b/src/service/rule/spec/DelegateDecisionSpec.groovy new file mode 100644 index 0000000000000000000000000000000000000000..788b727c1c50839f8512fe565526f452d2fb94a9 --- /dev/null +++ b/src/service/rule/spec/DelegateDecisionSpec.groovy @@ -0,0 +1,120 @@ +package service.rule.spec + +import service.rule.DecideResult +import service.rule.DecisionContext +import service.rule.DecisionSrv + +import java.util.concurrent.atomic.AtomicInteger + +/** + * 用于 策略中 {@link PolicySpec} 的子决策调用 + */ +class DelegateDecisionSpec extends BaseSpec { + /** + * 要调用的 决策id + */ + String 决策id + /** + * 是否异步执行 + * 默认同步 + */ + boolean 异步 + + + /** + * 要传给决策的参数 + * 决策 { + * 决策id = 'test1' + * + * // 左(子DecisionContext) = 右(父DecisionContext) + * 传参 { + * p1 = 1 + * p2 = p2 + * p3 = 'aa' + * } + * } + * @param 参数函数 + */ + void 传参(Closure 参数函数) { + nodes << Tuple.tuple('Input', { DecisionContext ctx -> + def input = new LinkedHashMap() { + @Override + Object get(Object key) { ctx.data.get(key) } + } + def cl = 参数函数.rehydrate(input, 参数函数, this) + cl.resolveStrategy = Closure.DELEGATE_FIRST + cl() + return input + }) + } + + + /** + * 把参数输出到当前决策执行的上下文 + * 会覆盖子决策返回配置 + * 决策 { + * 决策id = 'test1' + * + * // 左(父DecisionContext) = 右(子DecisionContext) + * 输出 { + * p1 = 1 + * p2 = p2 + * p3 = 'aa' + * } + * } + * + * 1. 没有输出配置默认会把子决策的返回属性当输出 + * 2. 配置了就不会输出子决策中的返回属性了 + * @param 输出函数 + */ + void 输出(Closure 输出函数) { + nodes << Tuple.tuple('Output', { DecisionContext ctx -> + def output = new LinkedHashMap() { + @Override + Object get(Object key) { ctx.data.get(key) } + } + def cl = 输出函数.rehydrate(output, 输出函数, this) + cl.resolveStrategy = Closure.DELEGATE_FIRST + cl() + return output + }) + } + + + /** + * 计算子决策的结果 + * @param ctx {@link DecisionContext} + * @return {@link DecideResult} + */ + DecideResult compute(DecisionContext ctx) { + Map input = [:] + nodes.each { node -> + if ("Input" == node.v1) { + input.putAll(node.v2.call(ctx)) + } else if ("Output" == node.v1) { + + } else throw new IllegalArgumentException("Unknown type: " + node.v1) + } + input.put("decisionId", 决策id) // 在字段选择收集器 可能会用到 + def times = ctx.delegateDecisionCount.computeIfAbsent(决策id, { new AtomicInteger()}) + DecisionContext ctx2 = ctx.bean(DecisionSrv).decide(决策id, ctx.id + "_" + times.getAndIncrement(), 异步, input) + if (异步) return null + Map output + nodes.each {node -> + if ("Output" == node.v1) { + if (output == null) output = [:] + output.putAll(node.v2.call(ctx2)) + } + } + if (output == null) { + ctx2.result()['data']?.each { e -> ctx.data.put(e.key, e.value)} //设置返回属性 + } else { + output.each { e -> ctx.data.put(e.key, e.value)} + } + return ctx2.decideResult + } + + + @Override + String name() { 决策id } +} diff --git a/src/service/rule/spec/PolicySpec.groovy b/src/service/rule/spec/PolicySpec.groovy new file mode 100644 index 0000000000000000000000000000000000000000..1d1685086b69fbd8116f3d1ce52f62a115513cc7 --- /dev/null +++ b/src/service/rule/spec/PolicySpec.groovy @@ -0,0 +1,160 @@ +package service.rule.spec + +import cn.xnatural.app.Utils +import org.codehaus.groovy.control.CompilerConfiguration +import org.codehaus.groovy.control.customizers.ImportCustomizer +import service.rule.DecideResult +import service.rule.DecisionContext + +/** + * 策略定义 spec + */ +class PolicySpec extends BaseSpec { + String 策略名 + + + void 操作(Closure 操作) { + nodes << Tuple.tuple('Operate', { DecisionContext ctx -> + rehydrate1(操作, ctx.data, this)() + }) + } + + + /** + * 执行策略条件函数. 条件函数返回false, 则跳出, 继续执行下一个策略 + * @param 条件 + */ + void 条件(Closure 条件) { + nodes << Tuple.tuple('Condition', { DecisionContext ctx -> + rehydrate1(条件, ctx.data, this)() + }) + } + + + void 属性定义(String 属性名, Object 值) { + if (!属性名) throw new IllegalArgumentException("属性名 不能为空") + attrs.put(属性名, 值) + } + + + /** + * 清除属性值缓存 + * @param 属性名 + */ + void 清除(String... 属性名) { + if (!属性名) return + nodes << Tuple.tuple('Clear', { DecisionContext ctx -> + 属性名.each {ctx.data.remove(it)} + }) + } + + + /** + * 根据 dsl 创建规则, 并创建执行 + */ + void 规则(@DelegatesTo(RuleSpec) Closure cl) { + RuleSpec spec = new RuleSpec() + def code = cl.rehydrate(spec, cl, this) + code.resolveStrategy = Closure.DELEGATE_FIRST + code() + + if (!spec.规则名) throw new IllegalArgumentException("规则名字不能为空") + if (!spec.nodes) throw new IllegalArgumentException("$spec.规则名 是空规则") + + // 定义执行函数 + nodes << Tuple.tuple("Rule", {DecisionContext ctx -> ctx.run(spec)}) + } + + + /** + * 根据 dls 创建 评分卡, 并创建执行 + */ + void 评分卡(@DelegatesTo(ScorecardSpec) Closure cl) { + ScorecardSpec spec = new ScorecardSpec() + def code = cl.rehydrate(spec, cl, this) + code.resolveStrategy = Closure.DELEGATE_FIRST + code() + + if (!spec.评分卡名) throw new IllegalArgumentException("评分卡名不能为空") + if (!spec.赋值变量) throw new IllegalArgumentException("评分卡赋值变量不能为空") + if (spec.模型 == null) throw new IllegalArgumentException("$spec.评分卡名 是空评分卡") + + // 定义执行函数 + nodes << Tuple.tuple("Scorecard", {DecisionContext ctx -> ctx.run(spec)}) + } + + + /** + * 根据 dls 创建 子决策, 并创建执行 + */ + void 决策(@DelegatesTo(DelegateDecisionSpec) Closure cl) { + DelegateDecisionSpec spec = new DelegateDecisionSpec() + def code = cl.rehydrate(spec, cl, this) + code.resolveStrategy = Closure.DELEGATE_FIRST + code() + + if (!spec.决策id) throw new IllegalArgumentException("子决策id不能为空") + + // 定义执行函数 + nodes << Tuple.tuple("Decision", {DecisionContext ctx -> ctx.run(spec)}) + } + + + /** + * 计算策略结果 + * @param ctx + * @return {@link DecideResult} + */ + DecideResult compute(DecisionContext ctx) { + DecideResult result + for (def node : nodes) { + if ("Rule" == node.v1) { + result = node.v2.call(ctx) + if (result && result.block) break + } else if ("Decision" == node.v1) { + result = node.v2.call(ctx) + if (result && result.block) break + } else if ("Condition" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[条件]开始执行") + if (!node.v2.call(ctx)) break + } else if ("Operate" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[操作]开始执行") + node.v2.call(ctx) + } else if ("Scorecard" == node.v1) { + node.v2.call(ctx) + } else throw new IllegalArgumentException("Unknown type: " + node.v1) + } + result + } + + @Override + String name() { return 策略名 } + + + static PolicySpec of(@DelegatesTo(PolicySpec) Closure cl) { + def spec = new PolicySpec() + def code = cl.rehydrate(spec, cl, this) + code.resolveStrategy = Closure.DELEGATE_FIRST + code() + if (!spec.策略名) throw new IllegalArgumentException("策略名字不能为空") + if (!spec.nodes) throw new IllegalArgumentException("$spec.策略名 是空策略") + return spec + } + + + /** + * 根据dsl字符串创建 PolicySpec 对象 + * @param dsl + * @return PolicySpec 对象 + */ + static PolicySpec of(String dsl) { + Binding binding = new Binding() + def config = new CompilerConfiguration() + def icz = new ImportCustomizer() + config.addCompilationCustomizers(icz) + icz.addImports(PolicySpec.name, Utils.name) + icz.addStarImports(RuleSpec.name, DecisionSpec.name, ScorecardSpec.name) + def shell = new GroovyShell(Thread.currentThread().contextClassLoader, binding, config) + shell.evaluate("service.rule.spec.PolicySpec.of{$dsl}") + } +} diff --git a/src/service/rule/spec/RuleSpec.groovy b/src/service/rule/spec/RuleSpec.groovy new file mode 100644 index 0000000000000000000000000000000000000000..0b10b6d4ac1c4b069e1893c3258d3d76063abfc2 --- /dev/null +++ b/src/service/rule/spec/RuleSpec.groovy @@ -0,0 +1,98 @@ +package service.rule.spec + +import service.rule.DecideResult +import service.rule.DecisionContext + +/** + * 规则定义 spec + */ +class RuleSpec extends BaseSpec { + String 规则名 + + + /** + * 自定义属性 + */ + void 属性定义(String 属性名, Object 值) { + if (!属性名) throw new IllegalArgumentException("属性名 不能为空") + attrs.put(属性名, 值) + } + + + /** + * 清除属性值缓存 + * @param 属性名 + */ + void 清除(String... 属性名) { + if (!属性名) return + nodes << Tuple.tuple('Clear', { DecisionContext ctx -> + 属性名.each {ctx.data.remove(it)} + }) + } + + + void 拒绝(Closure 条件) { + nodes << Tuple.tuple('Reject', { DecisionContext ctx -> + if (rehydrate1(条件, ctx.data, this)()) return DecideResult.Reject + null + }) + } + + + void 通过(Closure 条件) { + nodes << Tuple.tuple('Accept', { DecisionContext ctx -> + if (rehydrate1(条件, ctx.data, this)()) return DecideResult.Accept + null + }) + } + + + void 人工审核(Closure 条件) { + nodes << Tuple.tuple('Review', { DecisionContext ctx -> + if (rehydrate1(条件, ctx.data, this)()) return DecideResult.Review + null + }) + } + + + void 操作(Closure 操作) { + nodes << Tuple.tuple('Operate', { DecisionContext ctx -> + rehydrate1(操作, ctx.data, this)() + }) + } + + + /** + * 计算规则结果 + * @param ctx {@link DecisionContext} + * @return {@link DecideResult} + */ + DecideResult compute(DecisionContext ctx) { + DecideResult result + for (def node : nodes) { + if ("Reject" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[拒绝]开始执行") + result = node.v2.call(ctx) + if (result && result.block) break + } else if ("Accept" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[接受]开始执行") + result = node.v2.call(ctx) + if (result && result.block) break + } else if ("Review" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[人工]开始执行") + result = node.v2.call(ctx) + if (result && result.block) break + } else if ("Clear" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[清除]开始执行") + node.v2.call(ctx) + } else if ("Operate" == node.v1) { + DecisionContext.log.trace(ctx.logPrefix() + "[操作]开始执行") + node.v2.call(ctx) + } else throw new IllegalArgumentException("Unknown type: " + node.v1) + } + result + } + + @Override + String name() { return 规则名 } +} diff --git a/src/service/rule/spec/ScorecardSpec.groovy b/src/service/rule/spec/ScorecardSpec.groovy new file mode 100644 index 0000000000000000000000000000000000000000..65ba1cfe3f4f1ad64feae8b872b34d0834ce9d89 --- /dev/null +++ b/src/service/rule/spec/ScorecardSpec.groovy @@ -0,0 +1,87 @@ +package service.rule.spec + +import service.rule.DecisionContext + +/** + * 评分卡spec + * 例子: +评分卡 { + 评分卡名 = "测试评分卡" + 基础分 = 600 + 模型 = [ + ['年龄', 18..24, 40], + ['年龄', 25..45, 80], + ['年龄', 46..60, 50], + ['性别', 'F', 50], + ['性别', 'M', 60], + ['工作成市', ['成都', '巴中'], 99] + ] + 赋值变量 = '评分结果' +} + */ +class ScorecardSpec extends BaseSpec { + /** + * 评分卡名字 + */ + String 评分卡名 + /** + * 可要可不要 + */ + Number 基础分 + /** + [ + ['年龄', 18..24, 40], + ['年龄', 25..45, 80], + ['年龄', 46..60, 50], + ['性别', 'F', 50], + ['性别', 'M', 60] + ] + */ + List 模型 + /** + * 评分结果存放在哪个变量里面 + */ + String 赋值变量 + + + /** + * 计算结果 + * 按模型顺序依次计算结果并累加 + */ + Number compute(DecisionContext ctx) { + Number result = (基础分?:0) + 模型.findResults {item -> + // 3位: 变量名, 取值范围, 分值 + if (item.size() == 3) { + def attrValue = ctx.data.get(item[0]) + def enumValue = item[1] + if (enumValue instanceof Range || enumValue instanceof Collection) { + if (attrValue in enumValue) return item[2] + } else if (attrValue == enumValue) return item[2] + } + // 2位: 变量名, 分值计算函数 + else if (item.size() == 2) { + def attrValue = ctx.data.get(item[0]) + if (item[1] instanceof Closure) {//动态分值计算函数 + return rehydrate2(item[1], ctx.data, this)(attrValue) + } else throw new IllegalArgumentException("评分卡($评分卡名)模型格式错误: 变量名, 分值计算函数") + } + // 1位: 变量名/分值计算函数 + else if (item.size() == 1) { + if (item[0] instanceof String) { // 变量名 + def v = ctx.data.get(item[0]) + return v == null ? 0 : v //直接取值为评分 + } else if (item[0] instanceof Closure) { // 分值计算函数 + return rehydrate2(item[0], ctx.data, this)() + } else throw new IllegalArgumentException("评分卡($评分卡名)模型格式错误: 变量名 或 分值计算函数") + } + else throw new IllegalArgumentException("评分卡($评分卡名)模型格式错误: 位数") + 0 + }.sum() + ctx.setAttr(赋值变量, result) + return result + } + + + @Override + String name() { return 评分卡名 } +} diff --git a/src/service/rule/test.decision b/src/service/rule/test.decision new file mode 100644 index 0000000000000000000000000000000000000000..dfaf717c65376aee633bea2b5c72269a43867bdb --- /dev/null +++ b/src/service/rule/test.decision @@ -0,0 +1,115 @@ +// 唯一 +决策id = 'decision1' +决策名 = 'decision1' +决策描述 = '测试决策1' + +返回属性 '身份证号码' +返回属性 '年龄' + + +操作 { // 策略执行前操作执行 + +} + +策略 { + 策略名 = 'P_测试策略1' + 条件 { // 执行此策略的条件, false: 不执行, true/不配置默认 执行此策略 + // age > 20 && age < 50 + true + } + + 操作 { // 策略规则执行前操作执行 + + } + + // 空属性: 数据获取错误, 数据本身是空(其它指标) + + 规则 { + // 关闭() + 规则名 = 'R_参数验证' + + 拒绝 { + 年龄 == null || 身份证号码 == null || 姓名 == null || 年龄 > 50 || 性别 == 'M' + } + } + + 规则 { + // 关闭() + 规则名 = '通过规则' + + 操作 { // 顺序执行操作 + 指标1 = 20 + } + + 通过 { + 身份证号码 != null + } + + 操作 { // 顺序执行操作 + 指标1 = 21 + } + } + + 规则 { + 规则名 = '操作规则' + + 操作 { // 顺序执行操作 + 指标1 = 20 + } + + 通过 { + 身份证号码 != null + } + + 操作 { // 顺序执行操作 + // 四则运算 + 测试字段 = 2 * 年龄 + } + + 操作 { // 顺序执行操作 + // 逻辑判断 + if (年龄 > 30) { + 测试字段 -= 5 + } + } + } + + 规则 { + 规则名 = '列表规则' + + 禁入区域 = [ + '澳门特别行政区', '香港特别行政区', '新疆维吾尔自治区', '西藏自治区', + '内蒙古自治区', '宁夏回族自治区', '未知', '澳门', '台湾' + ] + + 拒绝 { + 工作地所在省 in 禁入区域 || 居住地所在省 in 禁入区域 + } + } + + 规则 { + 规则名 = '包含规则' + + 拒绝 { + "$姓名".contains 'xx' + } + } +} + + +策略 { + 策略名 = 'P_测试策略2' + + 规则 { + 规则名 = '通过规则' + + 通过 {true} + } + + 规则 { + 关闭() + 规则名 = '拒绝规则' + + 拒绝 {true} + } +} \ No newline at end of file diff --git a/src/static/components/Upload.vue b/src/static/components/Upload.vue new file mode 100644 index 0000000000000000000000000000000000000000..014d217436f388784197c38849fa65ab4dce7afd --- /dev/null +++ b/src/static/components/Upload.vue @@ -0,0 +1,104 @@ + + + + + \ No newline at end of file diff --git a/src/static/css/lib/bootstrap.min.4.3.1.css b/src/static/css/lib/bootstrap.min.4.3.1.css new file mode 100644 index 0000000000000000000000000000000000000000..92e3fe871295c44f8fa58ddc7ac242463f13e6bd --- /dev/null +++ b/src/static/css/lib/bootstrap.min.4.3.1.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-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-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;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:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-break:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.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}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.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-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-control.is-valid~.valid-feedback,.form-control.is-valid~.valid-tooltip,.was-validated .form-control:valid~.valid-feedback,.was-validated .form-control:valid~.valid-tooltip{display:block}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-select.is-valid~.valid-feedback,.custom-select.is-valid~.valid-tooltip,.was-validated .custom-select:valid~.valid-feedback,.was-validated .custom-select:valid~.valid-tooltip{display:block}.form-control-file.is-valid~.valid-feedback,.form-control-file.is-valid~.valid-tooltip,.was-validated .form-control-file:valid~.valid-feedback,.was-validated .form-control-file:valid~.valid-tooltip{display:block}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid~.valid-feedback,.custom-control-input.is-valid~.valid-tooltip,.was-validated .custom-control-input:valid~.valid-feedback,.was-validated .custom-control-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid~.valid-feedback,.custom-file-input.is-valid~.valid-tooltip,.was-validated .custom-file-input:valid~.valid-feedback,.was-validated .custom-file-input:valid~.valid-tooltip{display:block}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-control.is-invalid~.invalid-feedback,.form-control.is-invalid~.invalid-tooltip,.was-validated .form-control:invalid~.invalid-feedback,.was-validated .form-control:invalid~.invalid-tooltip{display:block}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-select.is-invalid~.invalid-feedback,.custom-select.is-invalid~.invalid-tooltip,.was-validated .custom-select:invalid~.invalid-feedback,.was-validated .custom-select:invalid~.invalid-tooltip{display:block}.form-control-file.is-invalid~.invalid-feedback,.form-control-file.is-invalid~.invalid-tooltip,.was-validated .form-control-file:invalid~.invalid-feedback,.was-validated .form-control-file:invalid~.invalid-tooltip{display:block}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid~.invalid-feedback,.custom-control-input.is-invalid~.invalid-tooltip,.was-validated .custom-control-input:invalid~.invalid-feedback,.was-validated .custom-control-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid~.invalid-feedback,.custom-file-input.is-invalid~.invalid-tooltip,.was-validated .custom-file-input:invalid~.invalid-feedback,.was-validated .custom-file-input:invalid~.invalid-tooltip{display:block}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline;box-shadow:none}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:calc(1rem + .4rem);padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar>.container,.navbar>.container-fluid{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%;border-radius:calc(.25rem - 1px)}.card-img-top{width:100%;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img-bottom{width:100%;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{display:-ms-flexbox;display:flex;-ms-flex:1 0 0%;flex:1 0 0%;-ms-flex-direction:column;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion>.card{overflow:hidden}.accordion>.card:not(:first-of-type) .card-header:first-child{border-radius:0}.accordion>.card:not(:first-of-type):not(:last-of-type){border-bottom:0;border-radius:0}.accordion>.card:first-of-type{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:last-of-type{border-top-left-radius:0;border-top-right-radius:0}.accordion>.card .card-header{margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:2;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:1;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-sm .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-md .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-lg .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-xl .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush .list-group-item:last-child{margin-bottom:-1px}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{margin-bottom:0;border-bottom:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}a.close.disabled{pointer-events:none}.toast{max-width:350px;overflow:hidden;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:.3rem;border-bottom-left-radius:.3rem}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;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-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;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-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:0s .6s opacity}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:spinner-border .75s linear infinite;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:spinner-grow .75s linear infinite;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;overflow-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/src/static/css/lib/fonts/heyui.eot b/src/static/css/lib/fonts/heyui.eot new file mode 100644 index 0000000000000000000000000000000000000000..bc4b5334457133cec82ba165791ff18d3e1b5a31 Binary files /dev/null and b/src/static/css/lib/fonts/heyui.eot differ diff --git a/src/static/css/lib/fonts/heyui.svg b/src/static/css/lib/fonts/heyui.svg new file mode 100644 index 0000000000000000000000000000000000000000..1eef97b8e35b10aacfbce3076998d9517c4a0299 --- /dev/null +++ b/src/static/css/lib/fonts/heyui.svg @@ -0,0 +1,56 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/static/css/lib/fonts/heyui.ttf b/src/static/css/lib/fonts/heyui.ttf new file mode 100644 index 0000000000000000000000000000000000000000..eb78e75686dc3eccb0e1d51ddc967f77c8237d68 Binary files /dev/null and b/src/static/css/lib/fonts/heyui.ttf differ diff --git a/src/static/css/lib/fonts/heyui.woff b/src/static/css/lib/fonts/heyui.woff new file mode 100644 index 0000000000000000000000000000000000000000..f139616640177db61d9a105327103933cab28be7 Binary files /dev/null and b/src/static/css/lib/fonts/heyui.woff differ diff --git a/src/static/css/lib/fonts/ionicons.svg b/src/static/css/lib/fonts/ionicons.svg new file mode 100644 index 0000000000000000000000000000000000000000..d8812552f34b46d7c1604050d7599a2a2b3cb568 --- /dev/null +++ b/src/static/css/lib/fonts/ionicons.svg @@ -0,0 +1,870 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/static/css/lib/fonts/ionicons.ttf b/src/static/css/lib/fonts/ionicons.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1caa214a3506bc3ee807eff8a24a195c50af1bf4 Binary files /dev/null and b/src/static/css/lib/fonts/ionicons.ttf differ diff --git a/src/static/css/lib/fonts/ionicons.woff b/src/static/css/lib/fonts/ionicons.woff new file mode 100644 index 0000000000000000000000000000000000000000..c909e51cf3e50600516fa7308f3ca75046be93ec Binary files /dev/null and b/src/static/css/lib/fonts/ionicons.woff differ diff --git a/src/static/css/lib/fonts/ionicons.woff2 b/src/static/css/lib/fonts/ionicons.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..1d6d9c564b3c9f7a097a8e92bde6425ccaa33704 Binary files /dev/null and b/src/static/css/lib/fonts/ionicons.woff2 differ diff --git a/src/static/css/lib/heyui.css b/src/static/css/lib/heyui.css new file mode 100644 index 0000000000000000000000000000000000000000..1c956b812bc22c8d50b108143a8daf1972ce6afa --- /dev/null +++ b/src/static/css/lib/heyui.css @@ -0,0 +1 @@ +.h-func-list-style{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}body{font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(255,255,255,0);-moz-osx-font-smoothing:grayscale}html,body,address,blockquote,dl,form,h1,h2,h3,h4,h5,h6,ol,table,ul,dd,dt,li,tbody,td,tfoot,th,thead,tr,button,del,ins,map,object,a,abbr,acronym,b,bdo,big,br,cite,code,dfn,em,i,img,kbd,q,samp,small,span,strong,sub,sup,tt,var,legend,fieldset,pre{margin:0;padding:0;outline:none;box-sizing:border-box}div{box-sizing:border-box}a{color:#45b984;cursor:pointer;text-decoration:none;outline:none;transition:color .2s ease}a:hover{color:#379469 !important}a:active{color:#296f4f !important}a:active,a:hover{outline:0;text-decoration:none}a[disabled]{color:#999999 !important;cursor:default}input[type=text],input[type=password],input[type=search],input[type=number],input[type=tel],input[type=url],input.h-input,textarea,.h-textarea{min-width:1px;position:relative;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;display:inline-block;padding:4px 7.5px;line-height:1.5;font-size:13px;transition:all linear .2s;box-sizing:border-box;-webkit-appearance:none;font-family:inherit;vertical-align:top;outline:none}input[type=text]:hover,input[type=password]:hover,input[type=search]:hover,input[type=number]:hover,input[type=tel]:hover,input[type=url]:hover,input.h-input:hover,textarea:hover,.h-textarea:hover{border-color:#6ac79d}input[type=text]:focus,input[type=password]:focus,input[type=search]:focus,input[type=number]:focus,input[type=tel]:focus,input[type=url]:focus,input.h-input:focus,textarea:focus,.h-textarea:focus{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}input[type=text][disabled],input[type=password][disabled],input[type=search][disabled],input[type=number][disabled],input[type=tel][disabled],input[type=url][disabled],input.h-input[disabled],textarea[disabled],.h-textarea[disabled],input[type=text][readonly],input[type=password][readonly],input[type=search][readonly],input[type=number][readonly],input[type=tel][readonly],input[type=url][readonly],input.h-input[readonly],textarea[readonly],.h-textarea[readonly]{border-color:#d3d3d3}input[type=text][disabled]:focus,input[type=password][disabled]:focus,input[type=search][disabled]:focus,input[type=number][disabled]:focus,input[type=tel][disabled]:focus,input[type=url][disabled]:focus,input.h-input[disabled]:focus,textarea[disabled]:focus,.h-textarea[disabled]:focus,input[type=text][readonly]:focus,input[type=password][readonly]:focus,input[type=search][readonly]:focus,input[type=number][readonly]:focus,input[type=tel][readonly]:focus,input[type=url][readonly]:focus,input.h-input[readonly]:focus,textarea[readonly]:focus,.h-textarea[readonly]:focus{box-shadow:none}input[type=text][readonly],input[type=password][readonly],input[type=search][readonly],input[type=number][readonly],input[type=tel][readonly],input[type=url][readonly],input.h-input[readonly],textarea[readonly],.h-textarea[readonly]{color:#555555;box-shadow:none;cursor:default}input[type=text][disabled],input[type=password][disabled],input[type=search][disabled],input[type=number][disabled],input[type=tel][disabled],input[type=url][disabled],input.h-input[disabled],textarea[disabled],.h-textarea[disabled]{color:#999999;background-color:#f5f5f5;pointer-events:painted;cursor:not-allowed}.h-form-item-valid-error input[type=text],.h-form-item-valid-error input[type=password],.h-form-item-valid-error input[type=search],.h-form-item-valid-error input[type=number],.h-form-item-valid-error input[type=tel],.h-form-item-valid-error input[type=url],.h-form-item-valid-error input.h-input,.h-form-item-valid-error textarea,.h-form-item-valid-error .h-textarea{border-color:#E11617}.h-form-item-valid-error input[type=text]:focus,.h-form-item-valid-error input[type=password]:focus,.h-form-item-valid-error input[type=search]:focus,.h-form-item-valid-error input[type=number]:focus,.h-form-item-valid-error input[type=tel]:focus,.h-form-item-valid-error input[type=url]:focus,.h-form-item-valid-error input.h-input:focus,.h-form-item-valid-error textarea:focus,.h-form-item-valid-error .h-textarea:focus{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}input[type=text],input[type=password],input[type=search],input[type=number],input[type=tel],input[type=url],input.h-input{height:30px}textarea,.h-textarea{padding:7.5px}input[type=text]::-ms-clear{display:none}input::-webkit-search-cancel-button{display:none}@font-face{font-family:'heyui';src:url('fonts/heyui.eot?p7arpe');src:url('fonts/heyui.eot?p7arpe#iefix') format('embedded-opentype'),url('fonts/heyui.ttf?p7arpe') format('truetype'),url('fonts/heyui.woff?p7arpe') format('woff'),url('fonts/heyui.svg?p7arpe#heyui') format('svg');font-weight:normal;font-style:normal}[class^="h-icon-"],[class*=" h-icon-"]{font-family:'heyui' !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.h-icon-help-solid:before{content:"\e91d"}.h-icon-lock:before{content:"\e91e"}.h-icon-star:before{content:"\e922"}.h-icon-star-on:before{content:"\e923"}.h-icon-help:before{content:"\e900"}.h-icon-plus:before{content:"\e114"}.h-icon-minus:before{content:"\e115"}.h-icon-check:before{content:"\e116"}.h-icon-inbox:before{content:"\e122"}.h-icon-outbox:before{content:"\e123"}.h-icon-info:before{content:"\e901"}.h-icon-refresh:before{content:"\e902"}.h-icon-warn:before{content:"\e903"}.h-icon-success:before{content:"\e904"}.h-icon-error:before{content:"\e905"}.h-icon-close:before{content:"\e906"}.h-icon-close-min:before{content:"\e924"}.h-icon-down:before{content:"\e907"}.h-icon-angle-top:before{content:"\e917"}.h-icon-angle-left:before{content:"\e91f"}.h-icon-angle-right:before{content:"\e920"}.h-icon-angle-down:before{content:"\e921"}.h-icon-home:before{content:"\e908"}.h-icon-left:before{content:"\e909"}.h-icon-top:before{content:"\e90a"}.h-icon-user:before{content:"\e90b"}.h-icon-task:before{content:"\e90c"}.h-icon-message:before{content:"\e90d"}.h-icon-fullscreen:before{content:"\e90e"}.h-icon-menu:before{content:"\e90f"}.h-icon-right:before{content:"\e910"}.h-icon-link:before{content:"\e911"}.h-icon-calendar:before{content:"\e912"}.h-icon-upload:before{content:"\e913"}.h-icon-github:before{content:"\e914"}.h-icon-edit:before{content:"\e915"}.h-icon-location:before{content:"\e916"}.h-icon-trash:before{content:"\e918"}.h-icon-users:before{content:"\e919"}.h-icon-complete:before{content:"\e91a"}.h-icon-bell:before{content:"\e91b"}.h-icon-search:before{content:"\e91c"}.h-icon-setting:before{content:"\e926"}.h-icon-completed:before{content:"\e930"}.h-icon-loading:before{content:"\e97f"}.h-icon-spinner:before{content:"\e981"}[class^="h-icon-"],[class*=" h-icon-"]{font-size:inherit;display:inline-block;vertical-align:-1px}.h-icon-loading,.h-icon-spinner{animation:h-ani-loading-loop 1s linear infinite}@keyframes h-ani-loading-loop{from{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}ul,ol{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box}.red-color{color:#E11617 !important}.bg-red-color{background-color:#E11617 !important}.blue-color{color:#3B91FF !important}.bg-blue-color{background-color:#3B91FF !important}.green-color{color:#13CE66 !important}.bg-green-color{background-color:#13CE66 !important}.yellow-color{color:#FFAE00 !important}.bg-yellow-color{background-color:#FFAE00 !important}.white-color{color:#ffffff !important}.bg-white-color{background-color:#ffffff !important}.gray-color{color:#c1c1c1 !important}.bg-gray-color{background-color:#c1c1c1 !important}.gray1-color{color:#d3d3d3 !important}.bg-gray1-color{background-color:#d3d3d3 !important}.gray2-color{color:#eeeeee !important}.bg-gray2-color{background-color:#eeeeee !important}.gray3-color{color:#f3f3f3 !important}.bg-gray3-color{background-color:#f3f3f3 !important}.gray4-color{color:#f5f5f5 !important}.bg-gray4-color{background-color:#f5f5f5 !important}.dark-color{color:#333333 !important}.bg-dark-color{background-color:#333333 !important}.dark1-color{color:#555555 !important}.bg-dark1-color{background-color:#555555 !important}.dark2-color{color:#666666 !important}.bg-dark2-color{background-color:#666666 !important}.dark3-color{color:#777777 !important}.bg-dark3-color{background-color:#777777 !important}.dark4-color{color:#999999 !important}.bg-dark4-color{background-color:#999999 !important}.primary-color{color:#45b984 !important}.bg-primary-color{background-color:#45b984 !important}.primary1-color{color:rgba(69,185,132,0.45) !important}.bg-primary1-color{background-color:rgba(69,185,132,0.45) !important}.primary2-color{color:rgba(69,185,132,0.15) !important}.bg-primary2-color{background-color:rgba(69,185,132,0.15) !important}.link{color:#45b984;cursor:pointer;text-decoration:none;outline:none;transition:color .2s ease}.link:hover{color:#379469 !important}.link:active{color:#296f4f !important}.link:active,.link:hover{outline:0;text-decoration:none}.link[disabled]{color:#999999 !important;cursor:default}.clearfix::after{content:"";display:block;clear:both}.flex{display:flex}.flex-column{flex-direction:column}.flex1{flex:1}.middle{position:absolute;top:50%;transform:translate(0%, -50%)}.absolute{position:absolute}.relative{position:relative}.pointer{cursor:pointer}.middle-center{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.middle-right{position:absolute;right:0;top:50%;transform:translate(0%, -50%)}.overflow-y{overflow-y:auto}.float-right{float:right}.text-hover{cursor:pointer;transition:color .2s ease}.text-hover:hover{color:#45b984 !important}.text-hover:active{color:#30815c !important}.text-hover.h-pop-trigger .text-hover{color:#379469 !important}.text-hover[disabled]{color:#999999 !important;cursor:default}.dark-text-hover{cursor:pointer;transition:color .2s ease;color:#999999}.dark-text-hover:hover{color:#666666 !important}.dark-text-hover:active{color:#4d4d4d !important}.dark-text-hover[disabled]{color:#999999 !important;cursor:default}.text-left{text-align:left !important}.text-center{text-align:center !important}.text-right{text-align:right !important}.bottom-line{border-bottom:1px solid #eeeeee}.h-split{display:inline-block;width:5px;height:2px}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-checkbox .h-checkbox-native{-webkit-appearance:none;display:inline-block;width:16px;height:16px;margin:0px;border:1px solid #d3d3d3;cursor:pointer;box-sizing:border-box;border-radius:2px;vertical-align:middle;transition:background,border linear .2s;position:relative;font-family:inherit;outline:none;background-color:#ffffff}.h-checkbox .h-checkbox-native[checked],.h-checkbox .h-checkbox-native[indeterminate]{background-color:#45b984;border:1px solid #45b984}.h-checkbox .h-checkbox-native:after{box-sizing:content-box;content:"";border:2px solid #ffffff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;width:4px;transition:all .2s;transform:rotate(45deg) scale(0)}.h-checkbox .h-checkbox-native[indeterminate]:after{content:"";width:8px;height:0px;left:2px;top:6px;transform:rotate(0deg) scale(1)}.h-checkbox .h-checkbox-native[checked]:after{transform:rotate(45deg) scale(1)}.h-checkbox .h-checkbox-native:hover{border-color:#45b984}.h-checkbox .h-checkbox-native[disabled],.h-checkbox .h-checkbox-native[readonly]{pointer-events:painted;cursor:not-allowed;border-color:#d3d3d3;background-color:#f5f5f5}.h-checkbox .h-checkbox-native[disabled]:after,.h-checkbox .h-checkbox-native[readonly]:after{border-color:#d3d3d3}.h-checkbox .h-checkbox-native[disabled][checked],.h-checkbox .h-checkbox-native[readonly][checked],.h-checkbox .h-checkbox-native[disabled][indeterminate],.h-checkbox .h-checkbox-native[readonly][indeterminate]{background-color:#d3d3d3}.h-checkbox .h-checkbox-native[disabled][checked]:after,.h-checkbox .h-checkbox-native[readonly][checked]:after,.h-checkbox .h-checkbox-native[disabled][indeterminate]:after,.h-checkbox .h-checkbox-native[readonly][indeterminate]:after{border-color:#ffffff}.h-checkbox{display:inline-block}.h-checkbox>label{margin-right:15px;display:inline-block}.h-checkbox>label:last-child{margin-right:0}.h-checkbox>label>:nth-child(2){margin-left:5px}.h-checkbox>label span{line-height:16px;vertical-align:middle}.h-checkbox>label i{line-height:16px;vertical-align:middle}.h-checkbox>label:hover>.h-checkbox-native{border-color:#45b984}.h-checkbox .h-checkbox-disabled{color:#999999;pointer-events:painted;cursor:not-allowed}.h-checkbox .h-checkbox-disabled:hover>.h-checkbox-native{border-color:#d3d3d3}.h-radio>label>.h-radio-icon{-webkit-appearance:none;display:inline-block;width:16px;height:16px;margin:0px;border:1px solid #d3d3d3;background:#FFF;border-radius:8px;cursor:pointer;position:relative;vertical-align:-3px;overflow:hidden;margin-right:5px;transition:all linear .2s;box-sizing:border-box;font-family:inherit;outline:none}.h-radio>label>.h-radio-icon:after{content:"";display:block;background-color:#45b984;transition:all linear .2s;transform:scale(0);width:8px;height:8px;border-radius:4px;position:relative;left:3px;top:3px}.h-radio>label>.h-radio-icon:checked,.h-radio>label>.h-radio-icon[checked]{border-color:#45b984}.h-radio>label>.h-radio-icon:checked:after,.h-radio>label>.h-radio-icon[checked]:after{transform:scale(1)}.h-radio>label>.h-radio-icon:hover{border-color:#45b984}.h-radio>label>.h-radio-icon[disabled]{pointer-events:painted;cursor:not-allowed;border-color:#d3d3d3;background-color:#f5f5f5}.h-radio>label>.h-radio-icon[disabled]:checked,.h-radio>label>.h-radio-icon[disabled][checked]{background-color:#f5f5f5}.h-radio>label>.h-radio-icon[disabled]:checked:after,.h-radio>label>.h-radio-icon[disabled][checked]:after{background-color:#d3d3d3}.h-radio{display:inline-block}.h-radio>label{margin-right:15px;height:30px;line-height:30px;display:inline-block}.h-radio>label:last-child{margin-right:0}.h-radio>label:hover>.h-radio-icon{border-color:#45b984}.h-radio.h-radio-disabled>label{color:#999999;pointer-events:painted;cursor:not-allowed}.h-radio.h-radio-disabled>label:hover>.h-radio-icon{border-color:#d3d3d3}.h-search{min-width:150px;position:relative;display:inline-block;vertical-align:middle}.h-search-block{display:block}.h-search .h-search-container{display:flex}.h-search .h-search-container .h-search-input{position:relative;flex:1}.h-search .h-search-container .h-search-input input{width:100%;padding-right:30px}.h-search>.h-icon-search,.h-search .h-icon-close{position:absolute;top:50%;right:8px;font-size:12px;z-index:3;cursor:pointer;transition:color .2s ease;color:#666666;margin-top:-6px}.h-search>.h-icon-search:hover,.h-search .h-icon-close:hover{color:#45b984 !important}.h-search>.h-icon-search:active,.h-search .h-icon-close:active{color:#30815c !important}.h-search>.h-icon-search.h-pop-trigger .h-search>.h-icon-search,.h-search>.h-icon-search.h-pop-trigger .h-search .h-icon-close,.h-search .h-icon-close.h-pop-trigger .h-search>.h-icon-search,.h-search .h-icon-close.h-pop-trigger .h-search .h-icon-close{color:#379469 !important}.h-search>.h-icon-search[disabled],.h-search .h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-search.h-search-has-button input{border-radius:4px 0 0 4px}.h-search.h-search-has-button .h-btn{height:30px;line-height:28px;padding-top:0;padding-bottom:0;border-radius:0 4px 4px 0;margin-left:-1px}.h-search.h-search-has-button .h-icon-search-end{display:none}.h-search .h-icon-close{display:none;cursor:pointer;transition:color .2s ease}.h-search .h-icon-close:hover{color:#45b984 !important}.h-search .h-icon-close:active{color:#30815c !important}.h-search .h-icon-close.h-pop-trigger .h-search .h-icon-close{color:#379469 !important}.h-search .h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-search-searching.h-search-end>.h-icon-search{display:none}.h-search-searching .h-icon-close{display:block}.h-search.h-search-front>.h-icon-search{z-index:1;left:8px;right:auto}.h-search.h-search-front input{padding-left:30px}.h-search.h-search-end>.h-icon-search{cursor:pointer;transition:color .2s ease}.h-search.h-search-end>.h-icon-search:hover{color:#45b984 !important}.h-search.h-search-end>.h-icon-search:active{color:#30815c !important}.h-search.h-search-end>.h-icon-search.h-pop-trigger .h-search.h-search-end>.h-icon-search{color:#379469 !important}.h-search.h-search-end>.h-icon-search[disabled]{color:#999999 !important;cursor:default}.h-notify{z-index:1000;position:relative}.h-notify .h-notify-body{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1000}.h-notify .h-notify-container{background-color:#ffffff;border-radius:3px;box-shadow:0 5px 10px rgba(0,0,0,0.1);transition:.2s;opacity:0}.h-notify .h-notify-content{position:relative}.h-notify .h-notify-close{display:block;position:absolute;right:8px;top:12px;font-size:14px;line-height:1;text-align:center;z-index:1;cursor:pointer;transition:color .2s ease;color:#999999}.h-notify .h-notify-close:hover{color:#666666 !important}.h-notify .h-notify-close:active{color:#4d4d4d !important}.h-notify .h-notify-close[disabled]{color:#999999 !important;cursor:default}.h-notify .h-notify-mask{position:fixed;top:0;bottom:0;left:0;right:0;transition:opacity .2s;background:rgba(0,0,0,0.16);z-index:1000;opacity:0}.h-notify.h-notify-show .h-notify-mask{opacity:1}.h-notify.h-notify-show .h-notify-container{opacity:1}.h-message-container{position:fixed;top:30px;z-index:1010;pointer-events:none;left:0;text-align:center;right:0}.h-message .h-notify-container{margin:0 auto;opacity:0;position:relative;overflow:hidden;display:inline-block;pointer-events:initial;max-height:0}.h-message .h-notify-content{padding:0px 18px;transition:.2s}.h-message .h-notify-content [class^="h-icon"],.h-message .h-notify-content [class*=" h-icon"]{margin-right:10px;display:inline-block}.h-message.h-notify-has-close .h-notify-content{padding-right:40px}.h-message.h-notify-show .h-notify-container{max-height:1000px;margin-top:10px}.h-message.h-notify-show .h-notify-content{padding-top:8px;padding-bottom:8px}.h-notice{transition:.7s;pointer-events:initial}.h-notice-container{position:fixed;top:50px;right:10px;z-index:1000;pointer-events:none}.h-notice .h-notify-container{min-width:350px;right:-100px;margin-bottom:20px;transform:none;position:relative;max-height:0;overflow:hidden}.h-notice .h-notify-container .h-notice-header,.h-notice .h-notify-container header:first-child{min-height:20px;line-height:20px;font-size:16px;padding:16px 0 0 16px}.h-notice .h-notify-container .h-notice-footer,.h-notice .h-notify-container footer:last-child{padding:10px 16px;text-align:left}.h-notice .h-notify-content{padding:12px 16px;color:#333333}.h-notice .h-notify-content [class^="h-icon"],.h-notice .h-notify-content [class*=" h-icon"]{margin-right:10px;display:inline-block}.h-notice.h-notice-has-icon .h-notice-header,.h-notice.h-notice-has-icon header:first-child{margin-left:40px}.h-notice.h-notice-has-icon .h-notify-content{margin-left:40px}.h-notice.h-notice-has-icon .h-notify-content [class^="h-icon"],.h-notice.h-notice-has-icon .h-notify-content [class*=" h-icon"]{margin-right:10px;float:left;font-size:30px;position:absolute;left:-25px;top:-20px}.h-notice.h-notice-has-icon headerfooter{margin-left:40px}.h-notice.h-notify-show .h-notify-container{right:0px;max-height:1000px}.h-modal{position:static}.h-modal .h-notify-body{position:relative;overflow:initial}.h-modal .h-notify-container{position:fixed}.h-modal .h-notify-container .h-modal-header,.h-modal .h-notify-container header:first-child{min-height:40px;line-height:40px;font-size:16px;padding-left:15px}.h-modal .h-notify-container .h-modal-footer,.h-modal .h-notify-container footer:last-child{padding:10px 15px;text-align:right}.h-modal .h-notify-content{padding:10px 15px}.h-modal .h-notify-content.h-notify-content-component{padding:0}.h-modal-type-default .h-notify-container{left:50%;transform:translate(-50%, 0%);top:10px;margin-bottom:10px;min-width:350px}.h-modal-full-screen .h-notify-container{margin-bottom:0;transform:none;top:30px !important;bottom:30px;left:30px;right:30px;display:flex;flex-direction:column}.h-modal-full-screen .h-notify-container .h-notify-content{flex:1;overflow:auto}.h-modal-transparent .h-notify-container{background:none;box-shadow:none}.h-modal.h-modal-has-divider .h-notify-container .h-modal-header,.h-modal.h-modal-has-divider .h-notify-container header:first-child{border-bottom:1px solid #eeeeee}.h-modal.h-modal-has-divider .h-notify-container .h-modal-footer,.h-modal.h-modal-has-divider .h-notify-container footer:last-child{border-top:1px solid #eeeeee}.h-modal.h-notify-has-mask .h-notify-body{position:fixed;overflow:auto}.h-modal.h-notify-has-mask .h-notify-container{position:absolute}.h-modal.h-notify-no-mask .h-notify-container{z-index:1000}.h-modal.h-notify-show.h-modal-type-default .h-notify-container{top:100px}.h-modal.h-notify-show.h-modal-container-center .h-notify-container{top:50%;transform:translate(-50%, -50%)}.h-modal.h-notify-show.h-modal-full-screen .h-notify-container{top:0 !important;bottom:0;left:0;right:0}.h-modal.h-notify-draggable .h-modal-header,.h-modal.h-notify-draggable header:first-child{cursor:move}.h-modal-type-drawer-right .h-notify-body,.h-modal-type-drawer-left .h-notify-body{overflow:hidden !important}.h-modal-type-drawer-right .h-notify-container,.h-modal-type-drawer-left .h-notify-container{top:0;bottom:0;display:flex;flex-direction:column}.h-modal-type-drawer-right .h-notify-container .h-notify-content,.h-modal-type-drawer-left .h-notify-container .h-notify-content{flex:1;overflow:auto}.h-modal-type-drawer-right.h-notify-show .h-notify-container,.h-modal-type-drawer-left.h-notify-show .h-notify-container{transform:translateX(0)}.h-modal-type-drawer-right .h-notify-container{transform:translateX(100%);right:0}.h-modal-type-drawer-left .h-notify-container{transform:translateX(-100%);left:0}.h-tooltip{z-index:1060;opacity:0;transition:.35s cubic-bezier(.24, .22, .015, 1.56);transition-property:transform,opacity}.h-tooltip.h-tooltip-editable{z-index:1000}.h-tooltip .h-tooltip-arrow{width:0;height:0;border-style:solid;position:absolute;border-color:transparent}.h-tooltip .h-tooltip-inner{max-width:250px;text-align:left;text-decoration:none;background:#333333;color:#ffffff;border-radius:4px}.h-tooltip .h-tooltip-inner-content{padding:4px 10px}.h-tooltip.h-tooltip-white .h-tooltip-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;content:" ";border-width:6px;margin-left:-6px;z-index:1}.h-tooltip.h-tooltip-white .h-tooltip-inner{background:#ffffff;color:#333333;box-shadow:0 2px 10px 0 rgba(0,0,0,0.15)}.h-tooltip.h-tooltip-white[x-placement^="top"] .h-tooltip-arrow{border-top-color:#e1e1e1}.h-tooltip.h-tooltip-white[x-placement^="top"] .h-tooltip-arrow:after{bottom:1px;border-bottom-width:0;border-top-color:#ffffff}.h-tooltip.h-tooltip-white[x-placement^="right"] .h-tooltip-arrow{border-right-color:#e1e1e1}.h-tooltip.h-tooltip-white[x-placement^="right"] .h-tooltip-arrow:after{left:7px;top:-6px;border-left-width:0;border-right-color:#ffffff}.h-tooltip.h-tooltip-white[x-placement^="left"] .h-tooltip-arrow{border-left-color:#e1e1e1}.h-tooltip.h-tooltip-white[x-placement^="left"] .h-tooltip-arrow:after{right:1px;top:-6px;border-right-width:0;border-left-color:#ffffff}.h-tooltip.h-tooltip-white[x-placement^="bottom"] .h-tooltip-arrow{border-bottom-color:#e1e1e1}.h-tooltip.h-tooltip-white[x-placement^="bottom"] .h-tooltip-arrow:after{top:1px;border-top-width:0;border-bottom-color:#ffffff}.h-tooltip[x-placement^="top"]{padding:5px 0 8px 0}.h-tooltip[x-placement^="right"]{padding:0 5px 0 8px}.h-tooltip[x-placement^="bottom"]{padding:8px 0 5px 0}.h-tooltip[x-placement^="left"]{padding:0 8px 0 5px}.h-tooltip[x-placement^="top"] .h-tooltip-arrow{bottom:3px;border-width:5px 5px 0;border-top-color:#333333}.h-tooltip[x-placement="top"] .h-tooltip-arrow{left:50%;margin-left:-5px}.h-tooltip[x-placement="top-start"] .h-tooltip-arrow{left:16px}.h-tooltip[x-placement="top-end"] .h-tooltip-arrow{right:16px}.h-tooltip[x-placement^="right"] .h-tooltip-arrow{left:3px;border-width:5px 5px 5px 0;border-right-color:#333333}.h-tooltip[x-placement="right"] .h-tooltip-arrow{top:50%;margin-top:-5px}.h-tooltip[x-placement="right-start"] .h-tooltip-arrow{top:8px}.h-tooltip[x-placement="right-end"] .h-tooltip-arrow{bottom:8px}.h-tooltip[x-placement^="left"] .h-tooltip-arrow{right:3px;border-width:5px 0 5px 5px;border-left-color:#333333}.h-tooltip[x-placement="left"] .h-tooltip-arrow{top:50%;margin-top:-5px}.h-tooltip[x-placement="bottom"] .h-tooltip-arrow{left:50%;margin-left:-5px}.h-tooltip[x-placement="left-start"] .h-tooltip-arrow{top:8px}.h-tooltip[x-placement="left-end"] .h-tooltip-arrow{bottom:8px}.h-tooltip[x-placement^="bottom"] .h-tooltip-arrow{top:3px;border-width:0 5px 5px;border-bottom-color:#333333}.h-tooltip[x-placement="bottom-start"] .h-tooltip-arrow{left:16px}.h-tooltip[x-placement="bottom-end"] .h-tooltip-arrow{right:16px}.h-tooltip-show{display:inline-block}[aria-hidden=false]{transform:scale(1);opacity:1}.h-dropdown{z-index:1000}.h-dropdown-inner{transition:.25s cubic-bezier(.24, .22, .015, 1.56);transition-property:transform,opacity;transform:scale(.8);max-height:500px;opacity:0}.h-dropdown-inner>div{display:block;box-sizing:border-box;border-radius:4px;background:#ffffff;box-shadow:0 5px 10px rgba(0,0,0,0.1)}.h-dropdown[aria-hidden=false] .h-dropdown-inner{transform:scale(1);opacity:1}.h-dropdown[x-placement=top-start] .h-dropdown-inner{transform-origin:bottom left}.h-dropdown[x-placement=top] .h-dropdown-inner{transform-origin:bottom}.h-dropdown[x-placement=top-end] .h-dropdown-inner{transform-origin:bottom right}.h-dropdown[x-placement=bottom-start] .h-dropdown-inner{transform-origin:top left}.h-dropdown[x-placement=bottom-end] .h-dropdown-inner{transform-origin:top right}.h-dropdown[x-placement=bottom] .h-dropdown-inner{transform-origin:top}.h-dropdowncustom{display:inline-block;vertical-align:middle}.h-dropdowncustom-show{position:relative}.h-dropdowncustom-show-toggle .h-dropdowncustom-show-content{padding-right:26px}.h-dropdowncustom-show>.h-icon-down{color:#666666;position:absolute;right:8px;top:50%;height:10px;font-size:12px;line-height:12px;transform:translate(0, -50%) scale(.8);transition:transform .2s}.h-dropdowncustom-show.h-pop-trigger>.h-icon-down{transform:rotate(-180deg) translate(0, 50%) scale(.8)}.h-dropdowncustom-show-content{display:inline-block}.h-dropdowncustom-show.h-dropdowncustom-empty .h-icon-down{right:auto;left:50%;margin-left:-5px}.h-dropdowncustom-show.h-dropdowncustom-disabled{cursor:default;color:#999999 !important}.h-dropdowncustom-show.h-dropdowncustom-disabled>.h-icon-down{color:#999999 !important}.h-dropdowncustom.h-btn{padding:0}.h-dropdowncustom.h-btn .h-dropdowncustom-show{padding:8px 15px;padding-right:0}.h-dropdowncustom.h-btn .h-dropdowncustom-show.h-dropdowncustom-empty{width:30px}.h-dropdowncustom.h-btn .h-dropdowncustom-show .h-icon-down{color:inherit}.h-text-dropdown{cursor:pointer}.h-text-dropdown>span{vertical-align:middle}.h-text-dropdown:hover,.h-text-dropdown.h-pop-trigger{color:#45b984}.h-tabs>.h-tabs-item{cursor:pointer;display:inline-block;transition:.2s all;position:relative}.h-tabs-default{padding:0 20px;border-bottom:1px solid #eeeeee;line-height:1;font-size:15px}.h-tabs-default>.h-tabs-item{padding:10px 15px;margin-bottom:-4px;border-bottom:3px solid transparent}.h-tabs-default>.h-tabs-item+div{margin-left:20px}.h-tabs-default>.h-tabs-item:hover,.h-tabs-default>.h-tabs-item.h-tabs-item-selected{color:#45b984;border-bottom:3px solid #45b984}.h-tabs-card{border-bottom:1px solid #d3d3d3;line-height:1}.h-tabs-card>.h-tabs-item{padding:8px 16px;margin-bottom:-1px;border-radius:4px 4px 0 0;border:1px solid transparent;border-top:3px solid transparent}.h-tabs-card>.h-tabs-item+div{margin-left:5px}.h-tabs-card>.h-tabs-item:hover,.h-tabs-card>.h-tabs-item.h-tabs-item-selected{color:#45b984;background:#ffffff;border-color:#d3d3d3;border-top-color:#45b984;border-bottom-color:#ffffff}.h-tabs-menu{line-height:1;font-size:15px}.h-tabs-menu>.h-tabs-item{display:block;padding:12px 16px}.h-tabs-menu>.h-tabs-item+div{margin-top:5px}.h-tabs-menu>.h-tabs-item:hover,.h-tabs-menu>.h-tabs-item.h-tabs-item-selected{color:#45b984}input.h-input,.h-textarea{min-width:1px;position:relative;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;display:inline-block;padding:4px 7.5px;line-height:1.5;font-size:13px;transition:all linear .2s;box-sizing:border-box;-webkit-appearance:none;font-family:inherit;vertical-align:top;outline:none}input.h-input:hover,.h-textarea:hover{border-color:#6ac79d}input.h-input:focus,.h-textarea:focus{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}input.h-input[disabled],.h-textarea[disabled],input.h-input[readonly],.h-textarea[readonly]{border-color:#d3d3d3}input.h-input[disabled]:focus,.h-textarea[disabled]:focus,input.h-input[readonly]:focus,.h-textarea[readonly]:focus{box-shadow:none}input.h-input[readonly],.h-textarea[readonly]{color:#555555;box-shadow:none;cursor:default}input.h-input[disabled],.h-textarea[disabled]{color:#999999;background-color:#f5f5f5;pointer-events:painted;cursor:not-allowed}.h-form-item-valid-error input.h-input,.h-form-item-valid-error .h-textarea{border-color:#E11617}.h-form-item-valid-error input.h-input:focus,.h-form-item-valid-error .h-textarea:focus{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}input.h-input{height:30px}.h-textarea{padding:7.5px}div.h-input{position:relative;display:inline-block}div.h-input>[class^="h-icon"],div.h-input>[class*=" h-icon"]{position:absolute;top:50%;right:8px;font-size:13px;z-index:3;transform:translate(0%, -50%)}div.h-input>.h-icon-close{color:#666666;transform-origin:center;cursor:pointer;transition:color .2s ease;transform:translate(0%, -50%) scale(.9)}div.h-input>.h-icon-close:hover{color:#45b984 !important}div.h-input>.h-icon-close:active{color:#30815c !important}div.h-input>.h-icon-close.h-pop-trigger div.h-input>.h-icon-close{color:#379469 !important}div.h-input>.h-icon-close[disabled]{color:#999999 !important;cursor:default}div.h-input>input{width:100%;position:relative;z-index:2}div.h-input.h-input-prefix-icon>[class^="h-icon"],div.h-input.h-input-prefix-icon>[class*=" h-icon"]{right:auto;left:8px}div.h-input.h-input-prefix-icon>input{padding-left:25px}div.h-input.h-input-suffix-icon>input{padding-right:25px}div.h-input-group{position:relative;display:flex}div.h-input-group>.h-btn{padding-top:7px;padding-bottom:7px;border-top-left-radius:0;border-bottom-left-radius:0}div.h-input-group>.h-numberinput>.h-numberinput-show,div.h-input-group>.h-btn,div.h-input-group>.h-select>.h-select-show{border-top-left-radius:0;border-bottom-left-radius:0}div.h-input-group>.h-numberinput:not(:last-child)>.h-numberinput-show,div.h-input-group>.h-select:not(:last-child)>.h-select-show{border-top-right-radius:0;border-bottom-right-radius:0}div.h-input-group>input,div.h-input-group>div{position:relative;z-index:2;margin:0;flex:1}div.h-input-group>.h-select{overflow:hidden}div.h-input-group>div{padding:0 !important}div.h-input-group>input:not(:last-child),div.h-input-group>div:not(:last-child) input{border-top-right-radius:0;border-bottom-right-radius:0}div.h-input-group>span{line-height:28px}div.h-input-group>.h-input-addon{line-height:28px;flex:inherit;text-align:center;background-color:#f3f3f3;border-top:1px solid #eeeeee;border-bottom:1px solid #eeeeee;height:30px;vertical-align:middle;padding:0px 5px;min-width:24px;white-space:nowrap;color:#999999;display:inline-block}div.h-input-group>.h-input-addon:first-child{border-radius:4px 0 0 4px;border-left:1px solid #eeeeee}div.h-input-group>.h-input-addon:last-child,div.h-input-group>.h-input-addon.last-child{border-radius:0 4px 4px 0;border-right:1px solid #eeeeee}div.h-input-group>.h-input-addon+input,div.h-input-group>.h-input-addon+div input{border-top-left-radius:0;border-bottom-left-radius:0}div.h-input-group>.h-input-addon>.h-select{display:block}div.h-input-group>.h-input-addon>.h-select .h-select-placeholder,div.h-input-group>.h-input-addon>.h-select .h-select-value-single{height:28px;line-height:28px}.h-btn{border:none;outline:none;padding:8px 15px;font-family:inherit;display:inline-block;border-radius:4px;color:inherit;font-size:13px;line-height:1;box-sizing:border-box;cursor:pointer;transition:all .2s;background-color:transparent;border:1px solid #d3d3d3;box-shadow:0 1px 1px 0 #eeeeee;background-color:#FFF}.h-btn:hover{border-color:#7ccea9;color:#7ccea9}.h-btn:active{border-color:#30815c;color:#30815c}.h-btn>i+span{margin-left:5px}.h-btn>span+i{margin-left:5px}.h-btn.h-btn-primary{background-color:#45b984;border-color:#42b27f;color:#ffffff}.h-btn.h-btn-primary:hover{border-color:#6ac79d;background-color:#6ac79d}.h-btn.h-btn-primary:active{border-color:#3a9b6f;background-color:#3a9b6f}.h-btn.h-btn-red{background-color:#E11617;border-color:#d81516;color:#ffffff}.h-btn.h-btn-red:hover{border-color:#ec3e3f;background-color:#ec3e3f}.h-btn.h-btn-red:active{border-color:#bc1213;background-color:#bc1213}.h-btn.h-btn-gray{background-color:#c1c1c1;border-color:#bcbcbc;color:#ffffff}.h-btn.h-btn-gray:hover{border-color:#dbdbdb;background-color:#dbdbdb}.h-btn.h-btn-gray:active{border-color:#adadad;background-color:#adadad}.h-btn.h-btn-yellow{background-color:#FFAE00;border-color:#f5a700;color:#ffffff}.h-btn.h-btn-yellow:hover{border-color:#ffbe33;background-color:#ffbe33}.h-btn.h-btn-yellow:active{border-color:#d69200;background-color:#d69200}.h-btn.h-btn-green{background-color:#13CE66;border-color:#12c561;color:#ffffff}.h-btn.h-btn-green:hover{border-color:#15e572;background-color:#15e572}.h-btn.h-btn-green:active{border-color:#10a954;background-color:#10a954}.h-btn.h-btn-blue{background-color:#3B91FF;border-color:#318bff;color:#ffffff}.h-btn.h-btn-blue:hover{border-color:#6eaeff;background-color:#6eaeff}.h-btn.h-btn-blue:active{border-color:#127aff;background-color:#127aff}.h-btn.h-btn-text{box-shadow:none;border-color:transparent}.h-btn.h-btn-text-primary{border-color:#45b984;color:#45b984}.h-btn.h-btn-text-primary:hover{border-color:#7ccea9;color:#7ccea9}.h-btn.h-btn-text-primary:active{border-color:#30815c;color:#30815c}.h-btn.h-btn-text-red{border-color:#E11617;color:#E11617}.h-btn.h-btn-text-red:hover{border-color:#ee5556;color:#ee5556}.h-btn.h-btn-text-red:active{border-color:#9b0f10;color:#9b0f10}.h-btn.h-btn-text-gray{border-color:#c1c1c1;color:#c1c1c1}.h-btn.h-btn-text-gray:hover{border-color:#e7e7e7;color:#e7e7e7}.h-btn.h-btn-text-gray:active{border-color:#9b9b9b;color:#9b9b9b}.h-btn.h-btn-text-yellow{border-color:#FFAE00;color:#FFAE00}.h-btn.h-btn-text-yellow:hover{border-color:#ffc64d;color:#ffc64d}.h-btn.h-btn-text-yellow:active{border-color:#b37a00;color:#b37a00}.h-btn.h-btn-text-green{border-color:#13CE66;color:#13CE66}.h-btn.h-btn-text-green:hover{border-color:#40ed8d;color:#40ed8d}.h-btn.h-btn-text-green:active{border-color:#0d8843;color:#0d8843}.h-btn.h-btn-text-blue{border-color:#3B91FF;color:#3B91FF}.h-btn.h-btn-text-blue:hover{border-color:#88bcff;color:#88bcff}.h-btn.h-btn-text-blue:active{border-color:#0068ee;color:#0068ee}.h-btn.h-btn-no-border{box-shadow:none;border-color:transparent !important}.h-btn.h-btn-circle{border-radius:20px}.h-btn.h-btn-icon-circle{border-radius:20px;padding:8px}.h-btn.h-btn-loading{pointer-events:none;opacity:.8}.h-btn.h-btn-block{display:block;width:100%}.h-btn.h-btn-transparent{background:transparent}.h-btn[disabled]{cursor:not-allowed;background-color:#f5f5f5;border-color:#d3d3d3;color:#999999}.h-btn[disabled]:hover{background-color:#f5f5f5;border-color:#d3d3d3;color:#999999}.h-btn[disabled].h-btn-text{border-color:transparent;background-color:transparent}.h-btn+.h-btn{margin-left:4px}.h-btn.h-btn-l{padding:10px 20px}.h-btn.h-btn-m{padding:7px 16px}.h-btn.h-btn-s{padding:5px 10px}.h-btn.h-btn-xs{padding:2px 6px}.h-btn-group{display:inline-block;vertical-align:middle}.h-btn-group .h-btn{border-radius:0;float:left;position:relative}.h-btn-group .h-btn+.h-btn{margin-left:-1px}.h-btn-group .h-btn:hover{z-index:2}.h-btn-group .h-btn:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.h-btn-group .h-btn:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.h-btn-group.h-btn-group-circle>:first-of-type{border-top-left-radius:20px;border-bottom-left-radius:20px}.h-btn-group.h-btn-group-circle>:last-of-type{border-bottom-right-radius:20px;border-top-right-radius:20px}.h-btn-group.h-btn-group .h-btn[disabled]{z-index:-1}.h-btn-group.h-btn-group-l .h-btn{font-size:110%;padding:10px 20px}.h-btn-group.h-btn-group-s .h-btn{padding:5px 8px}.h-btn-group.h-btn-group-xs .h-btn{padding:2px 6px;font-size:90%}.h-col-24{float:left;display:block;box-sizing:border-box;width:100%}.h-col-23{float:left;display:block;box-sizing:border-box;width:95.83333333%}.h-col-22{float:left;display:block;box-sizing:border-box;width:91.66666667%}.h-col-21{float:left;display:block;box-sizing:border-box;width:87.5%}.h-col-20{float:left;display:block;box-sizing:border-box;width:83.33333333%}.h-col-19{float:left;display:block;box-sizing:border-box;width:79.16666667%}.h-col-18{float:left;display:block;box-sizing:border-box;width:75%}.h-col-17{float:left;display:block;box-sizing:border-box;width:70.83333333%}.h-col-16{float:left;display:block;box-sizing:border-box;width:66.66666667%}.h-col-15{float:left;display:block;box-sizing:border-box;width:62.5%}.h-col-14{float:left;display:block;box-sizing:border-box;width:58.33333333%}.h-col-13{float:left;display:block;box-sizing:border-box;width:54.16666667%}.h-col-12{float:left;display:block;box-sizing:border-box;width:50%}.h-col-11{float:left;display:block;box-sizing:border-box;width:45.83333333%}.h-col-10{float:left;display:block;box-sizing:border-box;width:41.66666667%}.h-col-9{float:left;display:block;box-sizing:border-box;width:37.5%}.h-col-8{float:left;display:block;box-sizing:border-box;width:33.33333333%}.h-col-7{float:left;display:block;box-sizing:border-box;width:29.16666667%}.h-col-6{float:left;display:block;box-sizing:border-box;width:25%}.h-col-5{float:left;display:block;box-sizing:border-box;width:20.83333333%}.h-col-4{float:left;display:block;box-sizing:border-box;width:16.66666667%}.h-col-3{float:left;display:block;box-sizing:border-box;width:12.5%}.h-col-2{float:left;display:block;box-sizing:border-box;width:8.33333333%}.h-col-1{float:left;display:block;box-sizing:border-box;width:4.16666667%}@media (min-width:1800px){.h-col-xl-24{float:left;display:block;box-sizing:border-box;width:100%}.h-col-xl-23{float:left;display:block;box-sizing:border-box;width:95.83333333%}.h-col-xl-22{float:left;display:block;box-sizing:border-box;width:91.66666667%}.h-col-xl-21{float:left;display:block;box-sizing:border-box;width:87.5%}.h-col-xl-20{float:left;display:block;box-sizing:border-box;width:83.33333333%}.h-col-xl-19{float:left;display:block;box-sizing:border-box;width:79.16666667%}.h-col-xl-18{float:left;display:block;box-sizing:border-box;width:75%}.h-col-xl-17{float:left;display:block;box-sizing:border-box;width:70.83333333%}.h-col-xl-16{float:left;display:block;box-sizing:border-box;width:66.66666667%}.h-col-xl-15{float:left;display:block;box-sizing:border-box;width:62.5%}.h-col-xl-14{float:left;display:block;box-sizing:border-box;width:58.33333333%}.h-col-xl-13{float:left;display:block;box-sizing:border-box;width:54.16666667%}.h-col-xl-12{float:left;display:block;box-sizing:border-box;width:50%}.h-col-xl-11{float:left;display:block;box-sizing:border-box;width:45.83333333%}.h-col-xl-10{float:left;display:block;box-sizing:border-box;width:41.66666667%}.h-col-xl-9{float:left;display:block;box-sizing:border-box;width:37.5%}.h-col-xl-8{float:left;display:block;box-sizing:border-box;width:33.33333333%}.h-col-xl-7{float:left;display:block;box-sizing:border-box;width:29.16666667%}.h-col-xl-6{float:left;display:block;box-sizing:border-box;width:25%}.h-col-xl-5{float:left;display:block;box-sizing:border-box;width:20.83333333%}.h-col-xl-4{float:left;display:block;box-sizing:border-box;width:16.66666667%}.h-col-xl-3{float:left;display:block;box-sizing:border-box;width:12.5%}.h-col-xl-2{float:left;display:block;box-sizing:border-box;width:8.33333333%}.h-col-xl-1{float:left;display:block;box-sizing:border-box;width:4.16666667%}}@media (min-width:1200px) and (max-width:1800px){.h-col-lg-24{float:left;display:block;box-sizing:border-box;width:100%}.h-col-lg-23{float:left;display:block;box-sizing:border-box;width:95.83333333%}.h-col-lg-22{float:left;display:block;box-sizing:border-box;width:91.66666667%}.h-col-lg-21{float:left;display:block;box-sizing:border-box;width:87.5%}.h-col-lg-20{float:left;display:block;box-sizing:border-box;width:83.33333333%}.h-col-lg-19{float:left;display:block;box-sizing:border-box;width:79.16666667%}.h-col-lg-18{float:left;display:block;box-sizing:border-box;width:75%}.h-col-lg-17{float:left;display:block;box-sizing:border-box;width:70.83333333%}.h-col-lg-16{float:left;display:block;box-sizing:border-box;width:66.66666667%}.h-col-lg-15{float:left;display:block;box-sizing:border-box;width:62.5%}.h-col-lg-14{float:left;display:block;box-sizing:border-box;width:58.33333333%}.h-col-lg-13{float:left;display:block;box-sizing:border-box;width:54.16666667%}.h-col-lg-12{float:left;display:block;box-sizing:border-box;width:50%}.h-col-lg-11{float:left;display:block;box-sizing:border-box;width:45.83333333%}.h-col-lg-10{float:left;display:block;box-sizing:border-box;width:41.66666667%}.h-col-lg-9{float:left;display:block;box-sizing:border-box;width:37.5%}.h-col-lg-8{float:left;display:block;box-sizing:border-box;width:33.33333333%}.h-col-lg-7{float:left;display:block;box-sizing:border-box;width:29.16666667%}.h-col-lg-6{float:left;display:block;box-sizing:border-box;width:25%}.h-col-lg-5{float:left;display:block;box-sizing:border-box;width:20.83333333%}.h-col-lg-4{float:left;display:block;box-sizing:border-box;width:16.66666667%}.h-col-lg-3{float:left;display:block;box-sizing:border-box;width:12.5%}.h-col-lg-2{float:left;display:block;box-sizing:border-box;width:8.33333333%}.h-col-lg-1{float:left;display:block;box-sizing:border-box;width:4.16666667%}}@media (min-width:992px) and (max-width:1200px){.h-col-md-24{float:left;display:block;box-sizing:border-box;width:100%}.h-col-md-23{float:left;display:block;box-sizing:border-box;width:95.83333333%}.h-col-md-22{float:left;display:block;box-sizing:border-box;width:91.66666667%}.h-col-md-21{float:left;display:block;box-sizing:border-box;width:87.5%}.h-col-md-20{float:left;display:block;box-sizing:border-box;width:83.33333333%}.h-col-md-19{float:left;display:block;box-sizing:border-box;width:79.16666667%}.h-col-md-18{float:left;display:block;box-sizing:border-box;width:75%}.h-col-md-17{float:left;display:block;box-sizing:border-box;width:70.83333333%}.h-col-md-16{float:left;display:block;box-sizing:border-box;width:66.66666667%}.h-col-md-15{float:left;display:block;box-sizing:border-box;width:62.5%}.h-col-md-14{float:left;display:block;box-sizing:border-box;width:58.33333333%}.h-col-md-13{float:left;display:block;box-sizing:border-box;width:54.16666667%}.h-col-md-12{float:left;display:block;box-sizing:border-box;width:50%}.h-col-md-11{float:left;display:block;box-sizing:border-box;width:45.83333333%}.h-col-md-10{float:left;display:block;box-sizing:border-box;width:41.66666667%}.h-col-md-9{float:left;display:block;box-sizing:border-box;width:37.5%}.h-col-md-8{float:left;display:block;box-sizing:border-box;width:33.33333333%}.h-col-md-7{float:left;display:block;box-sizing:border-box;width:29.16666667%}.h-col-md-6{float:left;display:block;box-sizing:border-box;width:25%}.h-col-md-5{float:left;display:block;box-sizing:border-box;width:20.83333333%}.h-col-md-4{float:left;display:block;box-sizing:border-box;width:16.66666667%}.h-col-md-3{float:left;display:block;box-sizing:border-box;width:12.5%}.h-col-md-2{float:left;display:block;box-sizing:border-box;width:8.33333333%}.h-col-md-1{float:left;display:block;box-sizing:border-box;width:4.16666667%}}@media (min-width:768px) and (max-width:992px){.h-col-sm-24{float:left;display:block;box-sizing:border-box;width:100%}.h-col-sm-23{float:left;display:block;box-sizing:border-box;width:95.83333333%}.h-col-sm-22{float:left;display:block;box-sizing:border-box;width:91.66666667%}.h-col-sm-21{float:left;display:block;box-sizing:border-box;width:87.5%}.h-col-sm-20{float:left;display:block;box-sizing:border-box;width:83.33333333%}.h-col-sm-19{float:left;display:block;box-sizing:border-box;width:79.16666667%}.h-col-sm-18{float:left;display:block;box-sizing:border-box;width:75%}.h-col-sm-17{float:left;display:block;box-sizing:border-box;width:70.83333333%}.h-col-sm-16{float:left;display:block;box-sizing:border-box;width:66.66666667%}.h-col-sm-15{float:left;display:block;box-sizing:border-box;width:62.5%}.h-col-sm-14{float:left;display:block;box-sizing:border-box;width:58.33333333%}.h-col-sm-13{float:left;display:block;box-sizing:border-box;width:54.16666667%}.h-col-sm-12{float:left;display:block;box-sizing:border-box;width:50%}.h-col-sm-11{float:left;display:block;box-sizing:border-box;width:45.83333333%}.h-col-sm-10{float:left;display:block;box-sizing:border-box;width:41.66666667%}.h-col-sm-9{float:left;display:block;box-sizing:border-box;width:37.5%}.h-col-sm-8{float:left;display:block;box-sizing:border-box;width:33.33333333%}.h-col-sm-7{float:left;display:block;box-sizing:border-box;width:29.16666667%}.h-col-sm-6{float:left;display:block;box-sizing:border-box;width:25%}.h-col-sm-5{float:left;display:block;box-sizing:border-box;width:20.83333333%}.h-col-sm-4{float:left;display:block;box-sizing:border-box;width:16.66666667%}.h-col-sm-3{float:left;display:block;box-sizing:border-box;width:12.5%}.h-col-sm-2{float:left;display:block;box-sizing:border-box;width:8.33333333%}.h-col-sm-1{float:left;display:block;box-sizing:border-box;width:4.16666667%}}@media (max-width:768px){.h-col-xs-24{float:left;display:block;box-sizing:border-box;width:100%}.h-col-xs-23{float:left;display:block;box-sizing:border-box;width:95.83333333%}.h-col-xs-22{float:left;display:block;box-sizing:border-box;width:91.66666667%}.h-col-xs-21{float:left;display:block;box-sizing:border-box;width:87.5%}.h-col-xs-20{float:left;display:block;box-sizing:border-box;width:83.33333333%}.h-col-xs-19{float:left;display:block;box-sizing:border-box;width:79.16666667%}.h-col-xs-18{float:left;display:block;box-sizing:border-box;width:75%}.h-col-xs-17{float:left;display:block;box-sizing:border-box;width:70.83333333%}.h-col-xs-16{float:left;display:block;box-sizing:border-box;width:66.66666667%}.h-col-xs-15{float:left;display:block;box-sizing:border-box;width:62.5%}.h-col-xs-14{float:left;display:block;box-sizing:border-box;width:58.33333333%}.h-col-xs-13{float:left;display:block;box-sizing:border-box;width:54.16666667%}.h-col-xs-12{float:left;display:block;box-sizing:border-box;width:50%}.h-col-xs-11{float:left;display:block;box-sizing:border-box;width:45.83333333%}.h-col-xs-10{float:left;display:block;box-sizing:border-box;width:41.66666667%}.h-col-xs-9{float:left;display:block;box-sizing:border-box;width:37.5%}.h-col-xs-8{float:left;display:block;box-sizing:border-box;width:33.33333333%}.h-col-xs-7{float:left;display:block;box-sizing:border-box;width:29.16666667%}.h-col-xs-6{float:left;display:block;box-sizing:border-box;width:25%}.h-col-xs-5{float:left;display:block;box-sizing:border-box;width:20.83333333%}.h-col-xs-4{float:left;display:block;box-sizing:border-box;width:16.66666667%}.h-col-xs-3{float:left;display:block;box-sizing:border-box;width:12.5%}.h-col-xs-2{float:left;display:block;box-sizing:border-box;width:8.33333333%}.h-col-xs-1{float:left;display:block;box-sizing:border-box;width:4.16666667%}}.h-row{display:block}.h-row::after{content:"";display:block;clear:both}.h-row-clear{float:left;width:100%}.h-row-flex{display:flex;flex-direction:row;flex-wrap:wrap}.h-row-flex:before,.h-row-flex:after{display:flex}.h-row-flex-start{justify-content:flex-start}.h-row-flex-center{justify-content:center}.h-row-flex-end{justify-content:flex-end}.h-row-flex-space-between{justify-content:space-between}.h-row-flex-space-around{justify-content:space-around}.h-row-flex-top{align-items:flex-start}.h-row-flex-middle{align-items:center}.h-row-flex-bottom{align-items:flex-end}.h-row-flex-row-reverse{flex-direction:row-reverse}.h-row-flex-column{flex-direction:column}.h-row-flex-column-reverse{flex-direction:column-reverse}.h-wordcount{position:absolute;right:0;top:100%;margin:0}.h-affix{position:fixed;z-index:10}.h-affix-absolute{position:absolute}.h-autocomplete .h-autocomplete-show{min-height:30px;display:flex;flex-wrap:wrap;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box;padding-right:20px}.h-autocomplete .h-autocomplete-show:hover{border-color:#6ac79d}.h-autocomplete .h-autocomplete-show.h-pop-trigger,.h-autocomplete .h-autocomplete-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-autocomplete .h-autocomplete-show{border-color:#E11617}.h-form-item-valid-error .h-autocomplete .h-autocomplete-show:focus,.h-form-item-valid-error .h-autocomplete .h-autocomplete-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-autocomplete .h-autocomplete-show .h-icon-loading{color:#999999}.h-autocomplete .h-autocomplete-show .h-icon-loading,.h-autocomplete .h-autocomplete-show>.h-icon-close{position:absolute;top:50%;right:8px;font-size:12px;z-index:3;cursor:pointer;transition:color .2s ease;color:#666666;margin-top:-6px}.h-autocomplete .h-autocomplete-show .h-icon-loading:hover,.h-autocomplete .h-autocomplete-show>.h-icon-close:hover{color:#45b984 !important}.h-autocomplete .h-autocomplete-show .h-icon-loading:active,.h-autocomplete .h-autocomplete-show>.h-icon-close:active{color:#30815c !important}.h-autocomplete .h-autocomplete-show .h-icon-loading.h-pop-trigger .h-autocomplete .h-autocomplete-show .h-icon-loading,.h-autocomplete .h-autocomplete-show .h-icon-loading.h-pop-trigger .h-autocomplete .h-autocomplete-show>.h-icon-close,.h-autocomplete .h-autocomplete-show>.h-icon-close.h-pop-trigger .h-autocomplete .h-autocomplete-show .h-icon-loading,.h-autocomplete .h-autocomplete-show>.h-icon-close.h-pop-trigger .h-autocomplete .h-autocomplete-show>.h-icon-close{color:#379469 !important}.h-autocomplete .h-autocomplete-show .h-icon-loading[disabled],.h-autocomplete .h-autocomplete-show>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-autocomplete .h-autocomplete-show>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-autocomplete .h-autocomplete-show>span>span{line-height:22px}.h-autocomplete .h-autocomplete-show>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-autocomplete .h-autocomplete-show>span>.h-icon-close-min:hover{color:#45b984 !important}.h-autocomplete .h-autocomplete-show>span>.h-icon-close-min:active{color:#30815c !important}.h-autocomplete .h-autocomplete-show>span>.h-icon-close-min.h-pop-trigger .h-autocomplete .h-autocomplete-show>span>.h-icon-close-min{color:#379469 !important}.h-autocomplete .h-autocomplete-show>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-autocomplete .h-autocomplete-show>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-autocomplete .h-autocomplete-show>span>.h-icon-close:hover{color:#45b984 !important}.h-autocomplete .h-autocomplete-show>span>.h-icon-close:active{color:#30815c !important}.h-autocomplete .h-autocomplete-show>span>.h-icon-close.h-pop-trigger .h-autocomplete .h-autocomplete-show>span>.h-icon-close{color:#379469 !important}.h-autocomplete .h-autocomplete-show>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-autocomplete .h-autocomplete-input{flex:1;min-width:80px;width:auto;max-width:100%;border-color:transparent !important;line-height:13px;font-size:13px;height:24px;margin-bottom:2px;padding-left:5px}.h-autocomplete .h-autocomplete-input:focus{box-shadow:none !important}.h-autocomplete-disabled .h-autocomplete-show{background-color:#f5f5f5;color:#999999 !important;border-color:#d3d3d3}.h-autocomplete-disabled .h-autocomplete-show:hover{border-color:#d3d3d3;color:#999999 !important}.h-autocomplete-disabled .h-autocomplete-show .h-icon-down{color:#999999 !important}.h-autocomplete-ul{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box}.h-autocomplete-group{outline:none;user-select:none;position:relative;font-size:13px;background-color:#ffffff;padding:5px 0px;max-height:300px;overflow-y:auto}.h-autocomplete-group .h-autocomplete-item{cursor:pointer;padding:8px 10px;position:relative}.h-autocomplete-group .h-autocomplete-item:hover{background-color:#eeeeee}.h-autocomplete-group .h-autocomplete-item.disabled{cursor:default}.h-autocomplete-group .h-autocomplete-item.disabled:hover{background-color:transparent}.h-autocomplete-group .h-autocomplete-item.h-autocomplete-item-selected{background-color:#eeeeee}.h-autocomplete-group .h-autocomplete-empty-content{color:#999999;text-align:center}.h-avatar{position:relative;width:100%}.h-avatar-image-container{position:absolute}.h-avatar-image-container.h-avatar-middle{position:absolute;top:50%;transform:translate(0%, -50%)}.h-avatar-image-container .h-avatar-image{position:absolute;z-index:1;background-size:cover;background-position:center;height:100%;width:100%}.h-avatar.h-avatar-shape-circle .h-avatar-image{border-radius:50%}.h-avatar.h-avatar-shape-square .h-avatar-image{border-radius:4px}.h-avatar.h-avatar-no-info{display:inline-block}.h-avatar.h-avatar-fit-contain .h-avatar-image-container .h-avatar-image{background-size:contain}.h-avatar.h-avatar-fit-cover .h-avatar-image-container .h-avatar-image{background-size:cover}.h-avatar.h-avatar-fit-fill .h-avatar-image-container .h-avatar-image{background-size:100% 100%}.h-avatar.h-avatar-fit-none .h-avatar-image-container .h-avatar-image{background-size:initial}.h-backtop{z-index:10;position:fixed;cursor:pointer;display:none;right:50px;bottom:50px;animation:h-ani-backtop-hide .2s linear}.h-backtop.h-backtop-show{display:block;animation:h-ani-backtop-show .2s linear}.h-backtop-default .h-backtop-inner{background-color:rgba(0,0,0,0.6);border-radius:2px;box-shadow:0 1px 3px rgba(0,0,0,0.2);transition:all .2s ease-in-out}.h-backtop-default .h-backtop-inner:hover{background-color:rgba(0,0,0,0.7)}.h-backtop-default i{color:#fff;font-size:24px;padding:8px 12px}@keyframes h-ani-backtop-show{from{opacity:0}50%{opacity:.5}to{opacity:1}}@keyframes h-ani-backtop-hide{from{opacity:1}50%{opacity:.5}to{opacity:0}}.h-badge{position:relative;display:inline-block;vertical-align:middle;line-height:1}.h-badge-count{position:absolute;transform:scale(0);top:-10px;left:100%;margin-left:-5px;border-radius:100px;background:#E11617;color:#fff;line-height:18px;text-align:center;font-size:12px;white-space:nowrap;z-index:10;transition:.2s cubic-bezier(.24, .71, .73, 1.19);min-width:18px;height:18px;padding:0 4px}.h-badge-count-show{transform:scale(1)}.h-badge-count-dot{height:6px;width:6px;min-width:0;padding:0;top:-3px;left:auto;right:-3px}.h-badge-count a,.h-badge-count a:hover{color:#fff}.h-badge-count-alone{top:auto;display:block;position:relative;transform:translateX(0)}.h-badge-position-right{position:absolute;right:0;top:50%;transform:translateY(-50%)}.h-badge-position-right .h-badge-count{right:10px;left:auto}.h-breadcrumb-item-link{cursor:pointer;transition:color .2s ease}.h-breadcrumb-item-link:hover{color:#45b984 !important}.h-breadcrumb-item-link:active{color:#30815c !important}.h-breadcrumb-item-link.h-pop-trigger .h-breadcrumb-item-link{color:#379469 !important}.h-breadcrumb-item-link[disabled]{color:#999999 !important;cursor:default}.h-breadcrumb-item-separator{margin:0 8px;color:#d3d3d3}.h-breadcrumb-item-icon{vertical-align:middle;margin-right:4px}.h-breadcrumb-item-current{font-weight:bold}.h-carousel{position:relative}.h-carousel .h-carousel-container{position:relative;width:100%;height:100%;overflow:hidden;z-index:1}.h-carousel .h-carousel-list{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.h-carousel .h-carousel-list .h-carousel-item{background-position:center;background-repeat:no-repeat;flex-shrink:0;width:100%;height:100%;position:relative}.h-carousel .h-carousel-list .h-carousel-item .h-carousel-bg{height:100%;background-position:center;background-size:cover}.h-carousel .h-carousel-list .h-carousel-item .h-carousel-bg-pointer{cursor:pointer}.h-carousel .h-carousel-list .h-carousel-item.h-carousel-effect-item{position:absolute}.h-carousel .h-carousel-arrow{position:absolute;width:100%;height:100%;top:0;left:0;transition:.3s}.h-carousel .h-carousel-arrow .h-icon-left,.h-carousel .h-carousel-arrow .h-icon-right{z-index:2;color:#fff;font-size:32px;position:absolute;top:50%;transform:translateY(-50%);cursor:pointer;opacity:.4;transition:.5s}.h-carousel .h-carousel-arrow .h-icon-left:hover,.h-carousel .h-carousel-arrow .h-icon-right:hover{opacity:1}.h-carousel .h-carousel-arrow .h-icon-left{left:2%}.h-carousel .h-carousel-arrow .h-icon-right{right:2%}.h-carousel .h-carousel-arrow.h-carousel-arrow-hover{opacity:0}.h-carousel:hover .h-carousel-arrow-hover{opacity:1}.h-carousel .h-carousel-arrow-hidden{display:none !important}.h-carousel-pagination{z-index:3;position:relative}.h-carousel-pagination-circle .h-carousel-pagination-item,.h-carousel-pagination-square .h-carousel-pagination-item{opacity:.4;display:inline-block;margin-right:10px;cursor:pointer;position:relative;height:15px;transition:.5s}.h-carousel-pagination-circle .h-carousel-pagination-item>span,.h-carousel-pagination-square .h-carousel-pagination-item>span{display:inline-block;border-radius:4px;background-color:#fff}.h-carousel-pagination-circle .h-carousel-pagination-item.active,.h-carousel-pagination-square .h-carousel-pagination-item.active{opacity:1}.h-carousel-pagination-circle .h-carousel-pagination-item:last-of-type,.h-carousel-pagination-square .h-carousel-pagination-item:last-of-type{margin-right:0}.h-carousel-pagination-circle,.h-carousel-pagination-square{position:absolute;bottom:5%;left:50%;transform:translateX(-50%);z-index:2}.h-carousel-pagination-circle .h-carousel-pagination-item>span{width:8px;height:8px}.h-carousel-pagination-square .h-carousel-pagination-item>span{width:25px;height:3px}.h-carousel-pagination-hidden{display:none}.h-carousel-effect-fade-enter-active,.h-carousel-effect-fade-leave-active{transition:opacity 1s}.h-carousel-effect-fade-enter,.h-carousel-effect-fade-leave-to{opacity:0}.h-categorypicker{display:inline-block;box-sizing:border-box;vertical-align:middle}.h-categorypicker-placeholder{color:#787878}.h-categorypicker-value-single,.h-categorypicker-placeholder{line-height:24px;height:24px;padding-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-categorypicker-show{padding-right:25px !important;position:relative;cursor:default;line-height:1.5}.h-categorypicker-show>.h-icon-down{color:#666666;position:absolute;right:8px;top:50%;height:10px;font-size:12px;line-height:12px;transform:translate(0, -50%) scale(.8);transition:transform .2s}.h-categorypicker-show:hover>.h-icon-down{color:#45b984}.h-categorypicker-show.h-pop-trigger>.h-icon-down{transform:rotate(-180deg) translate(0, 50%) scale(.8);color:#45b984}.h-categorypicker-multiple-tags{display:flex;flex-wrap:wrap}.h-categorypicker-multiple-tags>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-categorypicker-multiple-tags>span>span{line-height:22px}.h-categorypicker-multiple-tags>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-categorypicker-multiple-tags>span>.h-icon-close-min:hover{color:#45b984 !important}.h-categorypicker-multiple-tags>span>.h-icon-close-min:active{color:#30815c !important}.h-categorypicker-multiple-tags>span>.h-icon-close-min.h-pop-trigger .h-categorypicker-multiple-tags>span>.h-icon-close-min{color:#379469 !important}.h-categorypicker-multiple-tags>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-categorypicker-multiple-tags>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-categorypicker-multiple-tags>span>.h-icon-close:hover{color:#45b984 !important}.h-categorypicker-multiple-tags>span>.h-icon-close:active{color:#30815c !important}.h-categorypicker-multiple-tags>span>.h-icon-close.h-pop-trigger .h-categorypicker-multiple-tags>span>.h-icon-close{color:#379469 !important}.h-categorypicker-multiple-tags>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-categorypicker-input-border .h-categorypicker-show{min-height:30px;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box}.h-categorypicker-input-border .h-categorypicker-show:hover{border-color:#6ac79d}.h-categorypicker-input-border .h-categorypicker-show.h-pop-trigger,.h-categorypicker-input-border .h-categorypicker-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-categorypicker-input-border .h-categorypicker-show{border-color:#E11617}.h-form-item-valid-error .h-categorypicker-input-border .h-categorypicker-show:focus,.h-form-item-valid-error .h-categorypicker-input-border .h-categorypicker-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-form-item-valid-error .h-categorypicker-input-border .h-categorypicker-show{border-color:#E11617}.h-form-item-valid-error .h-categorypicker-input-border .h-categorypicker-show.h-pop-trigger{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-categorypicker-input-border .h-categorypicker-value-single,.h-categorypicker-input-border .h-categorypicker-placeholder{margin-bottom:2px}.h-categorypicker-no-autosize{display:block}.h-categorypicker-disabled .h-categorypicker-show{background-color:#f5f5f5;color:#999999 !important;border-color:#d3d3d3}.h-categorypicker-disabled .h-categorypicker-show:hover{border-color:#d3d3d3;color:#999999 !important}.h-categorypicker-disabled .h-categorypicker-show .h-icon-down{color:#999999 !important}.h-categorypicker-value-single>.h-icon-close{position:absolute;top:50%;right:8px;font-size:12px;z-index:3;cursor:pointer;transition:color .2s ease;color:#666666;margin-top:-6px}.h-categorypicker-value-single>.h-icon-close:hover{color:#45b984 !important}.h-categorypicker-value-single>.h-icon-close:active{color:#30815c !important}.h-categorypicker-value-single>.h-icon-close.h-pop-trigger .h-categorypicker-value-single>.h-icon-close{color:#379469 !important}.h-categorypicker-value-single>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-categorypicker-modal-multiple-tags{min-height:30px;padding-right:180px}.h-categorypicker-modal-multiple-tags>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-categorypicker-modal-multiple-tags>span>span{line-height:22px}.h-categorypicker-modal-multiple-tags>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-categorypicker-modal-multiple-tags>span>.h-icon-close-min:hover{color:#45b984 !important}.h-categorypicker-modal-multiple-tags>span>.h-icon-close-min:active{color:#30815c !important}.h-categorypicker-modal-multiple-tags>span>.h-icon-close-min.h-pop-trigger .h-categorypicker-modal-multiple-tags>span>.h-icon-close-min{color:#379469 !important}.h-categorypicker-modal-multiple-tags>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-categorypicker-modal-multiple-tags>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-categorypicker-modal-multiple-tags>span>.h-icon-close:hover{color:#45b984 !important}.h-categorypicker-modal-multiple-tags>span>.h-icon-close:active{color:#30815c !important}.h-categorypicker-modal-multiple-tags>span>.h-icon-close.h-pop-trigger .h-categorypicker-modal-multiple-tags>span>.h-icon-close{color:#379469 !important}.h-categorypicker-modal-multiple-tags>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-categorypicker-ul{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box;min-width:300px;max-width:500px;padding:15px 10px}.h-categorypicker-ul .h-categorypicker-item{display:inline-block;padding:4px 10px}.h-categorypicker-ul .h-categorypicker-item .h-categorypicker-item-title{cursor:pointer}.h-categorypicker-ul .h-categorypicker-item{padding:2px 10px}.h-categorypicker-ul .h-categorypicker-item-title{padding:2px 5px;border-radius:4px;display:inline-block}.h-categorypicker-ul .h-categorypicker-item-title:hover{background:#eeeeee}.h-categorypicker-ul .h-categorypicker-item-selected .h-categorypicker-item-title{background:#45b984;color:#FFF}.h-categorypicker-ul.h-categorypicker-single-picker .h-categorypicker-item{padding:2px 5px}.h-categorypicker-tabs>.h-tabs-item{padding:10px 10px}.h-category{display:inline-block;box-sizing:border-box;vertical-align:middle}.h-category-placeholder{color:#787878}.h-category-value-single,.h-category-placeholder{line-height:24px;height:24px;padding-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-category-show{padding-right:25px !important;position:relative;cursor:default;line-height:1.5}.h-category-show>.h-icon-down{color:#666666;position:absolute;right:8px;top:50%;height:10px;font-size:12px;line-height:12px;transform:translate(0, -50%) scale(.8);transition:transform .2s}.h-category-show:hover>.h-icon-down{color:#45b984}.h-category-show.h-pop-trigger>.h-icon-down{transform:rotate(-180deg) translate(0, 50%) scale(.8);color:#45b984}.h-category-multiple-tags{display:flex;flex-wrap:wrap}.h-category-multiple-tags>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-category-multiple-tags>span>span{line-height:22px}.h-category-multiple-tags>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-category-multiple-tags>span>.h-icon-close-min:hover{color:#45b984 !important}.h-category-multiple-tags>span>.h-icon-close-min:active{color:#30815c !important}.h-category-multiple-tags>span>.h-icon-close-min.h-pop-trigger .h-category-multiple-tags>span>.h-icon-close-min{color:#379469 !important}.h-category-multiple-tags>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-category-multiple-tags>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-category-multiple-tags>span>.h-icon-close:hover{color:#45b984 !important}.h-category-multiple-tags>span>.h-icon-close:active{color:#30815c !important}.h-category-multiple-tags>span>.h-icon-close.h-pop-trigger .h-category-multiple-tags>span>.h-icon-close{color:#379469 !important}.h-category-multiple-tags>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-category-input-border .h-category-show{min-height:30px;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box}.h-category-input-border .h-category-show:hover{border-color:#6ac79d}.h-category-input-border .h-category-show.h-pop-trigger,.h-category-input-border .h-category-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-category-input-border .h-category-show{border-color:#E11617}.h-form-item-valid-error .h-category-input-border .h-category-show:focus,.h-form-item-valid-error .h-category-input-border .h-category-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-form-item-valid-error .h-category-input-border .h-category-show{border-color:#E11617}.h-form-item-valid-error .h-category-input-border .h-category-show.h-pop-trigger{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-category-input-border .h-category-value-single,.h-category-input-border .h-category-placeholder{margin-bottom:2px}.h-category-no-autosize{display:block}.h-category-disabled .h-category-show{background-color:#f5f5f5;color:#999999 !important;border-color:#d3d3d3}.h-category-disabled .h-category-show:hover{border-color:#d3d3d3;color:#999999 !important}.h-category-disabled .h-category-show .h-icon-down{color:#999999 !important}.h-category-value-single>.h-icon-close{position:absolute;top:50%;right:8px;font-size:12px;z-index:3;cursor:pointer;transition:color .2s ease;color:#666666;margin-top:-6px}.h-category-value-single>.h-icon-close:hover{color:#45b984 !important}.h-category-value-single>.h-icon-close:active{color:#30815c !important}.h-category-value-single>.h-icon-close.h-pop-trigger .h-category-value-single>.h-icon-close{color:#379469 !important}.h-category-value-single>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-category-item{font-size:90%;padding:3px 5px;cursor:pointer}.h-category-item:hover{background:#eeeeee}.h-category-modal-multiple-tags{min-height:30px;padding-right:180px}.h-category-modal-multiple-tags>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-category-modal-multiple-tags>span>span{line-height:22px}.h-category-modal-multiple-tags>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-category-modal-multiple-tags>span>.h-icon-close-min:hover{color:#45b984 !important}.h-category-modal-multiple-tags>span>.h-icon-close-min:active{color:#30815c !important}.h-category-modal-multiple-tags>span>.h-icon-close-min.h-pop-trigger .h-category-modal-multiple-tags>span>.h-icon-close-min{color:#379469 !important}.h-category-modal-multiple-tags>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-category-modal-multiple-tags>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-category-modal-multiple-tags>span>.h-icon-close:hover{color:#45b984 !important}.h-category-modal-multiple-tags>span>.h-icon-close:active{color:#30815c !important}.h-category-modal-multiple-tags>span>.h-icon-close.h-pop-trigger .h-category-modal-multiple-tags>span>.h-icon-close{color:#379469 !important}.h-category-modal-multiple-tags>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-category-modal-single-tag{min-height:30px;line-height:30px;padding-right:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-circle{display:inline-block;position:relative}.h-circle::after{content:"";display:block;clear:both}.h-circle-content{width:100%;text-align:center;position:absolute;left:0;top:50%;transform:translateY(-50%);line-height:1}.h-collapse{display:block}.h-collapse-item{display:block}.h-collapse-item:last-of-type{border-bottom:1px solid #eeeeee}.h-collapse-item-header{height:40px;line-height:40px;border-top:1px solid #eeeeee;padding:0 10px;font-size:13px;transition:all .2s}.h-collapse-item-header:hover{cursor:pointer;color:#45b984}.h-collapse-item-expand{margin-top:13px;margin-right:5px;transform:rotateZ(0deg);transition:all .2s;font-size:12px}.h-collapse-item-content{word-break:break-all}.h-collapse-item-content-box{padding:10px 20px}.h-collapse-item.h-collapse-item-active .h-collapse-item-header .h-collapse-item-expand{transform:rotateZ(90deg)}.h-collapse-transition{transition:.3s height ease-in-out,.3s padding-top ease-in-out,.3s padding-bottom ease-in-out}.h-datetime-range .h-datetime-show{min-width:208px}.h-datetime-full-range .h-datetime-show{min-width:234px}.h-date-picker{border:1px solid #eeeeee}.h-date-picker .h-date-shortcut{border-radius:4px 0 0 4px;width:104px;font-size:12px;line-height:28px;background:#f8f8f8;border-right:1px solid #eeeeee;padding:10px 0}.h-date-picker .h-date-shortcut>div{padding:3px 10px;cursor:pointer}.h-date-picker .h-date-shortcut>div:hover{background-color:#eeeeee}.h-date-picker .h-date-shortcut>div.disabled{cursor:default}.h-date-picker .h-date-shortcut>div.disabled:hover{background-color:transparent}.h-date-picker .h-date-container{display:flex}.h-date-picker .h-date-full-range-container{display:block;min-width:260px}.h-date-picker .h-date-full-range-container .h-tabs{padding:0}.h-date-picker .h-date-full-range-container .h-tabs>.h-tabs-item+div{margin-left:5px;padding:10px}.h-date-picker .h-date-range-container>.h-date-content:last-child{border-left:1px solid #eeeeee}.h-date-picker .h-date-content{padding:10px}.h-date-picker .h-date-self-defined{padding:15px;text-align:center}.h-date-picker .h-date-self-defined .h-input{width:110px}.h-date-picker .h-date-footer{padding:5px 10px;text-align:right;border-top:1px solid #eeeeee}.h-date-picker .h-date-header{text-align:center;line-height:30px}.h-date-picker .h-date-header>span{cursor:pointer;transition:color .2s ease;display:inline-block}.h-date-picker .h-date-header>span:hover{color:#45b984 !important}.h-date-picker .h-date-header>span:active{color:#30815c !important}.h-date-picker .h-date-header>span.h-pop-trigger .h-date-picker .h-date-header>span{color:#379469 !important}.h-date-picker .h-date-header>span[disabled]{color:#999999 !important;cursor:default}.h-date-picker .h-date-header-show{margin:0 3px}.h-date-picker .h-date-header .h-date-year-left-picker>i+i,.h-date-picker .h-date-header .h-date-year-right-picker>i+i{margin-left:-7px}.h-date-picker .h-date-header .h-date-month-left-picker,.h-date-picker .h-date-header .h-date-year-left-picker,.h-date-picker .h-date-header .h-date-month-right-picker,.h-date-picker .h-date-header .h-date-year-right-picker{color:#999999;font-size:12px;margin:0 3px}.h-date-picker .h-date-header .h-date-month-left-picker,.h-date-picker .h-date-header .h-date-year-left-picker{float:left}.h-date-picker .h-date-header .h-date-month-right-picker,.h-date-picker .h-date-header .h-date-year-right-picker{float:right}.h-date-picker .h-date-body{margin:8px auto 0;font-size:13px;width:224px}.h-date-picker .h-date-body>div>span{width:32px;height:32px;line-height:32px;display:inline-block;text-align:center;user-select:none}.h-date-picker .h-date-body-weeks{font-weight:bold}.h-date-picker .h-date-body-pickers>span{cursor:default}.h-date-picker .h-date-body-pickers>span:hover{background-color:#eeeeee}.h-date-picker .h-date-body-pickers>span.h-date-today{color:#45b984}.h-date-picker .h-date-body-pickers>span.h-date-selected{background-color:#45b984;color:#ffffff}.h-date-picker .h-date-body-pickers>span.h-date-start-selected{border-top-right-radius:0;border-bottom-right-radius:0}.h-date-picker .h-date-body-pickers>span.h-date-end-selected{border-top-left-radius:0;border-bottom-left-radius:0}.h-date-picker .h-date-body-pickers>span.h-date-range-selected{border-radius:0;background-color:rgba(69,185,132,0.15)}.h-date-picker .h-date-body-pickers>span.h-date-not-now-day{color:#d3d3d3;background-color:#ffffff}.h-date-picker .h-date-body-pickers>span.h-date-disabled{background-color:#f5f5f5;color:#999999;pointer-events:none}.h-date-picker .h-date-body-month>div>span,.h-date-picker .h-date-body-year>div>span,.h-date-picker .h-date-body-date>div>span{border-radius:50%}.h-date-picker .h-date-body-month>div>span,.h-date-picker .h-date-body-year>div>span{height:50px;width:50px;line-height:50px;margin:3px}.h-date-picker .h-date-body-week,.h-date-picker .h-date-body-quarter{min-width:200px;width:auto}.h-date-picker .h-date-body-week>div>span,.h-date-picker .h-date-body-quarter>div>span{border-radius:5px;width:100%;display:block;padding-left:10px;padding-right:10px}.h-date-picker .h-date-body-minute>div>span,.h-date-picker .h-date-body-hour>div>span{border-radius:5px;height:30px;width:50px;line-height:30px;margin:3px}.h-datetime-input-border{display:inline-block;vertical-align:middle}.h-datetime-input-border .h-input{width:100%}.h-datetime-input-border .h-datetime-show:hover>input:not([disabled]),.h-datetime-input-border .h-pop-trigger>input:not([disabled]){border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-dropdownmenu{display:inline-block;vertical-align:middle}.h-dropdownmenu-group{padding:10px 0}.h-dropdownmenu-disabled{cursor:default;color:#999999 !important}.h-dropdownmenu-disabled>.h-icon-down{color:#999999 !important}.h-dropdownmenu-item{cursor:pointer;padding:5px 15px;position:relative}.h-dropdownmenu-item:hover{background-color:#eeeeee}.h-dropdownmenu-item.disabled{cursor:default}.h-dropdownmenu-item.disabled:hover{background-color:transparent}.h-dropdownmenu-item>i{margin-right:5px}.h-dropdownmenu-item-divider{height:0;padding:0;overflow:hidden;margin:3px 0;border-top:1px solid #eeeeee}.h-dropdownmenu-item.disabled{color:#999999}.form-content-width100 input[type='text'],.form-content-width100 input[type='password'],.form-content-width100 input[type='number'],.form-content-width100 textarea,.form-content-width100 .h-input,.form-content-width100 .h-select,.form-content-width100 .h-taginput,.form-content-width100 .h-autocomplete,.form-content-width100 .h-numberinput,.form-content-width100 .h-datetime-input-border,.form-content-width100 .h-input-group{width:100%}.form-content-width100 .h-radio>label,.form-content-width100 .h-checkbox>label{height:30px;line-height:30px}.h-form::after{content:"";display:block;clear:both}.h-form .h-form-item{padding-bottom:24px;position:relative}.h-form .h-form-item-no-padding{padding-bottom:0px}.h-form .h-form-item-label{display:inline-block;text-align:right;font-size:13px;color:#555555;line-height:1;padding:8.5px 15px 8.5px 0;box-sizing:border-box}.h-form .h-form-item-required .h-form-item-label::before{content:"*";color:#E11617;font-size:15px;display:inline-block;margin-right:4px;line-height:8px;vertical-align:middle}.h-form .h-form-item-content{font-size:13px}.h-form .h-form-item-content input[type='text'],.h-form .h-form-item-content input[type='password'],.h-form .h-form-item-content input[type='number'],.h-form .h-form-item-content textarea,.h-form .h-form-item-content .h-input,.h-form .h-form-item-content .h-select,.h-form .h-form-item-content .h-taginput,.h-form .h-form-item-content .h-autocomplete,.h-form .h-form-item-content .h-numberinput,.h-form .h-form-item-content .h-datetime-input-border,.h-form .h-form-item-content .h-input-group{width:100%}.h-form .h-form-item-content .h-radio>label,.h-form .h-form-item-content .h-checkbox>label{height:30px;line-height:30px}.h-form .h-form-item-wrap{position:relative}.h-form .h-form-item-wrap::after{content:"";display:block;clear:both}.h-form .h-form-item-error{position:absolute;margin-top:5px;color:#E11617;line-height:1}.h-form.h-form-label-left .h-form-item-label{text-align:left;padding:8.5px 0 8.5px 15px}.h-form.h-form-label-left .h-form-item-required .h-form-item-label:before{position:absolute;top:13px;left:6px}.h-form.h-form-block .h-form-item::after,.h-form.h-form .h-form-item-block::after{content:"";display:block;clear:both}.h-form.h-form-block .h-form-item-label,.h-form.h-form .h-form-item-block-label{display:block;text-align:left;padding-left:0}.h-form.h-form-block .h-form-item-label:empty,.h-form.h-form .h-form-item-block-label:empty{display:none}.h-form.h-form-block .h-form-item-content::after,.h-form.h-form .h-form-item-block-content::after{content:"";display:block;clear:both}.h-form.h-form-inline .h-form-item{display:inline-block}.h-form.h-form-inline .h-form-item-label{float:left}.h-form.h-form-inline .h-form-item-content{float:left;margin-right:20px}.h-form.h-form-twocolumn .h-form-item{width:50%;float:left}.h-form.h-form-twocolumn .h-form-item-label{width:80px;float:left}.h-form.h-form-threecolumn .h-form-item{width:33.3%;float:left}.h-form.h-form-threecolumn .h-form-item-label{width:80px;float:left}.h-form.h-form-single .h-form-item,.h-form.h-form .h-form-item-single{width:100%}.h-form.h-form-single .h-form-item::after,.h-form.h-form .h-form-item-single::after{content:"";display:block;clear:both}.h-form.h-form-single .h-form-item .h-form-item-label,.h-form.h-form .h-form-item-single .h-form-item-label{width:80px;float:left}.h-form.h-form-single .h-form-item .h-form-item-content,.h-form.h-form .h-form-item-single .h-form-item-content{margin-left:80px}.h-form-readonly .h-form-item{padding-bottom:3px}.h-form-readonly .h-form-item .h-form-item-wrap{line-height:30px}.h-form-item-readonly .h-form-item-content{line-height:30px}.h-image-preview{position:relative;transition:height .3s,width .3s}.h-image-preview .h-image-preview-index{color:#fff;text-shadow:0 0 10px #000;font-size:18px;position:absolute;top:10px;right:20px;z-index:2}.h-image-preview>.h-image-preview-image{max-width:800px;max-height:12000px;display:block}.h-image-preview .fade-enter-active,.h-image-preview .fade-leave-active{transition:opacity .3s}.h-image-preview .fade-enter,.h-image-preview .fade-leave-to{opacity:0}.h-image-preview .h-image-preview-icon{text-shadow:0 0 10px #000;position:absolute;top:0;bottom:0;font-size:40px;color:#fff;opacity:0;transition:.2s opacity;cursor:pointer;width:50%;display:flex;flex-direction:column;justify-content:center}.h-image-preview .h-image-preview-icon.h-image-preview-left-icon{left:10px;text-align:left}.h-image-preview .h-image-preview-icon.h-image-preview-right-icon{right:10px;text-align:right}.h-image-preview .h-image-preview-icon:hover{opacity:1}.h-image-preview-list{clear:both}.h-image-preview-list::after{content:"";display:block;clear:both}.h-image-preview-list .h-image-preview-item{position:relative;cursor:pointer;background-size:cover;background-position:center;float:left;display:inline-block;overflow:hidden}.h-image-preview-list .h-image-preview-item:hover:before{content:'';position:absolute;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,0.6)}.h-image-preview-modal.h-modal .h-notify-container{min-width:0px;padding:5px}.h-layout{position:relative;display:flex;flex-direction:column;flex:auto;min-height:0;z-index:1;overflow:hidden}.h-layout::after{content:"";display:block;clear:both}.h-layout .h-layout{overflow:hidden}.h-layout.h-layout-has-sider{flex-direction:row}.h-layout.h-layout-header-fixed{padding-top:64px}.h-layout.h-layout-header-fixed>.h-layout-header{top:0;left:0;right:0;position:fixed;z-index:2}.h-layout.h-layout-header-fixed>.h-layout-content{z-index:1}.h-layout.h-layout-header-fixed>.h-layout-sider{z-index:1}.h-layout.h-layout-sider-fixed{padding-left:200px}.h-layout.h-layout-sider-fixed>.h-layout-content{z-index:1}.h-layout.h-layout-sider-fixed>.h-layout-sider{position:fixed;bottom:0;top:0;left:0;overflow:auto;z-index:2}.h-layout.h-layout-sider-fixed.h-layout-sider-collapsed{padding-left:70px}.h-layout.h-layout-sider-collapsed>.h-layout-sider{width:70px;flex:0 0 70px;max-width:70px;min-width:70px;overflow:initial;z-index:2}.h-layout.h-layout-header-fixed>.h-layout-sider-fixed>.h-layout-sider{top:64px}.h-layout.h-layout-has-sider>.h-layout-header-fixed>.h-layout-header{left:200px}.h-layout.h-layout-sider-collapsed>.h-layout-header-fixed>.h-layout-header{left:70px}.h-layout-header{height:64px;line-height:64px;z-index:1}.h-layout-header-theme-dark{color:rgba(255,255,255,0.65);background:#333333}.h-layout-header-theme-white{background:#FFF}.h-layout-sider{transition:all .2s;position:relative;flex:0 0 200px;max-width:200px;min-width:200px;width:200px;z-index:1}.h-layout-sider-theme-dark{background:#333333}.h-layout-sider-theme-white{background:#FFF}.h-layout-content{position:relative;flex:auto}.h-loadingbar{width:100%;position:fixed;top:0;left:0;right:0;z-index:2000}.h-loadingbar-inner{height:0px;width:0;transition:width .2s linear;background-color:#45b984}.h-loadingbar-inner-failed-color-error{background-color:#E11617}.h-loadingbar-inner.loading{height:2px}.h-loadingbar-inner.error{background-color:#E11617}@keyframes loading-rotate{100%{transform:rotate(360deg)}}@keyframes loading-path-rotate{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}.h-loading{position:absolute;left:0;bottom:0;right:0;top:0;background-color:rgba(255,255,255,0.6);z-index:-1;visibility:hidden;text-align:center;opacity:0;transition:opacity .5s}.h-loading .h-loading-circular{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:42px}.h-loading .h-loading-circular>svg{opacity:0;width:42px;height:42px;transition:opacity .5s;transform-origin:center center}.h-loading .h-loading-circular>svg .circle{stroke-dasharray:90, 150;stroke-dashoffset:0;stroke-width:2;stroke:#45b984;stroke-linecap:round}.h-loading.h-loading-loading{opacity:1}.h-loading.h-loading-loading.h-loading-full-screen{z-index:2000;position:fixed}.h-loading.h-loading-visible{visibility:visible;z-index:8}.h-loading.h-loading-visible svg{opacity:1;animation:loading-rotate 2s linear infinite}.h-loading.h-loading-visible svg .circle{animation:loading-path-rotate 1.5s ease-in-out infinite}.h-loading-parent{position:relative;min-height:200px}.h-menu{width:100%;display:block;margin:0;padding:0;outline:none;list-style:none;position:relative;line-height:1}.h-menu-ul{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box}.h-menu-li{position:relative}.h-menu-show{position:relative;padding:15px 26px;cursor:pointer;text-overflow:clip;white-space:nowrap;transition:padding .2s}.h-menu-show-expand{right:20px;position:absolute;top:50%;transform:translate(0%, -50%)}.h-menu-show-desc{transition:opacity .3s cubic-bezier(.645, .045, .355, 1),width .3s cubic-bezier(.645, .045, .355, 1);opacity:1}.h-menu-show-count{transition:right .2s;z-index:2;right:60px;position:absolute;top:50%;transform:translate(0%, -50%)}.h-menu .h-menu-li a{display:block;color:inherit;font-weight:inherit;text-decoration:inherit}.h-menu-mode-normal .h-menu-ul{max-height:0;transition:max-height .3s cubic-bezier(0, 1, 0, 1);overflow:hidden}.h-menu-mode-normal .h-menu-li .h-menu-li .h-menu-show{padding-left:50px}.h-menu-mode-normal .h-menu-li .h-menu-li .h-menu-li .h-menu-show{padding-left:70px}.h-menu-mode-normal .h-menu-li-opened>.h-menu-ul{max-height:1000px;transition:max-height .8s ease-in-out}.h-menu-mode-normal .h-menu-li-opened>.h-menu-show .h-menu-show-expand>i{transform:rotate(0deg)}.h-menu-mode-normal .h-menu-show{overflow:hidden;text-overflow:ellipsis;transition:color .2s}.h-menu-mode-normal .h-menu-show-icon{margin-right:5px}.h-menu-mode-normal .h-menu-show-expand>i{transition:transform .2s;transform:rotate(-90deg)}.h-menu-dark{background:#333333;color:#b3b3b3}.h-menu-dark .h-menu-show{border-right:0px solid transparent}.h-menu-dark .h-menu-show:hover{color:#ffffff}.h-menu-dark .h-menu-ul{background:#262626}.h-menu-dark .h-menu-li-selected{background:#45b984;color:#ffffff}.h-menu-white{background:#ffffff}.h-menu-white .h-menu-show:hover{color:#45b984}.h-menu-white .h-menu-ul{background:#ffffff}.h-menu-white .h-menu-li{position:relative}.h-menu-white .h-menu-li .h-menu-show:after{position:absolute;content:'';top:0;right:0;bottom:0;width:0px;background:#45b984}.h-menu-white .h-menu-li .h-menu-li-selected{background-color:rgba(69,185,132,0.15);color:#45b984}.h-menu-white .h-menu-li .h-menu-li-selected:after{width:5px;transition:.2s}.h-menu.h-menu-size-collapse>.h-menu-li>.h-menu-show{padding-left:28px}.h-menu.h-menu-size-collapse>.h-menu-li>.h-menu-show .h-menu-show-icon{margin-right:0px;font-size:17px}.h-menu.h-menu-size-collapse>.h-menu-li>.h-menu-show .h-menu-show-desc{visibility:visible;opacity:0;display:inline-block;width:0;text-overflow:clip}.h-menu.h-menu-size-collapse>.h-menu-li>.h-menu-show .h-menu-show-count{right:10px}.h-menu.h-menu-size-collapse>.h-menu-li>.h-menu-show .h-menu-show-expand{display:none}.h-menu.h-menu-size-collapse .h-menu-ul{padding:5px 0;margin-left:5px;left:100%;top:0;width:150px;border-radius:4px;position:absolute;max-width:0;transition:.2s cubic-bezier(.78, .17, .43, 1);white-space:nowrap;display:inline-block;overflow:hidden;opacity:.8;transform:scale(.8);transform-origin:left}.h-menu.h-menu-size-collapse .h-menu-ul .h-menu-show{overflow:hidden;text-overflow:ellipsis}.h-menu.h-menu-size-collapse .h-menu-show-expand{right:10px}.h-menu.h-menu-size-collapse .h-menu-show-expand i{transform:rotate(-90deg)}.h-menu.h-menu-size-collapse .h-menu-li:hover>.h-menu-ul{max-width:250%;opacity:1;transform:scale(1);overflow:visible}.h-menu.h-menu-size-collapse .h-menu-li:hover>.h-menu-ul:before{content:'';position:absolute;height:100%;top:0;left:-10px;width:10px}.h-menu.h-menu-size-collapse .h-menu-show{padding-left:20px}.h-menu-mode-horizontal:after{content:"";display:table;clear:both}.h-menu-mode-horizontal .h-menu-li{display:inline-block}.h-menu-mode-horizontal .h-menu-li .h-menu-show.h-menu-li-selected{background-color:rgba(69,185,132,0.15);color:#45b984}.h-menu-mode-horizontal .h-menu-li .h-menu-show.h-menu-li-selected:after{content:'';position:absolute;width:100%;height:2px;background-color:#45b984;bottom:0;left:0;right:0;top:auto}.h-menu-mode-horizontal .h-menu-ul{padding:5px 0;left:0;top:100%;width:150px;max-height:0;margin-top:5px;border-radius:4px;transition:.1s cubic-bezier(.78, .17, .43, 1);transform-origin:top;opacity:.8;transform:scale(.8);visibility:hidden;overflow:hidden;position:absolute;white-space:nowrap;display:inline-block}.h-menu-mode-horizontal .h-menu-ul .h-menu-li{display:block}.h-menu-mode-horizontal .h-menu-ul .h-menu-li .h-menu-ul{padding:5px 0;left:100%;margin-left:5px;top:0;width:150px;border-radius:4px;visibility:hidden;position:absolute;max-height:0;transition:.1s cubic-bezier(.78, .17, .43, 1);transform-origin:top;opacity:.8;transform:scale(.8);white-space:nowrap;display:inline-block}.h-menu-mode-horizontal .h-menu-ul .h-menu-show{overflow:hidden;text-overflow:ellipsis;transition:color .2s}.h-menu-mode-horizontal .h-menu-ul .h-menu-show-icon{margin-right:5px}.h-menu-mode-horizontal .h-menu-ul .h-menu-show-expand>i{transition:transform .2s;transform:rotate(-90deg)}.h-menu-mode-horizontal .h-menu-ul .h-menu-show.h-menu-li-selected{background-color:rgba(69,185,132,0.15);color:#45b984}.h-menu-mode-horizontal .h-menu-ul .h-menu-show.h-menu-li-selected:after{content:'';position:absolute;width:100%;height:2px;background-color:#45b984;bottom:0;left:0;right:0;top:auto}.h-menu-mode-horizontal .h-menu-show-expand{right:10px}.h-menu-mode-horizontal .h-menu-show-expand i{transform:rotate(-90deg)}.h-menu-mode-horizontal .h-menu-li:hover>.h-menu-ul{max-height:10000px;transform:scale(1);opacity:1;visibility:visible;overflow:visible}.h-menu-mode-horizontal .h-menu-li:hover>.h-menu-ul:before{content:'';position:absolute;width:100%;top:-10px;left:0;height:10px}.h-menu-mode-horizontal .h-menu-li:hover>.h-menu-ul:after{content:'';position:absolute;height:100%;top:0;left:-10px;width:10px}.h-menu-mode-horizontal.h-menu-dark .h-menu-li .h-menu-show.h-menu-li-selected{background-color:#45b984;color:#ffffff}.h-menu-mode-horizontal.h-menu-dark .h-menu-li .h-menu-show.h-menu-li-selected:after{display:none}.h-numberinput{display:block}.h-numberinput-show{display:flex;flex-wrap:wrap;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box}.h-numberinput-show:hover{border-color:#6ac79d}.h-numberinput-show.h-pop-trigger,.h-numberinput-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-numberinput-show{border-color:#E11617}.h-form-item-valid-error .h-numberinput-show:focus,.h-form-item-valid-error .h-numberinput-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-numberinput-show .h-numberinput-input{flex:1;min-width:80px;width:auto;max-width:100%;border-color:transparent !important;line-height:13px;font-size:13px;height:24px;margin-bottom:2px;padding-left:5px}.h-numberinput-show .h-numberinput-input:focus{box-shadow:none !important}.h-numberinput-operate{width:60px;height:28px;line-height:28px;margin-top:-2px;margin-bottom:-2px;margin-right:-2px}.h-numberinput-operate>span{display:inline-block;width:50%;text-align:center;float:left;border-left:1px solid #eeeeee;cursor:pointer;transition:color .2s ease}.h-numberinput-operate>span:hover{color:#45b984 !important}.h-numberinput-operate>span:active{color:#30815c !important}.h-numberinput-operate>span.h-pop-trigger .h-numberinput-operate>span{color:#379469 !important}.h-numberinput-operate>span[disabled]{color:#999999 !important;cursor:default}.h-numberinput-disabled .h-numberinput-show{background-color:#f5f5f5;color:#999999 !important;border-color:#d3d3d3}.h-numberinput-disabled .h-numberinput-show:hover{border-color:#d3d3d3;color:#999999 !important}.h-numberinput-disabled .h-numberinput-show .h-icon-down{color:#999999 !important}.h-numberinput-disabled .h-numberinput-operate>span{color:#999999 !important;cursor:not-allowed}.h-page{display:flex;align-items:center}.h-page::after{content:"";display:block;clear:both}.h-page>span,.h-page>input,.h-page>div{margin:0 5px}.h-page>.h-page-select-size{margin-right:0}.h-page.h-page-align-right{justify-content:flex-end;-ms-flex-pack:flex-end}.h-page.h-page-align-center{justify-content:center;-ms-flex-pack:center}.h-page-pager-container .h-page-pager{position:relative;border:1px solid #eeeeee;float:left;display:inline-block;padding:3.5px 10px;margin-left:-1px;cursor:pointer}.h-page-pager-container .h-page-pager:hover{color:#45b984}.h-page-pager-container .h-page-pager:first-child{margin-left:0}.h-page-pager-container .h-page-pager-selected{background-color:#45b984;color:#ffffff;border-color:#45b984;z-index:2}.h-page-pager-container .h-page-pager-selected:hover{color:#ffffff}.h-page-pager-container .h-page-pager-disabled{pointer-events:none;cursor:not-allowed;color:#999999}.h-page-pager-container .h-page-pager-disabled:hover{color:#999999}.h-page-ellipsis{pointer-events:none}.h-page-small{font-size:13px}.h-page-small .h-page-pager-container .h-page-pager{border:none;border-radius:4px}.h-page-small input[type=text]{height:25px;line-height:25px}.h-page-jumper-input{width:40px}.h-panel{background:#fff;border-radius:4px;position:relative;border:1px solid #eeeeee}.h-panel-no-border{border:none}.h-panel-bar{padding:10px 20px;border-bottom:1px solid #eeeeee;position:relative}.h-panel-bar>span{vertical-align:middle}.h-panel-bar .h-panel-title{line-height:34px;font-size:18px;display:inline-block;vertical-align:middle}.h-panel-bar .h-panel-right{position:absolute;top:50%;transform:translate(0%, -50%);right:20px}.h-panel-body{padding:20px}.h-poptip{width:160px;font-size:13px;padding:3px}.h-poptip-content{padding:10px 0px 18px}.h-progress{font-size:13px;position:relative;display:flex;align-items:center}.h-progress-title{width:100px;padding-right:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-progress-inner{flex:1;background-color:#f3f3f3;border-radius:100px;vertical-align:middle}.h-progress-bg{border-radius:100px;background-color:#3B91FF;transition:all .2s linear;position:relative;height:100%}.h-progress-text{color:#c1c1c1;width:100px;padding-left:10px;text-align:left;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-rate{background:#FFF;margin:0px;cursor:pointer;box-sizing:border-box;color:#FFAE00;display:block;line-height:30px;height:30px}.h-rate>span{font-size:18px;margin-right:3px;transition:all .2s;color:#eeeeee}.h-rate>span:hover>i{transition:transform .2s;transform:scale(1.1)}.h-rate>span.h-rate-on{color:#FFAE00}.h-rate[readonly]{pointer-events:painted;cursor:default}.h-rate[readonly]>span:hover>i{transform:none}.h-rate>.h-rate-value{font-size:15px;color:#FFAE00}.h-select{display:inline-block;box-sizing:border-box;vertical-align:middle}.h-select-placeholder{color:#787878}.h-select-value-single,.h-select-placeholder{line-height:24px;height:24px;padding-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-select-show{padding-right:25px !important;position:relative;cursor:default;line-height:1.5}.h-select-show>.h-icon-down{color:#666666;position:absolute;right:8px;top:50%;height:10px;font-size:12px;line-height:12px;transform:translate(0, -50%) scale(.8);transition:transform .2s}.h-select-show:hover>.h-icon-down{color:#45b984}.h-select-show.h-pop-trigger>.h-icon-down{transform:rotate(-180deg) translate(0, 50%) scale(.8);color:#45b984}.h-select-multiple-tags{display:flex;flex-wrap:wrap}.h-select-multiple-tags>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-select-multiple-tags>span>span{line-height:22px}.h-select-multiple-tags>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-select-multiple-tags>span>.h-icon-close-min:hover{color:#45b984 !important}.h-select-multiple-tags>span>.h-icon-close-min:active{color:#30815c !important}.h-select-multiple-tags>span>.h-icon-close-min.h-pop-trigger .h-select-multiple-tags>span>.h-icon-close-min{color:#379469 !important}.h-select-multiple-tags>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-select-multiple-tags>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-select-multiple-tags>span>.h-icon-close:hover{color:#45b984 !important}.h-select-multiple-tags>span>.h-icon-close:active{color:#30815c !important}.h-select-multiple-tags>span>.h-icon-close.h-pop-trigger .h-select-multiple-tags>span>.h-icon-close{color:#379469 !important}.h-select-multiple-tags>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-select-input-border .h-select-show{min-height:30px;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box}.h-select-input-border .h-select-show:hover{border-color:#6ac79d}.h-select-input-border .h-select-show.h-pop-trigger,.h-select-input-border .h-select-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-select-input-border .h-select-show{border-color:#E11617}.h-form-item-valid-error .h-select-input-border .h-select-show:focus,.h-form-item-valid-error .h-select-input-border .h-select-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-form-item-valid-error .h-select-input-border .h-select-show{border-color:#E11617}.h-form-item-valid-error .h-select-input-border .h-select-show.h-pop-trigger{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-select-input-border .h-select-value-single,.h-select-input-border .h-select-placeholder{margin-bottom:2px}.h-select-no-autosize{display:block}.h-select-disabled .h-select-show{background-color:#f5f5f5;color:#999999 !important;border-color:#d3d3d3}.h-select-disabled .h-select-show:hover{border-color:#d3d3d3;color:#999999 !important}.h-select-disabled .h-select-show .h-icon-down{color:#999999 !important}.h-select-show{display:flex;flex-wrap:wrap;position:relative}.h-select-show>.h-icon-close{position:absolute;top:50%;right:8px;font-size:12px;z-index:3;cursor:pointer;transition:color .2s ease;color:#666666;margin-top:-6px}.h-select-show>.h-icon-close:hover{color:#45b984 !important}.h-select-show>.h-icon-close:active{color:#30815c !important}.h-select-show>.h-icon-close.h-pop-trigger .h-select-show>.h-icon-close{color:#379469 !important}.h-select-show>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-select .h-select-search-input{flex:1;min-width:80px;width:auto;max-width:100%;border-color:transparent !important;line-height:13px;font-size:13px;height:24px;margin-bottom:2px;padding-left:5px}.h-select .h-select-search-input:focus{box-shadow:none !important}.h-select-filterable-value{top:1px;position:absolute;line-height:24px;left:8px;z-index:1;right:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-select-single-search-input{position:relative;z-index:2;background-color:transparent !important}.h-select-single-search-input:focus+.h-select-filterable-value{color:#c1c1c1}.h-select-disabled .h-select-single-search-input{color:#999999 !important}.h-select-group{outline:none;user-select:none;position:relative;font-size:13px;background-color:#ffffff;padding:5px 0px}.h-select-group-container .h-select-list{max-height:300px;overflow-y:auto}.h-select-group.h-select-group-has-label .h-select-item{padding:8px 20px}.h-select-group .h-select-item{cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px 10px;position:relative}.h-select-group .h-select-item:hover{background-color:#eeeeee}.h-select-group .h-select-item.disabled{cursor:default}.h-select-group .h-select-item.disabled:hover{background-color:transparent}.h-select-group .h-select-item-disabled{color:#999999;cursor:not-allowed}.h-select-group .h-select-item-disabled:hover{background:none}.h-select-group .h-select-item-label{color:#999999;font-size:12px;padding:8px 10px}.h-select-group .h-select-search-input{width:98%;margin:3px 1%}.h-select-group.h-select-single .h-select-item.h-select-item-picked{color:inherit;background-color:#eeeeee}.h-select-group.h-select-single .h-select-item.h-select-item-selected{background-color:rgba(69,185,132,0.15)}.h-select-group.h-select-multiple .h-select-item{padding-right:40px}.h-select-group.h-select-multiple .h-select-item .h-icon-check{display:none;position:absolute;right:10px;font-weight:bold}.h-select-group.h-select-multiple .h-select-item-selected{color:#45b984;background-color:transparent;cursor:pointer}.h-select-group.h-select-multiple .h-select-item-selected:hover{background-color:#eeeeee}.h-select-group.h-select-multiple .h-select-item-selected.disabled{cursor:default}.h-select-group.h-select-multiple .h-select-item-selected.disabled:hover{background-color:transparent}.h-select-group.h-select-multiple .h-select-item-selected .h-icon-check{display:inline-block}.h-select-group.h-select-multiple .h-select-item.h-select-item-picked{background-color:#eeeeee}.h-select-group .h-select-ul{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box}.h-select-group .h-select-ul-empty{color:#999999;line-height:24px;padding:0 10px}.h-skeleton{display:table;width:100%}@keyframes h-skeleton-loading{0%{background-position:100% 50%}100%{background-position:0 50%}}.h-skeleton .h-skeleton-avatar{display:table-cell;vertical-align:top;padding-right:20px}.h-skeleton .h-skeleton-avatar span{margin-top:16px;display:inline-block;background:#f5f5f5}.h-skeleton .h-skeleton-avatar span.h-skeleton-avatar-circle{border-radius:50%}.h-skeleton .h-skeleton-content{display:table-cell;width:100%}.h-skeleton .h-skeleton-content .h-skeleton-title{height:16px;margin-top:16px;background:#f5f5f5}.h-skeleton .h-skeleton-content .h-skeleton-paragraph{margin-top:24px}.h-skeleton .h-skeleton-content .h-skeleton-paragraph>li{width:100%;height:16px;list-style:none;background:#f5f5f5}.h-skeleton .h-skeleton-content .h-skeleton-paragraph>li+li{margin-top:16px}.h-skeleton.h-skeleton-active .h-skeleton-avatar>span,.h-skeleton.h-skeleton-active .h-skeleton-title,.h-skeleton.h-skeleton-active .h-skeleton-paragraph>li{background:linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);background-size:400% 100%;animation:h-skeleton-loading 1.4s ease infinite}.h-slider{padding:10px 5px}.h-slider-container{position:relative;min-height:10px}.h-slider-line,.h-slider-track{height:5px;border-radius:5px;top:50%;transform:translate(0%, -50%);position:absolute;left:0}.h-slider-line{background-color:#eeeeee;right:0}.h-slider-track{background-color:#45b984}.h-slider-node{height:16px;width:16px;position:absolute;background:#45b984;border-radius:16px;margin-left:-8px;top:-3px;transform:scale(.8);transition:box-shadow,transform .2s ease-in-out;user-select:none;cursor:pointer;cursor:-webkit-grab}.h-slider-node:hover,.h-slider-node-dragging{transform:scale(1.1)}.h-slider-node-dragging{box-shadow:0 0 0 2px rgba(69,185,132,0.2);cursor:-webkit-grabbing}.h-steps{display:flex}.h-steps-item{flex:1;transition:.2s;position:relative}.h-steps-index{transition:background .2s}.h-steps-icon{transition:color .3s}.h-steps-success{opacity:0}.h-steps-transverse .h-steps-content{display:inline-block;position:relative}.h-steps-transverse .h-steps-content .h-steps-title{background:#FFF;display:inline-block;padding-right:10px}.h-steps-transverse .h-steps-content .h-steps-icon{float:left;vertical-align:top}.h-steps-transverse .h-steps-content .h-steps-words{display:inline-block}.h-steps-actived .h-steps-icon{color:#45b984}.h-steps-actived .h-steps-success{opacity:1}.h-steps-actived .h-steps-index{border-color:#45b984;background-color:#ffffff}.h-steps-actived .h-steps-index-num{opacity:0}.h-steps-actived .h-steps-tail{border-color:#45b984}.h-steps-process .h-steps-icon{color:#45b984}.h-steps-process .h-steps-title{font-weight:bold}.h-steps-process .h-steps-index{background-color:#45b984;border-color:#45b984;color:#FFF;font-weight:bold}.h-steps-icon{font-size:16px;color:#999999;background:#FFF;display:inline-block;padding-right:10px}.h-steps-icon-custom{font-size:25px;line-height:1;background-color:#ffffff}.h-steps-tail{border-top:1px solid #d3d3d3;position:absolute;left:0;right:10px;top:15px}.h-steps-item-first .h-steps-tail{left:0}.h-steps-item-last{flex:inherit}.h-steps-item-last .h-steps-tail{display:none}.h-steps-content{display:inline-block;position:relative;z-index:1}.h-steps-desc{color:#c1c1c1;font-size:13px}.h-steps-index{background-color:#ffffff;border-radius:50%;border:1px solid #d3d3d3;background-color:#eeeeee;display:inline-block;height:30px;width:30px;text-align:center;position:relative}.h-steps-index>i{font-size:16px;overflow:hidden;display:inline-block;position:absolute;width:30px;text-align:center;left:-1px;font-style:normal;line-height:30px;top:-1px}.h-switchlist{display:inline-block;vertical-align:middle}.h-switchlist>span{padding:8px 15px;border-radius:0;color:inherit;font-size:13px;line-height:1;box-sizing:border-box;cursor:pointer;transition:all .2s;background-color:#FFF;border:1px solid #eeeeee;float:left;position:relative}.h-switchlist>span+span{margin-left:-1px}.h-switchlist>span:hover{z-index:2;color:#45b984}.h-switchlist>span:first-of-type{border-radius:4px 0 0 4px}.h-switchlist>span:last-of-type{border-radius:0 4px 4px 0}.h-switchlist>span[checked]{background-color:#45b984;border-color:#42b27f;color:#ffffff;z-index:3}.h-switchlist>span>i{margin-right:5px}.h-switchlist-small>span{padding:5px 8px}.h-switchlist[disabled]>span{pointer-events:painted;cursor:not-allowed;border-color:#d3d3d3;color:inherit;background-color:#f5f5f5}.h-switchlist[disabled]>span[checked]{background-color:#d3d3d3}.h-switch .h-switch-span{display:inline-block;margin:0px;position:relative;font-family:inherit;outline:none;border:1px solid #d3d3d3;border-radius:16px;box-sizing:border-box;background:#d3d3d3;float:left;margin-right:5px;transition:all .3s}.h-switch .h-switch-span:after{background-color:#ffffff;box-shadow:0 1px 3px rgba(0,0,0,0.4);border:2px solid #ffffff;border:none;top:1px;left:1px}.h-switch .h-switch-span:before{background-color:#d3d3d3;top:0;left:0;bottom:0;right:0}.h-switch .h-switch-span:after,.h-switch .h-switch-span:before{content:" ";position:absolute;border-radius:15px;transition:all .3s}.h-switch .h-switch-span .h-switch-inner{font-size:13px;line-height:26px;height:26px;margin-right:8px;margin-left:30px;color:#666666;position:relative;vertical-align:2px}.h-switch .h-switch-span:checked,.h-switch .h-switch-span[checked]{border-color:#45b984;background:#45b984}.h-switch .h-switch-span:checked:before,.h-switch .h-switch-span[checked]:before{transform:scale(0)}.h-switch .h-switch-span:checked .h-switch-inner,.h-switch .h-switch-span[checked] .h-switch-inner{margin-right:30px;margin-left:8px;color:#FFF}.h-switch .h-switch-span:checked[disabled],.h-switch .h-switch-span[checked][disabled]{background-color:#f5f5f5}.h-switch .h-switch-span[disabled]{border-color:#d3d3d3;background-color:#f5f5f5;pointer-events:painted;cursor:not-allowed}.h-switch .h-switch-span[disabled]:after{border-color:#ffffff}.h-switch .h-switch-span[disabled]:before{background-color:#f5f5f5}.h-switch{display:inline-block;position:relative;cursor:pointer;line-height:28px}.h-switch>.h-switch-text{display:inline-block}.h-switch>.h-switch-span{min-width:48.8px;height:28px}.h-switch>.h-switch-span:after{width:24px;height:24px}.h-switch>.h-switch-span:checked:after,.h-switch>.h-switch-span[checked]:after{left:100%;margin-left:-25px}.h-switch.h-switch-small{line-height:20px}.h-switch.h-switch-small>.h-switch-span{min-width:34.4px;height:20px}.h-switch.h-switch-small>.h-switch-span:after{width:16px;height:16px}.h-switch.h-switch-small>.h-switch-span:checked:after,.h-switch.h-switch-small>.h-switch-span[checked]:after{left:100%;margin-left:-17px}.h-switch.h-switch-small .h-switch-inner{display:none}.h-table{border:1px solid #eeeeee;position:relative}.h-table th{white-space:nowrap;overflow:hidden;text-align:left;height:40px;position:relative}.h-table th,.h-table td{overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all;box-sizing:border-box;min-width:0;padding:3px 0px 3px 8px;vertical-align:middle}.h-table th.text-right,.h-table td.text-right{padding-right:8px;padding-left:0}.h-table th.text-center,.h-table td.text-center{padding-right:0;padding-left:0}th.h-table-th-checkbox,td.h-table-td-checkbox{text-align:center;text-overflow:clip;padding-left:0}th.h-table-th-radio,td.h-table-td-radio{text-align:center;text-overflow:clip;padding-left:0}.h-table td{font-size:13px;height:40px;border-top:1px solid #eeeeee}.h-table table{table-layout:fixed;border-spacing:0}.h-table-header{background-color:#f5f5f5;position:relative;overflow:hidden;border-bottom:1px solid #eeeeee}.h-table-header table{width:100%}.h-table-body{overflow:auto}.h-table-container{position:relative;margin-top:-1px;background:#fff}.h-table-container.h-loading-parent{min-height:40px}.h-table-container table{width:100%}.h-table-fixed-right,.h-table-fixed-left{z-index:1;position:absolute;top:0;background:#FFF;bottom:0;overflow:hidden}.h-table-fixed-right table,.h-table-fixed-left table{background:#ffffff}.h-table-fixed-right table{float:right}.h-table-fixed-header-right,.h-table-fixed-header-left{z-index:1;position:absolute;top:0;overflow:hidden;border-bottom:1px solid #eeeeee}.h-table-fixed-header-right table,.h-table-fixed-header-left table{background:#f5f5f5}.h-table-fixed-cover{position:absolute;right:0;top:0;bottom:1px;background:#f5f5f5;z-index:2}.h-table-fixed-right,.h-table-fixed-header-right{right:0;box-shadow:-2px 0 6px -2px rgba(0,0,0,0.2)}.h-table-fixed-left,.h-table-fixed-header-left{left:0;box-shadow:2px 0 6px -2px rgba(0,0,0,0.2)}.h-table-border{border-left:0}.h-table-border td,.h-table-border th{border-left:1px solid #eeeeee}.h-table-border th{border-bottom:1px solid #eeeeee}.h-table-border .h-table-header table{margin-bottom:-1px}.h-table-border .h-table-content-empty{border-left:1px solid #eeeeee;border-top:1px solid #eeeeee}.h-table-border .h-table-fixed-right td,.h-table-border .h-table-fixed-header-right td,.h-table-border .h-table-fixed-right th,.h-table-border .h-table-fixed-header-right th{border-right:none}.h-table-stripe .h-table-tbody tr:nth-child(2n){background-color:#fcfcfc}.h-table .h-table-tbody tr.h-table-tr-hovered{background-color:#eeeeee}.h-table .h-table-tbody tr.h-table-tr-hovered.h-table-expand-tr{background-color:transparent}.h-table .h-table-tbody tr.h-table-tr-selected{background-color:rgba(69,185,132,0.15)}.h-table-content-empty{color:#999999;text-align:center;box-sizing:border-box;padding:20px}.h-table-sort-handler{display:inline-block;line-height:1;vertical-align:middle;font-size:12px;color:#d3d3d3;transition:color .2s}th:hover .h-table-sort-handler{color:#999999}.h-table-sort-handler>span{cursor:pointer}.h-table-sort-handler>span.h-table-sort-selected{color:#45b984}.h-table-tr-select-disabled{background:#f5f5f5}.h-table-content-empty-width{height:1px}.h-table-tree-icon{font-size:14px;cursor:pointer;transition:color .2s ease}.h-table-tree-icon:hover{color:#45b984 !important}.h-table-tree-icon:active{color:#30815c !important}.h-table-tree-icon.h-pop-trigger .h-table-tree-icon{color:#379469 !important}.h-table-tree-icon[disabled]{color:#999999 !important;cursor:default}.h-table-tree-empty{display:inline-block;width:14px}.h-table-tree-expand-space{display:inline-block;width:8px}.h-table-tree-opened .h-table-tree-icon{transform:rotate(90deg)}.h-taginput{width:250px;display:inline-block;display:flex;flex-wrap:wrap}.h-taginput-input-border{cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box}.h-taginput-input-border:hover{border-color:#6ac79d}.h-taginput-input-border.h-pop-trigger,.h-taginput-input-border.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-taginput-input-border{border-color:#E11617}.h-form-item-valid-error .h-taginput-input-border:focus,.h-form-item-valid-error .h-taginput-input-border.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}input[type=text].h-taginput-input{flex:1;min-width:80px;width:auto;max-width:100%;border-color:transparent !important;line-height:13px;font-size:13px;height:24px;margin-bottom:2px;padding-left:5px}input[type=text].h-taginput-input:focus{box-shadow:none !important}.h-taginput>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-taginput>span>span{line-height:22px}.h-taginput>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-taginput>span>.h-icon-close-min:hover{color:#45b984 !important}.h-taginput>span>.h-icon-close-min:active{color:#30815c !important}.h-taginput>span>.h-icon-close-min.h-pop-trigger .h-taginput>span>.h-icon-close-min{color:#379469 !important}.h-taginput>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-taginput>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-taginput>span>.h-icon-close:hover{color:#45b984 !important}.h-taginput>span>.h-icon-close:active{color:#30815c !important}.h-taginput>span>.h-icon-close.h-pop-trigger .h-taginput>span>.h-icon-close{color:#379469 !important}.h-taginput>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-form-item-valid-error .h-taginput{border-color:#E11617}.h-form-item-valid-error .h-taginput.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-tag,.h-tag-circle{display:inline-block;padding:4px 10px;border:1px solid #eeeeee;line-height:1;border-radius:4px;background:#ffffff;font-size:13px;vertical-align:middle;cursor:default;margin-right:5px}.h-tag-circle{padding:4px 4px;border-radius:50%}.h-tag-primary{color:#379469;background:#c7eada;border-color:#c7eada}.h-tag-red{color:#b31112;background:#f6b8b8;border-color:#f6b8b8}.h-tag-blue{color:#0874ff;background:#d0e5ff;border-color:#d0e5ff}.h-tag-yellow{color:#cc8b00;background:#ffe7b3;border-color:#ffe7b3}.h-tag-green{color:#0f9f4f;background:#b3efce;border-color:#b3efce}.h-tag-gray{color:#a8a8a8;background:#fafafa;border-color:#fafafa}.h-tag-bg-primary{color:#ffffff;background:#50be8b;border-color:#50be8b}.h-tag-bg-red{color:#ffffff;background:#e91d1e;border-color:#e91d1e}.h-tag-bg-blue{color:#ffffff;background:#4a9aff;border-color:#4a9aff}.h-tag-bg-yellow{color:#ffffff;background:#ffb30f;border-color:#ffb30f}.h-tag-bg-green{color:#ffffff;background:#14dc6d;border-color:#14dc6d}.h-tag-bg-gray{color:#ffffff;background:#c9c9c9;border-color:#c9c9c9}.h-text-ellipsis-limit-text{word-break:break-all}.h-timeline{list-style:none;margin:0;padding:0 10px}.h-timeline-item{list-style:none;position:relative;display:flex}.h-timeline-item.h-timeline-item-green-color .h-timeline-item-circle{border-color:#13CE66;color:#13CE66}.h-timeline-item.h-timeline-item-red-color .h-timeline-item-circle{border-color:#E11617;color:#E11617}.h-timeline-item.h-timeline-item-yellow-color .h-timeline-item-circle{border-color:#FFAE00;color:#FFAE00}.h-timeline-item-pending .h-timeline-item-tail{display:none}.h-timeline-item-time{width:100px;padding:0px 24px 30px 0px;color:#c1c1c1;font-size:13px;display:none;text-align:right}.h-timeline-item-content{padding:0px 0px 30px 24px;position:relative;flex:1}.h-timeline-item-content:after{content:'';position:absolute;top:3px;bottom:0px;left:-0.5px;border-left:1px dashed #d3d3d3;z-index:1}.h-timeline-item-circle{position:absolute;width:14px;height:14px;border:1px solid #3B91FF;color:#3B91FF;border-radius:14px;left:-7px;top:3px;background:#FFF;z-index:2}.h-timeline-item.has-icon .h-timeline-item-circle{font-size:14px;border:none}.h-timeline-item.has-icon .h-timeline-item-circle [class*=" h-icon"],.h-timeline-item.has-icon .h-timeline-item-circle [class^=h-icon]{vertical-align:2px}.h-timeline-item:last-child .h-timeline-item-content,.h-timeline-item:last-child .h-timeline-item-time{padding-bottom:10px}.h-timeline-item:last-child .h-timeline-item-content:after,.h-timeline-item:last-child .h-timeline-item-time:after{border-left:1px solid transparent}.h-timeline-time .h-timeline-item-time{display:block}.h-timeline-pending .h-timeline-item:nth-last-of-type(2) .h-timeline-item-content{padding-bottom:40px}.h-timeline-pending .h-timeline-item:nth-last-of-type(2) .h-timeline-item-content:after{border-left:1px dotted #eeeeee}.h-transfer{display:flex;flex-direction:row;width:480px}.h-transfer .h-transfer-source,.h-transfer .h-transfer-target{flex:1;border:1px solid #EEE}.h-transfer .h-transfer-source .h-transfer-header,.h-transfer .h-transfer-target .h-transfer-header{height:32px;line-height:32px;background:#f9f9f9;text-align:center;border-bottom:1px solid #EEE}.h-transfer .h-transfer-source .h-transfer-filter input,.h-transfer .h-transfer-target .h-transfer-filter input{width:100%;border-radius:0;border-width:0 0 1px 0;height:28px;outline:none;border-color:#EEE;box-shadow:none}.h-transfer .h-transfer-source .h-transfer-list,.h-transfer .h-transfer-target .h-transfer-list{height:240px;overflow-y:auto;padding:4px 0}.h-transfer .h-transfer-source .h-transfer-list .h-transfer-item,.h-transfer .h-transfer-target .h-transfer-list .h-transfer-item{padding-left:8px;height:32px;line-height:32px;cursor:pointer}.h-transfer .h-transfer-source .h-transfer-list .h-transfer-item .h-checkbox,.h-transfer .h-transfer-target .h-transfer-list .h-transfer-item .h-checkbox,.h-transfer .h-transfer-source .h-transfer-list .h-transfer-item .h-checkbox label,.h-transfer .h-transfer-target .h-transfer-list .h-transfer-item .h-checkbox label{display:block}.h-transfer .h-transfer-source .h-transfer-list .h-transfer-item.text-center,.h-transfer .h-transfer-target .h-transfer-list .h-transfer-item.text-center{padding-left:0}.h-transfer .h-transfer-source .h-transfer-list .h-transfer-item:hover,.h-transfer .h-transfer-target .h-transfer-list .h-transfer-item:hover{background:#f9f9f9}.h-transfer-switch{flex-basis:120px;text-align:center}.h-treepicker{display:inline-block;box-sizing:border-box;vertical-align:middle}.h-treepicker-placeholder{color:#787878}.h-treepicker-value-single,.h-treepicker-placeholder{line-height:24px;height:24px;padding-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-treepicker-show{padding-right:25px !important;position:relative;cursor:default;line-height:1.5}.h-treepicker-show>.h-icon-down{color:#666666;position:absolute;right:8px;top:50%;height:10px;font-size:12px;line-height:12px;transform:translate(0, -50%) scale(.8);transition:transform .2s}.h-treepicker-show:hover>.h-icon-down{color:#45b984}.h-treepicker-show.h-pop-trigger>.h-icon-down{transform:rotate(-180deg) translate(0, 50%) scale(.8);color:#45b984}.h-treepicker-multiple-tags{display:flex;flex-wrap:wrap}.h-treepicker-multiple-tags>span{margin-bottom:2px;display:inline-block;border-radius:2px;transition:all linear .2s;margin-right:5px;border:1px solid #eeeeee;background-color:#f5f5f5;font-size:13px;padding:0px 8px}.h-treepicker-multiple-tags>span>span{line-height:22px}.h-treepicker-multiple-tags>span>.h-icon-close-min{font-size:16px;color:#666666;display:inline-block;width:14px;margin-left:2px;vertical-align:-2px;cursor:pointer;transition:color .2s ease}.h-treepicker-multiple-tags>span>.h-icon-close-min:hover{color:#45b984 !important}.h-treepicker-multiple-tags>span>.h-icon-close-min:active{color:#30815c !important}.h-treepicker-multiple-tags>span>.h-icon-close-min.h-pop-trigger .h-treepicker-multiple-tags>span>.h-icon-close-min{color:#379469 !important}.h-treepicker-multiple-tags>span>.h-icon-close-min[disabled]{color:#999999 !important;cursor:default}.h-treepicker-multiple-tags>span>.h-icon-close{line-height:22px;display:inline-block;font-size:12px;color:#666666;margin-left:5px;cursor:pointer;transition:color .2s ease}.h-treepicker-multiple-tags>span>.h-icon-close:hover{color:#45b984 !important}.h-treepicker-multiple-tags>span>.h-icon-close:active{color:#30815c !important}.h-treepicker-multiple-tags>span>.h-icon-close.h-pop-trigger .h-treepicker-multiple-tags>span>.h-icon-close{color:#379469 !important}.h-treepicker-multiple-tags>span>.h-icon-close[disabled]{color:#999999 !important;cursor:default}.h-treepicker-input-border .h-treepicker-show{min-height:30px;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box}.h-treepicker-input-border .h-treepicker-show:hover{border-color:#6ac79d}.h-treepicker-input-border .h-treepicker-show.h-pop-trigger,.h-treepicker-input-border .h-treepicker-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-treepicker-input-border .h-treepicker-show{border-color:#E11617}.h-form-item-valid-error .h-treepicker-input-border .h-treepicker-show:focus,.h-form-item-valid-error .h-treepicker-input-border .h-treepicker-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-form-item-valid-error .h-treepicker-input-border .h-treepicker-show{border-color:#E11617}.h-form-item-valid-error .h-treepicker-input-border .h-treepicker-show.h-pop-trigger{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-treepicker-input-border .h-treepicker-value-single,.h-treepicker-input-border .h-treepicker-placeholder{margin-bottom:2px}.h-treepicker-no-autosize{display:block}.h-treepicker-disabled .h-treepicker-show{background-color:#f5f5f5;color:#999999 !important;border-color:#d3d3d3}.h-treepicker-disabled .h-treepicker-show:hover{border-color:#d3d3d3;color:#999999 !important}.h-treepicker-disabled .h-treepicker-show .h-icon-down{color:#999999 !important}.h-treepicker-item{padding:3px 5px;cursor:pointer}.h-treepicker-item:hover{background:#eeeeee}.h-treepicker-body{padding:15px;overflow:auto;height:300px;width:300px;box-sizing:border-box}.h-treepicker-footer{padding:5px 10px;text-align:right;border-top:1px solid #eeeeee}.h-tree-body{position:relative}.h-tree .h-search{margin-bottom:5px}.h-tree-li-opened>.h-tree-ul{max-height:10000px;transition:max-height 2s ease-in-out}.h-tree-li-opened>.h-tree-show .h-tree-show-expand .h-icon-angle-right{transform:rotate(90deg)}.h-tree-show{padding:3px 0;position:relative}.h-tree-show-space{display:inline-block;width:10px}.h-tree-show-expand{width:20px;text-align:right;color:#c1c1c1;display:inline-block;padding:0 2px 0 0;cursor:pointer;transition:color .2s ease}.h-tree-show-expand:hover{color:#45b984 !important}.h-tree-show-expand:active{color:#30815c !important}.h-tree-show-expand.h-pop-trigger .h-tree-show-expand{color:#379469 !important}.h-tree-show-expand[disabled]{color:#999999 !important;cursor:default}.h-tree-show-expand .h-icon-loading{font-size:12px;line-height:14px;vertical-align:middle}.h-tree-show-expand .h-icon-angle-right{line-height:14px;transition:.2s;vertical-align:-1px}.h-tree-show-desc{display:inline;word-break:break-all;font-size:13px;padding:2px 5px;margin-left:-4px}.h-tree-show-icon{margin-right:5px}.h-tree-show-disabled .h-tree-show-desc{color:#999999}.h-tree-show-disabled .h-tree-show-desc:hover{background-color:transparent}.h-tree-ul{list-style:none;margin:0;padding:0;outline:none;box-sizing:border-box;transition:max-height .2s cubic-bezier(0, 1, 0, 1);max-height:0;overflow:hidden}.h-tree.h-tree-theme-item-selected .h-tree-show-desc{cursor:pointer;border-radius:4px}.h-tree.h-tree-theme-item-selected.h-tree-single .h-tree-show-desc:hover{background-color:#eeeeee}.h-tree.h-tree-theme-item-selected.h-tree-single .h-tree-show-selected .h-tree-show-desc{background-color:#45b984;color:#ffffff}.h-tree.h-tree-theme-item-selected.h-tree-multiple .h-tree-show-desc:hover{color:#45b984}.h-tree-item-slot{display:inline-block}.h-tree-theme-row-selected .h-tree-show{cursor:pointer}.h-tree-theme-row-selected .h-tree-show:hover{background:#eeeeee}.h-tree-theme-row-selected .h-tree-show.h-tree-show-selected{background:rgba(69,185,132,0.15)}.h-uploader-progress{position:absolute;top:50%;transform:translate(0%, -50%);left:0;right:0;z-index:2}.h-uploader-image,.h-uploader-image-empty{position:relative;float:left;height:70px;width:70px;display:inline-block;border-radius:4px;margin-right:10px}.h-uploader-image:last-of-type,.h-uploader-image-empty:last-of-type{margin-right:0px}.h-uploader-image-background{position:absolute;left:0px;right:0px;top:0px;bottom:0px;z-index:1;background-size:cover;border-radius:4px;background-repeat:no-repeat;background-position:center}.h-uploader-image-operate{position:absolute;left:0;bottom:0;right:0;top:0;background:rgba(0,0,0,0.6);z-index:1;opacity:0;text-align:center;border-radius:4px}.h-uploader-image-operate>div{position:absolute;top:50%;transform:translate(0%, -50%);width:100%;left:0;text-align:center;color:#ffffff}.h-uploader-image-operate>div>span{cursor:pointer;color:#f3f3f3}.h-uploader-image-operate>div>span:hover{color:#ffffff}.h-uploader-image-operate-pointer{cursor:pointer}.h-uploader-image:hover .h-uploader-image-operate{transition:.2s;opacity:1}.h-uploader-image-empty{border:1px dashed #c1c1c1;color:#c1c1c1;transition:.2s;cursor:pointer}.h-uploader-image-empty i{font-size:25px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.h-uploader-image-empty:hover{border-color:#45b984;color:#45b984}.h-uploader-image-container{display:inline-block}.h-uploader-image-container .h-uploader-image-operate{cursor:pointer}.h-uploader-images-container::after{content:"";display:block;clear:both}.h-uploader-files{position:relative;margin-top:5px;font-size:13px;color:#c1c1c1}.h-uploader-file{position:relative;line-height:30px}.h-uploader-file-progress{padding-left:5px}.h-uploader-file-info{padding-right:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;padding-left:5px}.h-uploader-file-info:hover{background-color:#eeeeee}.h-uploader-file-info.disabled{cursor:default}.h-uploader-file-info.disabled:hover{background-color:transparent}.h-uploader-file .h-icon-trash{right:5px}.h-uploader-drop-element{padding:15px;color:#333333;border-radius:4px;border:1px dashed #d3d3d3;cursor:pointer}.h-uploader-drop-element:hover{border-color:#45b984}.h-uploader-drop-element.h-uploader-dragging{border-color:#45b984}.h-colorpicker{display:inline-block;position:relative;width:30px;height:30px}.h-colorpicker-show{width:30px;height:30px;cursor:default;background-color:#ffffff;border-radius:4px;border:1px solid #eeeeee;vertical-align:top;transition:all linear .2s;padding:2px 2px 0px 2px;font-size:13px;position:relative;box-sizing:border-box;padding:2px}.h-colorpicker-show:hover{border-color:#6ac79d}.h-colorpicker-show.h-pop-trigger,.h-colorpicker-show.focusing{border-color:#45b984;box-shadow:0 0 0 2px rgba(69,185,132,0.2)}.h-form-item-valid-error .h-colorpicker-show{border-color:#E11617}.h-form-item-valid-error .h-colorpicker-show:focus,.h-form-item-valid-error .h-colorpicker-show.focusing{box-shadow:0 0 0 2px rgba(225,22,23,0.2)}.h-colorpicker-show>.h-icon-down{color:#666666;position:absolute;left:50%;top:50%;height:10px;font-size:12px;line-height:12px;transform:translate(-50%, -50%) scale(.8);transition:transform .2s}.h-colorpicker-show.h-pop-trigger>.h-icon-down{transform:rotate(-180deg) translate(50%, 50%) scale(.8)}.h-colorpicker-show>.h-icon-down{color:#c1c1c1;z-index:3}.h-colorpicker-disabled .h-colorpicker-show{border-color:#999999 !important}.h-colorpicker-disabled .h-colorpicker-show>.h-icon-down{color:#999999 !important}.h-colorpicker-color-bg{height:24px;position:absolute;top:2px;width:24px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.h-colorpicker-color-show{position:relative;z-index:2;height:24px}.h-colorpicker-group{outline:none;user-select:none;position:relative;width:270px;padding:10px}.h-colorpicker-panel-input{width:150px}.h-colorpicker-panel-footer{display:flex;justify-content:space-between}.h-colorpicker-panel-buttons{padding-top:2px}.h-colorpicker-panel-buttons .h-colorpicker-clear-button{padding:5px}.h-colorpicker-hue-picker .h-slider-line{background:linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);height:10px}.h-colorpicker-hue-picker .h-slider-track{display:none}.h-colorpicker-hue-picker .h-slider-node{background:#eeeeee;transform:scale(1.1);box-shadow:none}.h-colorpicker-hue-picker .h-slider-node:hover,.h-colorpicker-hue-picker .h-slider-node-dragging{box-shadow:0 0 2px 0 #c1c1c1}.h-colorpicker-alpha-picker .h-slider-line{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);height:10px;background-size:contain}.h-colorpicker-alpha-picker .h-slider-track{height:10px;right:0 !important;background:linear-gradient(to right, rgba(255,255,255,0) 0%, #FFF 100%)}.h-colorpicker-alpha-picker .h-slider-node{background:#eeeeee;box-shadow:none;transform:scale(1.1)}.h-colorpicker-alpha-picker .h-slider-node:hover,.h-colorpicker-alpha-picker .h-slider-node-dragging{box-shadow:0 0 2px 0 #c1c1c1}.h-colorpicker-colors{margin-top:5px;margin-right:-5px}.h-colorpicker-colors .h-colorpicker-color{display:inline-block;border-radius:4px;height:18px;width:18px;margin-right:10px;margin-bottom:10px;cursor:pointer}.h-colorpicker-colors .h-colorpicker-color:hover{opacity:.8}.h-colorpicker-colors .h-colorpicker-color.h-colorpicker-color-choosed{box-shadow:0 0 2px 0 #333333}.h-color-slider-container{height:150px;position:relative;overflow:hidden}.h-color-slider-bg-white{position:absolute;left:0;bottom:0;right:0;top:0;background:linear-gradient(90deg, #fff, hsla(0,0%,100%,0))}.h-color-slider-bg-black{position:absolute;left:0;bottom:0;right:0;top:0;background:linear-gradient(0deg, #000, transparent)}.h-color-slider-node{position:absolute;width:14px;height:14px;border-radius:7px;margin-left:-7px;margin-top:-7px;border:1px solid #FFF;cursor:pointer;box-shadow:0 0 2px 0 #000} \ No newline at end of file diff --git a/src/static/favicon.ico b/src/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..007fb8b074b77c0bdae38279bfd9b749e86c1097 Binary files /dev/null and b/src/static/favicon.ico differ diff --git a/src/static/img/cat.png b/src/static/img/cat.png new file mode 100644 index 0000000000000000000000000000000000000000..bb4d5c6e7a027459ad8b0df5adb4153d7fe64beb Binary files /dev/null and b/src/static/img/cat.png differ diff --git a/src/static/index.html b/src/static/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3df6a84df33a387c7c704071818543991d5f6e94 --- /dev/null +++ b/src/static/index.html @@ -0,0 +1,83 @@ + + + + + Rule DSL Engine + + + + + + + + + + + + + + +
+ + + +
+ + + \ No newline at end of file diff --git a/src/static/js/common.js b/src/static/js/common.js new file mode 100644 index 0000000000000000000000000000000000000000..24f2664ab11f397516a6244b9cf41784a1034237 --- /dev/null +++ b/src/static/js/common.js @@ -0,0 +1,310 @@ +// web socket +function ws(cfg) { + cfg = cfg || {}; + // web socket + let client = window.client; + if (client && (client.readyState == 1 || client.readyState == 2)) { + console.log('Websocket连接可用不用重创建. state: ' + client.readyState); + return; + } + function doCreate() { + console.log('create websocket ...'); + try { + let protocol = "ws://"; + if (window.location.protocol.startsWith("https")) protocol = "wss://"; + client = new WebSocket(protocol + window.location.host + (cfg.path || "/test/msg")); + window.client = client; + } catch (e) { + console.log('创建websocket错误', e); + setTimeout(function () { + ws(cfg); + }, cfg.reconnection || (1000 * 60 * 2)); // 每两分钟重试 + return + } + client.onclose = cfg.onClose || function (e) { + console.log('websocket close', e); + // setTimeout(function () { + // ws(cfg) + // }, cfg.reconnection || (1000 * 60 * 2)); // 每两分钟重试 + }; + client.onmessage = cfg.onMsg || function (e) { //接收websocket 消息 + let jo = toJSON(e.data); + if (jo) { + // {type: 'xxx': data: null} + // if (jo.type == 'xxx') {} + if (jo.data.msg) { + app.$Notice.info({title: '后台提示', content: jo.data.msg, duration: 5}) + } + } else { + app.$Notice.info({title: '后台提示', content: e.data, duration: 7}) + } + }; + client.onopen = cfg.onOpen || function() { + console.log('websocket onopen'); + client.send('成功连接...'); + }; + } + doCreate() +} + +function toJSON(str) { + if (typeof str == 'string') { + try { + let obj = JSON.parse(str); + return obj + } catch(e) {} + } + return null +} + + +// 异步加载全局js库: js库名 -> 路径/[路径, 全局变量名] +let jsMap = new Map([ + ['md5', 'js/lib/md5.min.js'], + ['ace', ['js/lib/ace-1.4.12.js', 'ace']], + ['ace-tools', 'js/lib/ext-language_tools.min.js'], + ['ace-ext-searchbox', 'js/lib/ext-searchbox.js'], + ['ace-lang-rule', 'js/lib/mode-rule.js'], + ['ace-snip-rule', 'js/lib/rule-snippets.js'], + ['ace-lang-groovy', 'js/lib/mode-groovy.js'], + ['ace-lang-json', 'js/lib/mode-json.js'], + ['ace-snip-groovy', 'js/lib/groovy-snippets.min.js'], + ['moment', 'js/lib/moment.min.js'], + ['echarts', ['js/lib/echarts.min.js', 'echarts']], +]); +function loadJs() { + if (arguments.length < 1) return; + let names = [...arguments]; + let cb = arguments[arguments.length - 1]; // 最后一个参数可为 回调函数 + if (typeof cb == "string") { + cb = null + } else { + names.pop() + } + let length = names.length; + names.forEach(((item, index) => { + length-- + let value = jsMap.get(item); + if (!value) { + if (length === 0 && cb) cb(); + return; + } + let path = value; + if (value instanceof Array) { + if (typeof window[(value[1])] !== "undefined") { + path = null; + if (length === 0 && cb) cb(); + } else { + path = value[0] + } + } + if (path) { + $.ajax({ + url: path, + success: (res) => { + let script = document.createElement( "script" ); + script.text = res; + document.head.appendChild(script).parentNode.removeChild(script); + jsMap.delete(item); //只加载一次 + if (length === 0 && cb) cb(); + } + }) + } + })); +} + + +// ================定义公用组件===================== +// 时间戳格式化组件 +Vue.component('date-item', (resolve, reject) => { + loadJs('moment', () => { + resolve({ + props: ['time', 'format'], + template: '{{timeStr}}', + computed: { + timeStr: function () { + if (!this.time) return ''; + if (this.format) return moment(this.time).format(this.format); + else return moment(this.time).format('YYYY-MM-DD HH:mm:ss') + } + } + }) + }) +}); + +// json 编辑器 +Vue.component('ace-json', (resolve, reject) => { + loadJs('ace', () => { + ace.config.set("basePath", "js/lib"); + loadJs('ace-tools', 'ace-lang-json', () => { + resolve({ + model: {prop: 'content', event: 'update'}, + props: {content: String, readonly: Boolean, placeholder: String}, + template: '
', + data() { + return { + editor: null + } + }, + mounted: function () { + this.$nextTick(this.initEditor) + }, + watch: { + content(v) { + if (this.editor && v != this.editor.session.getValue()) { + this.editor.session.setValue(v); + } + } + }, + methods: { + initEditor() { + // if (this.editor) {this.editor.destroy()} + this.editor = ace.edit(this.$refs.editor); + if (this.content) this.editor.session.setValue(this.content); + this.editor.setReadOnly(this.readonly == true ? true : false); + this.editor.setOptions({ + enableBasicAutocompletion: true, + enableSnippets: true, + enableLiveAutocompletion: true, + placeholder: this.placeholder || '', + }); + this.editor.on('change', (e) => { + // this.content = this.editor.session.getValue(); + this.$emit('update', this.editor.session.getValue()) + }); + this.editor.session.setMode('ace/mode/json'); + this.editor.commands.addCommand({ + name: 'save', + bindKey: {win: 'Ctrl-S', mac: 'Command-S'}, + exec: (editor) => { + // this.content = this.editor.session.getValue(); + this.$emit('update', this.editor.session.getValue()); + this.$emit('save', this.editor.session.getValue()); + }, + // readOnly: false // 如果不需要使用只读模式,这里设置false + }); + }, + } + }) + }); + }); +}); + +// groovy 编辑器 +Vue.component('ace-groovy', (resolve, reject) => { + loadJs('ace', () => { + ace.config.set("basePath", "js/lib"); + loadJs('ace-tools', 'ace-lang-groovy', 'ace-snip-groovy', () => { + resolve({ + model: {prop: 'content', event: 'update'}, + props: {content: String, readonly: Boolean, placeholder: String}, + template: '
', + data() { + return { + editor: null + } + }, + beforeDestroy() { + if (this.editor) {this.editor.destroy()} + }, + mounted: function () { + this.$nextTick(this.initEditor) + }, + watch: { + content(v) { + if (this.editor && v != this.editor.session.getValue()) { + this.editor.session.setValue(v); + } + } + }, + methods: { + initEditor() { + // if (this.editor) {this.editor.destroy()} + this.editor = ace.edit(this.$refs.editor); + if (this.content) this.editor.session.setValue(this.content); + this.editor.setReadOnly(this.readonly == true ? true : false); + this.editor.setOptions({ + enableBasicAutocompletion: true, + enableSnippets: true, + enableLiveAutocompletion: true, + placeholder: this.placeholder || '', + }); + this.editor.on('change', (e) => { + // this.content = this.editor.session.getValue(); + this.$emit('update', this.editor.session.getValue()) + }); + this.editor.session.setMode('ace/mode/groovy'); + //this.editor.execCommand('find'); + this.editor.commands.addCommand({ + name: 'save', + bindKey: {win: 'Ctrl-S', mac: 'Command-S'}, + exec: (editor) => { + // this.content = this.editor.session.getValue(); + this.$emit('update', this.editor.session.getValue()); + this.$emit('save', this.editor.session.getValue()); + }, + // readOnly: false // 如果不需要使用只读模式,这里设置false + }); + // let languageTools = ace.require("ace/ext/language_tools"); + // console.log('languageTools', ace.require("ace/ext/language_tools")); + // languageTools.addCompleter({ + // getCompletions: (editor, session, pos, prefix, callback) => { + // callback(null, [ + // { + // name : "第一行", //名称 + // value : "身份证号码",//值,这就是匹配我们输入的内容,比如输入s或者select,这一行就会出现在提示框里,可根据自己需求修改,就是你想输入什么显示出北京呢,就改成什么 + // caption: "身",//字幕,下拉提示左侧内容,这也就是我们输入前缀匹配出来的内容,所以这里必须包含我们的前缀 + // meta: "字段-身份证号码", //类型,下拉提示右侧内容 + // type: "local",//可写为keyword + // score : 1000 // 让它排在最上面,类似权值的概念 + // }, + // { + // name : "年龄", //名称 + // value : "年龄",//值,这就是匹配我们输入的内容,比如输入s或者select,这一行就会出现在提示框里,可根据自己需求修改,就是你想输入什么显示出北京呢,就改成什么 + // caption: "年",//字幕,下拉提示左侧内容,这也就是我们输入前缀匹配出来的内容,所以这里必须包含我们的前缀 + // meta: "字段-年龄", //类型,下拉提示右侧内容 + // type: "local",//可写为keyword + // score : 1000 // 让它排在最上面,类似权值的概念 + // } + // ]); + // } + // }); + }, + } + }) + }); + }); +}); + + +// 异步加载组件 +new Map([ + ['Upload', 'components/Upload.vue'], + ['Admin', 'views/Admin.vue'], + ['Login', 'views/Login.vue'], + ['Dashboard', 'views/Dashboard.vue'], + ['PolicyCenter', 'views/config/PolicyCenter.vue'], + ['DecisionConfig', 'views/config/DecisionConfig.vue'], + ['DecisionDetail', 'views/config/DecisionDetail.vue'], + ['PolicyDetail', 'views/config/PolicyDetail.vue'], + ['RuleDetail', 'views/config/RuleDetail.vue'], + ['FieldConfig', 'views/config/FieldConfig.vue'], + ['DataCollectorConfig', 'views/config/DataCollectorConfig.vue'], + ['OpHistory', 'views/config/OpHistory.vue'], + ['UserCenter', 'views/config/UserCenter.vue'], + ['UserConfig', 'views/config/UserConfig.vue'], + ['Permission', 'views/config/Permission.vue'], + ['DecisionData', 'views/data/DecisionData.vue'], + ['DecisionResult', 'views/data/DecideResult.vue'], + ['CollectResult', 'views/data/CollectResult.vue'], + ['DataAnalyse', 'views/data/DataAnalyse.vue'], + ['DecisionEChart', 'views/data/DecisionEChart.vue'], + ['RuleEChart', 'views/data/RuleEChart.vue'], + ['Clock', 'views/Clock.vue'], + ['StatusSuspension', 'views/StatusSuspension.vue'], + ['MyInfo', 'views/MyInfo.vue'], +]).forEach((path, key) => { + Vue.component(key, (resolve, reject) => { + httpVueLoader(path)().then((r) => resolve(r)) + }); +}); diff --git a/src/static/js/lib/ace-1.4.12.js b/src/static/js/lib/ace-1.4.12.js new file mode 100644 index 0000000000000000000000000000000000000000..6bd2b01ae5d5bc207c6eaac3640c1ecc528bd09d --- /dev/null +++ b/src/static/js/lib/ace-1.4.12.js @@ -0,0 +1,17 @@ +(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMESPACE="",e=function(){return this}();!e&&typeof window!="undefined"&&(e=window);if(!ACE_NAMESPACE&&typeof requirejs!="undefined")return;var t=function(e,n,r){if(typeof e!="string"){t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if(typeof t=="string"){var i=s(e,t);if(i!=undefined)return n&&n(),i}else if(Object.prototype.toString.call(t)==="[object Array]"){var o=[];for(var u=0,a=t.length;u=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(s.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(s.split(" Chrome/")[1])||undefined,t.isEdge=parseFloat(s.split(" Edge/")[1])||undefined,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("./useragent"),i="http://www.w3.org/1999/xhtml";t.buildDom=function o(e,t,n){if(typeof e=="string"&&e){var r=document.createTextNode(e);return t&&t.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&t&&t.appendChild(e),e;if(typeof e[0]!="string"||!e[0]){var i=[];for(var s=0;s=1.5:!0;if(typeof document!="undefined"){var s=document.createElement("div");t.HI_DPI&&s.style.transform!==undefined&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&typeof s.style.animationName!="undefined"&&(t.HAS_CSS_ANIMATION=!0),s=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./oop"),i=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},t,n;for(n in e.FUNCTION_KEYS)t=e.FUNCTION_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);for(n in e.PRINTABLE_KEYS)t=e.PRINTABLE_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",function(){var t=["cmd","ctrl","alt","shift"];for(var n=Math.pow(2,t.length);n--;)e.KEY_MODS[n]=t.filter(function(t){return n&e.KEY_MODS[t]}).join("-")+"-"}(),e.KEY_MODS[0]="",e.KEY_MODS[-1]="input-",e}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function a(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){u={passive:!1}}})}catch(e){}}function f(){return u==undefined&&a(),u}function l(e,t,n){this.elem=e,this.type=t,this.callback=n}function d(e,t,n){var u=p(t);if(!i.isMac&&s){t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(u|=8);if(s.altGr){if((3&u)==3)return;s.altGr=0}if(n===18||n===17){var a="location"in t?t.location:t.keyLocation;if(n===17&&a===1)s[n]==1&&(o=t.timeStamp);else if(n===18&&u===3&&a===2){var f=t.timeStamp-o;f<50&&(s.altGr=!0)}}}n in r.MODIFIER_KEYS&&(n=-1);if(!u&&n===13){var a="location"in t?t.location:t.keyLocation;if(a===3){e(t,u,-n);if(t.defaultPrevented)return}}if(i.isChromeOS&&u&8){e(t,u,n);if(t.defaultPrevented)return;u&=-9}return!!u||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,u,n):!1}function v(){s=Object.create(null)}var r=e("./keys"),i=e("./useragent"),s=null,o=0,u;l.prototype.destroy=function(){h(this.elem,this.type,this.callback),this.elem=this.type=this.callback=undefined};var c=t.addListener=function(e,t,n,r){e.addEventListener(t,n,f()),r&&r.$toDestroy.push(new l(e,t,n))},h=t.removeListener=function(e,t,n){e.removeEventListener(t,n,f())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return e.type=="dblclick"?0:e.type=="contextmenu"||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){function i(e){t&&t(e),n&&n(e),h(r,"mousemove",t),h(r,"mouseup",i),h(r,"dragstart",i)}var r=e&&e.ownerDocument||document;return c(r,"mousemove",t),c(r,"mouseup",i),c(r,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?c(e,"mousewheel",function(e){var n=8;e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/n,e.wheelY=-e.wheelDeltaY/n):(e.wheelX=0,e.wheelY=-e.wheelDelta/n),t(e)},n):"onwheel"in e?c(e,"wheel",function(e){var n=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*n||0,e.wheelY=e.deltaY*n||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=(e.deltaX||0)*5,e.wheelY=(e.deltaY||0)*5}t(e)},n):c(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,s,o){function p(e){t.getButton(e)!==0?u=0:e.detail>1?(u++,u>4&&(u=1)):u=1;if(i.isIE){var o=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-f)>5;if(!l||o)u=1;l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),u==1&&(a=e.clientX,f=e.clientY)}e._clicks=u,r[s]("mousedown",e);if(u>4)u=0;else if(u>1)return r[s](h[u],e)}var u=0,a,f,l,h={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){c(e,"mousedown",p,o)})};var p=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};t.getModifierString=function(e){return r.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var o=null;c(e,"keydown",function(e){o=e.keyCode},r),c(e,"keypress",function(e){return d(n,e,o)},r)}else{var u=null;c(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=d(n,e,e.keyCode);return u=e.defaultPrevented,t},r),c(e,"keypress",function(e){u&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),u=null)},r),c(e,"keyup",function(e){s[e.keyCode]=null},r),s||(v(),c(window,"focus",v))}};if(typeof window=="object"&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++,i=function(s){s.data==r&&(t.stopPropagation(s),h(n,"message",i),e())};c(n,"message",i),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function r(){t.$idleBlocked?setTimeout(r,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?tthis.end.column?1:0:ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.row0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;nDate.now()-50?!0:r=!1},cancel:function(){r=Date.now()}}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=e("../clipboard"),a=i.isChrome<18,f=i.isIE,l=i.isChrome>63,c=400,h=e("../lib/keys"),p=h.KEY_MODS,d=i.isIOS,v=d?/\s/:/\n/,m=i.isMobile,g=function(e,t){function X(){x=!0,n.blur(),n.focus(),x=!1}function $(e){e.keyCode==27&&n.value.lengthC&&T[s]=="\n")o=h.end;else if(rC&&T.slice(0,s).split("\n").length>2)o=h.down;else if(s>C&&T[s-1]==" ")o=h.right,u=p.option;else if(s>C||s==C&&C!=N&&r==s)o=h.right;r!==s&&(u|=p.shift);if(o){var a=t.onCommandKey({},u,o);if(!a&&t.commands){o=h.keyCodeToString(o);var f=t.commands.findKeyCommand(u,o);f&&t.execCommand(f)}N=r,C=s,O("")}};document.addEventListener("selectionchange",s),t.on("destroy",function(){document.removeEventListener("selectionchange",s)})}var n=s.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var g=!1,y=!1,b=!1,w=!1,E="";m||(n.style.fontSize="1px");var S=!1,x=!1,T="",N=0,C=0,k=0;try{var L=document.activeElement===n}catch(A){}r.addListener(n,"blur",function(e){if(x)return;t.onBlur(e),L=!1},t),r.addListener(n,"focus",function(e){if(x)return;L=!0;if(i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(O):O()},t),this.$focusScroll=!1,this.focus=function(){if(E||l||this.$focusScroll=="browser")return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=n.getBoundingClientRect().top!=0}catch(r){return}var i=[];if(t){var s=n.parentElement;while(s&&s.nodeType==1)i.push(s),s.setAttribute("ace_nocontext",!0),!s.parentElement&&s.getRootNode?s=s.getRootNode().host:s=s.parentElement}n.focus({preventScroll:!0}),t&&i.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){n.style.position="",n.style.top=="0px"&&(n.style.top=e)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return L},t.on("beforeEndOperation",function(){var e=t.curOp,r=e&&e.command&&e.command.name;if(r=="insertstring")return;var i=r&&(e.docChanged||e.selectionChanged);b&&i&&(T=n.value="",W()),O()});var O=d?function(e){if(!L||g&&!e||w)return;e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=T=r);var i=4,s=4+(e.length||(t.selection.isEmpty()?0:1));(N!=i||C!=s)&&n.setSelectionRange(i,s),N=i,C=s}:function(){if(b||w)return;if(!L&&!P)return;b=!0;var e=0,r=0,i="";if(t.session){var s=t.selection,o=s.getRange(),u=s.cursor.row;e=o.start.column,r=o.end.column,i=t.session.getLine(u);if(o.start.row!=u){var a=t.session.getLine(u-1);e=o.start.rowu+1?f.length:r,r+=i.length+1,i=i+"\n"+f}else m&&u>0&&(i="\n"+i,r+=1,e+=1);i.length>c&&(e=T.length&&e.value===T&&T&&e.selectionEnd!==C},_=function(e){if(b)return;g?g=!1:M(n)?(t.selectAll(),O()):m&&n.selectionStart!=N&&O()},D=null;this.setInputHandler=function(e){D=e},this.getInputHandler=function(){return D};var P=!1,H=function(e,r){P&&(P=!1);if(y)return O(),e&&t.onPaste(e),y=!1,"";var s=n.selectionStart,o=n.selectionEnd,u=N,a=T.length-C,f=e,l=e.length-s,c=e.length-o,h=0;while(u>0&&T[h]==e[h])h++,u--;f=f.slice(h),h=1;while(a>0&&T.length-h>N-1&&T[T.length-h]==e[e.length-h])h++,a--;l-=h-1,c-=h-1;var p=f.length-h+1;p<0&&(u=-p,p=0),f=f.slice(0,p);if(!r&&!f&&!l&&!u&&!a&&!c)return"";w=!0;var d=!1;return i.isAndroid&&f==". "&&(f=" ",d=!0),f&&!u&&!a&&!l&&!c||S?t.onTextInput(f):t.onTextInput(f,{extendLeft:u,extendRight:a,restoreStart:l,restoreEnd:c}),w=!1,T=e,N=s,C=o,k=c,d?"\n":f},B=function(e){if(b)return z();if(e&&e.inputType){if(e.inputType=="historyUndo")return t.execCommand("undo");if(e.inputType=="historyRedo")return t.execCommand("redo")}var r=n.value,i=H(r,!0);(r.length>c+100||v.test(i)||m&&N<1&&N==C)&&O()},j=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(!r||a)return;var i=f||n?"Text":"text/plain";try{return t?r.setData(i,t)!==!1:r.getData(i)}catch(e){if(!n)return j(e,t,!0)}},F=function(e,i){var s=t.getCopyText();if(!s)return r.preventDefault(e);j(e,s)?(d&&(O(s),g=s,setTimeout(function(){g=!1},10)),i?t.onCut():t.onCopy(),r.preventDefault(e)):(g=!0,n.value=s,n.select(),setTimeout(function(){g=!1,O(),i?t.onCut():t.onCopy()}))},I=function(e){F(e,!0)},q=function(e){F(e,!1)},R=function(e){var s=j(e);if(u.pasteCancelled())return;typeof s=="string"?(s&&t.onPaste(s,e),i.isIE&&setTimeout(O),r.preventDefault(e)):(n.value="",y=!0)};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",_,t),r.addListener(n,"input",B,t),r.addListener(n,"cut",I,t),r.addListener(n,"copy",q,t),r.addListener(n,"paste",R,t),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:q(e);break;case 86:R(e);break;case 88:I(e)}},t);var U=function(e){if(b||!t.onCompositionStart||t.$readOnly)return;b={};if(S)return;e.data&&(b.useTextareaForIME=!1),setTimeout(z,0),t._signal("compositionStart"),t.on("mousedown",X);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,b.markerRange=r,b.selectionStart=N,t.onCompositionStart(b),b.useTextareaForIME?(T=n.value="",N=0,C=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))},z=function(){if(!b||!t.onCompositionUpdate||t.$readOnly)return;if(S)return X();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;H(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+C-b.selectionStart+k)}},W=function(e){if(!t.onCompositionEnd||t.$readOnly)return;b=!1,t.onCompositionEnd(),t.off("mousedown",X),e&&B()},V=o.delayedCall(z,50).schedule.bind(null,null);r.addListener(n,"compositionstart",U,t),r.addListener(n,"compositionupdate",z,t),r.addListener(n,"keyup",$,t),r.addListener(n,"keydown",V,t),r.addListener(n,"compositionend",W,t),this.getElement=function(){return n},this.setCommandMode=function(e){S=e,n.readOnly=!1},this.setReadOnly=function(e){S||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){P=!0,O(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,o){E||(E=n.style.cssText),n.style.cssText=(o?"z-index:100000;":"")+(i.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+C)*t.renderer.characterWidth*.5+"px;";var u=t.container.getBoundingClientRect(),a=s.computedStyle(t.container),f=u.top+(parseInt(a.borderTopWidth)||0),l=u.left+(parseInt(u.borderLeftWidth)||0),c=u.bottom-f-n.clientHeight-2,h=function(e){s.translate(n,e.clientX-l-2,Math.min(e.clientY-f-2,c))};h(e);if(e.type!="mousedown")return;t.renderer.$isMousePressed=!0,clearTimeout(J),i.isWin&&r.capture(t.container,h,K)},this.onContextMenuClose=K;var J,Q=function(e){t.textInput.onContextMenu(e),K()};r.addListener(n,"mouseup",Q,t),r.addListener(n,"mousedown",function(e){e.preventDefault(),K()},t),r.addListener(t.renderer.scroller,"contextmenu",Q,t),r.addListener(n,"contextmenu",Q,t),d&&G(e,t,n)};t.TextInput=g,t.$setUserAgentForTests=function(e,t){m=e,d=t}}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function u(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function a(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var n=t.column-4;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/useragent"),i=0,s=550;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,s=e.getButton();if(s!==0){var o=i.getSelectionRange(),u=o.isEmpty();(u||s==1)&&i.selection.moveToPosition(n),s==2&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault());return}this.mousedownEvent.time=Date.now();if(t&&!i.isFocused()){i.focus();if(this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode){this.setState("focusWait"),this.captureMouse(e);return}}return this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;if(!this.mousedownEvent)return;this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=a(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=a(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>i||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,u=i?e.wheelY/i:n.vy;i=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(f=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(f=!0);if(f)n.allowed=r;else if(r-n.allowedt.session.documentToScreenRow(l.row,l.column))return c()}if(f==s)return;f=s.text.join("
"),i.setHtml(f),i.show(),t._signal("showGutterTooltip",i),t.on("mousewheel",c);if(e.$tooltipFollowsMouse)h(u);else{var p=u.domEvent.target,d=p.getBoundingClientRect(),v=i.getElement().style;v.left=d.right+"px",v.top=d.bottom+"px"}}function c(){o&&(o=clearTimeout(o)),f&&(i.hide(),f=null,t._signal("hideGutterTooltip",i),t.off("mousewheel",c))}function h(e){i.setPosition(e.x,e.y)}var t=e.editor,n=t.renderer.$gutterLayer,i=new a(t.container);e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var o,u,f;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,"ace_fold-widget"))return c();f&&e.$tooltipFollowsMouse&&h(t),u=t;if(o)return;o=setTimeout(function(){o=null,u&&!e.isMousePressed?l():c()},50)}),s.addListener(t.renderer.$gutter,"mouseout",function(e){u=null;if(!f||o)return;o=setTimeout(function(){o=null,c()},50)},t),t.on("changeSession",c)}function a(e){o.call(this,e)}var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event"),o=e("../tooltip").Tooltip;i.inherits(a,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+s>r&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=u}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function f(e){function T(e,n){var r=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;if(!S||i||s)t.moveCursorToPosition(e),S=r,x={x:p,y:d};else{var o=l(x.x,x.y,p,d);o>a?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),C(),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.selection.fromOrientedRange(m),t.isFocused()&&!w&&t.$resetCursorStyle(),m=null,g=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",s.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),s.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||(k(),y++),A!==null&&(A=null),e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!g)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e),t),i.addListener(c,"dragend",this.onDragEnd.bind(e),t),i.addListener(c,"dragenter",this.onDragEnter.bind(e),t),i.addListener(c,"dragover",this.onDragOver.bind(e),t),i.addListener(c,"dragleave",this.onDragLeave.bind(e),t),i.addListener(c,"drop",this.onDrop.bind(e),t);var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),s=e("../lib/dom");t.addTouchListeners=function(e,t){function b(){var e=window.navigator&&window.navigator.clipboard,r=!1,i=function(){var n=t.getCopyText(),i=t.session.getUndoManager().hasUndo();y.replaceChild(s.buildDom(r?["span",!n&&["span",{"class":"ace_mobile-button",action:"selectall"},"Select All"],n&&["span",{"class":"ace_mobile-button",action:"copy"},"Copy"],n&&["span",{"class":"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{"class":"ace_mobile-button",action:"paste"},"Paste"],i&&["span",{"class":"ace_mobile-button",action:"undo"},"Undo"],["span",{"class":"ace_mobile-button",action:"find"},"Find"],["span",{"class":"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),y.firstChild)},o=function(n){var s=n.target.getAttribute("action");if(s=="more"||!r)return r=!r,i();if(s=="paste")e.readText().then(function(e){t.execCommand(s,e)});else if(s){if(s=="cut"||s=="copy")e?e.writeText(t.getCopyText()):document.execCommand("copy");t.execCommand(s)}y.firstChild.style.display="none",r=!1,s!="openCommandPallete"&&t.focus()};y=s.buildDom(["div",{"class":"ace_mobile-menu",ontouchstart:function(e){n="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),o(e)},onclick:o},["span"],["span",{"class":"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){y||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,s=t.container.getBoundingClientRect();y.style.top=n.pageY-s.top-3+"px",n.pageX-s.left=2?t.selection.getLineRange(p.row):t.session.getBracketRange(p);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),n="wait"}function T(){h+=60,c=setInterval(function(){h--<=0&&(clearInterval(c),c=null),Math.abs(v)<.01&&(v=0),Math.abs(m)<.01&&(m=0),h<20&&(v=.9*v),h<20&&(m=.9*m);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*m),e==t.session.getScrollTop()&&(h=0)},10)}var n="scroll",o,u,a,f,l,c,h=0,p,d=0,v=0,m=0,g,y;i.addListener(e,"contextmenu",function(e){if(!g)return;var n=t.textInput.getElement();n.focus()},t),i.addListener(e,"touchstart",function(e){var i=e.touches;if(l||i.length>1){clearTimeout(l),l=null,a=-1,n="zoom";return}g=t.$mouseHandler.isMousePressed=!0;var s=t.renderer.layerConfig.lineHeight,c=t.renderer.layerConfig.lineHeight,y=e.timeStamp;f=y;var b=i[0],w=b.clientX,E=b.clientY;Math.abs(o-w)+Math.abs(u-E)>s&&(a=-1),o=e.clientX=w,u=e.clientY=E,v=m=0;var T=new r(e,t);p=T.getDocumentPosition();if(y-a<500&&i.length==1&&!h)d++,e.preventDefault(),e.button=0,x();else{d=0;var N=t.selection.cursor,C=t.selection.isEmpty()?N:t.selection.anchor,k=t.renderer.$cursorLayer.getPixelPosition(N,!0),L=t.renderer.$cursorLayer.getPixelPosition(C,!0),A=t.renderer.scroller.getBoundingClientRect(),O=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,_=function(e,t){return e/=c,t=t/s-.75,e*e+t*t};if(e.clientXP?"cursor":"anchor"),P<3.5?n="anchor":D<3.5?n="cursor":n="scroll",l=setTimeout(S,450)}a=y},t),i.addListener(e,"touchend",function(e){g=t.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),n=="zoom"?(n="",h=0):l?(t.selection.moveToPosition(p),h=0,w()):n=="scroll"?(T(),E()):w(),clearTimeout(l),l=null},t),i.addListener(e,"touchmove",function(e){l&&(clearTimeout(l),l=null);var i=e.touches;if(i.length>1||n=="zoom")return;var s=i[0],a=o-s.clientX,c=u-s.clientY;if(n=="wait"){if(!(a*a+c*c>4))return e.preventDefault();n="cursor"}o=s.clientX,u=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var h=e.timeStamp,p=h-f;f=h;if(n=="scroll"){var d=new r(e,t);d.speed=1,d.wheelX=a,d.wheelY=c,10*Math.abs(a)1&&(i=n[n.length-2]);var o=a[t+"Path"];return o==null?o=a.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(u){}if(i&&!t.$loading[n])return r&&r(i);t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r);if(t.$loading[n].length>1)return;var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a),f()};var f=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),f=function(){})};t.init=l,t.version="1.4.12"}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,f=e("./touch_handler").addTouchListeners,l=e("../config"),c=function(e){var t=this;this.editor=e,new s(this),new o(this),new a(this);var n=function(t){var n=!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement());n&&window.focus(),e.focus()},u=e.renderer.getMouseEventTarget();r.addListener(u,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(u,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.addMultiMouseDownListener([u,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),f(e.container,e);var l=e.renderer.$gutter;r.addListener(l,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(l,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(l,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(l,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(u,"mousedown",n,e),r.addListener(l,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",function(n){if(t.state||t.$dragDelay||!t.$dragEnabled)return;var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),s=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?s.setCursorStyle("default"):s.setCursorStyle("")},e)};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,s=this.editor.renderer;s.$isMousePressed=!0;var o=this,a=function(e){if(!e)return;if(i.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new u(e,o.editor),o.$mouseMoved=!0},f=function(e){n.off("beforeEndOperation",c),clearInterval(h),l(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",o.isMousePressed=s.$isMousePressed=!1,s.$keepTextAreaAtCursor&&s.$moveTextAreaToCursor(),o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e),n.endOperation()},l=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(i.isOldIE&&e.domEvent.type=="dblclick")return setTimeout(function(){f(e)});var c=function(e){if(!o.releaseMouse)return;n.curOp.command.name&&n.curOp.selectionChanged&&(o[o.state+"End"]&&o[o.state+"End"](),o.state="",o.releaseMouse())};n.on("beforeEndOperation",c),n.startOperation({command:{name:"mouse"}}),o.$onCaptureMouseMove=a,o.releaseMouse=r.capture(this.editor.container,a,f);var h=setInterval(l,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){if(t&&t.domEvent&&t.domEvent.type!="contextmenu")return;this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent)}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(c.prototype),l.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,s=i.getFoldAt(n.row,n.column,1);s&&(t.getAccelKey()?i.removeFold(s):i.expandFold(s),t.stop());var o=t.domEvent&&t.domEvent.target;o&&r.hasCssClass(o,"ace_inline_button")&&r.hasCssClass(o,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session,s=i.getParentFoldRangeData(r,!0),o=s.range||s.firstRange;if(o){r=o.start.row;var u=i.getFoldAt(r,i.getLine(r).length,1);u?i.removeFold(u):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}var r=e("../lib/dom");t.FoldHandler=i}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),s=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]==e)return;while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;typeof e=="function"&&!e.handleKeyboard&&(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){var s,o=!1,u=this.$editor.commands;for(var a=this.$handlers.length;a--;){s=this.$handlers[a].handleKeyboard(this.$data,e,t,n,r);if(!s||!s.command)continue;s.command=="null"?o=!0:o=u.exec(s.command,this.$editor,s.args,r),o&&r&&e!=-1&&s.passEvent!=1&&s.command.passEvent!=1&&i.stopEvent(r);if(o)break}return!o&&e==-1&&(s={command:"insertstring"},o=u.exec("insertstring",this.$editor,t)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),o},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(s.prototype),t.KeyBinding=s}),define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";function F(e,t,n,r){var i=s?d:p,c=null,h=null,v=null,m=0,g=null,y=null,b=-1,w=null,E=null,T=[];if(!r)for(w=0,r=[];w0)if(g==16){for(w=b;w-1){for(w=b;w=0;C--){if(r[C]!=N)break;t[C]=s}}}function I(e,t,n){if(o=e){u=i+1;while(u=e)u++;for(a=i,l=u-1;a=t.length||(o=n[r-1])!=b&&o!=w||(c=t[r+1])!=b&&c!=w)return E;return u&&(c=w),c==o?c:E;case k:o=r>0?n[r-1]:S;if(o==b&&r+10&&n[r-1]==b)return b;if(u)return E;p=r+1,h=t.length;while(p=1425&&d<=2303||d==64286;o=t[p];if(v&&(o==y||o==T))return y}if(r<1||(o=t[r-1])==S)return E;return n[r-1];case S:return u=!1,f=!0,s;case x:return l=!0,E;case O:case M:case D:case P:case _:u=!1;case H:return E}}function R(e){var t=e.charCodeAt(0),n=t>>8;return n==0?t>191?g:B[t]:n==5?/[\u0591-\u05f4]/.test(e)?y:g:n==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?A:/[\u0660-\u0669\u066b-\u066c]/.test(e)?w:t==1642?L:/[\u06f0-\u06f9]/.test(e)?b:T:n==32&&t<=8287?j[t&255]:n==254?t>=65136?T:E:E}function U(e){return e>="\u064b"&&e<="\u0655"}var r=["\u0621","\u0641"],i=["\u063a","\u064a"],s=0,o=0,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],v=0,m=1,g=0,y=1,b=2,w=3,E=4,S=5,x=6,T=7,N=8,C=9,k=10,L=11,A=12,O=13,M=14,_=15,D=16,P=17,H=18,B=[H,H,H,H,H,H,H,H,H,x,S,x,N,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,S,S,S,x,N,E,E,L,L,L,E,E,E,E,E,k,C,k,C,C,b,b,b,b,b,b,b,b,b,b,C,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,H,H,H,H,H,H,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,C,E,L,L,L,L,E,E,E,E,g,E,E,H,E,E,L,L,b,b,E,g,E,E,E,b,g,E,E,E,E,E],j=[N,N,N,N,N,N,N,N,N,N,N,H,H,H,g,y,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N,S,O,M,_,D,P,C,L,L,L,L,L,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,C,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N];t.L=g,t.R=y,t.EN=b,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\u00b7",t.doBidiReorder=function(e,n,r){if(e.length<2)return{};var i=e.split(""),o=new Array(i.length),u=new Array(i.length),a=[];s=r?m:v,F(i,a,i.length,n);for(var f=0;fT&&n[f]0&&i[f-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(i[f])&&(a[f-1]=a[f]=t.R_H,f++);i[i.length-1]===t.DOT&&(a[i.length-1]=t.B),i[0]==="\u202b"&&(a[0]=t.RLE);for(var f=0;f=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n,r=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){n=this.session.$getRowCacheIndex(t,this.currentRow-e-1);if(n!==r)break;r=n,e++}}else e=this.currentRow;return e},this.updateRowLine=function(e,t){e===undefined&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1,s=n?this.EOF:this.EOL;this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE;if(this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(t===undefined&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&e<=t&&s[i]%2!==0&&i++;for(var u=0;ut&&s[i]%2===0&&(o+=this.charWidths[s[i]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},this.getSelections=function(e,t){var n=this.bidiMap,r=n.bidiLevels,i,s=[],o=0,u=Math.min(e,t)-this.wrapIndent,a=Math.max(e,t)-this.wrapIndent,f=!1,l=!1,c=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,p=0;p=u&&hn+s/2){n+=s;if(r===i.length-1){s=0;break}s=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!==0&&i[r]%2===0?(e0&&i[r-1]%2===0&&i[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&s===0&&i[r-1]%2===0||!this.isRtlDir&&r===0&&i[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!==0&&s!==0&&r--,t=this.bidiMap.logicalFromVisual[r]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(o.prototype),t.BidiHandler=o}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(this.$silent)return;var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||s)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t));if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t=0,n,r=/\s/,i=this.session.tokenRe;i.lastIndex=0;if(this.session.tokenRe.exec(e))t=this.session.tokenRe.lastIndex;else{while((n=e[t])&&r.test(n))t++;if(t<1){i.lastIndex=0;while((n=e[t])&&!i.test(n)){i.lastIndex=0,t++;if(r.test(n)){if(t>2){t--;break}while((n=e[t])&&r.test(n))t++;if(t>2)break}}}}return i.lastIndex=0,t},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;t===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);if(e!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(n.row+e,n.column,r);e!==0&&t===0&&s.row===this.lead.row&&s.column===this.lead.column,this.moveCursorTo(s.row,s.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch(r){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(u.prototype),t.Selection=u}),define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var r=e("./config"),i=2e3,s=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a1?f.onMatch=this.$applyToken:f.onMatch=f.token),c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null)}r.length||(s[0]=0,r.push("$")),u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(e){i=e|0},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;il){var g=e.substring(l,m-v.length);h.type==p?h.value+=g:(h.type&&f.push(h),h={type:p,value:g})}for(var y=0;yi){c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(l1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:f,state:n.length?n:r}},this.reportError=r.reportError}).call(s.prototype),t.Tokenizer=s}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],f,l={},c={'"':'"',"'":"'"},h=function(e){var t=-1;e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount}));if(l[t])return f=l[t];f=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},d=function(e){this.add("braces","insertion",function(t,n,r,i,s){var u=r.getCursorPosition(),a=i.doc.getLine(u.row);if(s=="{"){h(r);var l=r.getSelectionRange(),c=i.doc.getTextRange(l);if(c!==""&&c!=="{"&&r.getWrapBehavioursEnabled())return p(l,c,"{","}");if(d.isSaneInsertion(r,i))return/[\]\}\)]/.test(a[u.column])||r.inMultiSelectMode||e&&e.braces?(d.recordAutoInsert(r,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(r,i,"{"),{text:"{",selection:[1,1]})}else if(s=="}"){h(r);var v=a.substring(u.column,u.column+1);if(v=="}"){var m=i.$findOpeningBracket("}",{column:u.column+1,row:u.row});if(m!==null&&d.isAutoInsertedClosing(u,a,s))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if(s=="\n"||s=="\r\n"){h(r);var g="";d.isMaybeInsertedClosing(u,a)&&(g=o.stringRepeat("}",f.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var v=a.substring(u.column,u.column+1);if(v==="}"){var y=i.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!y)return null;var b=this.$getIndent(i.getLine(y.row))}else{if(!g){d.clearMaybeInsertedClosing();return}var b=this.$getIndent(a)}var w=b+i.getTabString();return{text:"\n"+w+"\n"+b+g,selection:[1,w.length,1,w.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;f.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"(",")");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"[","]");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var s=r.$mode.$quotes||c;if(i.length==1&&s[i]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(i)!=-1)return;h(n);var o=i,u=n.getSelectionRange(),a=r.doc.getTextRange(u);if(a!==""&&(a.length!=1||!s[a])&&n.getWrapBehavioursEnabled())return p(u,a,o,o);if(!a){var f=n.getCursorPosition(),l=r.doc.getLine(f.row),d=l.substring(f.column-1,f.column),v=l.substring(f.column,f.column+1),m=r.getTokenAt(f.row,f.column),g=r.getTokenAt(f.row,f.column+1);if(d=="\\"&&m&&/escape/.test(m.type))return null;var y=m&&/string|escape/.test(m.type),b=!g||/string|escape/.test(g.type),w;if(v==o)w=y!==b,w&&/string\.end/.test(g.type)&&(w=!1);else{if(y&&!b)return null;if(y&&b)return null;var E=r.$mode.tokenRe;E.lastIndex=0;var S=E.test(d);E.lastIndex=0;var x=E.test(d);if(S||x)return null;if(v&&!/[\s;,.})\]\\]/.test(v))return null;var T=l[f.column-2];if(!(d!=o||T!=o&&!E.test(T)))return null;w=!0}return{text:w?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.$mode.$quotes||c,o=r.doc.getTextRange(i);if(!i.isMultiLine()&&s.hasOwnProperty(o)){h(n);var u=r.doc.getLine(i.start.row),a=u.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,f.autoInsertedLineEnd[0])||(f.autoInsertedBrackets=0),f.autoInsertedRow=r.row,f.autoInsertedLineEnd=n+i.substr(r.column),f.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(f.maybeInsertedBrackets=0),f.maybeInsertedRow=r.row,f.maybeInsertedLineStart=i.substr(0,r.column)+n,f.maybeInsertedLineEnd=i.substr(r.column),f.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return f.autoInsertedBrackets>0&&e.row===f.autoInsertedRow&&n===f.autoInsertedLineEnd[0]&&t.substr(e.column)===f.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return f.maybeInsertedBrackets>0&&e.row===f.maybeInsertedRow&&t.substr(e.column)===f.maybeInsertedLineEnd&&t.substr(0,e.column)==f.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){f.autoInsertedLineEnd=f.autoInsertedLineEnd.substr(1),f.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){f&&(f.maybeInsertedBrackets=0,f.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,s=[];for(var o=0;o2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(ne.length&&(E=e.length)}),u==Infinity&&(u=E,s=!1,o=!1),l&&u%f!=0&&(u=Math.floor(u/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new f(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,a=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new l(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new f(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new l(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);a.start.row==c&&(a.start.column+=h),a.end.row==c&&(a.end.column+=h),t.selection.fromOrientedRange(a)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)if(e[t]){var n=e[t],i=n.prototype.$id,s=r.$modes[i];s||(r.$modes[i]=s=new n),r.$modes[t]||(r.$modes[t]=s),this.$embeds.push(t),this.$modes[t]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(var t=0;t=0&&t.row=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.columnthis.row)return;var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new u(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e))},this.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,r==-1&&(r=t),s<=r&&n.fireUpdateEvent(s,r)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.lines[t]=null;else if(e.action=="remove")this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(s.prototype),t.BackgroundTokenizer=s}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i)}}}).call(o.prototype),t.SearchHighlight=o}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if(e.action=="insert"){var f=i-r,l=-t.column+n.column;for(;or)break;a.start.row==r&&a.start.column>=t.column&&(a.start.column==t.column&&this.$bias<=0||(a.start.column+=l,a.start.row+=f));if(a.end.row==r&&a.end.column>=t.column){if(a.end.column==t.column&&this.$bias<0)continue;a.end.column==t.column&&l>0&&oa.start.column&&a.end.column==s[o+1].start.column&&(a.end.column-=l),a.end.column+=l,a.end.row+=f}}}else{var f=r-i,l=t.column-n.column;for(;oi)break;if(a.end.rowt.column)a.end.column=t.column,a.end.row=t.row}else a.end.column+=l,a.end.row+=f;else a.end.row>i&&(a.end.row+=f);if(a.start.rowt.column)a.start.column=t.column,a.start.row=t.row}else a.start.column+=l,a.start.row+=f;else a.start.row>i&&(a.start.row+=f)}}if(f!=0&&o=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i=t){u=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column,c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);c&&!c.range.isStart(u,a)&&this.removeFold(c),h&&!h.range.isEnd(f,l)&&this.removeFold(h);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.collapseChildren||p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?(n=new r(0,0,this.getLength(),0),t==null&&(t=!0)):typeof e=="number"?n=new r(e,0,e,this.getLine(e).length):"row"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRangeList(n),t!=0?this.removeFolds(i):this.expandFolds(i);if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row),i==null&&(i=0),t==null&&(t=e.end.row),n==null&&(n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(tl)break}while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return f.end.row=i.getCurrentTokenRow(),f.end.column=i.getCurrentTokenColumn()+s.value.length-2,f}},this.foldAll=function(e,t,n,r){n==undefined&&(n=1e5);var i=this.foldWidgets;if(!i)return;t=t||this.getLength(),e=e||0;for(var s=e;s=e&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}},this.foldToLevel=function(e){this.foldAll();while(e-->0)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){var n=e.getTokens(t);for(var r=0;r=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(!this.getFoldWidget)return;var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range))return this.removeFold(s),s}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,f,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action=="remove")this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator;t.Folding=u}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/));if(!r)return null;var s=new i(e.row,e.column-1,e.row,e.column),o=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);if(!o)return[s];var u=new i(o.row,o.column,o.row,o.column+1);return[s,u]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}r.implement(this,u),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(oe&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;ao){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;for(var n=e.length-1;n!=-1;n--){var r=e[n];r.action=="insert"||r.action=="remove"?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;for(var n=0;ne.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,f=s.start,o=f.row-a.row,u=f.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new l(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,u),o.length&&this.addFolds(o),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode")},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,s=r.row,o=i.row,u=o-s,a=null;this.$updating=!0;if(u!=0)if(n==="remove"){this[t?"$wrapData":"$rowLengthCache"].splice(s,u);var f=this.$foldData;a=this.getFoldsInRange(e),this.removeFolds(a);var l=this.getFoldLine(i.row),c=0;if(l){l.addRemoveChars(i.row,i.column,r.column-i.column),l.shiftRow(-u);var h=this.getFoldLine(s);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c=i.row&&l.shiftRow(-u)}o=s}else{var p=Array(u);p.unshift(s,0);var d=t?this.$wrapData:this.$rowLengthCache;d.splice.apply(d,p);var f=this.$foldData,l=this.getFoldLine(s),c=0;if(l){var v=l.range.compareInside(r.row,r.column);v==0?(l=l.split(r.row,r.column),l&&(l.shiftRow(u),l.addRemoveChars(o,0,i.column-r.column))):v==-1&&(l.addRemoveChars(s,0,i.column-r.column),l.shiftRow(u)),c=f.indexOf(l)+1}for(c;c=s&&l.shiftRow(u)}}else{u=Math.abs(e.start.column-e.end.column),n==="remove"&&(a=this.getFoldsInRange(e),this.removeFolds(a),u=-u);var l=this.getFoldLine(s);l&&l.addRemoveChars(s,r.column,u)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var r=this.doc.getAllLines(),i=this.getTabSize(),o=this.$wrapData,u=this.$wrapLimit,a,f,l=e;t=Math.min(t,r.length-1);while(l<=t)f=this.getFoldLine(l,f),f?(a=[],f.walk(function(e,t,i,o){var u;if(e!=null){u=this.$getDisplayTokens(e,a.length),u[0]=n;for(var f=1;fr-b){var w=f+r-b;if(e[w-1]>=c&&e[w]>=c){y(w);continue}if(e[w]==n||e[w]==s){for(w;w!=f-1;w--)if(e[w]==n)break;if(w>f){y(w);continue}w=f+r;for(w;w>2)),f-1);while(w>E&&e[w]E&&e[w]E&&e[w]==a)w--}else while(w>E&&e[w]E){y(++w);continue}w=f+r,e[w]==t&&w--,y(w-b)}return o},this.$getDisplayTokens=function(n,r){var i=[],s;r=r||0;for(var o=0;o39&&u<48||u>57&&u<64?i.push(a):u>=4352&&m(u)?i.push(e,t):i.push(e)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i=4352&&m(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),!this.$useWrapMode||!this.$wrapData[e]?t:this.$wrapData[e].length+t},this.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0)var u=f[l],i=this.$docRowCache[l],h=e>f[c-1];else var h=!c;var p=this.getLength()-1,d=this.getNextFoldLine(i),v=d?d.start.row:Infinity;while(u<=e){a=this.getRowLength(i);if(u+a>e||i>=p)break;u+=a,i++,i>v&&(i=d.end.row+1,d=this.getNextFoldLine(i,d),v=d?d.start.row:Infinity),h&&(this.$docRowCache.push(i),this.$screenRowCache.push(u))}if(d&&d.start.row<=i)r=this.getFoldDisplayLine(d),i=d.start.row;else{if(u+a<=e||i>p)return{row:p,column:this.getLine(p).length};r=this.getLine(i),d=null}var m=0,g=Math.floor(e-u);if(this.$useWrapMode){var y=this.$wrapData[i];y&&(o=y[g],g>0&&y.length&&(m=y.indent,s=y[g-1]||y[y.length-1],r=r.substring(s)))}return n!==undefined&&this.$bidiHandler.isBidiRow(u+g,i,g)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),d?d.idxToPosition(s):{row:i,column:s}},this.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);var v=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var g=0;while(d.length>=m[g])r++,g++;d=d.substring(m[g-1]||0,d.length),v=g>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[u]&&this.lineWidgets[u].rowsAbove&&(r+=this.lineWidgets[u].rowsAbove),{row:r,column:v+this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;ro&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){if(!this.$enableVarChar)return;this.$getStringScreenWidth=function(t,n,r){if(n===0)return[0,0];n||(n=Infinity),r=r||0;var i,s;for(s=0;sn)break}return[r,s]}},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=m}.call(d.prototype),e("./edit_session/folding").Folding.call(d.prototype),e("./edit_session/bracket_match").BracketMatch.call(d.prototype),o.defineOptions(d.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;this.$wrap=e;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){e=parseInt(e),e>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=d}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function u(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new s(e,n,i,o),n==o&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start)?(r=null,!1):!0}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a,l;e:for(var c=u.offset||0;c<=f;c++){for(var h=0;hv)continue;o.push(l=new s(c,v,c+a-1,m)),a>2&&(c=c+a-2)}}else for(var g=0;gE&&o[h].end.row==n.end.row)h--;o=o.slice(g,h+1);for(g=0,h=o.length;g=u;n--)if(c(n,Number.MAX_VALUE,e))return;if(t.wrap==0)return;for(n=a,u=o.row;n>=u;n--)if(c(n,Number.MAX_VALUE,e))return};else var f=function(e){var n=o.row;if(c(n,o.column,e))return;for(n+=1;n<=a;n++)if(c(n,0,e))return;if(t.wrap==0)return;for(n=u,a=o.row;n<=a;n++)if(c(n,0,e))return};if(t.$isMultiLine)var l=n.length,c=function(t,i,s){var o=r?t-l+1:t;if(o<0)return;var u=e.getLine(o),a=u.search(n[0]);if(!r&&ai)return;if(s(o,a,o+l-1,c))return!0};else if(r)var c=function(t,r,i){var s=e.getLine(t),o=[],u,a=0;n.lastIndex=0;while(u=n.exec(s)){var f=u[0].length;a=u.index;if(!f){if(a>=s.length)break;n.lastIndex=a+=1}if(u.index+f>r)break;o.push(u.index,f)}for(var l=o.length-1;l>=0;l-=2){var c=o[l-1],f=o[l];if(i(t,c,t,c+f))return!0}};else var c=function(t,r,i){var s=e.getLine(t),o,u;n.lastIndex=r;while(u=n.exec(s)){var a=u[0].length;o=u.index;if(i(t,o,t,o+a))return!0;if(!a){n.lastIndex=o+=1;if(o>=s.length)return!1}}};return{forEach:f}}}).call(o.prototype),t.Search=o}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function o(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function u(e,t){o.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),i=e("../lib/useragent"),s=r.KEY_MODS;u.prototype=o.prototype,function(){function e(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&(typeof e=="string"?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var s=r[i];if(s==e)delete r[i];else if(Array.isArray(s)){var o=s.indexOf(e);o!=-1&&(s.splice(o,1),s.length==1&&(r[i]=s[0]))}}},this.bindKey=function(e,t,n){typeof e=="object"&&e&&(n==undefined&&(n=e.position),e=e[this.platform]);if(!e)return;if(typeof t=="function")return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach(function(e){var r="";if(e.indexOf(" ")!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),u=s[o.hashId]+o.key;this._addCommandToBinding(r+u,t,n)},this)},this._addCommandToBinding=function(t,n,r){var i=this.commandKeyBinding,s;if(!n)delete i[t];else if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?(s=i[t].indexOf(n))!=-1&&i[t].splice(s,1):i[t]=[i[t]],typeof r!="number"&&(r=e(n));var o=i[t];for(s=0;sr)break}o.splice(s,0,n)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=s[t]+n;return this.commandKeyBinding[r]},this.handleKeyboard=function(e,t,n,r){if(r<0)return;var i=s[t]+n,o=this.commandKeyBinding[i];e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o);if(o)if(o=="chainKeys"||o[o.length-1]=="chainKeys")return e.$keyChain=e.$keyChain||i,{command:"null"};if(e.$keyChain)if(!!t&&t!=4||n.length!=1){if(t==-1||r>0)e.$keyChain=""}else e.$keyChain=e.$keyChain.slice(0,-i.length-1);return{command:o}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(o.prototype),t.HashHandler=o,t.MultiHashHandler=u}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}typeof e=="string"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(this.$checkCommandState!=0&&e.isAvailable&&!e.isAvailable(t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(e){i.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(e,t){typeof t=="number"&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty(),n=t?e.selection.getLineRange():e.selection.getRange();e._emit("cut",n),n.isEmpty()||e.session.remove(n),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(e){var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,u=e.session.doc.getTextRange(e.selection.getRange()),a=u.replace(/\n\s*/," ").length,f=e.session.doc.getLine(n.row);for(var l=n.row+1;l<=i.row+1;l++){var c=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));c.length!==0&&(c=" "+c),f+=c}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:}n=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var s=this.selection.toJSON();this.curOp.selectionAfter=s,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(s),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},this.setKeyboardHandler=function(e,t){if(e&&typeof e=="string"&&e!="ace"){this.$keybindingId=e;var n=this;g.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(!t||!t.bgTokenizer)return;t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session));if(!n)return;var r="ace_bracket";Array.isArray(n)?n.length==1&&(r="ace_error_bracket"):n=[n],n.length==2&&(p.comparePoints(n[0].end,n[1].start)==0?n=[p.fromPoints(n[0].start,n[1].end)]:p.comparePoints(n[0].start,n[1].end)==0&&(n=[p.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map(function(e){return t.addMarker(e,r,"text")})}},50)},this.$highlightTags=function(){if(this.$highlightTagPending)return;var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(!t||!t.bgTokenizer)return;var n=e.getCursorPosition(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type)){t.removeMarker(t.$tagHighlight),t.$tagHighlight=null;return}if(i.type.indexOf("tag-open")!==-1){i=r.stepForward();if(!i)return}var s=i.value,o=i.value,u=0,a=r.stepBackward();if(a.value==="<"){do a=i,i=r.stepForward(),i&&(i.type.indexOf("tag-name")!==-1?(o=i.value,s===o&&(a.value==="<"?u++:a.value===""&&u--);while(i&&u>=0)}else{do{i=a,a=r.stepBackward();if(i)if(i.type.indexOf("tag-name")!==-1)s===i.value&&(a.value==="<"?u++:a.value===""){var f=0,l=a;while(l){if(l.type.indexOf("tag-name")!==-1&&l.value===s){u--;break}if(l.value==="<")break;l=r.stepBackward(),f++}for(var c=0;c1)&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),s=i.substring(n,r);if(s.length>5e3||!/[\w\d]/.test(s))return;var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),u=i.substring(n-1,r+1);if(!o.test(u))return;return o},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;var r=this.selection.getAllRanges();for(var i=0;iu.search(/\S|$/)){var a=u.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var f=i.column,l=n.getState(i.row),u=n.getLine(i.row),c=r.checkOutdent(l,u,e);n.insert(i,e),s&&s.selection&&(s.selection.length==2?this.selection.setSelectionRange(new p(i.row,f+s.selection[0],i.row,f+s.selection[1])):this.selection.setSelectionRange(new p(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3])));if(this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=r.getNextLineIndent(l,u.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},h)}c&&r.autoOutdent(l,n,i.row)}},this.autoIndent=function(){var e=this.session,t=e.getMode(),n,r;if(this.selection.isEmpty())n=0,r=e.doc.getLength()-1;else{var i=this.getSelectionRange();n=i.start.row,r=i.end.row}var s="",o="",u="",a,f,l,c=e.getTabString();for(var h=n;h<=r;h++)h>0&&(s=e.getState(h-1),o=e.getLine(h-1),u=t.getNextLineIndent(s,o,c)),a=e.getLine(h),f=t.$getIndent(a),u!==f&&(f.length>0&&(l=new p(h,0,h,f.length),e.remove(l)),u.length>0&&e.insert({row:h,column:0},u)),t.autoOutdent(s,e,h)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){if(t.extendLeft||t.extendRight){var n=this.selection.getRange();n.start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove()}(e||!this.selection.isEmpty())&&this.insert(e,!0);if(t.restoreStart||t.restoreEnd){var n=this.selection.getRange();n.start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n)}},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column===0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;tt.toLowerCase()?1:0});var i=new p(0,0,0,0);for(var r=e.first;r<=e.last;r++){var s=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=s.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n=u&&o<=a&&(n=t,f.selection.clearSelection(),f.moveCursorTo(e,u+r),f.selection.selectTo(e,a+r)),u=a});var l=this.$toggleWordPairs,c;for(var h=0;hp+1)break;p=d.last}l--,u=this.session.$moveLines(h,p,t?0:e),t&&e==-1&&(c=l+1);while(c<=l)o[c].moveBy(u,0),c++;t||(u=0),a+=u}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),s=i||r.stepForward();if(!s)return;var o,u=!1,a={},f=n.column-s.start,l,c={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g))for(;f=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(!e)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.topwindow.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e)return;delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",u),this.renderer.off("beforeRender",o)}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!="wide",i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e))},this.prompt=function(e,t,n){var r=this;g.loadModule("./ext/prompt",function(i){i.prompt(r,e,t,n)})}}.call(w.prototype),g.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?E.attach(this):E.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?E.attach(this):E.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),i.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),i.addCssClass(this.container,"ace_hasPlaceholder");var t=i.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var E={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\u00b7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=w}),define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){while(n0){a.row+=i,a.column+=a.row==r.row?s:0;continue}!t&&l<=0&&(a.row=n.row,a.column=n.column,l===0&&(a.bias=1))}}function f(e){return{row:e.row,column:e.column}}function l(e){return{start:f(e.start),end:f(e.end),action:e.action,lines:e.lines.slice()}}function c(e){e=e||this;if(Array.isArray(e))return e.map(c).join("\n");var t="";e.action?(t=e.action=="insert"?"+":"-",t+="["+e.lines+"]"):e.value&&(Array.isArray(e.value)?t=e.value.map(h).join("\n"):t=h(e.value)),e.start&&(t+=h(e));if(e.id||e.rev)t+=" ("+(e.id||e.rev)+")";return t}function h(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function p(e,t){var n=e.action=="insert",r=t.action=="insert";if(n&&r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;m(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;m(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)m(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;m(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)m(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;m(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var r=0;r=0?m(e,t,-1):o(e.start,t.start)<=0?m(t,e,1):(m(e,s.fromPoints(t.start,e.start),-1),m(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?m(t,e,-1):o(t.start,e.start)<=0?m(e,t,1):(m(t,s.fromPoints(e.start,t.start),-1),m(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.end,e.start)<=0)){var i,u;return o(e.start,t.start)<0&&(i=e,e=y(e,t.start)),o(e.end,t.end)>0&&(u=y(e,t.end)),g(t.end,e.start,e.end,-1),u&&!i&&(e.lines=u.lines,e.start=u.start,e.end=u.end,u=e),[t,i,u].filter(Boolean)}m(e,t,-1)}return[t,e]}function m(e,t,n){g(e.start,t.start,t.end,n),g(e.end,t.start,t.end,n)}function g(e,t,n,r){e.row==(r==1?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function y(e,t){var n=e.lines,r=e.end;e.end=f(t);var i=e.end.row-e.start.row,s=n.splice(i,n.length),o=i?t.column:t.column-e.start.column;n.push(s[0].substring(0,o)),s[0]=s[0].substr(o);var u={start:f(t),end:r,lines:s,action:e.action};return u}function b(e,t){t=l(t);for(var n=e.length;n--;){var r=e[n];for(var i=0;i0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){e==undefined&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?c(e):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)}}).call(r.prototype);var s=e("./range").Range,o=s.comparePoints,u=s.comparePoints;t.UndoManager=r}),define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){r.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight),s=n.documentToScreenRow(e,0)*t.lineHeight;return s-i*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);var t=r.createFragment(this.element);for(var n=0;ns&&(a=i.end.row+1,i=t.getNextFoldLine(a,i),s=i?i.start.row:Infinity);if(a>r){while(this.$lines.getLength()>u+1)this.$lines.pop();break}o=this.$lines.get(++u),o?o.row=a:(o=this.$lines.createCell(a,e,this.session,f),this.$lines.push(o)),this.$renderCell(o,e,i,a),a++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";if(this.$fixedWidth||t.$useWrapMode)i=t.getLength()+r-1;var s=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();s+=o.left+o.right,s!==this.gutterWidth&&!isNaN(s)&&(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},this.$updateCursorRow=function(){if(!this.$highlightGutterLine)return;var e=this.session.selection.getCursor();if(this.$cursorRow===e.row)return;this.$cursorRow=e.row},this.updateLineHighlight=function(){if(!this.$highlightGutterLine)return;var e=this.session.selection.cursor.row;this.$cursorRow=e;if(this.$cursorCell&&this.$cursorCell.row==e)return;this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}},this.scrollLines=function(e){var t=this.config;this.config=e,this.$updateCursorRow();if(this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;this.oldLastRow=n;if(!t||r0;i--)this.$lines.shift();if(r>n)for(var i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){var r=[],i=t,s=this.session.getNextFoldLine(i),o=s?s.start.row:Infinity;for(;;){i>o&&(i=s.end.row+1,s=this.session.getNextFoldLine(i,s),o=s?s.start.row:Infinity);if(i>n)break;var u=this.$lines.createCell(i,e,this.session,f);this.$renderCell(u,e,s,i),r.push(u),i++}return r},this.$renderCell=function(e,t,n,i){var s=e.element,o=this.session,u=s.childNodes[0],a=s.childNodes[1],f=o.$firstLineNumber,l=o.$breakpoints,c=o.$decorations,h=o.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&o.foldWidgets,d=n?n.start.row:Number.MAX_VALUE,v="ace_gutter-cell ";this.$highlightGutterLine&&(i==this.$cursorRow||n&&i=d&&this.$cursorRow<=n.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),l[i]&&(v+=l[i]),c[i]&&(v+=c[i]),this.$annotations[i]&&(v+=this.$annotations[i].className),s.className!=v&&(s.className=v);if(p){var m=p[i];m==null&&(m=p[i]=o.getFoldWidget(i))}if(m){var v="ace_fold-widget ace_"+m;m=="start"&&i==d&&in.right-t.right)return"foldWidgets"}}).call(a.prototype),t.Gutter=a}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(!e)return;this.config=e,this.i=0;var t;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(i.isEmpty())continue;i=i.toScreenRange(this.session);if(r.renderer){var s=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,s,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,i,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type=="text"?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start"+" ace_br15",e)}if(this.i!=-1)while(this.ip,l==f),s,l==f?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;i=i||"";if(this.session.$bidiHandler.isBidiRow(t.start.row)){var f=t.clone();f.end.row=f.start.row,f.end.column=this.session.getLine(f.start.row).length,this.drawBidiSingleLineMarker(e,f,n+" ace_br1 ace_start",r,null,i)}else this.elt(n+" ace_br1 ace_start","height:"+o+"px;"+"right:0;"+"top:"+u+"px;left:"+a+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var f=t.clone();f.start.row=f.end.row,f.start.column=0,this.drawBidiSingleLineMarker(e,f,n+" ace_br12",r,null,i)}else{u=this.$getTop(t.end.row,r);var l=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+o+"px;"+"width:"+l+"px;"+"top:"+u+"px;"+"left:"+s+"px;"+(i||""))}o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<=0)return;u=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(c?" ace_br"+c:""),"height:"+o+"px;"+"right:0;"+"top:"+u+"px;"+"left:"+s+"px;"+(i||""))},this.drawSingleLineMarker=function(e,t,n,r,i,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,s);var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+o+"px;"+"width:"+u+"px;"+"top:"+a+"px;"+"left:"+f+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=this.$getTop(t.start.row,r),a=this.$padding,f=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);f.forEach(function(e){this.elt(n,"height:"+o+"px;"+"width:"+e.width+(i||0)+"px;"+"top:"+u+"px;"+"left:"+(a+e.left)+"px;"+(s||""))},this)},this.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),this.elt(n,"height:"+o+"px;"+"top:"+s+"px;"+"left:0;right:0;"+(i||""))},this.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;this.elt(n,"height:"+o+"px;"+"top:"+s+"px;"+"left:0;right:0;"+(i||""))}}).call(s.prototype),t.Marker=s}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("./lines").Lines,u=e("../lib/event_emitter").EventEmitter,a=function(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)};(function(){r.implement(this,u),this.EOF_CHAR="\u00b6",this.EOL_CHAR_LF="\u00ac",this.EOL_CHAR_CRLF="\u00a4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\u00b7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()=="\n"&&e.getNewLineMode()!="windows",n=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;nl&&(u=a.end.row+1,a=this.session.getNextFoldLine(u,a),l=a?a.start.row:Infinity);if(u>i)break;var c=s[o++];if(c){this.dom.removeChildren(c),this.$renderLine(c,u,u==l?a:!1),f&&(c.style.top=this.$lines.computeLineTop(u,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(u)+"px";c.style.height!=h&&(f=!0,c.style.height=h)}u++}if(f)while(o0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){var r=[],s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=this.$lines.createCell(s,e,this.session),f=a.element;this.dom.removeChildren(f),i.setStyle(f.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),i.setStyle(f.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(f,s,s==u?o:!1),this.$useLineGroups()?f.className="ace_line_group":f.className="ace_line",r.push(a),s++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;var t=e.firstRow,n=e.lastRow,r=this.$lines;while(r.getLength())r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,o=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,u=this.dom.createFragment(this.element),a,f=0;while(a=o.exec(r)){var l=a[1],c=a[2],h=a[3],p=a[4],d=a[5];if(!i.showSpaces&&c)continue;var v=f!=a.index?r.slice(f,a.index):"";f=a.index+a[0].length,v&&u.appendChild(this.dom.createTextNode(v,this.element));if(l){var m=i.session.getScreenTabSize(t+a.index);u.appendChild(i.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(c)if(i.showSpaces){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_space",g.textContent=s.stringRepeat(i.SPACE_CHAR,c.length),u.appendChild(g)}else u.appendChild(this.com.createTextNode(c,this.element));else if(h){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_space ace_invalid",g.textContent=s.stringRepeat(i.SPACE_CHAR,h.length),u.appendChild(g)}else if(p){t+=1;var g=this.dom.createElement("span");g.style.width=i.config.characterWidth*2+"px",g.className=i.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",g.textContent=i.showSpaces?i.SPACE_CHAR:p,u.appendChild(g)}else if(d){t+=1;var g=this.dom.createElement("span");g.style.width=i.config.characterWidth*2+"px",g.className="ace_cjk",g.textContent=d,u.appendChild(g)}}u.appendChild(this.dom.createTextNode(f?r.slice(f):r,this.element));if(!this.$textToken[n.type]){var y="ace_"+n.type.replace(/\./g," ace_"),g=this.dom.createElement("span");n.type=="fold"&&(g.style.width=n.value.length*this.config.characterWidth+"px"),g.className=y,g.appendChild(u),e.appendChild(g)}else e.appendChild(u);return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(t[0]==" "){r-=r%this.tabSize;var i=r/this.tabSize;for(var s=0;s=o)u=this.$renderToken(a,u,l,c.substring(0,o-r)),c=c.substring(o-r),r=o,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(s.stringRepeat("\u00a0",n.indent),this.element)),i++,u=0,o=n[i]||Number.MAX_VALUE;c.length!=0&&(r+=c.length,u=this.$renderToken(a,u,l,c))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,u,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,i);n=this.$renderToken(e,n,r,i)}},this.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=i?"":"",e.appendChild(s)},this.$renderLine=function(e,t,n){!n&&n!=0&&(n=this.session.getFoldLine(t));if(n)var r=this.$getFoldLineTokens(t,n);else var r=this.session.getTokens(t);var i=e;if(r.length){var s=this.session.getRowSplitData(t);if(s&&s.length){this.$renderWrappedLine(e,r,s);var i=e.lastChild}else{var i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(o)}},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.lengthn-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(sn?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(a.prototype),t.Text=a}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){var t=this.cursors;for(var n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){var e=this.cursors;for(var t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0);if(!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));if(r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||o.top<0)&&n>1)continue;var u=this.cursors[i++]||this.addCursor(),a=u.style;this.drawCursor?this.drawCursor(u,o,e,t[n],this.session):this.isCursorInView(o,e)?(r.setStyle(a,"display","block"),r.translate(u,o.left,o.top),r.setStyle(a,"width",Math.round(e.characterWidth)+"px"),r.setStyle(a,"height",e.lineHeight+"px")):r.setStyle(a,"display","none")}while(this.cursors.length>i)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,u=32768,a=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\u00a0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){r.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var f=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(f,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){this.scrollTop=this.element.scrollTop;if(this.coeff!=1){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>u?(this.coeff=u/e,e=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(f.prototype);var l=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(l,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(l.prototype),t.ScrollBar=f,t.ScrollBarV=f,t.ScrollBarH=l,t.VScrollBar=f,t.HScrollBar=l}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(r.blockIdle(100),n.changes=0,n.onRender(t));if(n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),u=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,f=256,l=typeof ResizeObserver=="function",c=200,h=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",f),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,a),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",u.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){e===undefined&&(e=this.$measureSizes());if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=o.onIdle(function t(){e.checkForSizeChanges(),o.onIdle(t,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/f};return t.width===0||t.height===0?null:t},this.$measureCharWidth=function(e){this.$main.textContent=s.stringRepeat(e,f);var t=this.$main.getBoundingClientRect();return t.width/f},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return!t||!t.parentElement?1:(window.getComputedStyle(t).zoom||1)*e(t.parentElement)},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(c,0),e(0,c),e(c,c)],this.el)},this.transformCoordinates=function(e,t){function r(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function s(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function u(e){var t=e.getBoundingClientRect();return[t.left,t.top]}if(e){var n=this.$getZoom(this.el);e=o(1/n,e)}this.els||this.$initTransformMeasureNodes();var a=u(this.els[0]),f=u(this.els[1]),l=u(this.els[2]),h=u(this.els[3]),p=r(i(h,f),i(h,l),i(s(f,l),s(h,a))),d=o(1+p[0],i(f,a)),v=o(1+p[1],i(l,a));if(t){var m=t,g=p[0]*m[0]/c+p[1]*m[1]/c+1,y=s(o(m[0],d),o(m[1],v));return s(o(1/g/c,y),a)}var b=i(e,a),w=r(i(d,o(p[0],b)),i(v,o(p[1],b)),b);return o(c,w)}}).call(h.prototype)}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./config"),o=e("./layer/gutter").Gutter,u=e("./layer/marker").Marker,a=e("./layer/text").Text,f=e("./layer/cursor").Cursor,l=e("./scrollbar").HScrollBar,c=e("./scrollbar").VScrollBar,h=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,d=e("./lib/event_emitter").EventEmitter,v='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',m=e("./lib/useragent"),g=m.isIE;i.importCssString(v,"ace_editor.css");var y=function(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var r=this.$textLayer=new a(this.content);this.canvas=r.element,this.$markerFront=new u(this.content),this.$cursorLayer=new f(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new c(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!m.isIOS,this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,d),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e);if(!e)return;this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode)},this.updateLines=function(e,t,n){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var s=0,o=this.$size,u={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};r&&(e||o.height!=r)&&(o.height=r,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL);if(n&&(e||o.width!=n)){s|=this.CHANGE_SIZE,o.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var a=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",a),i.setStyle(this.scroller.style,"right",a),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight());if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)s|=this.CHANGE_FULL}return o.$dirty=!n||!r,s&&this._signal("resize",u),s},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$isMousePressed)return;var e=this.textarea.style,t=this.$composition;if(!this.$keepTextAreaAtCursor&&!t){i.translate(this.textarea,-100,0);return}var n=this.$cursorLayer.$pixelPos;if(!n)return;t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,s=n.top,o=n.left;s-=r.offset;var u=t&&t.useTextareaForIME?this.lineHeight:g?0:1;if(s<0||s>r.height-u){i.translate(this.textarea,0,0);return}var a=1,f=this.$size.height-u;if(!t)s+=this.lineHeight;else if(t.useTextareaForIME){var l=this.textarea.value;a=this.characterWidth*this.session.$getStringScreenWidth(l)[0]}else s+=this.lineHeight+2;o-=this.scrollLeft,o>this.$size.scrollerWidth-a&&(o=this.$size.scrollerWidth-a),o+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",u+"px"),i.setStyle(e,"width",a+"px"),i.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-a),Math.min(s,f))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,n=this.session.documentToScreenRow(t,0)*e.lineHeight;return n-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.setMargin=function(e,t,n,r){var i=this.margin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){e|=this.$computeLayerConfig()|this.$loop.clear();if(n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var s=n.width+2*this.$padding+"px",o=n.minHeight+"px";i.setStyle(this.content.style,"width",s),i.setStyle(this.content.style,"height",o)}e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left");if(e&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal("afterRender",e);return}if(e&this.CHANGE_SCROLL){this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal("afterRender",e);return}e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=n<=2*this.lineHeight,i=!r&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var s=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,s=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),u=this.$horizScroll!==o;u&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var f=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=l;var c=this.scrollMargin;this.session.setScrollTop(Math.max(-c.top,Math.min(this.scrollTop,i-t.scrollerHeight+c.bottom))),this.session.setScrollLeft(Math.max(-c.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+c.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+l<0||this.scrollTop>c.top),p=a!==h;p&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var d=this.scrollTop%this.lineHeight,v=Math.ceil(f/this.lineHeight)-1,m=Math.max(0,Math.round((this.scrollTop-d)/this.lineHeight)),g=m+v,y,b,w=this.lineHeight;m=e.screenToDocumentRow(m,0);var E=e.getFoldLine(m);E&&(m=E.start.row),y=e.documentToScreenRow(m,0),b=e.getRowLength(m)*w,g=Math.min(e.screenToDocumentRow(g,0),e.getLength()-1),f=t.scrollerHeight+e.getRowLength(g)*w+b,d=this.scrollTop-y*w;var S=0;if(this.layerConfig.width!=s||u)S=this.CHANGE_H_SCROLL;if(u||p)S|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(s=this.$getLongestLine());return this.layerConfig={width:s,padding:this.$padding,firstRow:m,firstRowScreen:y,lastRow:g,lineHeight:w,characterWidth:this.characterWidth,minHeight:f,maxHeight:i,offset:d,gutterOffset:w?Math.max(0,Math.ceil((d+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),S},this.$updateLines=function(){if(!this.$changedLines)return;var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight===0)return;var r=this.$cursorLayer.getPixelPosition(e),i=r.left,s=r.top,o=n&&n.top||0,u=n&&n.bottom||0,a=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;a+o>s?(t&&a+o>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):a+this.$size.scrollerHeight-ui?(i=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),u=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:u,side:s-u>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),u=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(u,Math.max(o,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),e.useTextareaForIME==undefined&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""},this.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var s={type:t,value:e},o=i.getTokens(n);if(r==null)o.push(s);else{var u=0;for(var a=0;a50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})}}).call(f.prototype);var l=function(e,t,n){var r=null,i=!1,u=Object.create(s),a=[],l=new f({messageBuffer:a,terminate:function(){},postMessage:function(e){a.push(e);if(!r)return;i?setTimeout(c):c()}});l.setEmitSync=function(e){i=e};var c=function(){var e=a.shift();e.command?r[e.command].apply(r,e.args):e.event&&u._signal(e.event,e.data)};return u.postMessage=function(e){l.onMessage({data:e})},u.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},u.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){r=new e[n](u);while(a.length)c()}),l};t.UIWorkerClient=l,t.WorkerClient=f,t.createWorker=a}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;this.updateAnchors(e),i&&(this.length+=n);if(i&&!this.session.$fromUndo)if(e.action==="insert")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.insertMergedLines(a,e.lines)}else if(e.action==="remove")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(this.$updating)return;var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)},this.onCursorChange=function(e){if(this.$updating||!this.session)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth===-1)return;var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){var i=t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()},e),u.addListener(t,"keyup",r,e),u.addListener(t,"blur",r,e)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount===0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){var e=this.ranges.length?this.ranges:[this.getRange()],t=[];for(var n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column0)g--;if(g>0){var y=0;while(r[y].isEmpty())y++}for(var b=g;b>=y;b--)r[b].isEmpty()&&r.splice(b,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection")},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,u=this.selection,a=u.rangeList,f=(r?u:a).ranges,l;if(!f.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var c=u._eventRegistry;u._eventRegistry={};var h=new s(o);this.inVirtualSelectionMode=!0;for(var p=f.length;p--;){if(i)while(p>0&&f[p].start.row==f[p-1].end.row)p--;h.fromOrientedRange(f[p]),h.index=p,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});!l&&d!==undefined&&(l=d),h.toOrientedRange(f[p])}h.detach(),this.selection=o.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=c,u.mergeOverlappingRanges(),u.ranges[0]&&u.fromOrientedRange(u.ranges[0]);var v=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),v&&v.from==v.to&&this.renderer.animateScrolling(v.from),l},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r0);u<0&&(u=0),f>=c&&(f=c-1)}var p=this.session.removeFullLines(u,f);p=this.$reAlignText(p,l),this.session.insert({row:u,column:0},p.join("\n")+"\n"),l||(o.start.column=0,o.end.column=p[p.length-1].length),this.selection.setRange(o)}else{s.forEach(function(e){t.substractPoint(e.cursor)});var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),io?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),st[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++tf){var p=e.getLine(l).length;return new r(f,u,l,p)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/dom");(function(){this.getRowLength=function(e){var t;return this.lineWidgets?t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:t=0,!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach();if(this.editor==e)return;this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;if(!t)return;this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(!n||!e.action)return;var r=e.data,i=r.start.row,s=r.end.row,o=e.action=="add";for(var u=i+1;ut[n].column&&n++,s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}},this.$updateRows=function(){var e=this.session.lineWidgets;if(!e)return;var t=!0;e.forEach(function(e,n){if(e){t=!1,e.row=n;while(e.$oldWidget)e.$oldWidget.row=n,e=e.$oldWidget}}),t&&(this.session.lineWidgets=null)},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){this.$registerLineWidget(e),e.session=this.session;if(!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight==null&&(e.pixelHeight=e.el.offsetHeight)),e.rowCount==null&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);e.$fold=n;if(n){var i=this.session.lineWidgets;e.row==n.end.row&&!i[n.start.row]?i[n.start.row]=e:e.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el);if(e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}if(this.session.lineWidgets){var n=this.session.lineWidgets[e.row];if(n==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else while(n){if(n.$oldWidget==e){n.$oldWidget=e.$oldWidget;break}n=n.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){var t=this.session.lineWidgets,n=t&&t[e],r=[];while(n)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!n||!n.length)return;var i=Infinity;for(var s=0;s0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=n.width+2*n.padding+"px"),u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}}}).call(i.prototype),t.LineWidgets=i}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(!r.length)return;var i=o(r,{row:t,column:-1},s.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:i===0&&n<0&&(i=r.length-1);var u=r[i];if(!u||!n)return;if(u.row===t){do u=r[i+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[i+=n];while(u&&u.row==t);return a.length&&a}var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),o=s.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type=="errorMarker"})[0];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];s.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,s.row=c.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),d=h.el.appendChild(i.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(s).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("
"),p.appendChild(i.createElement("div"));var m=function(e,t,n){if(t===0&&(n==="esc"||n==="return"))return h.destroy(),{command:"null"}};h.destroy=function(){if(e.$mouseHandler.isMousePressed)return;e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy)},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./range").Range,o=e("./editor").Editor,u=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,f=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,typeof define=="function"&&(t.define=define),t.edit=function(e,n){if(typeof e=="string"){var s=e;e=document.getElementById(s);if(!e)throw new Error("ace.edit can't find div #"+s)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var u="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;u=a.value,e=r.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(u=e.textContent,e.innerHTML="");var l=t.createEditSession(u),c=new o(new f(e),l,n),h={document:l,editor:c,onResize:c.resize.bind(c,null)};return a&&(h.textarea=a),i.addListener(window,"resize",h.onResize),c.on("destroy",function(){i.removeListener(window,"resize",h.onResize),h.editor.container.env=null}),c.container.env=c.env=h,c},t.createEditSession=function(e,t){var n=new u(e,t);return n.setUndoManager(new a),n},t.Range=s,t.Editor=o,t.EditSession=u,t.UndoManager=a,t.VirtualRenderer=f,t.version=t.config.version}); (function() { + window.require(["ace/ace"], function(a) { + if (a) { + a.config.init(true); + a.define = window.define; + } + if (!window.ace) + window.ace = a; + for (var key in a) if (a.hasOwnProperty(key)) + window.ace[key] = a[key]; + window.ace["default"] = window.ace; + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = window.ace; + } + }); + })(); + \ No newline at end of file diff --git a/src/static/js/lib/echarts.min.js b/src/static/js/lib/echarts.min.js new file mode 100644 index 0000000000000000000000000000000000000000..97081b3f1b908e054b1776d79056fa56058d6320 --- /dev/null +++ b/src/static/js/lib/echarts.min.js @@ -0,0 +1,45 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict"; + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n18);a&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document}(navigator.userAgent,a);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},u=Object.prototype.toString,h=Array.prototype,c=h.forEach,p=h.filter,d=h.slice,f=h.map,g=function(){}.constructor,y=g?g.prototype:null,v={};function m(t,e){v[t]=e}var _=2311;function x(){return _++}function b(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(s)return s(t,n,i),!0}return!1}function Ut(t){return"CANVAS"===t.nodeName.toUpperCase()}var Zt="undefined"!=typeof window&&!!window.addEventListener,jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qt=[];function Kt(t,e,n,i){return n=n||{},i||!a.canvasSupported?$t(t,e,n):a.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):$t(t,e,n),n}function $t(t,e,n){if(a.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Ut(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Xt(qt,t,i,r))return n.zrX=qt[0],void(n.zrY=qt[1])}n.zrX=n.zrY=0}function Jt(t){return t||window.event}function Qt(t,e,n){if(null!=(e=Jt(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Kt(t,r,e,n)}else{Kt(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&jt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function te(t,e,n,i){Zt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ee=Zt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function ne(t){return 2===t.which||3===t.which}var ie=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=re(r)/re(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ae="silent";function se(){ee(this.event)}var le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ft),ue=function(t,e){this.x=t,this.y=e},he=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ce=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new ue(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new le,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new Vt(o),o}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(P(he,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=de(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new ue(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new ue(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:se}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new ue(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=pe(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==ae)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new ie);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new ue;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(Ft);function pe(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||ae}return!1}function de(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function fe(){return[1,0,0,1,0,0]}function ge(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ye(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ve(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function _e(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function xe(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function be(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function we(t){var e=[1,0,0,1,0,0];return ye(e,t),e}P(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ce.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=de(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Lt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var Se=Object.freeze({__proto__:null,create:fe,identity:ge,copy:ye,mul:ve,translate:me,rotate:_e,scale:xe,invert:be,clone:we}),Me=ge,Ie=5e-5;function Te(t){return t>Ie||t<-5e-5}var Ce=[],Ae=[],De=[1,0,0,1,0,0],Le=Math.abs,ke=function(){function t(){}return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Te(this.rotation)||Te(this.x)||Te(this.y)||Te(this.scaleX-1)||Te(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):Me(i),e&&(n?ve(i,t.transform,i):ye(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&Me(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ce);var n=Ce[0]<0?-1:1,i=Ce[1]<0?-1:1,r=((Ce[0]-n)*e+n)/Ce[0]||0,o=((Ce[1]-i)*e+i)/Ce[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],be(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];Te(e-1)&&(e=Math.sqrt(e)),Te(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ve(Ae,t.invTransform,e),e=Ae);var n=this.originX,i=this.originY;(n||i)&&(De[4]=n,De[5]=i,ve(Ae,e,De),Ae[4]-=n,Ae[5]-=i,e=Ae),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Rt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Rt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Le(t[0]-1)>1e-10&&Le(t[3]-1)>1e-10?Math.sqrt(Le(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){Me(e=e||[]);var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,l=t.y;return e[4]-=n,e[5]-=i,e[0]*=r,e[1]*=o,e[2]*=r,e[3]*=o,e[4]*=r,e[5]*=o,a&&_e(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=l,e},t.initDefaultProps=function(){var e=t.prototype;e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,e.globalScaleRatio=1}(),t}(),Pe={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Pe.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Pe.bounceIn(2*t):.5*Pe.bounceOut(2*t-1)+.5}},Oe=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Pe[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),Re=function(t){this.value=t},Ne=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Re(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Ee=function(){function t(t){this._list=new Ne,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Re(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),ze={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Be(t){return(t=Math.round(t))<0?0:t>255?255:t}function Ve(t){return t<0?0:t>1?1:t}function Fe(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Be(parseFloat(e)/100*255):Be(parseInt(e,10))}function Ge(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Ve(parseFloat(e)/100):Ve(parseFloat(e))}function He(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function We(t,e,n){return t+(e-t)*n}function Ye(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Xe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Ue=new Ee(20),Ze=null;function je(t,e){Ze&&Xe(Ze,e),Ze=Ue.put(t,Ze||e.slice())}function qe(t,e){if(t){e=e||[];var n=Ue.get(t);if(n)return Xe(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in ze)return Xe(e,ze[i]),je(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Ye(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),je(t,e),e):void Ye(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Ye(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),je(t,e),e):void Ye(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Ye(e,+u[0],+u[1],+u[2],1):Ye(e,0,0,0,1);h=Ge(u.pop());case"rgb":return 3!==u.length?void Ye(e,0,0,0,1):(Ye(e,Fe(u[0]),Fe(u[1]),Fe(u[2]),h),je(t,e),e);case"hsla":return 4!==u.length?void Ye(e,0,0,0,1):(u[3]=Ge(u[3]),Ke(u,e),je(t,e),e);case"hsl":return 3!==u.length?void Ye(e,0,0,0,1):(Ke(u,e),je(t,e),e);default:return}}Ye(e,0,0,0,1)}}function Ke(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ge(t[1]),r=Ge(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Ye(e=e||[],Be(255*He(a,o,n+1/3)),Be(255*He(a,o,n)),Be(255*He(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function $e(t,e){var n=qe(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return an(n,4===n.length?"rgba":"rgb")}}function Je(t){var e=qe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Qe(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Be(We(a[0],s[0],l)),n[1]=Be(We(a[1],s[1],l)),n[2]=Be(We(a[2],s[2],l)),n[3]=Ve(We(a[3],s[3],l)),n}}var tn=Qe;function en(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=qe(e[r]),s=qe(e[o]),l=i-r,u=an([Be(We(a[0],s[0],l)),Be(We(a[1],s[1],l)),Be(We(a[2],s[2],l)),Ve(We(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var nn=en;function rn(t,e,n,i){var r=qe(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=Ge(n)),null!=i&&(r[2]=Ge(i)),an(Ke(r),"rgba")}function on(t,e){var n=qe(t);if(n&&null!=e)return n[3]=Ve(e),an(n,"rgba")}function an(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function sn(t,e){var n=qe(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var ln=Object.freeze({__proto__:null,parse:qe,lift:$e,toHex:Je,fastLerp:Qe,fastMapToColor:tn,lerp:en,mapToColor:nn,modifyHSL:rn,modifyAlpha:on,stringify:an,lum:sn,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),un=Array.prototype.slice;function hn(t,e,n){return(e-t)*n+t}function cn(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var r=function(t){return k(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&gn(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=qe(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);if(this._isAllValueEqual&&i>0){o=n[i-1];(this.isValueColor&&!gn(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1)}}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&fn(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var p=h.percent-c.percent;if(0!==p){var d=(e-c.percent)/p,f=i?this._additiveValue:u?wn:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],y=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],m=o[n>a-3?a-1:n+2][r];if(l>0)1===l?vn(f,y,g,v,m,d,d*d,d*d*d):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0)1===l?cn(f,c[r],h[r],d):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],d),i?this._additiveValue=_:t[s]=_}i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(qe(t[n],wn),pn(wn,wn,i,1),t[n]=_n(wn)):t[n]=t[n]+i:1===e?pn(t[n],t[n],i,1):2===e&&dn(t[n],t[n],i,1)},t}(),Mn=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?b("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,z(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),In=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Tn=Math.min,Cn=Math.max,An=new In,Dn=new In,Ln=new In,kn=new In,Pn=new In,On=new In,Rn=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Tn(t.x,this.x),n=Tn(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Cn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Cn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return me(r,r,[-e.x,-e.y]),xe(r,r,[n,i]),me(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}An.x=Ln.x=n.x,An.y=kn.y=n.y,Dn.x=kn.x=n.x+n.width,Dn.y=Ln.y=n.y+n.height,An.transform(i),kn.transform(i),Dn.transform(i),Ln.transform(i),e.x=Tn(An.x,Dn.x,Ln.x,kn.x),e.y=Tn(An.y,Dn.y,Ln.y,kn.y);var l=Cn(An.x,Dn.x,Ln.x,kn.x),u=Cn(An.y,Dn.y,Ln.y,kn.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Nn={},En="12px sans-serif";var zn={measureText:function(t,e){return xn||(xn=C().getContext("2d")),bn!==e&&(bn=xn.font=e||En),xn.measureText(t)}};function Bn(t,e){var n=Nn[e=e||En];n||(n=Nn[e]=new Ee(500));var i=n.get(t);return null==i&&(i=zn.measureText(t,e).width,n.put(t,i)),i}function Vn(t,e,n,i){var r=Bn(t,e),o=Wn(e),a=Gn(0,r,n),s=Hn(0,o,i);return new Rn(a,s,r,o)}function Fn(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return Vn(r[0],e,n,i);for(var o=new Rn(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function Xn(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Yn(i[0],n.width),u+=Yn(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Un=1;"undefined"!=typeof window&&(Un=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Zn=Un,jn="#333",qn="#ccc",Kn="__zr_normal__",$n=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],Jn={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},Qn={},ti=new Rn(0,0,0,0),ei=function(){function t(t){this.id=x(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var u=ti;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Qn,n,u):Xn(Qn,n,u),r.x=Qn.x,r.y=Qn.y,o=Qn.align,a=Qn.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Yn(h[0],u.width),p=Yn(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),s&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?qn:jn},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&qe(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,an(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},I(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(X(t))for(var n=z(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Kn,!1,t)},t.prototype.useState=function(e,n,i){var r=e===Kn;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(A(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var l=!(!s||!s.hoverLayer);return l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}b("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s0,p),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=A(i,t),o=A(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function ni(t,e,n,i,r){var o=[];oi(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},c=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){for(var m=t.animators,_=[],x=0;x=0;)r++;return r-e}function si(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function li(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function ui(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function hi(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=ui(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=li(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-li(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=ai(t,n,i,e))s&&(l=s),si(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var pi=!1;function di(){pi||(pi=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function fi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var gi,yi,vi=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=fi}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(di(),u.z=0),isNaN(u.z2)&&(di(),u.z2=0),isNaN(u.zlevel)&&(di(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),mi="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},_i=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,mi((function e(){t._running&&(mi(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Mn(t,e.loop);return this.addAnimator(n),n},e}(Ft),xi=a.domSupported,bi=(yi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:gi=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(gi,(function(t){var e=t.replace("mouse","pointer");return yi.hasOwnProperty(e)?e:t}))}),wi=["mousemove","mouseup"],Si=["pointermove","pointerup"],Mi=!1;function Ii(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ti(t){t&&(t.zrByTouch=!0)}function Ci(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Ai=function(t,e){this.stopPropagation=ft,this.stopImmediatePropagation=ft,this.preventDefault=ft,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Di={mousedown:function(t){t=Qt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Qt(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Qt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Ci(this,(t=Qt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Mi=!0,t=Qt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Mi||(t=Qt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Ti(t=Qt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Di.mousemove.call(this,t),Di.mousedown.call(this,t)},touchmove:function(t){Ti(t=Qt(this.dom,t)),this.handler.processGesture(t,"change"),Di.mousemove.call(this,t)},touchend:function(t){Ti(t=Qt(this.dom,t)),this.handler.processGesture(t,"end"),Di.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Di.click.call(this,t)},pointerdown:function(t){Di.mousedown.call(this,t)},pointermove:function(t){Ii(t)||Di.mousemove.call(this,t)},pointerup:function(t){Di.mouseup.call(this,t)},pointerout:function(t){Ii(t)||Di.mouseout.call(this,t)}};P(["click","dblclick","contextmenu"],(function(t){Di[t]=function(e){e=Qt(this.dom,e),this.trigger(t,e)}}));var Li={pointermove:function(t){Ii(t)||Li.mousemove.call(this,t)},pointerup:function(t){Li.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function ki(t,e){var n=e.domHandlers;a.pointerEventsSupported?P(bi.pointer,(function(i){Oi(e,i,(function(e){n[i].call(t,e)}))})):(a.touchEventsSupported&&P(bi.touch,(function(i){Oi(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),P(bi.mouse,(function(i){Oi(e,i,(function(r){r=Jt(r),e.touching||n[i].call(t,r)}))})))}function Pi(t,e){function n(n){Oi(e,n,(function(i){i=Jt(i),Ci(t,i.target)||(i=function(t,e){return Qt(t.dom,new Ai(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}a.pointerEventsSupported?P(Si,n):a.touchEventsSupported||P(wi,n)}function Oi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,te(t.domTarget,e,n,i)}function Ri(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],Zt?e.removeEventListener(n,i,r):e.detachEvent("on"+n,i));t.mounted={}}var Ni=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Ei=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new Ni(e,Di),xi&&(i._globalHandlerScope=new Ni(document,Li)),ki(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){Ri(this._localHandlerScope),xi&&Ri(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,xi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Pi(this,e):Ri(e)}},e}(Ft),zi=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=A(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function Zi(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function ji(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function qi(t){return t.sort((function(t,e){return t-e})),t}function Ki(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function $i(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Ji(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Qi(t,e,n){if(!t[e])return 0;var i=R(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),o=O(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),a=100*r,s=O(o,(function(t){return Math.floor(t)})),l=R(s,(function(t,e){return t+e}),0),u=O(o,(function(t,e){return t-s[e]}));lh&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}var tr=9007199254740991;function er(t){var e=2*Math.PI;return(t%e+e)%e}function nr(t){return t>-1e-4&&t=10&&e++,e}function sr(t,e){var n=ar(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function lr(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function ur(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&A(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Kr=qr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),$r=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Kr(this,t,e)},t}(),Jr=new Ee(50);function Qr(t){if("string"==typeof t){var e=Jr.get(t);return e&&e.image}return t}function to(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=Jr.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!no(e=o.image)&&o.pending.push(a):((e=new Image).onload=e.onerror=eo,Jr.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function eo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=Bn(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function ao(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=Bn(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?so(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=Bn(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function so(t,e,n,i){for(var r=0,o=0,a=t.length;o=0?parseFloat(t)/100*e:parseFloat(t);return t}(l.width,i.width)+d;u.length>0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=go(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&e<=255}(t)||!!po[t]}function go(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,h+=u,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var yo="__zr_style_"+Math.round(10*Math.random()),vo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},mo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};vo[yo]=!0;var _o=["z","z2","invisible"],xo=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=z(e),i=0;i-1e-8&&tIo||t<-1e-8}function Ro(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function No(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Eo(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(Po(h)&&Po(c)){if(Po(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(Po(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=Mo(f),m=h*s+1.5*a*(-c+v),_=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-So(-m,Ao):So(m,Ao))+(_=_<0?-So(-_,Ao):So(_,Ao))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var x=(2*h*s-3*a*c)/(2*Mo(h*h*h)),b=Math.acos(x)/3,w=Mo(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+Co*Math.sin(b)))/(3*a),(-s+w*(S-Co*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),I>=0&&I<=1&&(o[d++]=I)}}return d}function zo(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Po(a)){if(Oo(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(Po(u))r[0]=-o/(2*a);else if(u>0){var h,c=Mo(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function Bo(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Vo(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;Do[0]=l,Do[1]=u;for(var m=0;m<1;m+=.05)Lo[0]=Ro(t,n,r,a,m),Lo[1]=Ro(e,i,o,s,m),(f=Pt(Do,Lo))=0&&f=0&&y1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Jo[0]=Ko(r)*n+t,Jo[1]=qo(r)*i+e,Qo[0]=Ko(o)*n+t,Qo[1]=qo(o)*i+e,u(s,Jo,Qo),h(l,Jo,Qo),(r%=$o)<0&&(r+=$o),(o%=$o)<0&&(o+=$o),r>o&&!a?o+=$o:rr&&(ta[0]=Ko(d)*n+t,ta[1]=qo(d)*i+e,u(s,ta,s),h(l,ta,l))}var la={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ua=[],ha=[],ca=[],pa=[],da=[],fa=[],ga=Math.min,ya=Math.max,va=Math.cos,ma=Math.sin,_a=Math.sqrt,xa=Math.abs,ba=Math.PI,wa=2*ba,Sa="undefined"!=typeof Float32Array,Ma=[];function Ia(t){return Math.round(t/ba*1e8)/1e8%2*ba}function Ta(t,e){var n=Ia(t[0]);n<0&&(n+=wa);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=wa?r=n+wa:e&&n-r>=wa?r=n-wa:!e&&n>r?r=n+(wa-Ia(n-r)):e&&n0&&(this._ux=xa(n/Zn/t)||0,this._uy=xa(n/Zn/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData(la.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=xa(t-this._xi)>this._ux||xa(e-this._yi)>this._uy||this._len<5;return this.addData(la.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(la.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(la.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){Ma[0]=i,Ma[1]=r,Ta(Ma,o),i=Ma[0];var a=(r=Ma[1])-i;return this.addData(la.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=va(r)*n+t,this._yi=ma(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(la.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData(la.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&d<=t||h<0&&d>=t||0===h&&(c>0&&f<=e||c<0&&f>=e);)d+=h*(n=o[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,h>0&&dl||c>0&&fu||a[i%2?"moveTo":"lineTo"](h>=0?ga(d,t):ya(d,t),c>=0?ga(f,e):ya(f,e));h=d-t,c=f-e,this._dashOffset=-_a(h*h+c*c)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,v=0,m=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=Ro(g,t,n,r,a+.1)-Ro(g,t,n,r,a),l=Ro(y,e,i,o,a+.1)-Ro(y,e,i,o,a),v+=_a(s*s+l*l);for(;m<_&&!((x+=f[m])>d);m++);for(a=(x-d)/v;a<=1;)u=Ro(g,t,n,r,a),h=Ro(y,e,i,o,a),m%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[m]/v,m=(m+1)%_;m%2!=0&&c.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-_a(s*s+l*l)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,Sa&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){ca[0]=ca[1]=da[0]=da[1]=Number.MAX_VALUE,pa[0]=pa[1]=fa[0]=fa[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||xa(y)>i||c===e-1)&&(f=Math.sqrt(D*D+y*y),r=g,o=_);break;case la.C:var v=t[c++],m=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++];f=Fo(r,o,v,m,g,_,x,b,10),r=x,o=b;break;case la.Q:f=Uo(r,o,v=t[c++],m=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case la.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],A=C+T;c+=1;t[c++];d&&(a=va(T)*M+w,s=ma(T)*I+S),f=ya(M,I)*ga(wa,Math.abs(C)),r=va(A)*M+w,o=ma(A)*I+S;break;case la.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case la.Z:var D=a-r;y=s-o;f=Math.sqrt(D*D+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0;if(!f||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var v=0;vc||xa(s-o)>p||v===d-1){if(f){if(g+(H=l[y++])>u){var x=(u-g)/H;t.lineTo(r*(1-x)+a*x,o*(1-x)+s*x);break t}g+=H}t.lineTo(a,s),r=a,o=s}break;case la.C:var b=h[v++],w=h[v++],S=h[v++],M=h[v++],I=h[v++],T=h[v++];if(f){if(g+(H=l[y++])>u){Bo(r,b,S,I,x=(u-g)/H,ua),Bo(o,w,M,T,x,ha),t.bezierCurveTo(ua[1],ha[1],ua[2],ha[2],ua[3],ha[3]);break t}g+=H}t.bezierCurveTo(b,w,S,M,I,T),r=I,o=T;break;case la.Q:b=h[v++],w=h[v++],S=h[v++],M=h[v++];if(f){if(g+(H=l[y++])>u){Yo(r,b,S,x=(u-g)/H,ua),Yo(o,w,M,x,ha),t.quadraticCurveTo(ua[1],ha[1],ua[2],ha[2]);break t}g+=H}t.quadraticCurveTo(b,w,S,M),r=S,o=M;break;case la.A:var C=h[v++],A=h[v++],D=h[v++],L=h[v++],k=h[v++],P=h[v++],O=h[v++],R=!h[v++],N=D>L?D:L,E=xa(D-L)>.001,z=k+P,B=!1;if(f)g+(H=l[y++])>u&&(z=k+P*(u-g)/H,B=!0),g+=H;if(E&&t.ellipse?t.ellipse(C,A,D,L,O,k,z,R):t.arc(C,A,N,k,z,R),B)break t;_&&(n=va(k)*D+C,i=ma(k)*L+A),r=va(z)*D+C,o=ma(z)*L+A;break;case la.R:n=r=h[v],i=o=h[v+1],a=h[v++],s=h[v++];var V=h[v++],F=h[v++];if(f){if(g+(H=l[y++])>u){var G=u-g;t.moveTo(a,s),t.lineTo(a+ga(G,V),s),(G-=V)>0&&t.lineTo(a+V,s+ga(G,F)),(G-=F)>0&&t.lineTo(a+ya(V-G,0),s+F),(G-=V)>0&&t.lineTo(a,s+ya(F-G,0));break t}g+=H}t.rect(a,s,V,F);break;case la.Z:if(f){var H;if(g+(H=l[y++])>u){x=(u-g)/H;t.lineTo(r*(1-x)+n*x,o*(1-x)+i*x);break t}g+=H}t.closePath(),r=n,o=i}}},t.CMD=la,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,e._uy=0}(),t}();function Aa(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=Oa);var p=Math.atan2(l,s);return p<0&&(p+=Oa),p>=i&&p<=r||p+Oa>=i&&p+Oa<=r}function Na(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Ea=Ca.CMD,za=2*Math.PI;var Ba=[-1,-1,-1],Va=[-1,-1];function Fa(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=Va[0],Va[0]=Va[1],Va[1]=h),f=Ro(e,i,o,s,Va[0]),d>1&&(g=Ro(e,i,o,s,Va[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(Po(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=Mo(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,Ba);if(0===l)return 0;var u=Wo(e,i,o);if(u>=0&&u<=1){for(var h=0,c=Go(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ba[0]=-l,Ba[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=za-1e-4){i=0,r=za;var h=o?1:-1;return a>=Ba[0]+t&&a<=Ba[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=za,r+=za);for(var p=0,d=0;d<2;d++){var f=Ba[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=za+g),(g>=i&&g<=r||g+za>=i&&g+za<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Wa(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=Na(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case Ea.M:p=f=u[y++],d=g=u[y++];break;case Ea.L:if(n){if(Aa(p,d,u[y],u[y+1],e,i,r))return!0}else c+=Na(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ea.C:if(n){if(Da(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Fa(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ea.Q:if(n){if(La(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ga(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ea.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,m?(f=o,g=a):c+=Na(p,d,o,a,i,r);var T=(i-_)*w/b+_;if(n){if(Ra(_,x,w,S,S+M,I,e,T,r))return!0}else c+=Ha(_,x,w,S,S+M,I,T,r);p=Math.cos(S+M)*b+_,d=Math.sin(S+M)*w+x;break;case Ea.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(Aa(f,g,o,g,e,i,r)||Aa(o,g,o,a,e,i,r)||Aa(o,a,f,a,e,i,r)||Aa(f,a,f,g,e,i,r))return!0}else c+=Na(o,g,o,a,i,r),c+=Na(f,a,f,g,i,r);break;case Ea.Z:if(n){if(Aa(p,d,f,g,e,i,r))return!0}else c+=Na(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=Na(p,d,f,g,i,r)||0),0!==c}var Ya=T({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},vo),Xa={style:T({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},mo.style)},Ua=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Za=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?jn:e>.2?"#eee":qn}if(t)return qn}return jn},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===sn(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new Ca(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Wa(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Wa(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:I(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return pt(Ya,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=I({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=I({},i.shape),I(s,n.shape)):(s=I({},r?this.shape:i.shape),I(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=I({},this.shape);for(var u={},h=z(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return pt(ja,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=Fn(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(xo);qa.prototype.type="tspan";var Ka=T({x:0,y:0},vo),$a={style:T({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},mo.style)};var Ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return pt(Ka,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return $a},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Rn(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(xo);Ja.prototype.type="image";var Qa=Math.round;function ts(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Qa(2*i)===Qa(2*r)&&(t.x1=t.x2=ns(i,s,!0)),Qa(2*o)===Qa(2*a)&&(t.y1=t.y2=ns(o,s,!0)),t):t}}function es(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=ns(i,s,!0),t.y=ns(r,s,!0),t.width=Math.max(ns(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(ns(r+a,s,!1)-t.y,0===a?0:1),t):t}}function ns(t,e,n){if(!e)return t;var i=Qa(2*t);return(i+Qa(e))%2==0?i/2:(i+(n?1:-1))/2}var is=function(){this.x=0,this.y=0,this.width=0,this.height=0},rs={},os=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new is},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=es(rs,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Za);os.prototype.type="rect";var as={fill:"#000"},ss={style:T({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},mo.style)},ls=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=as,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&u){var d=Math.floor(p/l);n=n.slice(0,d)}var f=p,g=h;if(r&&(f+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var y=oo(h,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,I=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),T=i.calculatedLineHeight,C=0;Cl&&co(n,t.substring(l,u),e,s),co(n,i[2],e,s,i[1]),l=io.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,x,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var C=w.width,A=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))P.percentWidth=C,h.push(P),P.contentWidth=Bn(P.text,I);else{if(A){var D=w.backgroundColor,L=D&&D.image;L&&no(L=Qr(L))&&(P.width=Math.max(P.width,L.width*T/L.height))}var k=f&&null!=r?r-x:null;null!=k&&k=0&&"right"===(C=_[T]).align;)this._placeToken(C,t,b,f,I,"right",y),w-=C.width,I-=C.width,T--;for(M+=(n-(M-d)-(g-I)-w)/2;S<=T;)C=_[S],this._placeToken(C,t,b,f,M+C.width/2,"center",y),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&gs(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(r=ds(r,o,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(qa),d=p.createStyle();p.useStyle(d);var f=this._defaultStyle,g=!1,y=0,v=ps("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),m=ps("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||f.autoStroke&&!g?null:(y=2,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;d.text=t.text,d.x=r,d.y=u,_&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||En,d.opacity=et(s.opacity,e.opacity,1),m&&(d.lineWidth=et(s.lineWidth,e.lineWidth,y),d.lineDash=tt(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=m),v&&(d.fill=v);var x=t.contentWidth,b=t.contentHeight;p.setBoundingRect(new Rn(Gn(d.x,x,d.textAlign),Hn(d.y,b,d.textBaseline),x,b))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=H(u),d=t.borderRadius,f=this;if(p||h&&c){(a=this._getOrCreateChild(os)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=d,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=tt(t.fillOpacity,1);else if(u&&u.image){(s=this._getOrCreateChild(Ja)).onload=function(){f.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=i,y.width=r,y.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=tt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var v=(a||s).style;v.shadowBlur=t.shadowBlur||0,v.shadowColor=t.shadowColor||"transparent",v.shadowOffsetX=t.shadowOffsetX||0,v.shadowOffsetY=t.shadowOffsetY||0,v.opacity=et(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&ot(e)||t.textFont||t.font},e}(xo),us={left:!0,right:1,center:1},hs={top:1,bottom:1,middle:1};function cs(t){if(t){t.font=ls.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||us[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||hs[n]?n:"top",t.padding&&(t.padding=it(t.padding))}}function ps(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ds(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function fs(t){var e=t.text;return null!=e&&(e+=""),e}function gs(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var ys=Lr(),vs=1,ms={},_s=Lr(),xs=["emphasis","blur","select"],bs=["normal","emphasis","blur","select"],ws="highlight",Ss="downplay",Ms="select",Is="unselect",Ts="toggleSelect";function Cs(t){return null!=t&&"none"!==t}var As=new Ee(100);function Ds(t){if("string"!=typeof t)return t;var e=As.get(t);return e||(e=$e(t,-.1),As.put(t,e)),e}function Ls(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function ks(t){Ls(t,"emphasis",2)}function Ps(t){2===t.hoverState&&Ls(t,"normal",0)}function Os(t){Ls(t,"blur",1)}function Rs(t){1===t.hoverState&&Ls(t,"normal",0)}function Ns(t){t.selected=!0}function Es(t){t.selected=!1}function zs(t,e,n){e(t,n)}function Bs(t,e,n){zs(t,e,n),t.isGroup&&t.traverse((function(t){zs(t,e,n)}))}function Vs(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function Fs(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&A(n,"select")>=0,o=!1;if(t instanceof Za){var a=_s(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Cs(s)||Cs(l)){var u=(i=i||{}).style||{};!Cs(u.fill)&&Cs(s)?(o=!0,i=I({},i),(u=I({},u)).fill=Ds(s)):!Cs(u.stroke)&&Cs(l)&&(o||(i=I({},i),u=I({},u)),u.stroke=Ds(l)),i.style=u}}if(i&&null==i.z2){o||(i=I({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=A(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Js(t,e,n){il(t,!0),Bs(t,Gs),Qs(t,e,n)}function Qs(t,e,n){var i=ys(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var tl=["emphasis","blur","select"],el={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function nl(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=cl(f),s*=cl(f));var g=(r===o?-1:1)*cl((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+dl(c)*y-pl(c)*v,_=(e+i)/2+pl(c)*y+dl(c)*v,x=vl([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=vl(b,w);if(yl(b,w)<=-1&&(S=fl),yl(b,w)>=1&&(S=0),S<0){var M=Math.round(S/fl*1e6)/1e6;S=2*fl+M%2*fl}h.addData(u,m,_,a,s,x,S,c,o)}var _l=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,xl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var bl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(Za);function wl(t){return null!=t.setData}function Sl(t,e){var n=function(t){var e=new Ca;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=Ca.CMD,l=t.match(_l);if(!l)return e;for(var u=0;uL*L+k*k&&(M=T,I=C),{cx:M,cy:I,x01:-h,y01:-c,x11:M*(r/b-1),y11:I*(r/b-1)}}function Gl(t,e){var n=zl(e.r,0),i=zl(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a,s=!!e.clockwise,l=e.startAngle,u=e.endAngle;if(l===u)a=0;else{var h=[l,u];Ta(h,!s),a=Nl(h[0]-h[1])}var c=e.cx,p=e.cy,d=e.cornerRadius||0,f=e.innerCornerRadius||0;if(n>Vl)if(a>Ll-Vl)t.moveTo(c+n*Pl(l),p+n*kl(l)),t.arc(c,p,n,l,u,!s),i>Vl&&(t.moveTo(c+i*Pl(u),p+i*kl(u)),t.arc(c,p,i,u,l,s));else{var g=Nl(n-i)/2,y=Bl(g,d),v=Bl(g,f),m=v,_=y,x=n*Pl(l),b=n*kl(l),w=i*Pl(u),S=i*kl(u),M=void 0,I=void 0,T=void 0,C=void 0;if((y>Vl||v>Vl)&&(M=n*Pl(u),I=n*kl(u),T=i*Pl(l),C=i*kl(l),aVl)if(_>Vl){var N=Fl(T,C,x,b,n,_,s),E=Fl(M,I,w,S,n,_,s);t.moveTo(c+N.cx+N.x01,p+N.cy+N.y01),_Vl&&a>Vl)if(m>Vl){N=Fl(w,S,M,I,i,-m,s),E=Fl(x,b,T,C,i,-m,s);t.lineTo(c+N.cx+N.x01,p+N.cy+N.y01),m=2){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pn-2?n-1:l+1],d=t[l>n-3?n-1:l+2]);var f=u*u,g=u*f;i.push([Ul(h[0],c[0],p[0],d[0],u,f,g),Ul(h[1],c[1],p[1],d[1],u,f,g)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]);s=1;for(var c=r.length;spu[1]){if(a=!1,r)return a;var u=Math.abs(pu[0]-cu[1]),h=Math.abs(cu[0]-pu[1]);Math.min(u,h)>i.len()&&(u0?l?e.animateFrom(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Ou(t,e,n,i,r,o){Pu("update",t,e,n,i,r,o)}function Ru(t,e,n,i,r,o){Pu("init",t,e,n,i,r,o)}function Nu(t,e,n,i,r,o){Bu(t)||Pu("remove",t,e,n,i,r,o)}function Eu(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),Nu(t,{style:{opacity:0}},e,n,i)}function zu(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||Eu(t,e,n,i)})):Eu(t,e,n,i)}function Bu(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Hu(t){return!t.isGroup}function Wu(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Hu(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Hu(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),Ou(t,i,n,ys(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=I({},t.shape)),e}}function Yu(t,e){return O(t,(function(t){var n=t[0];n=mu(n,e.x),n=_u(n,e.x+e.width);var i=t[1];return i=mu(i,e.y),[n,i=_u(i,e.y+e.height)]}))}function Xu(t,e){var n=mu(t.x,e.x),i=_u(t.x+t.width,e.x+e.width),r=mu(t.y,e.y),o=_u(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Uu(t,e,n){var i=I({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),T(r,n),new Ja(i)):Tu(t.replace("path://",""),i,n,"center")}function Zu(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=qu(f,g,u,h)/d;if(y<0||y>1)return!1;var v=qu(f,g,c,p)/d;return!(v<0||v>1)}function qu(t,e,n,i){return t*i-n*e}Mu("circle",Tl),Mu("ellipse",Al),Mu("sector",Wl),Mu("ring",Xl),Mu("polygon",ql),Mu("polyline",$l),Mu("rect",os),Mu("line",tu),Mu("bezierCurve",ru),Mu("arc",au);var Ku=Object.freeze({__proto__:null,extendShape:bu,extendPath:Su,registerShape:Mu,getShapeClass:Iu,makePath:Tu,makeImage:Cu,mergePath:Du,resizePath:Lu,subPixelOptimizeLine:function(t){return ts(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return es(t.shape,t.shape,t.style),t},subPixelOptimize:ku,updateProps:Ou,initProps:Ru,removeElement:Nu,removeElementWithFadeOut:zu,isElementRemoved:Bu,getTransform:Vu,applyTransform:Fu,transformDirection:Gu,groupTransition:Wu,clipPointsByRect:Yu,clipRectByRect:Xu,createIcon:Uu,linePolygonIntersect:Zu,lineLineIntersect:ju,Group:zi,Image:Ja,Text:ls,Circle:Tl,Ellipse:Al,Sector:Wl,Ring:Xl,Polygon:ql,Polyline:$l,Rect:os,Line:tu,BezierCurve:ru,Arc:au,IncrementalDisplayable:vu,CompoundPath:su,LinearGradient:uu,RadialGradient:hu,BoundingRect:Rn,OrientedBoundingRect:gu,Point:In,Path:Za}),$u={};function Ju(t,e){for(var n=0;n-1?Ch:Dh;function Oh(t,e){t=t.toUpperCase(),kh[t]=new Sh(e),Lh[t]=e}Oh(Ah,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Oh(Ch,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Rh=1e3,Nh=6e4,Eh=36e5,zh=864e5,Bh=31536e6,Vh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},Fh="{yyyy}-{MM}-{dd}",Gh={year:"{yyyy}",month:"{yyyy}-{MM}",day:Fh,hour:"{yyyy}-{MM}-{dd} "+Vh.hour,minute:"{yyyy}-{MM}-{dd} "+Vh.minute,second:"{yyyy}-{MM}-{dd} "+Vh.second,millisecond:Vh.none},Hh=["year","month","day","hour","minute","second","millisecond"],Wh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Yh(t,e){return"0000".substr(0,e-(t+="").length)+t}function Xh(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Uh(t){return t===Xh(t)}function Zh(t,e,n,i){var r=rr(t),o=r[Kh(n)](),a=r[$h(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[Jh(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[Qh(n)](),c=(h-1)%12+1,p=r[tc(n)](),d=r[ec(n)](),f=r[nc(n)](),g=(i instanceof Sh?i:function(t){return kh[t]}(i||Ph)||kh.EN).getModel("time"),y=g.get("month"),v=g.get("monthAbbr"),m=g.get("dayOfWeek"),_=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,Yh(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Yh(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Yh(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Yh(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Yh(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Yh(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Yh(f,3)).replace(/{S}/g,f+"")}function jh(t,e){var n=rr(t),i=n[$h(e)]()+1,r=n[Jh(e)](),o=n[Qh(e)](),a=n[tc(e)](),s=n[ec(e)](),l=0===n[nc(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function qh(t,e,n){var i="number"==typeof t?rr(t):t;switch(e=e||jh(t,n)){case"year":return i[Kh(n)]();case"half-year":return i[$h(n)]()>=6?1:0;case"quarter":return Math.floor((i[$h(n)]()+1)/4);case"month":return i[$h(n)]();case"day":return i[Jh(n)]();case"half-day":return i[Qh(n)]()/24;case"hour":return i[Qh(n)]();case"minute":return i[tc(n)]();case"second":return i[ec(n)]();case"millisecond":return i[nc(n)]()}}function Kh(t){return t?"getUTCFullYear":"getFullYear"}function $h(t){return t?"getUTCMonth":"getMonth"}function Jh(t){return t?"getUTCDate":"getDate"}function Qh(t){return t?"getUTCHours":"getHours"}function tc(t){return t?"getUTCMinutes":"getMinutes"}function ec(t){return t?"getUTCSeconds":"getSeconds"}function nc(t){return t?"getUTCSeconds":"getSeconds"}function ic(t){return t?"setUTCFullYear":"setFullYear"}function rc(t){return t?"setUTCMonth":"setMonth"}function oc(t){return t?"setUTCDate":"setDate"}function ac(t){return t?"setUTCHours":"setHours"}function sc(t){return t?"setUTCMinutes":"setMinutes"}function lc(t){return t?"setUTCSeconds":"setSeconds"}function uc(t){return t?"setUTCSeconds":"setSeconds"}function hc(t){if(!cr(t))return H(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function cc(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var pc=it,dc=/([&<>"'])/g,fc={"&":"&","<":"<",">":">",'"':""","'":"'"};function gc(t){return null==t?"":(t+"").replace(dc,(function(t,e){return fc[e]}))}function yc(t,e,n){function i(t){return t&&ot(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?rr(t):t;if(!isNaN(+s))return Zh(s,"yyyy-MM-dd hh:mm:ss",n);if(a)return"-"}if("ordinal"===e)return W(t)?i(t):Y(t)&&r(t)?t+"":"-";var l=hr(t);return r(l)?hc(l):W(t)?i(t):"-"}var vc=["a","b","c","d","e","f","g"],mc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function _c(t,e,n){F(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function bc(t,e){return e=e||"transparent",H(t)?t:X(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function wc(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Sc=P,Mc=["left","right","top","bottom","width","height"],Ic=[["width","left","right"],["height","top","bottom"]];function Tc(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Cc=Tc;V(Tc,"vertical"),V(Tc,"horizontal");function Ac(t,e,n){n=pc(n||0);var i=e.width,r=e.height,o=Zi(t.left,i),a=Zi(t.top,r),s=Zi(t.right,i),l=Zi(t.bottom,r),u=Zi(t.width,i),h=Zi(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new Rn(o+n[3],a+n[0],u,h);return f.margin=n,f}function Dc(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new Rn(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}var h=Ac(T({width:l.width,height:l.height},e),n,i),c=o?h.x-l.x:0,p=a?h.y-l.y:0;"raw"===s?(t.x=c,t.y=p):(t.x+=c,t.y+=p),t.markRedraw()}}function Lc(t){var e=t.layoutMode||t.constructor.layoutMode;return X(e)?e:e?{type:e}:null}function kc(t,e,n){var i=n&&n.ignoreSize;!F(i)&&(i=[i,i]);var r=a(Ic[0],0),o=a(Ic[1],1);function a(n,r){var o={},a=0,u={},h=0;if(Sc(n,(function(e){u[e]=t[e]})),Sc(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=S(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Nr(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Sh);Yr(Nc,Sh),jr(Nc),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Gr(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Gr(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Nc),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return P(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return P(t,(function(t){A(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),P(s,(function(t){A(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);A(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(P(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),P(c.successor,p?f:d)}P(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(Nc,(function(t){var e=[];P(Nc.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=O(e,(function(t){return Gr(t).main})),"dataset"!==t&&A(e,"dataset")<=0&&e.unshift("dataset");return e}));var Ec="";"undefined"!=typeof navigator&&(Ec=navigator.platform||"");var zc="rgba(0, 0, 0, 0.2)",Bc={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Ec.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Vc=ht(["tooltip","label","itemName","itemId","seriesName"]),Fc="original",Gc="arrayRows",Hc="objectRows",Wc="keyedColumns",Yc="typedArray",Xc="unknown",Uc="column",Zc="row",jc=1,qc=2,Kc=3,$c=Lr();function Jc(t,e,n){var i={},r=tp(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=$c(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;P(t=t.slice(),(function(e,n){var r=X(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var pp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Sh(i),this._locale=new Sh(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=gp(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,gp(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):ap(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&P(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=ht(),s=e&&e.replaceMergeMainTypeMap;$c(this).datasetMap=ht(),P(t,(function(t,e){null!=t&&(Nc.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?w(t):S(n[e],t,!0))})),s&&s.each((function(t,e){Nc.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),Nc.topologicalTravel(o,Nc.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=ip.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,_r(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=Sr(a,o,l);(function(t,e,n){P(t,(function(t){var i=t.newOption;X(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,Nc),n[e]=null,i.set(e,null),r.set(e,0);var h=[],c=[],p=0;P(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o=Nc.getClass(e,t.keyInfo.subType,!0);if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var a=I({componentIndex:n},t.keyInfo);I(i=new o(r,this,this,a),a),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),c.push(i),p++):(h.push(void 0),c.push(void 0))}),this),n[e]=h,i.set(e,c),r.set(e,p),"series"===e&&rp(this)}),this),this._seriesIndices||rp(this)},e.prototype.getOption=function(){var t=w(this.option);return P(t,(function(e,n){if(Nc.hasClass(n)){for(var i=_r(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Ar(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Sp=P,Mp=X,Ip=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Tp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Ip.length;n=0;f--){var g=t[f];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var y=g.data.getByRawIndex(g.stackResultDimension,c);if(p>=0&&y>0||p<=0&&y<0){p+=y,d=y;break}}}return i[0]=p,i[1]=d,i}));a.hostModel.setData(l),e.data=l}))}var Yp,Xp,Up,Zp,jp,qp=function(t){this.data=t.data||(t.sourceFormat===Wc?{}:[]),this.sourceFormat=t.sourceFormat||Xc,this.seriesLayoutBy=t.seriesLayoutBy||Uc,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Kp(t){return t instanceof qp}function $p(t,e,n,i){n=n||td(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:ed(r),startIndex:a,dimensionsDetectedCount:o};if(e===Gc){var s=t;"auto"===i||null==i?nd((function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)}),n,s,10):a=Y(i)?i:i?1:0,r||1!==a||(r=[],nd((function(t,e){r[e]=null!=t?t+"":""}),n,s,1/0)),o=r?r.length:n===Zc?s.length:s[0]?s[0].length:null}else if(e===Hc)r||(r=function(t){var e,n=0;for(;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Id=function(){function t(t,e){if("number"!=typeof e){var n="";0,yr(n)}this._opFn=Md[t],this._rvalFloat=hr(e)}return t.prototype.evaluate=function(t){return"number"==typeof t?this._opFn(t,this._rvalFloat):this._opFn(hr(t),this._rvalFloat)},t}(),Td=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,r="number"===n?t:hr(t),o="number"===i?e:hr(e),a=isNaN(r),s=isNaN(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return ro?-this._resultLT:0},t}(),Cd=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=hr(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=hr(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Ad(t,e){return"eq"===t||"ne"===t?new Cd("eq"===t,e):dt(Md,t)?new Id(t,e):null}var Dd=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return bd(t,e)},t}();function Ld(t){var e=t.sourceFormat;if(!Ed(e)){var n="";0,yr(n)}return t.data}function kd(t){var e=t.sourceFormat,n=t.data;if(!Ed(e)){var i="";0,yr(i)}if(e===Gc){for(var r=[],o=0,a=n.length;o9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(Vd(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=Z(a=o.get("data",!0))?Yc:Fc,e=[];var h=this._getSourceMetaRawOption(),c=l?l.metaRawOption:null;t=[$p(a,{seriesLayoutBy:tt(h.seriesLayoutBy,c?c.seriesLayoutBy:null),sourceHeader:tt(h.sourceHeader,c?c.sourceHeader:null),dimensions:tt(h.dimensions,c?c.dimensions:null)},s,o.get("encode",!0))]}else{var p=n;if(r){var d=this._applyTransform(i);t=d.sourceList,e=d.upstreamSignList}else{t=[$p(p.get("source",!0),this._getSourceMetaRawOption(),null,null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&Fd(o)}var a,s=[],l=[];return P(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||Fd(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=_r(t),r=i.length,o="";r||yr(o);for(var a=0,s=r;a1||e>0&&!t.noHeader,i=0;P(t.blocks,(function(t){Xd(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))})),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var r=e.noHeader,o=jd(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];rt(!o||F(o)),o=o||[];var a=t.orderMode;if(e.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(dt(s,a)){var l=new Td(s[a],null);o.sort((function(t,e){return l.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===a&&o.reverse()}var u=jd(e);if(P(o,(function(e,n){var o=Xd(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)})),!r.length)return;return"richText"===t.renderMode?r.join(u.richText):qd(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=yc(e.header,"ordinal",t.useUTC),l=Gd(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Kd(t,s,l)+o.richText+a:qd('
'+gc(s)+"
"+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,h=t.useUTC;if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":yc(l,"ordinal",h),d=e.valueType,f=a?[]:F(u)?O(u,(function(t,e){return yc(t,F(d)?d[e]:d,h)})):[yc(u,F(d)?d[0]:d,h)],g=!s||!o,y=!s&&o,v=Gd(i,r),m=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":Kd(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,f,g,y,_)):qd((s?"":c)+(o?"":function(t,e,n){return''+gc(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px";return''+O(t,(function(t){return gc(t)})).join("  ")+""}(f,g,y,_)),n)}}}};function Zd(t,e,n,i,r,o){if(t){var a=Xd(t);a.planLayout(t);var s={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e};return a.build(s,t,0,o)}}function jd(t){var e=t.__gapLevelBetweenSubBlocks;return{html:Hd[e],richText:Wd[e]}}function qd(t,e){return'
'+t+'
'}function Kd(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function $d(t,e){return bc(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Jd(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Qd=function(){function t(){this.richTextStyles={},this._nextStyleNameId=pr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=xc({color:e,type:t,renderMode:n,markerId:i});return H(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};F(e)?P(e,(function(t){return I(n,t)})):I(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function tf(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=F(c),d=$d(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=R(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(Yd("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?P(i,(function(t){h(fd(o,n,t),t)})):P(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=fd(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=Cr(o),v=y&&o.name||"",m=l.getName(a),_=s?v:m;return Yd("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[Yd("nameValue",{markerType:"item",markerColor:d,name:_,noName:!ot(_),value:e,valueType:n})].concat(i||[])})}var ef=Lr();function nf(t,e){return t.getName(e)||t.getId(e)}var rf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=md({count:af,reset:sf}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(ef(this).sourceManager=new zd(this)).prepareSource();var i=this.getInitialData(t,n);uf(i,this),this.dataTask.context.data=i,ef(this).dataBeforeProcessed=i,of(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=Lc(this),i=n?Pc(t):{},r=this.subType;Nc.hasClass(r)&&(r+="Series"),S(t,e.getTheme().get(this.subType)),S(t,this.getDefaultOption()),xr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&kc(t,i,n)},e.prototype.mergeOption=function(t,e){t=S(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Lc(this);n&&kc(this.option,t,n);var i=ef(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);uf(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,ef(this).dataBeforeProcessed=r,of(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!Z(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=up.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[nf(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(t,e)}},e.registerClass=function(t){return Nc.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.useColorPaletteOnData=!1,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Nc);function of(t){var e=t.name;Cr(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return P(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function af(t){return t.model.getRawData().count()}function sf(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lf}function lf(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function uf(t,e){P(r(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,V(hf,e))}))}function hf(t,e){var n=cf(t);return n&&n.setOutputEnd((e||this).count()),e}function cf(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}L(rf,yd),L(rf,up),Yr(rf,Nc);var pf=function(){function t(){this.group=new zi,this.uid=Ih("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();function df(){var t=Lr();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Hr(pf),jr(pf);var ff=Lr(),gf=df(),yf=function(){function t(){this.group=new zi,this.uid=Ih("viewChart"),this.renderTask=md({plan:_f,reset:xf}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){mf(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){mf(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){ff(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function vf(t,e,n){t&&("emphasis"===e?Hs:Ws)(t,n)}function mf(t,e,n){var i=Dr(t,e),r=e&&null!=e.highlightKey?function(t){var e=ms[t];return null==e&&vs<=32&&(e=ms[t]=vs++),e}(e.highlightKey):null;null!=i?P(_r(i),(function(e){vf(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){vf(t,n,r)}))}function _f(t){return gf(t.model)}function xf(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&ff(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),bf[l]}Hr(yf),jr(yf);var bf={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},wf="\0__throttleOriginMethod",Sf="\0__throttleRate",Mf="\0__throttleType";function If(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function Tf(t,e,n,i){var r=t[e];if(r){var o=r[wf]||r,a=r[Mf];if(r[Sf]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=If(o,n,"debounce"===i))[wf]=o,r[Mf]=i,r[Sf]=n}return r}}var Cf=Lr(),Af={itemStyle:qr(xh,!0),lineStyle:qr(vh,!0)},Df={lineStyle:"stroke",itemStyle:"fill"};function Lf(t,e){var n=t.visualStyleMapper||Af[e];return n||(console.warn("Unkown style type '"+e+"'."),Af.itemStyle)}function kf(t,e){var n=t.visualDrawType||Df[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var Pf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=Lf(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=kf(t,i),l=o[s],u=G(l)?l:null;if(o[s]&&!u||(o[s]=t.getColorFromPalette(t.name,null,e.getSeriesCount()),n.setVisual("colorFromPalette",!0)),n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=I({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},Of=new Sh,Rf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=Lf(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Of.option=n[i];var a=r(Of);I(t.ensureUniqueItemVisual(e,"style"),a),Of.option.decal&&(t.setItemVisual(e,"decal",Of.option.decal),Of.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Nf={performRawSeries:!0,overallReset:function(t){var e=ht();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Cf(t).scope=n}})),t.eachSeries((function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Cf(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=kf(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},Ef=Math.PI;var zf=function(){function t(t,e,n,i){this._stageTaskMap=ht(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ht();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;P(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";rt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}P(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=ht(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||md({plan:Hf,reset:Wf,count:Uf}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||md({reset:Bf});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ht(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,md({reset:Vf,onDirty:Gf})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}rt(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,P(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return G(t)&&(t={overallReset:t,seriesType:Zf(t)}),t.uid=Ih("stageHandler"),e&&(t.visualType=e),t},t}();function Bf(t){t.overallReset(t.ecModel,t.api,t.payload)}function Vf(t){return t.overallProgress&&Ff}function Ff(){this.agent.dirty(),this.getDownstream().dirty()}function Gf(){this.agent&&this.agent.dirty()}function Hf(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Wf(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=_r(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?O(e,(function(t,e){return Xf(e)})):Yf}var Yf=Xf(0);function Xf(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),cg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),o=t.get("symbolKeepAspect"),a=t.get("symbolRotate"),s=G(i),l=G(r),u=G(a),h=s||l||u,c=!s&&i?i:t.defaultSymbol,p=l?null:r,d=u?null:a;if(n.setVisual({legendSymbol:t.legendSymbol||c,symbol:c,symbolSize:p,symbolKeepAspect:o,symbolRotate:d}),!e.isSeriesFiltered(t))return{dataEach:h?function(e,n){var o=t.getRawValue(n),h=t.getDataParams(n);s&&e.setItemVisual(n,"symbol",i(o,h)),l&&e.setItemVisual(n,"symbolSize",r(o,h)),u&&e.setItemVisual(n,"symbolRotate",a(o,h))}:null}}}};function pg(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n);default:0}}function dg(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:0}}function fg(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i);break;default:0}}var gg=2*Math.PI,yg=Ca.CMD,vg=["top","right","bottom","left"];function mg(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function _g(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%gg<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=Pa(r),r=Pa(p)}else i=Pa(i),r=Pa(r);i>r&&(r+=gg);var d=Math.atan2(s,a);if(d<0&&(d+=gg),d>=i&&d<=r||d+gg>=i&&d+gg<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function xg(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=Math.sqrt(h*h+c*c),d=(l*(h/=p)+u*(c/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*h,g=a[1]=e+d*c;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function bg(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),h=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}var wg=[];function Sg(t,e,n){var i=bg(e.x,e.y,e.width,e.height,t.x,t.y,wg);return n.set(wg[0],wg[1]),i}function Mg(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,d=0;d0){e=e/180*Math.PI,Ig.fromArray(t[0]),Tg.fromArray(t[1]),Cg.fromArray(t[2]),In.sub(Ag,Ig,Tg),In.sub(Dg,Cg,Tg);var n=Ag.len(),i=Dg.len();if(!(n<.001||i<.001)){Ag.scale(1/n),Dg.scale(1/i);var r=Ag.dot(Dg);if(Math.cos(e)1&&In.copy(Pg,Cg),Pg.toArray(t[1])}}}}function Rg(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,Ig.fromArray(t[0]),Tg.fromArray(t[1]),Cg.fromArray(t[2]),In.sub(Ag,Tg,Ig),In.sub(Dg,Cg,Tg);var i=Ag.len(),r=Dg.len();if(!(i<.001||r<.001))if(Ag.scale(1/i),Dg.scale(1/r),Ag.dot(e)=a)In.copy(Pg,Cg);else{Pg.scaleAndAdd(Dg,o/Math.tan(Math.PI/2-s));var l=Cg.x!==Tg.x?(Pg.x-Tg.x)/(Cg.x-Tg.x):(Pg.y-Tg.y)/(Cg.y-Tg.y);if(isNaN(l))return;l<0?In.copy(Pg,Tg):l>1&&In.copy(Pg,Cg)}Pg.toArray(t[1])}}}function Ng(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Eg(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Lt(i[0],i[1]),o=Lt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Ot([],i[1],i[0],a/r),l=Ot([],i[1],i[2],a/o),u=Ot([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&x(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){x(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function Fg(t,e,n,i){return Vg(t,"y","height",e,n,i)}function Gg(t){if(t){for(var e=[],n=0;n=0&&n.attr(d.oldLayoutSelect),A(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),Ou(n,s,e,a)}else if(n.attr(s),!uh(n).valueAnimation){var h=tt(n.style.opacity,1);n.style.opacity=0,Ru(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};Zg(c,s,jg),Zg(c,n.states.select,jg)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};Zg(p,s,jg),Zg(p,n.states.emphasis,jg)}ch(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=Ug(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),Ou(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Ru(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}();function Kg(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}P([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,i,r){e=I({},e),r.dispatchAction(I(e,{type:t[1],seriesIndex:n(i,e)}))}))}))}function $g(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:Y(t)?[t]:F(t)?t:null):null}var dy=new Ca(!0);function fy(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function gy(t){var e=t.fill;return null!=e&&"none"!==e}function yy(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function vy(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function my(t,e,n){var i=to(e.image,e.__image,n);if(no(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var _y=["shadowBlur","shadowOffsetX","shadowOffsetY"],xy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function by(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;(i||e.opacity!==n.opacity)&&(o||(My(t,r),o=!0),t.globalAlpha=null==e.opacity?vo.opacity:e.opacity),(i||e.blend!==n.blend)&&(o||(My(t,r),o=!0),t.globalCompositeOperation=e.blend||vo.blend);for(var a=0;a<_y.length;a++){var s=_y[a];(i||e[s]!==n[s])&&(o||(My(t,r),o=!0),t[s]=t.dpr*(e[s]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(My(t,r),o=!0),t.shadowColor=e.shadowColor||vo.shadowColor),o}function wy(t,e,n,i,r){var o=Iy(e,r.inHover),a=i?null:n&&Iy(n,r.inHover)||{};if(o===a)return!1;var s=by(t,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(My(t,r),s=!0),t.fillStyle=o.fill),(i||o.stroke!==a.stroke)&&(s||(My(t,r),s=!0),t.strokeStyle=o.stroke),(i||o.opacity!==a.opacity)&&(s||(My(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(My(t,r),s=!0),t.lineWidth=l)}for(var u=0;u0&&py(n.lineDash,n.lineWidth),w=n.lineDashOffset,S=!!t.setLineDash,M=e.getGlobalScale();if(u.setScale(M[0],M[1],e.segmentIgnoreThreshold),b){var I=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;I&&1!==I&&(b=O(b,(function(t){return t/I})),w/=I)}var T=!0;(l||e.__dirty&Za.SHAPE_CHANGED_BIT||b&&!S&&r)&&(u.setDPR(t.dpr),s?u.setContext(null):(u.setContext(t),T=!1),u.reset(),b&&!S&&(u.setLineDash(b),u.setLineDashOffset(w)),e.buildPath(u,e.shape,i),u.toStatic(),e.pathUpdated()),T&&u.rebuildPath(t,s?a:1),b&&S&&(t.setLineDash(b),t.lineDashOffset=w),i||(n.strokeFirst?(r&&vy(t,n),o&&yy(t,n)):(o&&yy(t,n),r&&vy(t,n))),b&&S&&t.setLineDash([])}(t,e,d,p),p&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):e instanceof qa?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),wy(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||En,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var o=n.lineDash&&n.lineWidth>0&&py(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;s&&1!==s&&(o=O(o,(function(t){return t/s})),a/=s),t.setLineDash(o),t.lineDashOffset=a,r=!0}}n.strokeFirst?(fy(n)&&t.strokeText(i,n.x,n.y),gy(n)&&t.fillText(i,n.x,n.y)):(gy(n)&&t.fillText(i,n.x,n.y),fy(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,d)):e instanceof Ja?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(t,e,n,i,r){by(t,Iy(e,r.inHover),n&&Iy(n,r.inHover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=to(n.image,e.__image,e,e.onload);if(i&&no(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,h=n.sy||0;t.drawImage(i,u,h,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var c=a-(u=n.sx),p=s-(h=n.sy);t.drawImage(i,u,h,c,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,d)):e instanceof vu&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.setOption=function(t,e,n){if(this._disposed)bv(this.id);else{var i,r,o;if(By(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new bp(this._api),s=this._theme,l=this._model=new pp;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Iv),dv(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(qy(this),Jy.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,nv.call(this,i),iv.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Fy&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(a.canvasSupported)return(t=I({},t||{})).pixelRatio=t.pixelRatio||this.getDevicePixelRatio(),t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(a.svgSupported){var t=this._zr;return P(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;Ey(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Ey(i,(function(t){t.group.ignore=!1})),o}bv(this.id)},e.prototype.getConnectedDataURL=function(t){if(this._disposed)bv(this.id);else if(a.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Pv[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();P(kv,(function(o,a){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.getRenderedCanvas(w(t)),d=o.getDom().getBoundingClientRect();s=i(d.left,s),l=i(d.top,l),u=r(d.right,u),h=r(d.bottom,h),c.push({dom:p,left:d.left,top:d.top})}}));var d=(u*=p)-(s*=p),f=(h*=p)-(l*=p),g=C(),y=Hi(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return Ey(c,(function(t){var e=t.left-s,n=t.top-l;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new os({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),Ey(c,(function(t){var e=new Ja({style:{x:t.left*p-s,y:t.top*p-l,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return Qy(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Qy(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return P(Pr(this._model,t),(function(t,i){i.indexOf("Models")>=0&&P(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;bv(this.id)},e.prototype.getVisual=function(t,e){var n=Pr(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?pg(r,o,e):dg(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;Ey(xv,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&Jg(o,(function(t){var e=ys(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=I({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),Ey(Sv,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),Ey(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?($g("map","selectchanged",e,i,t),$g("pie","selectchanged",e,i,t)):"select"===t.fromAction?($g("map","selected",e,i,t),$g("pie","selected",e,i,t)):"unselect"===t.fromAction&&($g("map","unselected",e,i,t),$g("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?bv(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)bv(this.id);else{this._disposed=!0,Er(this.getDom(),Nv,"");var t=this._api,e=this._model;Ey(this._componentsViews,(function(n){n.dispose(e,t)})),Ey(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete kv[this.id]}},e.prototype.resize=function(t){if(this._disposed)bv(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&qy(this),Jy.update.call(this,{type:"resize",animation:{duration:0}}),this.__flagInMainProcess=!1,nv.call(this,i),iv.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)bv(this.id);else if(By(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Lv[t]){var n=Lv[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?bv(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=Sv[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)bv(this.id);else if(By(e)||(e={silent:!!e}),wv[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;ev.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.browser.weChat&&this._throttledZrFlush(),nv.call(this,n),iv.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed)bv(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(Bu(e))return;if(e instanceof Za&&function(t){var e=_s(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}qy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ky(t,!0),Ky(t,!1),e.plan()},Ky=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.node&&!a.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,n)},hv=function(t,e){Ey(Cv,(function(n){n(t,e)}))},fv=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},gv=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Bu(e)||t(e)})),e.__needsUpdateStatus=!1)},cv=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){Hs(e,n),fv(t)},i.prototype.leaveEmphasis=function(e,n){Ws(e,n),fv(t)},i.prototype.enterBlur=function(e){Ys(e),fv(t)},i.prototype.leaveBlur=function(e){Xs(e),fv(t)},i.prototype.enterSelect=function(e){Us(e),fv(t)},i.prototype.leaveSelect=function(e){Zs(e),fv(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(vp))(t)},pv=function(t){function e(t,e){for(var n=0;n=0)){jv.push(n);var o=zf.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Kv(t,e){Lv[t]=e}function $v(t,e,n){sg(t,e,n)}var Jv=function(t){var e=(t=w(t)).type,n="";e||yr(n);var i=e.split(":");2!==i.length&&yr(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,Rd.set(e,t)};Zv(Gy,Pf),Zv(Hy,Rf),Zv(Hy,Nf),Zv(Gy,cg),Zv(Hy,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolKeepAspect",a)}:null}}}),Zv(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=ky(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=ky(r,e)}}))})),Fv(Hp),Gv(900,(function(t){var e=ht();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Wp)})),Kv("default",(function(t,e){T(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new zi,i=new os({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new ls({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily}}),a=new os({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new au({shape:{startAngle:-Ef/2,endAngle:-Ef/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Ef/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Ef/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Yv({type:ws,event:ws,update:ws},ft),Yv({type:Ss,event:Ss,update:Ss},ft),Yv({type:Ms,event:Ms,update:Ms},ft),Yv({type:Is,event:Is,update:Is},ft),Yv({type:Ts,event:Ts,update:Ts},ft),Vv("light",Qf),Vv("dark",rg);var Qv=[],tm={registerPreprocessor:Fv,registerProcessor:Gv,registerPostInit:Hv,registerPostUpdate:Wv,registerAction:Yv,registerCoordinateSystem:Xv,registerLayout:Uv,registerVisual:Zv,registerTransform:Jv,registerLoading:Kv,registerMap:$v,PRIORITY:Wy,ComponentModel:Nc,ComponentView:pf,SeriesModel:rf,ChartView:yf,registerComponentModel:function(t){Nc.registerClass(t)},registerComponentView:function(t){pf.registerClass(t)},registerSeriesModel:function(t){rf.registerClass(t)},registerChartView:function(t){yf.registerClass(t)},registerSubTypeDefaulter:function(t,e){Nc.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Wi(t,e)}};function em(t){F(t)?P(t,(function(t){em(t)})):A(Qv,t)>=0||(Qv.push(t),G(t)&&(t={install:t}),t.install(tm))}function nm(t){return null==t?0:t.length||1}function im(t){return t}var rm=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||im,this._newKeyGetter=i||im,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;av[1]&&(v[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||gm(this,d))}this._rawCount=this._count=s,this._extent={},lm(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===Fc,p=0;pb[1]&&(b[1]=x)}if(c&&!i.pure&&y){var w=y.name;null==l[v]&&null!=w&&(l[v]=Tr(w,null));var S=y.id;null==u[v]&&null!=S&&(u[v]=Tr(S,null))}this._dontMakeIdFromName||gm(this,v)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},lm(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=0&&e=0&&e=0&&ea&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){Sm(t)?I(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=c&&b<=p||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){y=d[h[0]];var m=d[h[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=c&&b<=p||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=c&&b<=p||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[T][1])&&(M=!1)}M&&(s[l++]=this.getRawIndex(v))}return lx[1]&&(x[1]=_)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=vm(this,[t]),o=r._storage,a=[],s=wm(1/e),l=o[t],u=this.count(),h=r._rawExtent[t],c=new(um(this))(u),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r.getRawIndex=pm,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=vm(this,[]),a=o._storage[t],s=this.count(),l=new(um(this))(s),u=0,h=wm(1/e),c=this.getRawIndex(0);l[u++]=c;for(var p=1;pn&&(n=i,r=S)}l[u++]=r,c=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=pm,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new Sh(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new rm(t?t.getIndices():[],this.getIndices(),(function(e){return dm(t,e)}),(function(t){return dm(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},Sm(t)?I(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(F(r=this.getVisual(e))?r=r.slice():Sm(r)&&(r=I({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Sm(e)?I(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(Sm(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?I(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=ys(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(_m,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){P(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){e||(e=new t(Mm(this.dimensions,this.getDimensionInfo,this),this.hostModel));if(e._storage=this._storage,e._storageArr=this._storageArr,xm(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?Cm:Dm},hm=function(t,e,n,i){var r=Tm[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},dm=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=fm(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},ym=function(t){return F(t)||(t=null!=t?[t]:[]),t},function(t,e){for(var n=0;n=0?(s[c]=(o=l[c],a=void 0,(a=o.constructor)===Array?o.slice():new a(o)),r._rawExtent[c]=mm(),r._extent[c]=null):s[c]=l[c],u.push(s[c]))}return r},mm=function(){return[1/0,-1/0]},_m=function(t){var e=ys(t),n=ys(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},xm=function(t,e){P(Lm.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,P(km,(function(n){t[n]=w(e[n])})),t._calculationInfo=I({},e._calculationInfo)},gm=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=fm(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=fm(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function Om(t,e,n){Kp(e)||(e=Jp(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=ht(),o=ht(),a=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return P(e,(function(t){var e;X(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(e,t,i,n.dimCount),l=0;le[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();jr(Wm);var Ym=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&O(i,Xm);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ht(this.categories))},t}();function Xm(t){return X(t)&&null!=t.value?t.value:t+""}var Um=ji;function Zm(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=sr(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=jm(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),qm(t,0,e),qm(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[Um(Math.ceil(t[0]/a)*a,s),Um(Math.floor(t[1]/a)*a,s)],t),r}function jm(t){return $i(t)+2}function qm(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Km(t,e){return t>=e[0]&&t<=e[1]}function $m(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Jm(t,e){return t*(e[1]-e[0])+e[0]}var Qm=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Ym({})),F(i)&&(i=new Ym({categories:O(i,(function(t){return X(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Km(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return $m(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Jm(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(Wm);Wm.registerClass(Qm);var t_=ji,e_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Km(t,this._extent)},e.prototype.normalize=function(t){return $m(t,this._extent)},e.prototype.scale=function(t){return Jm(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=jm(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:t_(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return P(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=Zi(t.get("barWidth"),i),d=Zi(t.get("barMaxWidth"),i),f=Zi(t.get("barMinWidth")||1,i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:o_(r),stackId:r_(t)})})),l_(n)}function l_(t){var e={};P(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return P(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=z(i).length;o=Math.max(35-4*a,15)+"%"}var s=Zi(o,r),l=Zi(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),P(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;P(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;P(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function u_(t,e,n){if(t&&e){var i=t[o_(e)];return null!=i&&null!=n?i[r_(n)]:i}}function h_(t,e){var n=a_(t,e),i=s_(n),r={};P(n,(function(t){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=r_(t),s=i[o_(o)][a],l=s.offset,u=s.width,h=n.getOtherAxis(o),c=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var p=e.mapDimension(h.dim),d=e.mapDimension(o.dim),f=Fm(e,p),g=h.isHorizontal(),y=f_(o,h),v=0,m=e.count();v=0?"p":"n",w=y;f&&(r[a][x]||(r[a][x]={p:y,n:y}),w=r[a][x][b]);var S,M=void 0,I=void 0,T=void 0,C=void 0;if(g)M=w,I=(S=n.dataToPoint([_,x]))[1]+l,T=S[0]-y,C=u,Math.abs(T).5||(h=.5),{progress:function(t,e){for(var c,p=t.count,d=new i_(2*p),f=new i_(2*p),g=new i_(p),y=[],v=[],m=0,_=0;null!=(c=t.next());)v[u]=e.get(a,c),v[1-u]=e.get(s,c),y=n.dataToPoint(v,null,y),f[m]=l?i.x+i.width:y[0],d[m++]=y[0],f[m]=l?y[1]:i.y+i.height,d[m++]=y[1],g[_++]=c;e.setLayout({largePoints:d,largeDataIndices:g,largeBackgroundPoints:f,barWidth:h,valueAxisStart:f_(r,o),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function p_(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function d_(t){return t.pipelineContext&&t.pipelineContext.large}function f_(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var g_=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return n(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Zh(t.value,Gh[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Xh(this._minLevelUnit))]||Gh.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=I({},Vh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(F(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return Zh(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var r=this.getSetting("useUTC"),o=function(t,e,n,i){var r=1e4,o=Wh,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var _=N(O(u,(function(t){return N(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(d=0;d<_.length;++d)for(var w=_[d],S=0;Sn&&(this._approxInterval=n);var o=y_.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function m_(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function __(t){return(t/=Eh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function x_(t,e){return(t/=e?Nh:Rh)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function b_(t){return sr(t,!0)}function w_(t,e,n){var i=new Date(t);switch(Xh(e)){case"year":case"month":i[rc(n)](0);case"day":i[oc(n)](1);case"hour":i[ac(n)](0);case"minute":i[sc(n)](0);case"second":i[lc(n)](0),i[uc(n)](0)}return i.getTime()}Wm.registerClass(g_);var S_=Wm.prototype,M_=e_.prototype,I_=$i,T_=ji,C_=Math.floor,A_=Math.ceil,D_=Math.pow,L_=Math.log,k_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new e_,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return O(M_.getTicks.call(this,t),(function(t){var e=t.value,r=ji(D_(this.base,e));return r=e===n[0]&&this._fixMin?O_(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?O_(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=L_(t)/L_(n),e=L_(e)/L_(n),M_.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=S_.getExtent.call(this);e[0]=D_(t,e[0]),e[1]=D_(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=O_(e[0],n[0])),this._fixMax&&(e[1]=O_(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=L_(t[0])/L_(e),t[1]=L_(t[1])/L_(e),S_.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=or(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[ji(A_(e[0]/i)*i),ji(C_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){M_.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Km(t=L_(t)/L_(this.base),this._extent)},e.prototype.normalize=function(t){return $m(t=L_(t)/L_(this.base),this._extent)},e.prototype.scale=function(t){return t=Jm(t,this._extent),D_(this.base,t)},e.type="log",e}(Wm),P_=k_.prototype;function O_(t,e){return T_(t,I_(e))}P_.getMinorTicks=M_.getMinorTicks,P_.getLabel=M_.getLabel,Wm.registerClass(k_);var R_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]s&&(a=NaN,s=NaN);var h=J(a)||J(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[E_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=N_[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),N_={min:"_determinedMin",max:"_determinedMax"},E_={min:"_dataMin",max:"_dataMax"};function z_(t,e,n){var i=t.rawExtentInfo;return i||(i=new R_(t,e,n),t.rawExtentInfo=i,i)}function B_(t,e){return null==e?null:J(e)?NaN:t.parse(e)}function V_(t,e){var n=t.type,i=z_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=a_("bar",a),l=!1;if(P(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=s_(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=u_(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;P(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;P(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function F_(t,e){var n=V_(t,e),i=n.extent,r=e.get("splitNumber");t instanceof k_&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var a=e.get("interval");null!=a&&t.setInterval&&t.setInterval(a)}function G_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Qm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new g_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Wm.getClass(e)||e_)}}function H_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(W_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function W_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Y_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new Rn(t.x,t.y,o,a)}function X_(t){var e=t.get("interval");return null==e?"auto":e}function U_(t){return"category"===t.type&&0===X_(t.getLabelModel())}function Z_(t,e){var n={};return P(t.mapDimensionsAll(e),(function(e){n[Gm(t,e)]=!0})),z(n)}var j_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var q_={isDimensionStacked:Fm,enableDataStack:Vm,getStackedDimension:Gm};var K_=Object.freeze({__proto__:null,createList:function(t){return Hm(t.getSource(),t)},getLayoutRect:Ac,dataStack:q_,createScale:function(t,e){var n=e;e instanceof Sh||(n=new Sh(e));var i=G_(n);return i.setExtent(t[0],t[1]),F_(i,n),i},mixinAxisModelCommonMethods:function(t){L(t,j_)},getECData:ys,createTextStyle:function(t,e){return nh(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:Nm,createSymbol:uy,enableHoverEmphasis:Js});function $_(t,e){return Math.abs(t-e)<1e-8}function J_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;o>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function ex(t,e){return O(N((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,r=0;r0})),(function(t){var n=t.properties,i=t.geometry,r=[];if("Polygon"===i.type){var o=i.coordinates;r.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}"MultiPolygon"===i.type&&P(o=i.coordinates,(function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var a=new Q_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var nx=Object.freeze({__proto__:null,linearMap:Ui,round:ji,asc:qi,getPrecision:Ki,getPrecisionSafe:$i,getPixelPrecision:Ji,getPercentWithPrecision:Qi,MAX_SAFE_INTEGER:tr,remRadian:er,isRadianAroundZero:nr,parseDate:rr,quantity:or,quantityExponent:ar,nice:sr,quantile:lr,reformIntervals:ur,isNumeric:cr,numericToNumber:hr}),ix=Object.freeze({__proto__:null,parse:rr,format:Zh}),rx=Object.freeze({__proto__:null,extendShape:bu,extendPath:Su,makePath:Tu,makeImage:Cu,mergePath:Du,resizePath:Lu,createIcon:Uu,updateProps:Ou,initProps:Ru,getTransform:Vu,clipPointsByRect:Yu,clipRectByRect:Xu,registerShape:Mu,getShapeClass:Iu,Group:zi,Image:Ja,Text:ls,Circle:Tl,Ellipse:Al,Sector:Wl,Ring:Xl,Polygon:ql,Polyline:$l,Rect:os,Line:tu,BezierCurve:ru,Arc:au,IncrementalDisplayable:vu,CompoundPath:su,LinearGradient:uu,RadialGradient:hu,BoundingRect:Rn}),ox=Object.freeze({__proto__:null,addCommas:hc,toCamelCase:cc,normalizeCssArray:pc,encodeHTML:gc,formatTpl:_c,getTooltipMarker:xc,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=rr(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Yh(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",Yh(s,2)).replace("d",s).replace("hh",Yh(l,2)).replace("h",l).replace("mm",Yh(u,2)).replace("m",u).replace("ss",Yh(h,2)).replace("s",h).replace("SSS",Yh(c,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:ro,getTextRect:function(t,e,n,i,r,o,a,s){return gr(),new ls({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),ax=Object.freeze({__proto__:null,map:O,each:P,indexOf:A,inherits:D,reduce:R,filter:N,bind:B,curry:V,isArray:F,isString:H,isObject:X,isFunction:G,extend:I,defaults:T,clone:w,merge:S}),sx=Lr();function lx(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=hx(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=H_(t);return{labels:O(e,(function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function ux(t,e){return"category"===t.type?function(t,e){var n,i,r=cx(t,"ticks"),o=X_(e),a=px(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(G(o))n=gx(t,o,!0);else if("auto"===o){var s=hx(t,t.getLabelModel());i=s.labelCategoryInterval,n=O(s.labels,(function(t){return t.tickValue}))}else n=fx(t,i=o,!0);return dx(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:O(t.scale.getTicks(),(function(t){return t.value}))}}function hx(t,e){var n,i,r=cx(t,"labels"),o=X_(e),a=px(r,o);return a||(G(o)?n=gx(t,o):(i="auto"===o?function(t){var e=sx(t).autoInterval;return null!=e?e:sx(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=fx(t,i)),dx(r,o,{labels:n,labelCategoryInterval:i}))}function cx(t,e){return sx(t)[e]||(sx(t)[e]=[])}function px(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=U_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function gx(t,e,n){var i=t.scale,r=H_(t),o=[];return P(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var yx=[0,1],vx=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Ji(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&mx(n=n.slice(),i.count()),Ui(t,yx,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&mx(n=n.slice(),i.count());var r=Ui(t,n,yx,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=O(ux(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;P(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=ji(t),e=ji(e),h?t>e:t0&&t<100||(t=5),O(this.scale.getMinorTicks(t),(function(t){return O(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return lx(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=H_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=Fn(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(v,m))),x=sx(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=w:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}(this)},t}();function mx(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function _x(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function xx(t,e,n,i,r){for(var o=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1=i&&l+1>=r){for(var u=[],h=0;h=i&&c+1>=r)return Sx(l.components);s[a]=l}else s[a]=void 0}var f;o++}for(;o<=a;){var p=c();if(p)return p}}(t,e,n)}var Ix="none",Tx=Math.round,Cx=Math.sin,Ax=Math.cos,Dx=Math.PI,Lx=2*Math.PI,kx=180/Dx,Px=1e-4;function Ox(t){return Tx(1e3*t)/1e3}function Rx(t){return Tx(1e4*t)/1e4}function Nx(t){return t-1e-4}function Ex(t,e){e&&zx(t,"transform","matrix("+Ox(e[0])+","+Ox(e[1])+","+Ox(e[2])+","+Ox(e[3])+","+Rx(e[4])+","+Rx(e[5])+")")}function zx(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function Bx(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof Ja)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==Ix}(e)){var r=e.fill;zx(t,"fill",r="transparent"===r?Ix:r),zx(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i:i)+"")}else zx(t,"fill",Ix);if(function(t){var e=t.stroke;return null!=e&&e!==Ix}(e)){var o=e.stroke;zx(t,"stroke",o="transparent"===o?Ix:o);var a=e.lineWidth,s=e.strokeNoScale?n.getLineScale():1;zx(t,"stroke-width",(s?a/s:0)+""),zx(t,"paint-order",e.strokeFirst?"stroke":"fill"),zx(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i:i)+"");var l=e.lineDash&&a>0&&py(e.lineDash,a);if(l){var u=e.lineDashOffset;s&&1!==s&&(l=O(l,(function(t){return t/s})),u&&(u=Tx(u/=s))),zx(t,"stroke-dasharray",l.join(",")),zx(t,"stroke-dashoffset",(u||0)+"")}else zx(t,"stroke-dasharray","");e.lineCap&&zx(t,"stroke-linecap",e.lineCap),e.lineJoin&&zx(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&zx(t,"stroke-miterlimit",e.miterLimit+"")}else zx(t,"stroke",Ix)}}var Vx=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,h=!s,c=Math.abs(u),p=Nx(c-Lx)||(h?u>=Lx:-u>=Lx),d=u>0?u%Lx:u%Lx+Lx,f=!1;f=!!p||!Nx(c)&&d>=Dx==!!h;var g=Rx(t+n*Ax(o)),y=Rx(e+i*Cx(o));p&&(u=h?Lx-1e-4:1e-4-Lx,f=!0,l&&this._d.push("M",g,y));var v=Rx(t+n*Ax(o+u)),m=Rx(e+i*Cx(o+u));if(isNaN(g)||isNaN(y)||isNaN(n)||isNaN(i)||isNaN(r)||isNaN(kx)||isNaN(v)||isNaN(m))return"";this._d.push("A",Rx(n),Rx(i),Tx(r*kx),+f,+h,v,m)},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doUpdate=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},t.prototype.add=function(t){return null},t.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},t.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},t.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return P(this._tagNames,(function(n){for(var i=t.getElementsByTagName(n),r=0;r-1){var s=qe(a)[3],l=Je(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[i].color);e.appendChild(o)}t.__dom=e},e.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom)}},e}(Yx);function qx(t){return t&&(!!t.image||!!t.svgElement)}var Kx=new ty,$x=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return n(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;P(["fill","stroke"],(function(i){var r=e.style[i];if(qx(r)){var o=n.getDefs(!0),a=Kx.get(r);a?o.contains(a)||n.addDom(a):a=n.add(r),n.markUsed(e);var s=a.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}}))}},e.prototype.add=function(t){if(qx(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},e.prototype.update=function(t){if(qx(t)){var e=this;this.doUpdate(t,(function(){var n=Kx.get(t);e.updateDom(t,n)}))}},e.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,r=e.getElementsByTagName("image");if(r.length){if(!t.image)return void e.removeChild(r[0]);i=r[0]}else t.image&&(i=this.createElement("image"));if(i){var o=void 0;if("string"==typeof t.image?o=t.image:t.image instanceof HTMLImageElement?o=t.image.src:t.image instanceof HTMLCanvasElement&&(o=t.image.toDataURL()),o){i.setAttribute("href",o),i.setAttribute("x","0"),i.setAttribute("y","0");var a=to(o,i,{dirty:function(){}},(function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}));a&&a.width&&a.height&&(e.setAttribute("width",a.width+""),e.setAttribute("height",a.height+"")),e.appendChild(i)}}}var s="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",s),Kx.set(t,e)},e.prototype.markUsed=function(e){e.style&&(qx(e.style.fill)&&t.prototype.markDomUsed.call(this,Kx.get(e.style.fill)),qx(e.style.stroke)&&t.prototype.markDomUsed.call(this,Kx.get(e.style.stroke)))},e}(Yx);function Jx(t){var e=t.__clipPaths;return e&&e.length>0}var Qx=function(t){function e(e,n){var i=t.call(this,e,n,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}return n(e,t),e.prototype.markAllUnused=function(){for(var e in t.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[e]);this._keyDuplicateCount={}},e.prototype._getClipPathGroup=function(t,e){if(Jx(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getDefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getAttribute("id"),r=i._dom,n.contains(r)||n.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(r),i._dom=r),this.getSvgProxy(i).brush(i);var a=this.getSvgElement(i);r.innerHTML="",r.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1))}else t&&t.setAttribute("clip-path","none")},e.prototype.markUsed=function(e){var n=this;e.__clipPaths&&P(e.__clipPaths,(function(e){e._dom&&t.prototype.markDomUsed.call(n,e._dom)}))},e.prototype.removeUnused=function(){t.prototype.removeUnused.call(this);var e={};for(var n in this._refGroups){var i=this._refGroups[n];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):e[n]=i}this._refGroups=e},e}(Yx),tb=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}return n(e,t),e.prototype._getFromPool=function(){var t=this._shadowDomPool.pop();if(!t){(t=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var e=this.createElement("feDropShadow");t.appendChild(e),this.addDom(t)}return t},e.prototype.update=function(t,e){if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(e.style)){var n=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=e._shadowDom=this._shadowDomMap[n];i||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)}else this.remove(t,e)},e.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},e.prototype.updateDom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowOffsetX||0,u=r.shadowOffsetY||0,h=r.shadowBlur,c=r.shadowColor;i.setAttribute("dx",l/a+""),i.setAttribute("dy",u/s+""),i.setAttribute("flood-color",c);var p=h/2/a+" "+h/2/s;i.setAttribute("stdDeviation",p),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),e._shadowDom=n;var d=n.getAttribute("id");t.style.filter="url(#"+d+")"}},e.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap){var n=this._shadowDomMap[e];t.push(n)}this._shadowDomMap={}}},e}(Yx);function eb(t){return parseInt(t,10)}function nb(t){return t instanceof Za?Fx:t instanceof Ja?Gx:t instanceof qa?Wx:Fx}function ib(t,e){return e&&t&&e.parentNode!==t}function rb(t,e,n){if(ib(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function ob(t,e){if(ib(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function ab(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function sb(t){return t.__svgEl}var lb=function(){function t(t,e,n,i){this.type="svg",this.refreshHover=ub("refreshHover"),this.pathToImage=ub("pathToImage"),this.configLayer=ub("configLayer"),this.root=t,this.storage=e,this._opts=n=I({},n||{});var r=_x("svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=_x("g");r.appendChild(o);var a=_x("g");r.appendChild(a),this._gradientManager=new jx(i,a),this._patternManager=new $x(i,a),this._clipPathManager=new Qx(i,a),this._shadowManager=new tb(i,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]}return t.prototype.getType=function(){return"svg"},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.getSvgRoot=function(){return this._svgRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},t.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=_x("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},t.prototype.createSVGElement=function(t){return _x(t)},t.prototype.paintOne=function(t){var e=nb(t);return e&&e.brush(t),sb(t)},t.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,r=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),r.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.resize=function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgDom;o.setAttribute("width",t+""),o.setAttribute("height",e+"")}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||eb(s[n])||eb(a.style[n]))-(eb(s[r])||0)-(eb(s[o])||0)|0},t.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},t.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},t.prototype.toDataURL=function(){this.refresh();var t=this._svgDom,e=t.outerHTML||(t.parentNode&&t.parentNode).innerHTML;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(e.replace(/>\n\r<"))},t}();function ub(t){return function(){b('In SVG mode painter not support method "'+t+'"')}}function hb(){return!1}function cb(t,e,n){var i=C(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var pb=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||Zn,"string"==typeof e?r=cb(e,n,i):X(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=hb,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=i,o}return n(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=cb("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new Rn(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new Rn(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&l.restore()};if(u)if(0===u.length)p=s.__endIndex;else for(var x=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}else b("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?gb:0),this._needsManuallyCompositing),u.__builtin__||b("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),s.__dirty&ei.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,P(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?S(n[t],e,!0):n[t]=e;for(var i=0;i0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=O(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return Fm(e,c[0])&&(p=!0,c[0]=d),Fm(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Ab(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Db="undefined"!=typeof Float32Array,Lb=Db?Float32Array:Array;function kb(t){return F(t)?Db?new Float32Array(t):t:new Lb(t)}var Pb=Math.min,Ob=Math.max;function Rb(t,e){return isNaN(t)||isNaN(e)}function Nb(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(Rb(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var _=v-u,x=m-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;Rb(w,S)&&M=i||Rb(w,S))d=v,f=m;else{T=w-u,C=S-h;var L=v-u,k=w-v,P=m-h,O=S-m,R=void 0,N=void 0;"x"===s?(R=Math.abs(L),N=Math.abs(k),d=v-R*a,f=m,A=v+R*a,D=m):"y"===s?(R=Math.abs(P),N=Math.abs(O),d=v,f=m-R*a,A=v,D=m+R*a):(R=Math.sqrt(L*L+P*P),d=v-T*a*(1-(I=(N=Math.sqrt(k*k+O*O))/(N+R))),f=m-C*a*(1-I),D=m+C*a*I,A=Pb(A=v+T*a*I,Ob(w,v)),D=Pb(D,Ob(S,m)),A=Ob(A,Pb(w,v)),f=m-(C=(D=Ob(D,Pb(S,m)))-m)*R/N,d=Pb(d=v-(T=A-v)*R/N,Ob(u,v)),f=Pb(f,Ob(h,m)),A=v+(T=v-(d=Ob(d,Pb(u,v))))*N/R,D=m+(C=m-(f=Ob(f,Pb(h,m))))*N/R)}t.bezierCurveTo(c,p,d,f,v,m),c=A,p=D}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var Eb=function(){this.smooth=0,this.smoothConstraint=!0},zb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Eb},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&Rb(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?Eo(n,u,c,d,t,s):Eo(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?Ro(i,h,p,f,_):Ro(n,u,c,d,_);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(Za),Bb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Eb),Vb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Bb},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&Rb(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return P(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Kb(t,e){return[t[2*e],t[2*e+1]]}function $b(t,e,n,i){if(Wb(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("show"),a=r.get("valueAnimation"),s=i.getData(),l={lastFrameIndex:0},u=o?function(n,i){t._endLabelOnDuring(n,i,s,l,a,r,e)}:null,h=e.getBaseAxis().isHorizontal(),c=Fb(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=l.originalX&&e.attr({x:l.originalX,y:l.originalY})}),u);if(!i.get("clip",!0)){var p=c.shape,d=Math.max(p.width,p.height);h?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,c),c}return Gb(e,n,i)}var Jb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var t=new zi,e=new Tb;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===r.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),v=!l.isEmpty(),m=l.get("origin"),_=Cb(r,a,m),x=v&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=kb(2*i),o=0;o=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),h=O(r.stops,(function(t){return{offset:0,coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}})),c=h.length,p=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var d=h[0].coord-10,f=h[c-1].coord+10,g=f-d;if(g<.001)return"transparent";P(h,(function(t){t.offset=(t.coord-d)/g})),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new uu(0,0,0,0,h,!0);return y[i]=d,y[i+"2"]=f,y}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")];d&&c.type===r.type&&I===this._step?(v&&!f?f=this._newPolygon(u,x):f&&!v&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,r,bc(C)),g.setClipPath($b(this,r,!1,t)),b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),Yb(this._stackedOnPoints,x)&&Yb(this._points,u)||(y?this._doUpdateAnimation(a,x,r,n,I,m):(I&&(u=jb(u,r,I),x&&(x=jb(x,r,I))),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:x})))):(b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,r,M),I&&(u=jb(u,r,I),x&&(x=jb(x,r,I))),d=this._newPolyline(u),v&&(f=this._newPolygon(u,x)),h||this._initOrUpdateEndLabel(t,r,bc(C)),g.setClipPath($b(this,r,!0,t)));var A=t.get(["emphasis","focus"]),D=t.get(["emphasis","blurScope"]);(d.useStyle(T(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),nl(d,t,"lineStyle"),d.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=d.style.lineWidth+1);ys(d).seriesIndex=t.seriesIndex,Js(d,A,D);var L=Zb(t.get("smooth")),k=t.get("smoothMonotone"),R=t.get("connectNulls");if(d.setShape({smooth:L,smoothMonotone:k,connectNulls:R}),f){var N=a.getCalculationInfo("stackedOnSeries"),E=0;f.useStyle(T(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),N&&(E=Zb(N.get("smooth"))),f.setShape({smooth:L,stackedOnSmooth:E,smoothMonotone:k,connectNulls:R}),nl(f,t,"areaStyle"),ys(f).seriesIndex=t.seriesIndex,Js(f,A,D)}var z=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=I,this._valueOrigin=m},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Dr(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new bb(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else yf.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Dr(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else yf.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Vs(this._polyline,t),e&&Vs(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new zb({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Vb({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,h="function"==typeof u?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _="function"==typeof u?u(o):l*m+h,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(i.get("show")){var r=t.getData(),o=this._polyline,a=this._endLabel;a||((a=this._endLabel=new ls({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var s=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(r.getLayout("points"));s>=0&&(th(o,eh(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:s,defaultText:function(t,e,n){return null!=n?xb(r,n):_b(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?d:0)*(y?-1:1),x=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=Kb(u,S[0]);s.attr({x:T[0]+_,y:T[1]+x}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(m,b))&&s.attr({x:T[0]+_,y:T[1]+x});var C=h.getRawValue(S[0]),A=h.getRawValue(S[1]);r&&(I=Br(n,p,C,A,w.t))}i.lastFrameIndex=S[0]}else{var D=1===t||i.lastFrameIndex>0?S[0]:0;T=Kb(u,D);r&&(I=h.getRawValue(D)),s.attr({x:T[0]+_,y:T[1]+x})}r&&uh(s).setLabelText(I)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=Cb(r,e,a),v=Cb(o,t,s),m=t.getLayout("points")||[],_=e.getLayout("points")||[],x=0;x3e3||s&&Ub(c,d)>3e3)return a.setShape({points:p}),void(s&&s.setShape({points:p,stackedOnPoints:d}));a.shape.__points=u.current,a.shape.points=h;var f={shape:{points:p}};u.current!==h&&(f.shape.__points=u.next),a.stopAnimation(),Ou(a,f,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),Ou(s,{shape:{stackedOnPoints:d}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],y=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;"string"==typeof r?d=tw[r]:"function"==typeof r&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,ew))}}}}}var iw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Hm(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(rf);rf.registerClass(iw);var rw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return Hm(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Th(iw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(iw),ow=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},aw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new ow},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),f=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,p*r+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveTo(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,f*r+i)),t.closePath()},e}(Za),sw=["itemStyle","borderWidth"],lw=["itemStyle","borderRadius"],uw=[0,0],hw=Math.max,cw=Math.min;var pw=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var h=t.isAnimationEnabled()?t:null,c=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();0;if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);c&&this._enableRealtimeSort(c,a,n);var p=t.get("clip",!0)||c,d=function(t,e){var n=t.getArea&&t.getArea();if(Wb(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),v=y.get("borderRadius")||0,m=[],_=this._backgroundEls,x=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(t){var e=yw[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?Wl:os)({shape:ww(e,n,t),silent:!0,z2:0})}(l,r,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",v),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),i=yw[l.type](a,e,n);if(g&&w(e),a.hasValue(e)){var s=!1;p&&(s=dw[l.type](d,i));var y=fw[l.type](t,a,e,i,r,h,u.model,!1,f);vw(y,a,e,n,i,t,r,"polar"===l.type),x?y.attr({shape:i}):c?gw(c,h,y,i,e,r,!1,!1):Ru(y,{shape:i},t,e),a.setItemGraphicEl(e,y),o.add(y),y.ignore=s}})).update((function(e,n){var i=a.getItemModel(e),S=yw[l.type](a,e,i);if(g){var M=void 0;0===_.length?M=w(n):((M=_[n]).useStyle(y.getItemStyle()),"cartesian2d"===l.type&&M.setShape("r",v),m[e]=M);var I=yw[l.type](a,e);Ou(M,{shape:ww(r,I,l)},h,e)}var T=s.getItemGraphicEl(n);if(!a.hasValue(e))return o.remove(T),void(T=null);var C=!1;p&&(C=dw[l.type](d,S))&&o.remove(T),T||(T=fw[l.type](t,a,e,S,r,h,u.model,!!T,f)),b||vw(T,a,e,i,S,t,r,"polar"===l.type),x?T.attr({shape:S}):c?gw(c,h,T,S,e,r,!0,b):Ou(T,{shape:S},t,e,null),a.setItemGraphicEl(e,T),T.ignore=C,o.add(T)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&zu(n,t,e)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new zi);S.removeAll();for(var M=0;Mo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r,animation:{duration:0}})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){zu(e,t,ys(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(yf),dw={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=hw(e.x,t.x),s=cw(e.x+e.width,r),l=hw(e.y,t.y),u=cw(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=cw(e.r,t.r),o=hw(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},fw={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new os({shape:I({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function vw(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(lw)||0),t.useStyle(l);var u=i.getShallow("cursor");if(u&&t.attr("cursor",u),!s){var h=a?r.height>0?"bottom":"top":r.width>0?"left":"right",c=eh(i);th(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:_b(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h}),hh(t.getTextContent(),c,o.getRawValue(n),(function(t){return xb(e,t)}))}var p=i.getModel(["emphasis"]);Js(t,p.get("focus"),p.get("blurScope")),nl(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",P(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var mw=function(){},_w=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new mw},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=c&&y<=p&&(l<=v?h>=l&&h<=v:h>=v&&h<=l))return a[d]}return-1}(this,t.offsetX,t.offsetY);ys(this).dataIndex=e>=0?e:null}),30,!1);function ww(t,e,n){if(Wb(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var Sw=2*Math.PI,Mw=Math.PI/180;function Iw(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,n),o=t.get("center"),a=t.get("radius");F(a)||(a=[0,a]),F(o)||(o=[o,o]);var s=Zi(r.width,n.getWidth()),l=Zi(r.height,n.getHeight()),u=Math.min(s,l),h=Zi(o[0],s)+r.x,c=Zi(o[1],l)+r.y,p=Zi(a[0],u/2),d=Zi(a[1],u/2),f=-t.get("startAngle")*Mw,g=t.get("minAngle")*Mw,y=0;e.each(i,(function(t){!isNaN(t)&&y++}));var v=e.getSum(i),m=Math.PI/(v||y)*2,_=t.get("clockwise"),x=t.get("roseType"),b=t.get("stillShowZeroSum"),w=e.getDataExtent(i);w[0]=0;var S=Sw,M=0,I=f,T=_?1:-1;if(e.setLayout({viewRect:r,r:d}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:h,cy:c,r0:p,r:x?NaN:d});else{(i="area"!==x?0===v&&b?m:t*m:Sw/y)n?a:o,h=Math.abs(l.label.y-n);if(h>u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(c)0?"right":"left":L>0?"left":"right"}var F=y.get("rotate");if(O="number"==typeof F?F*(Math.PI/180):F?L<0?-D+Math.PI:-D:0,o=!!O,p.x=I,p.y=T,p.rotation=O,p.setStyle({verticalAlign:"middle"}),R){p.setStyle({align:A});var G=p.states.select;G&&(G.x+=p.x,G.y+=p.y)}else{var H=p.getBoundingRect().clone();H.applyTransform(p.getComputedTransform());var W=(p.style.margin||0)+2.1;H.y-=W/2,H.height+=W,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new In(L,k),linePoints:C,textAlign:A,labelDistance:m,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:H})}s.setTextConfig({inside:R})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(yf);function Rw(t,e,n){e=F(e)&&{coordDimensions:e}||I({},e);var i=t.getSource(),r=Nm(i,e),o=new Pm(r,t);return o.initData(i,n),o}var Nw=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),Ew=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.useColorPaletteOnData=!0,e}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nw(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Rw(this,{coordDimensions:["value"],encodeDefaulter:V(Qc,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=Qi(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){xr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(rf);var zw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Hm(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},e}(rf),Bw=function(){},Vw=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Bw},e.prototype.buildPath=function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape,a=t.getContext?t.getContext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e}(Za),Fw=function(){function t(){this.group=new zi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t,e){this.group.removeAll();var n=new Vw({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)}))}},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new vu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new Vw,this._incremental.addDisplayable(i,!0)):((i=new Vw({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},t.prototype._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=uy(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;if(l&&t.setColor(l),!n){var u=ys(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",(function(e){u.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(u.dataIndex=n+(t.startIndex||0))}))}},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),Gw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=Qb("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Fw:new Tb,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(yf),Hw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Nc),Ww=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Or).models[0]},e.type="cartesian2dAxis",e}(Nc);L(Ww,j_);var Yw={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Xw=S({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Yw),Uw=S({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Yw),Zw={category:Xw,value:Uw,time:S({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Uw),log:T({scale:!0,logBase:10},Uw)},jw={value:1,category:1,time:1,log:1};function qw(t,e,i,r){P(jw,(function(o,a){var s=S(S({},Zw[a],!0),r,!0),l=function(t){function i(){for(var n=[],i=0;ie[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(vx);function nS(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Q(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function iS(t){return"cartesian2d"===t.get("coordinateSystem")}function rS(t){var e={xAxisModel:null,yAxisModel:null};return P(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Or).models[0];e[i]=o})),e}var oS=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Jw,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),P(n.x,(function(t){F_(t.scale,t.model)})),P(n.y,(function(t){F_(t.scale,t.model)}));var i={};P(n.x,(function(t){sS(n,"y",t,i)})),P(n.y,(function(t){sS(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=Ac(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){P(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(P(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Qm?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=H_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var uS=Math.PI,hS=function(){function t(t,e){this.group=new zi,this.opt=e,this.axisModel=t,T(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new zi({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!cS[t]},t.prototype.add=function(t){cS[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=er(e-t);return nr(o)?(r=n>0?"top":"bottom",i="center"):nr(o-uS)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),cS={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Rt(s,s,a),Rt(l,l,a));var u=I({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new tu({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});h.anid="line",n.add(h);var c=e.get(["axisLine","symbol"]),p=e.get(["axisLine","symbolSize"]),d=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof d&&(d=[d,d]),null!=c){"string"==typeof c&&(c=[c,c]),"string"!=typeof p&&"number"!=typeof p||(p=[p,p]);var f=p[0],g=p[1];P([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==c[i]&&null!=c[i]){var r=uy(c[i],-f/2,-g/2,f,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=gS(r.getTicksCoords(),e.transform,l,T(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,fS(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*uS/180),fS(s)?o=hS.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=er(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;nr(a-uS/2)?(o=l?"bottom":"top",r="center"):nr(a-1.5*uS)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*uS&&a>uS/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=Q(t.nameTruncateMaxWidth,y.maxWidth,a),_=e.get("tooltip",!0),x=e.mainType,b={componentType:x,name:r,$vars:["name"]};b[x+"Index"]=e.componentIndex;var w=new ls({x:d[0],y:d[1],rotation:o.rotation,silent:hS.isLabelSilent(e),style:nh(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(w.tooltip=_&&_.show?I({content:r,formatter:function(){return r},formatterParams:b},_):null,w.__fullText=r,w.anid="name",e.get("triggerEvent")){var S=hS.makeAxisEventDataBase(e);S.targetType="axisName",S.name=r,ys(w).eventData=S}i.add(w),w.updateTransform(),n.add(w),w.decomposeTransform()}}};function pS(t){t&&(t.ignore=!0)}function dS(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=ge([]);return _e(r,r,-t.rotation),n.applyTransform(ve([],r,t.getLocalTransform())),i.applyTransform(ve([],r,e.getLocalTransform())),n.intersect(i)}}function fS(t){return"middle"===t||"center"===t}function gS(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function mS(t){var e=_S(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=xS(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=T({color:c.color},a));var d=S(w(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:h},!1);if(s||(d.name=""),"string"==typeof l){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else"function"==typeof l&&(d.name=l(d.name,d));var g=new Sh(d,null,this.ecModel);return L(g,j_.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:S({lineStyle:{color:"#bbb"}},HS.axisLine),axisLabel:WS(HS.axisLabel,!1),axisTick:WS(HS.axisTick,!1),splitLine:WS(HS.splitLine,!0),splitArea:WS(HS.splitArea,!0),indicator:[]},e}(Nc),XS=["axisLine","axisTickLabel","axisName"],US=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;P(O(e.getIndicatorAxes(),(function(t){return new hS(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){P(XS,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=F(h)?h:[h],d=F(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,_=0;_n[0]&&isFinite(c)&&isFinite(n[0]))}else{a.getTicks().length-1>r&&(u=o(u));c=ji((h=Math.ceil(n[1]/u)*u)-u*r);a.setExtent(c,h),a.setInterval(u)}}))},t.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},t.dimensions=[],t}();function qS(t){t.registerCoordinateSystem("radar",jS),t.registerComponentModel(YS),t.registerComponentView(US)}var KS="\0_ec_interaction_mutex";function $S(t,e){return!!JS(t)[e]}function JS(t){return t[KS]||(t[KS]={})}Yv({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var QS=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=B(n._mousedownHandler,n),r=B(n._mousemoveHandler,n),o=B(n._mouseupHandler,n),a=B(n._mousewheelHandler,n),s=B(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=T(w(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return n(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(ne(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&nM("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!$S(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ee(t.event),eM(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){ne(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=nM("zoomOnMouseWheel",t,this._opt),n=nM("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;tM(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);tM(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){$S(this._zr,"globalPan")||tM(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Ft);function tM(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ee(i.event),eM(t,e,n,i,r))}function eM(t,e,n,i,r){r.isAvailableBehavior=B(nM,null,n,i),t.trigger(e,r)}function nM(t,e,n){var i=n[t];return!t||i&&(!H(i)||e.event[i+"Key"])}function iM(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function rM(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var oM={axisPointer:1,tooltip:1,brush:1};function aM(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!oM.hasOwnProperty(i.mainType)&&r&&r.model!==n}for(var sM=[126,25],lM=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],uM=0;uM=4&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=o&&null!=a&&(l=DM(s,o,a),!e.ignoreViewBox)){var c=i;(i=new zi).add(c),c.scaleX=c.scaleY=l.scale,c.x=l.x,c.y=l.y}return e.ignoreRootClip||null==o||null==a||i.setClipPath(new os({shape:{x:0,y:0,width:o,height:a}})),{root:i,width:o,height:a,viewBoxRect:s,viewBoxTransform:l}},t.prototype._parseNode=function(t,e){var n,i,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=xM[r]){var o=i.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else(i=vM[r])&&(n=i.call(this,t,e),e.add(n));if(n)for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},t.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new qa({style:{text:t.textContent},x:this._textX||0,y:this._textY||0});bM(e,r),MM(t,r,this._defs);var o=r.style,a=o.fontSize;a&&a<9&&(o.fontSize=9,r.scaleX*=a/9,r.scaleY*=a/9);var s=(o.fontSize||o.fontFamily)&&[o.fontStyle,o.fontWeight,(o.fontSize||12)+"px",o.fontFamily||"sans-serif"].join(" ");o.font=s;var l=r.getBoundingRect();return this._textX+=l.width,e.add(r),r},t.internalField=void(vM={g:function(t,e){var n=new zi;return bM(e,n),MM(t,n,this._defs),n},rect:function(t,e){var n=new os;return bM(e,n),MM(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n},circle:function(t,e){var n=new Tl;return bM(e,n),MM(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n},line:function(t,e){var n=new tu;return bM(e,n),MM(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n},ellipse:function(t,e){var n=new Al;return bM(e,n),MM(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=wM(i));var r=new ql({shape:{points:n||[]}});return bM(e,r),MM(t,r,this._defs),r},polyline:function(t,e){var n=new Za;bM(e,n),MM(t,n,this._defs);var i,r=t.getAttribute("points");return r&&(i=wM(r)),new $l({shape:{points:i||[]}})},image:function(t,e){var n=new Ja;return bM(e,n),MM(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new zi;return bM(e,a),MM(t,a,this._defs),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new zi;return bM(e,a),MM(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var n=Ml(t.getAttribute("d")||"");return bM(e,n),MM(t,n,this._defs),n}}),t}(),xM={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new uu(e,n,i,r);return function(t,e){var n=t.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset"),r=void 0;r=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o=n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:o})}n=n.nextSibling}}(t,o),o}};function bM(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),T(e.__inheritedStyle,t.__inheritedStyle))}function wM(t){for(var e=ot(t).split(mM),n=[],i=0;i0;o-=2){var a=i[o],s=void 0;switch(r=r||[1,0,0,1,0,0],i[o-1]){case"translate":s=ot(a).split(mM),me(r,r,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":s=ot(a).split(mM),xe(r,r,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":s=ot(a).split(mM),_e(r,r,parseFloat(s[0]));break;case"skew":s=ot(a).split(mM),console.warn("Skew transform is not supported yet");break;case"matrix":s=ot(a).split(mM),r[0]=parseFloat(s[0]),r[1]=parseFloat(s[1]),r[2]=parseFloat(s[2]),r[3]=parseFloat(s[3]),r[4]=parseFloat(s[4]),r[5]=parseFloat(s[5])}}e.setLocalTransform(r)}}(t,e),I(o,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};AM.lastIndex=0;for(;null!=(i=AM.exec(e));)r[i[1]]=i[2];for(var o in SM)SM.hasOwnProperty(o)&&null!=r[o]&&(n[SM[o]]=r[o]);return n}(t)),!i))for(var a in SM)if(SM.hasOwnProperty(a)){var s=t.getAttribute(a);null!=s&&(o[SM[a]]=s)}r.style=r.style||{},null!=o.fill&&(r.style.fill=TM(o.fill,n)),null!=o.stroke&&(r.style.stroke=TM(o.stroke,n)),P(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=o[t]&&(r.style[t]=parseFloat(o[t]))})),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),P(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=o[t]&&(r.style[t]=o[t])})),o.lineDash&&(r.style.lineDash=O(ot(o.lineDash).split(mM),(function(t){return parseFloat(t)}))),r.__inheritedStyle=o}var IM=/url\(\s*#(.*?)\)/;function TM(t,e){var n=e&&t&&t.match(IM);return n?e[ot(n[1])]:t}var CM=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var AM=/([^\s:;]+)\s*:\s*([^:;]+)/g;function DM(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r);return{scale:o,x:-(t.x+t.width/2)*o+e/2,y:-(t.y+t.height/2)*o+n/2}}var LM=Lr();function kM(t,e){var n,i,r,o,a=t.svgXML;try{rt(null!=(i=(n=a&&(r=a,o={ignoreViewBox:!0,ignoreRootClip:!0},(new _M).parse(r,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var s=n.width,l=n.height,u=n.viewBoxRect;if(e||(e=null==s||null==l?i.getBoundingRect():new Rn(0,0,0,0),null!=s&&(e.width=s),null!=l&&(e.height=l)),u){var h=DM(u,e.width,e.height),c=i;(i=new zi).add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return i.setClipPath(new os({shape:e.plain()})),{root:i,boundingRect:e}}var PM={geoJSON:gM,svg:{load:function(t,e){var n=LM(e).originRoot;if(n)return{root:n,boundingRect:LM(e).boundingRect};var i=kM(e);return LM(e).originRoot=i.root,LM(e).boundingRect=i.boundingRect,i},makeGraphic:function(t,e,n){var i=LM(e),r=i.rootMap||(i.rootMap=ht()),o=r.get(n);if(o)return o;var a=i.originRoot,s=i.boundingRect;return i.originRootHostKey?o=kM(e,s).root:(i.originRootHostKey=n,o=a),r.set(n,o)},removeGraphic:function(t,e,n){var i=LM(e),r=i.rootMap;r&&r.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},OM=function(t,e,n){var i,r=[],o=ht(),a=ht();return P(EM(t),(function(s){var l=PM[s.type].load(t,s,n);P(l.regions,(function(t){var n=t.name;e&&e.hasOwnProperty(n)&&(t=t.cloneShallow(n=e[n])),r.push(t),o.set(n,t),a.set(n,t.center)}));var u=l.boundingRect;u&&(i?i.union(u):i=u.clone())})),{regions:r,regionsMap:o,nameCoordMap:a,boundingRect:i||new Rn(0,0,0,0)}},RM=function(t,e){var n=EM(t),i=[];return P(n,(function(n){var r=PM[n.type].makeGraphic;r&&i.push(r(t,n,e))})),i},NM=function(t,e){P(EM(t),(function(n){var i=PM[n.type].makeGraphic;i&&i(t,n,e)}))};function EM(t){var e=lg(t)||[];return e}function zM(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}var BM=function(){function t(t){var e=new zi;this.uid=Ih("ec_map_draw"),this._controller=new QS(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new zi),e.add(this._backgroundGroup=new zi)}return t.prototype.draw=function(t,e,n,i,r){var o="geo"===t.mainType,a=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},(function(e){a||e.getHostGeoModel()!==t||(a=e.getData())}));var s=t.coordinateSystem;this._updateBackground(s);var l,u,h=this._regionsGroup,c=this.group,p=s.getTransformInfo(),d=!h.childAt(0)||r;if(d)c.transform=p.roamTransform,c.decomposeTransform(),c.dirty();else{var f=new ke;f.transform=p.roamTransform,f.decomposeTransform();var g={scaleX:f.scaleX,scaleY:f.scaleY,x:f.x,y:f.y};l=f.scaleX,u=f.scaleY,Ou(c,g,t)}h.removeAll();var y=ht(),v=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0;P(s.regions,(function(e){var i=y.get(e.name)||y.set(e.name,new zi),r=new su({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(r);var s,f=t.getRegionModel(e.name)||t,g=f.getModel("itemStyle"),m=f.getModel("emphasis"),_=m.getModel("itemStyle"),x=f.getModel(["blur","itemStyle"]),b=f.getModel(["select","itemStyle"]),w=zM(g),S=zM(_),M=zM(x),I=zM(b);if(a){s=a.indexOfName(e.name);var T=a.getItemVisual(s,"style"),C=a.getItemVisual(s,"decal");v&&T.fill&&(w.fill=T.fill),C&&(w.decal=ky(C,n))}var A=p.rawScaleX,D=p.rawScaleY,L=p.rawX,k=p.rawY,O=function(t){return[t[0]*A+L,t[1]*D+k]};P(e.geometries,(function(t){if("polygon"===t.type){for(var e=[],n=0;n=0)&&(F=t);var G=O(e.center),H=new ls({x:G[0],y:G[1],scaleX:1/c.scaleX,scaleY:1/c.scaleY,z2:10,silent:!0});th(H,eh(f),{labelFetcher:F,labelDataIndex:V,defaultText:e.name},{normal:{align:"center",verticalAlign:"middle"}}),r.setTextContent(H),r.setTextConfig({local:!0}),r.disableLabelAnimation=!0,d||Ou(H,{scaleX:1/l,scaleY:1/u},t)}if(a)a.setItemGraphicEl(s,i);else{var W=t.getRegionModel(e.name);ys(r).eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:W&&W.option||{}}}(i.__regions||(i.__regions=[])).push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Js(i,m.get("focus"),m.get("blurScope")),h.add(i)})),this._updateController(t,e,n),this._updateMapSelectHandler(t,h,n,i)},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&NM(this._mapName,this.uid),this._mapName=null,this._controllerHost=null},t.prototype._updateBackground=function(t){var e=t.map;this._mapName!==e&&P(RM(e,this.uid),(function(t){this._backgroundGroup.add(t)}),this),this._mapName=e},t.prototype._updateController=function(t,e,n){var i=t.coordinateSystem,r=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=i.getZoom(),r.enable(t.get("roam")||!1);var a=t.mainType;function s(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}r.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,iM(o,t.dx,t.dy),n.dispatchAction(I(s(),{dx:t.dx,dy:t.dy}))}),this),r.off("zoom").on("zoom",(function(t){this._mouseDownFlag=!1,rM(o,t.scale,t.originX,t.originY),n.dispatchAction(I(s(),{zoom:t.scale,originX:t.originX,originY:t.originY}));var e=this.group;this._regionsGroup.traverse((function(t){var n=t.getTextContent();n&&(n.scaleX=1/e.scaleX,n.scaleY=1/e.scaleY,n.markRedraw())}))}),this),r.setPointerChecker((function(e,r,o){return i.getViewRectAfterRoam().contain(r,o)&&!aM(e,n,t)}))},t.prototype._updateMapSelectHandler=function(t,e,n,i){var r=this;e.off("mousedown"),t.get("selectedMode")&&(e.on("mousedown",(function(){r._mouseDownFlag=!0})),e.on("click",(function(t){r._mouseDownFlag&&(r._mouseDownFlag=!1)})))},t}(),VM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!t.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id)(o=this._mapDraw)&&r.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new BM(n);r.add(o.group),o.draw(t,e,n,this,i),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,n){var i=t.originalData,r=this.group;i.each(i.mapDimension("value"),(function(e,n){if(!isNaN(e)){var o=i.getItemLayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new Tl({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var u=t.mainSeries.getData(),h=i.getName(n),c=u.indexOfName(h),p=i.getItemModel(n),d=p.getModel("label"),f=u.getItemGraphicEl(c);th(l,eh(p),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(c,n)}}}),l.disableLabelAnimation=!0,d.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(t){l.useState(t)}}r.add(l)}}}))},e.type="map",e}(yf),FM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},n}return n(e,t),e.prototype.getInitialData=function(t){for(var e=Rw(this,{coordDimensions:["value"],encodeDefaulter:V(Qc,this)}),n=ht(),i=[],r=0,o=e.count();r1?(s.width=a,s.height=a/d):(s.height=a,s.width=a*d),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=t.getBoxLayoutParams();g.aspect=d,s=Ac(g,{width:c,height:p})}this.setViewRect(s.x,s.y,s.width,s.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}L(UM,YM);var qM=new(function(){function t(){this.dimensions=UM.prototype.dimensions}return t.prototype.create=function(t,e){var n=[];t.eachComponent("geo",(function(t,i){var r=t.get("map"),o=t.get("aspectScale"),a=!0,s=lg(r);s&&s[0]&&"svg"===s[0].type?(null==o&&(o=1),a=!1):null==o&&(o=.75);var l=new UM(r+i,r,t.get("nameMap"),a);l.aspectScale=o,l.zoomLimit=t.get("scaleLimit"),n.push(l),t.coordinateSystem=l,l.model=t,l.resize=jM,l.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var i={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}})),P(i,(function(t,i){var r=O(t,(function(t){return t.get("nameMap")})),o=new UM(i,i,M(r));o.zoomLimit=Q.apply(null,O(t,(function(t){return t.get("scaleLimit")}))),n.push(o),o.resize=jM,o.aspectScale=t[0].get("aspectScale"),o.resize(t[0],e),P(t,(function(t){t.coordinateSystem=o,function(t,e){P(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(o,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n){for(var i=(t||[]).slice(),r=ht(),o=0;o=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=rI(s),o=oI(o),s&&o;){r=rI(r),a=oI(a),r.hierNode.ancestor=t;var p=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);p>0&&(sI(aI(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!rI(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!oI(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function eI(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function nI(t){return arguments.length?t:lI}function iI(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function rI(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function oI(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function aI(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function sI(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function lI(t,e){return t.parentNode===e.parentNode?1:2}var uI=function(){this.parentPoint=[],this.childPoints=[]},hI=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new uI},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Zi(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var p=1;pm.x)||(x-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),C=I*(Math.PI/180),A=y.getTextContent();A&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-x:C,origin:"center"}),A.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),L="ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;L&&(ys(n).focus=L),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new ru({shape:gI(h,c,p,r,r)})),Ou(g,{shape:gI(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),TI=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;no&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return Yd("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.type="series.tree",e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(rf);function AI(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function DI(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=nI((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=nI());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),AI(l,(function(t){y=(t.getLayout().x+d)*f,v=(t.depth-1)*g;var e=iI(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(h.getLayout().x+p+d),f=r/(c.depth-1||1),AI(l,(function(t){v=(t.getLayout().x+d)*g,y="LR"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),AI(l,(function(t){y=(t.getLayout().x+d)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function LI(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();I(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}function kI(t,e,n){if(t&&A(e,t.type)>=0){var i=n.getData().tree.root,r=t.targetNode;if("string"==typeof r&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function PI(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function OI(t,e){return A(PI(t),e)>=0}function RI(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var NI=function(){},EI=["treemapZoomToNode","treemapRender","treemapMove"];function zI(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=hp(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var BI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};VI(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Sh({itemStyle:r},this,e),a=O((i=t.levels=function(t,e){var n,i,r=_r(e.get("color")),o=_r(e.get(["aria","decal","decals"]));if(!r)return;P(t=t||[],(function(t){var e=new Sh(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e))||[],(function(t){return new Sh(t,o,e)}),this),s=TI.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=a[n.depth];return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return Yd("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=RI(i,this),n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},I(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){zI(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(rf);function VI(t){var e=0;P(t.children,(function(t){VI(t);var n=t.value;F(n)&&(n=n[0]),e+=n}));var n=t.value;F(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),F(t.value)?t.value[0]=n:t.value=n}var FI=function(){function t(t){this.group=new zi,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Dc(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Tr(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o,a,s,l,u,h,c,p,d,f=0,g=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),v=(o=e.pos,a=e.box,l=a.width,u=a.height,h=Zi(o.left,l),c=Zi(o.top,u),p=Zi(o.right,l),d=Zi(o.bottom,u),(isNaN(h)||isNaN(parseFloat(o.left)))&&(h=0),(isNaN(p)||isNaN(parseFloat(o.right)))&&(p=l),(isNaN(c)||isNaN(parseFloat(o.top)))&&(c=0),(isNaN(d)||isNaN(parseFloat(o.bottom)))&&(d=u),s=pc(s||0),{width:Math.max(p-h-s[1]-s[3],0),height:Math.max(d-c-s[0]-s[2],0)}),m=e.totalWidth,_=e.renderList,x=_.length-1;x>=0;x--){var b=_[x],w=b.node,S=b.width,M=b.text;m>v.width&&(m-=S-g,S=g,M=null);var I=new ql({shape:{points:GI(f,0,S,y,x===_.length-1,0===x)},style:T(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new ls({style:{text:M,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z:10,onclick:V(r,w)});I.disableLabelAnimation=!0,this.group.add(I),HI(I,t,w),f+=S+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function GI(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function HI(t,e,n){ys(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&RI(n,e)}}var WI=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new Rn(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];me(s,s,[-(e-=a.x),-(n-=a.y)]),xe(s,s,[t.scale,t.scale]),me(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&wc(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new FI(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(OI(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(yf);var JI=P,QI=X,tT=-1,eT=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=w(e);this.type=i,this.mappingMethod=n,this._normalizeData=cT[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(nT(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,P(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(JI(e,(function(t,e){n[t]=e})),!F(i)){var r=[];X(i)?JI(i,(function(t,e){var i=n[e];r[null!=i?i:tT]=t})):r[-1]=i,i=hT(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):nT(r,!0):(rt("linear"!==n||r.dataExtent),nT(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return B(this._normalizeData,this)},t.listVisualTypes=function(){return z(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){X(t)?P(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=F(e)?[]:X(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&JI(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(F(t))t=t.slice();else{if(!QI(t))return[];var e=[];JI(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var p=new eT(c);return dT(p).drColorMappingBy=h,p}(0,r,o,0,u,d);P(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=I({},e);if(r){var s=r.type,l="color"===s&&dT(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);gT(t,o,n,i)}}))}else s=yT(u),h.fill=s}}function yT(t){var e=vT(t,"color");if(e){var n=vT(t,"colorAlpha"),i=vT(t,"colorSaturation");return i&&(e=rn(e,null,null,i)),n&&(e=on(e,n)),e}}function vT(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function mT(t,e){var n=t.get(e);return F(n)&&n.length?{name:e,range:n}:null}var _T=Math.max,xT=Math.min,bT=Q,wT=P,ST=["itemStyle","borderWidth"],MT=["itemStyle","gapWidth"],IT=["upperLabel","show"],TT=["upperLabel","height"],CT={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Ac(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Zi(bT(s.width,l[0]),r),h=Zi(bT(s.height,l[1]),o),c=i&&i.type,p=kI(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=PI(f);if("treemapMove"!==c){var y="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,p=0,d=c.length;ptr&&(u=tr),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?_T(u*i/l,l/(u*r)):1/0}function LT(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var x=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*x+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*x,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*x+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*x,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(zi),dC=function(){function t(t){this.group=new zi,this._LineCtor=t||pC}return t.prototype.isPersistent=function(){return!0},t.prototype.updateData=function(t){var e=this,n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=fC(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=fC(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function MC(t,e){var n=[],i=Yo,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[mt(l[0]),mt(l[1])],l[2]&&l.__original.push(mt(l[2])));var c=l.__original;if(null!=l[2]){if(vt(r[0],c[0]),vt(r[1],c[2]),vt(r[2],c[1]),u&&"none"!==u){var p=jT(t.node1),d=SC(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=jT(t.node2),d=SC(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}vt(l[0],r[0]),vt(l[1],r[2]),vt(l[2],r[1])}else{if(vt(o[0],c[0]),vt(o[1],c[1]),wt(a,o[1],o[0]),At(a,a),u&&"none"!==u){p=jT(t.node1);bt(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=jT(t.node2);bt(o[1],o[1],a,-p*e)}vt(l[0],o[0]),vt(l[1],o[1])}}))}function IC(t){return"view"===t.type}var TC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new Tb,i=new dC,r=this.group;this._controller=new QS(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(IC(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):Ou(s,l,t)}MC(t.getGraph(),ZT(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p),u.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),r=t.getModel();n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",(function(){c&&(c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(e),u.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){c&&c.setUnfixed(e)})),n.setDraggable(o&&!!c),"adjacency"===r.get(["emphasis","focus"])&&(ys(n).focus=t.getAdjacentDataIndices())})),u.graph.eachEdge((function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(ys(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var d="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var n=u.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();if(d){var r=u.getItemLayout(e),o=Math.atan2(r[1]-g,r[0]-f);o<0&&(o=2*Math.PI+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof DC||(e=this._nodesMap[CC(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function PC(t,e,n,i,r){for(var o=new AC(i),a=0;a "+p)),u++)}var d,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)d=Hm(t,n);else{var g=_p.get(f),y=g&&g.dimensions||[];A(y,"value")<0&&y.concat(["value"]);var v=Nm(t,{coordDimensions:y});(d=new Pm(v,n)).initData(t)}var m=new Pm(["value"],n);return m.initData(l,s),r&&r(d,m),vI({mainData:d,struct:o,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}L(DC,kC("hostGraph","data")),L(LC,kC("hostGraph","edgeData"));var OC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Nw(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),xr(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){BT(n=this)&&(n.__curvenessList=[],n.__edgeMap={},VT(n));var a=PC(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Sh.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return P(a.edges,(function(t){!function(t,e,n,i){if(BT(n)){var r=FT(t,e,n),o=n.__edgeMap,a=o[GT(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Yd("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return tf({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=O(this.option.categories||[],(function(t){return null!=t.value?t:I({value:0},t)})),e=new Pm(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(rf),RC={type:"graphRoam",event:"graphRoam",update:"none"};var NC=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},EC=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getDefaultShape=function(){return new NC},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(Za);function zC(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var BC=2*Math.PI,VC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:Zi(n[0],e.getWidth()),cy:Zi(n[1],e.getHeight()),r:Zi(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){for(var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?aw:Wl,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=(l-s)%BC||l===s?(l-s)%BC:BC,g=s,y=0;c&&y=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(m.get("show")&&L!==x){P=(P=m.get("distance"))?P+l:l;for(var N=0;N<=b;N++){u=Math.cos(M),h=Math.sin(M);var E=new tu({shape:{x1:u*(f-P)+p,y1:h*(f-P)+d,x2:u*(f-S-P)+p,y2:h*(f-S-P)+d},silent:!0,style:A});"auto"===A.stroke&&E.setStyle({stroke:i((L+N/b)/x)}),c.add(E),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),_=+t.get("max"),x=[m,_],b=[o,a];function w(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=Zi(o.get("width"),r.r),s=Zi(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=Zi(u[0],r.r),c=Zi(u[1],r.r),p=o.get("keepAspect");return(i=l?uy(l,h-a/2,c-s,a,s,null,p):new EC({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?aw:Wl,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=_-y.get(v,t)%_),c}(g||d)&&(y.diff(h).add((function(e){if(d){var n=w(e,o);Ru(n,{rotation:-(Ui(y.get(v,e),x,b,!0)+Math.PI/2)},t),u.add(n),y.setItemGraphicEl(e,n)}if(g){var i=S(e,o),r=f.get("clip");Ru(i,{shape:{endAngle:Ui(y.get(v,e),x,b,r)}},t),u.add(i),p[e]=i}})).update((function(e,n){if(d){var i=h.getItemGraphicEl(n),r=i?i.rotation:o,a=w(e,r);a.rotation=r,Ou(a,{rotation:-(Ui(y.get(v,e),x,b,!0)+Math.PI/2)},t),u.add(a),y.setItemGraphicEl(e,a)}if(g){var s=c[n],l=S(e,s?s.shape.endAngle:o),m=f.get("clip");Ou(l,{shape:{endAngle:Ui(y.get(v,e),x,b,m)}},t),u.add(l),p[e]=l}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis");if(d){var r=y.getItemGraphicEl(t);r.useStyle(y.getItemVisual(t,"style")),r.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===r.style.fill&&r.setStyle("fill",i(Ui(y.get(v,t),x,[0,1],!0))),r.z2EmphasisLift=0,nl(r,e),Js(r,n.get("focus"),n.get("blurScope"))}if(g){var o=p[t];o.useStyle(y.getItemVisual(t,"style")),o.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),o.z2EmphasisLift=0,nl(o,e),Js(o,n.get("focus"),n.get("blurScope"))}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=uy(r,e.cx-i/2+Zi(o[0],e.r),e.cy-i/2+Zi(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new zi,c=[],p=[],d=t.isAnimationEnabled();a.diff(this._data).add((function(t){c[t]=new ls({silent:!0}),p[t]=new ls({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),f=new zi,g=i(Ui(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var v=y.get("offsetCenter"),m=r.cx+Zi(v[0],r.r),_=r.cy+Zi(v[1],r.r);(C=c[e]).attr({style:nh(y,{x:m,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:g})}),f.add(C)}var x=n.getModel("detail");if(x.get("show")){var b=x.get("offsetCenter"),w=r.cx+Zi(b[0],r.r),S=r.cy+Zi(b[1],r.r),M=Zi(x.get("width"),r.r),I=Zi(x.get("height"),r.r),T=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:g,C=p[e],A=x.get("formatter");C.attr({style:nh(x,{x:w,y:S,text:zC(o,A),width:isNaN(M)?null:M,height:isNaN(I)?null:I,align:"center",verticalAlign:"middle"},{inheritColor:T})}),hh(C,{normal:x},o,(function(t){return zC(t,A)})),d&&ch(C,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return zC(a?a.interpolatedValue:o,A)}}),f.add(C)}h.add(f)})),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(yf),FC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n.useColorPaletteOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Rw(this,["value"])},e.type="series.gauge",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(rf);var GC=["itemStyle","opacity"],HC=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new $l,a=new ls;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return n(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(GC);l=null==l?1:l,i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Ru(i,{style:{opacity:l}},r,e)):Ou(i,{style:{opacity:l},shape:{points:a.points}},r,e),nl(i,o),this._updateLabel(t,e),Js(this,s.get("focus"),s.get("blurScope"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;th(r,eh(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new In(h[0][0],h[0][1]):null},Ou(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),zg(n,Bg(a),{stroke:u})},e}(ql),WC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new HC(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){zu(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(yf),YC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.useColorPaletteOnData=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nw(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return Rw(this,{coordDimensions:["value"],encodeDefaulter:V(Qc,this)})},e.prototype._defaultLabelLine=function(t){xr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(rf);function XC(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&rA(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function rA(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var oA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&S(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){P(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];P(N(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Nc),aA=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return n(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(vx);function sA(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=uA(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=uA(s,[0,a]),r=o=uA(s,[r,o]),i=0}e[0]=uA(e[0],n),e[1]=uA(e[1],n);var l=lA(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=uA(e[i],c),u=lA(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function lA(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function uA(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var hA=P,cA=Math.min,pA=Math.max,dA=Math.floor,fA=Math.ceil,gA=ji,yA=Math.PI,vA=function(){function t(t,e,n){this.type="parallel",this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;hA(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new aA(t,G_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();hA(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),F_(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=mA(e.get("axisExpandWidth"),l),c=mA(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow");d?(t=mA(d[1]-d[0],l),d[1]=d[0]+t):(t=mA(h*(c-1),l),(d=[h*(e.get("axisExpandCenter")||dA(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[dA(gA(d[0]/h,1))+1,fA(gA(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:p,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),hA(n,(function(e,n){var o=(i.axisExpandable?xA:_A)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:yA/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];_e(h,h,u),me(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];P(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?sA(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[pA(0,o[1]*s/p-p/2)])[1]=cA(o[1],i[0]+p),i[0]=i[1]-p}return{axisExpandWindow:i,behavior:l}},t}();function mA(t,e){return cA(pA(t,e[0]),e[1])}function _A(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function xA(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)qi(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&GA(t);var l=w(s);l.brushType=rD(l.brushType,a),l.panelId=a===SA?null:a.panelId,o=t._creatingCover=OA(t,l),t._covers.push(o)}if(o){var u=sD[rD(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(tD(t,o,t._track)),i&&(RA(t,o),u.updateCommon(t,o)),NA(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&VA(t,e,n)&&GA(t)&&(r={isEnd:i,removeOnClick:!0});return r}function rD(t,e){return"auto"===t?e.defaultBrushType:t}var oD={mousedown:function(t){if(this._dragging)aD(this,t);else if(!t.target||!t.target.draggable){eD(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=VA(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=VA(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new Sh(r[a],this,e));if(i&&n)return PC(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))})).data},e.prototype.setNodePosition=function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return Yd("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return Yd("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){this.option},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(rf);function wD(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){P(t,(function(t){var e=PD(t.outEdges,kD),n=PD(t.inEdges,kD),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setLayout({depth:v?y.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)ID(s,l*=.99,a),MD(s,r,n,i,a),OD(s,l,a),MD(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";P(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),P(t,(function(t){var e=0,n=0;P(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),P(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==N(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function SD(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function MD(t,e,n,i,r){var o="vertical"===r?"x":"y";P(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function ID(t,e,n){P(t.slice().reverse(),(function(t){P(t,(function(t){if(t.outEdges.length){var i=PD(t.outEdges,TD,n)/PD(t.outEdges,kD);if(isNaN(i)){var r=t.outEdges.length;i=r?PD(t.outEdges,CD,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-LD(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-LD(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function TD(t,e){return LD(t.node2,e)*t.getValue()}function CD(t,e){return LD(t.node2,e)}function AD(t,e){return LD(t.node1,e)*t.getValue()}function DD(t,e){return LD(t.node1,e)}function LD(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function kD(t){return t.getValue()}function PD(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),P(e,(function(e){var r=new eT({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var ND=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];P(g,(function(t,e){var n;F(t)?(n=t.slice(),t.unshift(e)):F(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:h,type:am(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:am(f),dimsDef:v.slice()}];return Rw(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:V(Jc,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),ED=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(rf);L(ED,ND,!0);var zD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=FD(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?GD(s,n,i,t):n=FD(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(yf),BD=function(){},VD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return n(e,t),e.prototype.getDefaultShape=function(){return new BD},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var x=[v,_];i.push(x)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var ZD=["color","borderColor"],jD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&JD(s,a))return;var l=$D(a,n,!0);Ru(l,{shape:{points:a.ends}},t,n),QD(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&JD(s,h)?i.remove(u):(u?Ou(u,{shape:{points:h.ends}},t,a):u=$D(h),QD(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),iL(t,this.group);var e=t.get("clip",!0)?Hb(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=$D(i.getItemLayout(n));QD(o,i,n,r),o.incremental=!0,this.group.add(o)}},e.prototype._incrementalRenderLarge=function(t,e){iL(e,this.group,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(yf),qD=function(){},KD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return n(e,t),e.prototype.getDefaultShape=function(){return new qD},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Za);function $D(t,e,n){var i=t.ends;return new KD({shape:{points:n?tL(i,t):i},z2:100})}function JD(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(ZD);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var oL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return n(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(rf);function aL(t){t&&F(t.series)&&P(t.series,(function(t){X(t)&&"k"===t.type&&(t.type="candlestick")}))}L(oL,ND,!0);var sL=["itemStyle","borderColor"],lL=["itemStyle","borderColor0"],uL=["itemStyle","color"],hL=["itemStyle","color0"],cL={seriesType:"candlestick",plan:df(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?uL:hL)}function i(t,e){return e.get(t>0?sL:lL)}if(t.getData().setVisual("legendSymbol","roundRect"),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,I(e.ensureUniqueItemVisual(r,"style"),s)}}}}},pL="undefined"!=typeof Float32Array?Float32Array:Array,dL={seriesType:"candlestick",plan:df(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=Zi(tt(t.get("barMaxWidth"),r),r),a=Zi(tt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?Zi(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.mapDimension(r[0]),a=n.mapDimensionsAll(r[1]),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==o||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=new pL(4*t.count),c=0,p=[],d=[];for(;null!=(r=t.next());){var f=n.get(o,r),g=n.get(s,r),y=n.get(l,r),v=n.get(u,r),m=n.get(h,r);isNaN(f)||isNaN(v)||isNaN(m)?(a[c++]=NaN,c+=3):(a[c++]=fL(n,r,g,y,l),p[0]=f,p[1]=v,i=e.dataToPoint(p,null,d),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,p[1]=m,i=e.dataToPoint(p,null,d),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r;for(;null!=(r=t.next());){var a=n.get(o,r),c=n.get(s,r),p=n.get(l,r),d=n.get(u,r),f=n.get(h,r),g=Math.min(c,p),y=Math.max(c,p),v=w(g,a),m=w(y,a),_=w(d,a),x=w(f,a),b=[];S(b,m,0),S(b,v,1),b.push(I(x),I(m),I(_),I(v)),n.setItemLayout(r,{sign:fL(n,r,c,p,l),initBaseline:c>p?m[1]:v[1],ends:b,brushRect:M(d,f,a)})}function w(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function S(t,e,n){var r=e.slice(),o=e.slice();r[0]=ku(r[0]+i/2,1,!1),o[0]=ku(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=w(t,n),o=w(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function I(t){return t[0]=ku(t[0],1),t}}}}};function fL(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function gL(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var yL=function(t){function e(e,n){var i=t.call(this)||this,r=new bb(e,n),o=new zi;return i.add(r),i.add(o),i.updateData(e,n),i}return n(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),r=0;r<3;r++){var o=uy(e,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-r/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}gL(i,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],r=0;r0&&(a=this._getLineLength(i)/l*1e3),(a!==this._period||s!==this._loop)&&(i.stopAnimation(),a>0)){var h=void 0;h="function"==typeof u?u(n):u,i.__t>0&&(h=-a*i.__t),i.__t=0;var c=i.animate("",s).when(a,{__t:1}).delay(h).during((function(){r._updateSymbolPosition(i)}));s||c.done((function(){r.remove(i)})),c.start()}this._period=a,this._loop=s}},e.prototype._getLineLength=function(t){return Lt(t.__p1,t.__cp1)+Lt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=Go,l=Ho;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),h=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(_L),wL=function(){this.polyline=!1,this.curveness=0,this.segs=[]},SL=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new wL},e.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(n[r++],n[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*i,p=(l+h)/2-(u-s)*i;t.quadraticCurveTo(c,p,u,h)}else t.lineTo(u,h)}},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(La(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(Aa(u,h,p,d,o,t,e))return a;a++}return-1},e}(Za),ML=function(){function t(){this.group=new zi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t){this.group.removeAll();var e=new SL({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new vu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e){var n=new SL;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("style");if(r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null),!n){var o=ys(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){o.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(o.dataIndex=n+t.__startIndex)}))}},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),IL={seriesType:"lines",plan:df(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(rf);function kL(t){return t instanceof Array||(t=[t,t]),t}var PL={seriesType:"lines",reset:function(t){var e=kL(t.get("symbol")),n=kL(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=kL(n.getShallow("symbol",!0)),r=kL(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var OL=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=C();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){var I=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=I[M],_[x++]=I[M+1],_[x++]=I[M+2],_[x++]=I[M+3]*v*256}else x+=4}return c.putImageData(m,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=C()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function RL(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var NL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):RL(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(RL(r)?this.render(e,n,i):this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0))},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem;if(Wb(u,"cartesian2d")){var h=u.getAxis("x"),c=u.getAxis("y");0,o=h.getBandWidth(),a=c.getBandWidth(),s=h.scale.getExtent(),l=c.scale.getExtent()}for(var p=this.group,d=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),v=eh(t),m=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurScope"]),x=Wb(u,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],b=n;bs[1]||Il[1])continue;var T=u.dataToPoint([M,I]);w=new os({shape:{x:Math.floor(Math.round(T[0])-o/2),y:Math.floor(Math.round(T[1])-a/2),width:Math.ceil(o),height:Math.ceil(a)},style:S})}else{if(isNaN(d.get(x[1],b)))continue;w=new os({z2:1,shape:u.dataToRect([d.get(x[0],b)]).contentShape,style:S})}var C=d.getItemModel(b);if(d.hasItemOption){var A=C.getModel("emphasis");f=A.getModel("itemStyle").getItemStyle(),g=C.getModel(["blur","itemStyle"]).getItemStyle(),y=C.getModel(["select","itemStyle"]).getItemStyle(),m=A.get("focus"),_=A.get("blurScope"),v=eh(C)}var D=t.getRawValue(b),L="-";D&&null!=D[2]&&(L=D[2]+""),th(w,v,{labelFetcher:t,labelDataIndex:b,defaultOpacity:S.opacity,defaultText:L}),w.ensureState("emphasis").style=f,w.ensureState("blur").style=g,w.ensureState("select").style=y,Js(w,m,_),w.incremental=r,r&&(w.states.emphasis.hoverLayer=!0),p.add(w),d.setItemGraphicEl(b,w)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new OL;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),p=Math.min(l.width+l.x,i.getWidth()),d=Math.min(l.height+l.y,i.getHeight()),f=p-h,g=d-c,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=O(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:o<0?-1:0}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,p=l.categoryDim,d=Math.abs(n[p.wh]),f=t.getItemVisual(e,"symbolSize");h=F(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=Zi(h[p.index],d),h[c.index]=Zi(h[c.index],i?d:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(zL)||0;o&&(VL.attr({scaleX:e[0],scaleY:e[1],rotation:n}),VL.updateTransform(),o/=VL.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o}(n,c.symbolScale,l,i,c);var p=c.symbolSize,d=n.get("symbolOffset");return F(d)&&(d=[Zi(d[0],p[0]),Zi(d[1],p[1])]),function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categoryDim,d=h.valueDim,f=c.pxSign,g=Math.max(e[d.index]+s,0),y=g;if(i){var v=Math.abs(l),m=Q(t.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=Zi(m,e[d.index]),b=Math.max(g+2*x,0),w=_?0:2*x,S=cr(i),M=S?i:ik((v+w)/b);b=g+2*(x=(v-M*g)/2/(_?M:M-1)),w=_?0:2*x,S||"fixed"===i||(M=u?ik((Math.abs(u)+w)/b):0),y=M*b-w,c.repeatTimes=M,c.symbolMargin=x}var T=f*(y/2),C=c.pathPosition=[];C[p.index]=n[p.wh]/2,C[d.index]="start"===a?T:"end"===a?l-T:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var A=c.bundlePosition=[];A[p.index]=n[p.xy],A[d.index]=n[d.xy];var D=c.barRectShape=I({},n);D[d.wh]=f*Math.max(Math.abs(n[d.wh]),Math.abs(C[d.index]+T)),D[p.wh]=n[p.wh];var L=c.clipShape={};L[p.xy]=-n[p.xy],L[p.wh]=h.ecSize[p.wh],L[d.xy]=0,L[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function HL(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function WL(t){var e=t.symbolPatternSize,n=uy(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function YL(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(tk(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function XL(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?ek(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=WL(n),r.add(o),ek(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function UL(t,e,n){var i=I({},e.barRectShape),r=t.__pictorialBarRect;r?ek(r,null,{shape:i},e,n):(r=t.__pictorialBarRect=new os({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(r))}function ZL(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=I({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Ou(r,{shape:o},s,l);else{o[a.wh]=0,r=new os({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],Ku[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function jL(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=qL,n.isAnimationEnabled=KL,n}function qL(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function KL(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $L(t,e,n,i){var r=new zi,o=new zi;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?YL(r,e,n):XL(r,0,n),UL(r,n,i),ZL(r,e,n,i),r.__pictorialShapeStr=QL(t,n),r.__pictorialSymbolMeta=n,r}function JL(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];tk(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),P(o,(function(t){Nu(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function QL(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tk(t,e,n){P(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function ek(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&Ku[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function nk(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),p=o.get("scale");tk(t,(function(t){if(t instanceof Ja){var e=t.style;t.useStyle(I({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valueDim.posDesc[+(n.boundingLength>0)];th(t.__pictorialBarRect,eh(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:_b(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:d}),Js(t,h,c)}function ik(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var rk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return n(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Th(iw.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(iw);var ok=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new rm(this._layersSeries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fMath.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(v=r.r0+b,a>Math.PI/2&&(w="right")):"right"===w&&(v=r.r-b,a>Math.PI/2&&(w="left")):(v=(r.r+r.r0)/2,w="center"),d.style.align=w,d.style.verticalAlign=f(o,"verticalAlign")||"middle",d.x=v*s+r.cx,d.y=v*l+r.cy;var S=f(o,"rotate"),M=0;"radial"===S?(M=-a)<-Math.PI/2&&(M+=Math.PI):"tangential"===S?(M=Math.PI/2-a)>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI):"number"==typeof S&&(M=S*Math.PI/180),d.rotation=M})),h.dirtyStyle()},e}(Wl),hk="sunburstRootToNode",ck="sunburstHighlight";var pk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new uk(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new rm(r,i,s,s).add(h).update(h).remove(V(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new uk(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)wc(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:hk,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(yf),dk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};fk(n);var i=O(t.levels||[],(function(t){return new Sh(t,this,e)}),this),r=TI.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=RI(i,this),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){zI(this)},e.type="series.sunburst",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},e}(rf);function fk(t){var e=0;P(t.children,(function(t){fk(t);var n=t.value;F(n)&&(n=n[0]),e+=n}));var n=t.value;F(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),F(t.value)?t.value[0]=n:t.value=n}var gk=Math.PI/180;function yk(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");F(i)||(i=[0,i]),F(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=Zi(e[0],r),l=Zi(e[1],o),u=Zi(i[0],a/2),h=Zi(i[1],a/2),c=-t.get("startAngle")*gk,p=t.get("minAngle")*gk,d=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&vk(f,y);var v=0;P(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),_=Math.PI/(m||v)*2,x=f.depth>0,b=f.height-(x?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(t,e){if(t){var n=e;if(t!==d){var i=t.getValue(),r=0===m&&M?_:i*_;r1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&"string"==typeof o&&(o=$e(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),I(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}function _k(t,e){return e=e||[0,0],O(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function xk(t,e){return e=e||[0,0],O([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function bk(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function wk(t,e){return e=e||[0,0],O(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function Sk(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||dt(t,"text")))}function Mk(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},dt(a,"text")&&(o.text=a.text),dt(a,"rich")&&(o.rich=a.rich),dt(a,"textFill")&&(o.fill=a.textFill),dt(a,"textStroke")&&(o.stroke=a.textStroke),r={type:"text",style:o,silent:!0},i={};var s=dt(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),dt(a,"textPosition")&&(i.position=a.textPosition),dt(a,"textOffset")&&(i.offset=a.textOffset),dt(a,"textRotation")&&(i.rotation=a.textRotation),dt(a,"textDistance")&&(i.distance=a.textDistance)}return Ik(o,t),P(o.rich,(function(t){Ik(t,t)})),{textConfig:i,textContent:r}}function Ik(t,e){e&&(e.font=e.textFont||e.font,dt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),dt(e,"textAlign")&&(t.align=e.textAlign),dt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),dt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),dt(e,"textWidth")&&(t.width=e.textWidth),dt(e,"textHeight")&&(t.height=e.textHeight),dt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),dt(e,"textPadding")&&(t.padding=e.textPadding),dt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),dt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),dt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),dt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),dt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),dt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),dt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function Tk(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Ck(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=n.outsideFill||o),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,P(e.rich,(function(t){Ck(t,t)})),i}function Ck(t,e){e&&(dt(e,"fill")&&(t.textFill=e.fill),dt(e,"stroke")&&(t.textStroke=e.fill),dt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),dt(e,"font")&&(t.font=e.font),dt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),dt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),dt(e,"fontSize")&&(t.fontSize=e.fontSize),dt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),dt(e,"align")&&(t.textAlign=e.align),dt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),dt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),dt(e,"width")&&(t.textWidth=e.width),dt(e,"height")&&(t.textHeight=e.height),dt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),dt(e,"padding")&&(t.textPadding=e.padding),dt(e,"borderColor")&&(t.textBorderColor=e.borderColor),dt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),dt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),dt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),dt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),dt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),dt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),dt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),dt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),dt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),dt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Ak=Ca.CMD,Dk=2*Math.PI,Lk=["x","y"],kk=["width","height"],Pk=[];function Ok(t,e){return Math.abs(t-e)<1e-5}function Rk(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],u=0,h=0,c=0,p=0;function d(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function f(t,n,i,r){Ok(t,i)&&Ok(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function Nk(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=n0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),M=Math.cos(w),I=0;for(_=0;_c.width?1:0,r=kk[i],o=Lk[i],a=c[r]/e,s=c[o],l=0;li[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:B(wk,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}},fP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return Hm(this.getSource(),this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=Qk(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},e}(rf),gP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this._data,o=t.getData(),a=this.group,s=NP(t,o,e,n),l=t.__transientTransitionOpt;if(!l||null!=l.from&&null!=l.to){var u=new KP(t,l),h=l?"multiple":"oneToOne";new rm(r?r.getIndices():[],o.getIndices(),yP(r,h,l&&l.from),yP(o,h,l&&l.to),null,h).add((function(e){zP(n,null,e,s(e,i),t,a,o,null)})).remove((function(e){UP(r.getItemGraphicEl(e),t,a)})).update((function(e,l){u.reset("oneToOne");var h=r.getItemGraphicEl(l);u.findAndAddFrom(h),u.hasFrom()&&(qP(h,a),h=null),zP(n,h,e,s(e,i),t,a,o,u),u.applyMorphing()})).updateManyToOne((function(e,l){u.reset("manyToOne");for(var h=0;h=0){!s&&(s=r[t]={});var f=z(l);for(c=0;c=0){var d=t.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=r.style={});var g=z(i);for(h=0;h=p;d--)UP(e.childAt(d),r,e)}(t,e,n,i,r,s),l>=0?o.replaceAt(e,l):o.add(e),e}function VP(t,e){var n,i=Qk(t),r=e.type,o=e.shape,a=e.style;return null!=r&&r!==i.customGraphicType||"path"===r&&((n=o)&&(dt(n,"pathData")||dt(n,"d")))&&ZP(o)!==i.customPathData||"image"===r&&dt(a,"image")&&a.image!==i.customImagePath}function FP(t,e,n){var i=e?GP(t,e):t,r=e?HP(t,i,iP):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?GP(s,e):s:null;if(r&&(n.isLegacy||Sk(r,o,!!a,!!l))){n.isLegacy=!0;var u=Mk(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function GP(t,e){return e?t?t[e]:null:t}function HP(t,e,n){var i=e&&e.style;return null==i&&n===iP&&t&&(i=t.styleEmphasis),i}function WP(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function YP(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;BP(n.api,r,n.dataIndex,i,n.seriesModel,n.group,0,n.morphPreparation)}function XP(t){var e=this.context;UP(e.oldChildren[t],e.seriesModel,e.group)}function UP(t,e,n){if(t){var i=Qk(t).leaveToProps;i?Ou(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t)}}function ZP(t){return t&&(t.pathData||t.d)}function jP(t){return t&&t instanceof Za}function qP(t,e){t&&e.remove(t)}var KP=function(){function t(t,e){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=t,this._transOpt=e}return t.prototype.hasFrom=function(){return!!this._fromList.length},t.prototype.findAndAddFrom=function(t){if(t&&(Qk(t).canMorph&&this._fromList.push(t),t.isGroup))for(var e=t.childrenRef(),n=0;n=n?i-a:o;this._manyToOneForSingleTo(r,a>=i?null:a,s)}else if("oneToMany"===t)for(var l=Math.max(1,Math.floor(n/i)),u=0,h=0;u=n?n-u:l;this._oneToManyForSingleFrom(u,c,h>=i?null:h)}},t.prototype._oneToOneForSingleTo=function(t,e){var n,i=this._toList[t],r=this._toElOptionList[t],o=this._toDataIndices[t],a=this._allPropsFinalList[t],s=this._fromList[e],l=this._getOrCreateMorphConfig(o),u=l.duration;if(s&&Yk(s)){if(_P(i,a,r.style),u){var h=Xk([s],i,l,$P);this._processResultIndividuals(h,t,null)}}else{var c=u&&s&&(s!==i||(Wk(n=s)||Yk(n)))?s:null,p={};bP("shape",i,c,r,p,!1),bP("extra",i,c,r,p,!1),SP(i,c,r,p,!1),MP(i,c,r,r.style,p,!1),_P(i,a,r.style),c&&Fk(c,i,l),xP(i,o,r,this._seriesModel,p,!1)}},t.prototype._manyToOneForSingleTo=function(t,e,n){var i=this._toList[t],r=this._toElOptionList[t];_P(i,this._allPropsFinalList[t],r.style);var o=this._getOrCreateMorphConfig(this._toDataIndices[t]);if(o.duration&&null!=e){for(var a=[],s=e;sa)return!0;if(o){var s=_S(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=JP(t).pointerEl=new Ku[r.type](QP(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=JP(t).labelEl=new ls(QP(e.label));t.add(r),rO(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=JP(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=JP(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),rO(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Uu(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ee(t.event)},onmousedown:tO(this._onHandleDragMove,this,0,0),drift:tO(this._onHandleDragMove,this),ondragend:tO(this._onHandleDragEnd,this)}),i.add(r)),aO(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");F(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Tf(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){nO(this._axisPointerModel,!e&&this._moveAnimation,this._handle,oO(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(oO(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(oO(i)),JP(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function nO(t,e,n,i){iO(JP(n).lastProp,i)||(JP(n).lastProp=i,e?Ou(n,i,t):(n.stopAnimation(),n.attr(i)))}function iO(t,e){if(X(t)&&X(e)){var n=!0;return P(e,(function(e,i){n=n&&iO(t[i],e)})),!!n}return t===e}function rO(t,e){t[e.get(["label","show"])?"show":"hide"]()}function oO(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function aO(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function sO(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function lO(t,e,n,i,r){var o=uO(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=pc(a.get("padding")||0),l=a.getFont(),u=Fn(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:nh(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function uO(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:W_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};P(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),H(a)?o=a.replace("{value}",o):G(a)&&(o=a(s))}return o}function hO(t,e,n){var i=[1,0,0,1,0,0];return _e(i,i,n.rotation),me(i,i,n.position),Fu([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function cO(t,e,n,i,r,o){var a=hS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),lO(e,i,r,o,{position:hO(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function pO(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function dO(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function fO(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var gO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=yO(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=sO(i),c=vO[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}cO(e,t,nS(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=nS(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=hO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=yO(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(eO);function yO(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var vO={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:pO([e,n[0]],[e,n[1]],mO(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:dO([e-i/2,n[0]],[i,r],mO(t))}}};function mO(t){return"x"===t.dim?0:1}var _O=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Nc),xO=Lr(),bO=P;function wO(t,e,n){if(!a.node){var i=e.getZr();xO(i).records||(xO(i).records={}),function(t,e){if(xO(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);bO(xO(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}xO(t).initialized=!0,n("click",V(MO,"click")),n("mousemove",V(MO,"mousemove")),n("globalout",SO)}(i,e),(xO(i).records[t]||(xO(i).records[t]={})).handler=n}}function SO(t,e,n){t.handler("leave",null,n)}function MO(t,e,n,i){e.handler(t,n,i)}function IO(t,e){if(!a.node){var n=e.getZr();(xO(n).records||{})[t]&&(xO(n).records[t]=null)}}var TO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";wO("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){IO("axisPointer",e)},e.prototype.dispose=function(t,e){IO("axisPointer",e)},e.type="axisPointer",e}(pf);function CO(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Dr(o,t);if(null==a||a<0||F(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(O(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var AO=Lr();function DO(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||B(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){RO(r)&&(r=CO({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=RO(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||RO(r),p={},d={},f={list:[],map:{}},g={showPointer:V(kO,d),showTooltip:V(PO,f)};P(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);P(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&LO(t,a,g,!1,p)}}))}));var y={};return P(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&P(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,OO(e),OO(t)))),y[t.key]=o}}))})),P(y,(function(t,e){LO(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];P(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(RO(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=AO(i)[r]||{},a=AO(i)[r]={};P(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&P(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];P(o,(function(t,e){!a[e]&&l.push(t)})),P(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function LO(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return P(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),P(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&I(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function kO(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function PO(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=bS(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function OO(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function RO(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function NO(t){SS.registerAxisPointerClass("CartesianAxisPointer",gO),t.registerComponentModel(_O),t.registerComponentView(TO),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!F(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=yS(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},DO)}var EO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=sO(i),c=zO[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var p=[1,0,0,1,0,0];_e(p,p,s),me(p,p,[i.cx,i.cy]),l=Fu([a,-r],p);var d=e.getModel("axisLabel").get("rotate")||0,f=hS.innerTextLayout(s,d*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));lO(t,n,i,r,p)},e}(eO);var zO={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:pO(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:fO(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:fO(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},BO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},e}(Nc),VO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Or).models[0]},e.type="polarAxis",e}(Nc);L(VO,j_);var FO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleAxis",e}(VO),GO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusAxis",e}(VO),HO=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(vx);HO.prototype.dataToRadius=vx.prototype.dataToCoord,HO.prototype.radiusToData=vx.prototype.coordToData;var WO=Lr(),YO=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=Fn(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=WO(t.model),p=c.lastAutoInterval,d=c.lastTickCount;return null!=p&&null!=d&&Math.abs(p-h)<=1&&Math.abs(d-r)<=1&&p>h?h=p:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(vx);YO.prototype.dataToAngle=vx.prototype.dataToCoord,YO.prototype.angleToData=vx.prototype.coordToData;var XO=function(){function t(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new HO,this._angleAxis=new YO,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return UO(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return UO(e)===this?this.pointToData(n):null},t}();function UO(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function ZO(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();P(Z_(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),P(Z_(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),F_(i.scale,i.model),F_(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function jO(t,e){if(t.type=e.get("type"),t.scale=G_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var qO={dimensions:XO.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new XO(i+"");r.update=ZO;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");jO(o,s),jO(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=Zi(i[0],r),t.cy=Zi(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:F(l)||(l=[0,l]);var u=[Zi(l[0],s),Zi(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Or).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},KO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function $O(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function JO(t){return t.getRadiusAxis().inverse?0:1}function QO(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var tR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=O(n.getViewLabels(),(function(t){t=w(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));QO(s),QO(o),P(KO,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||eR[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(SS),eR={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=JO(n),u=l?0:1;(a=0===o[u]?new Tl({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new Xl({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[JO(n)],u=O(i,(function(t){return new tu({shape:$O(n,[l,l+s],t.coord)})}));t.add(Du(u,{style:T(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[JO(n)],h=[],c=0;cf?"left":"right",v=Math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];X(m)&&m.textStyle&&(a=new Sh(m.textStyle,l,l.ecModel))}var _=new ls({silent:hS.isLabelSilent(e),style:nh(a,{x:d[0],y:d[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(_),h){var x=hS.makeAxisEventDataBase(e);x.targetType="axisLabel",x.value=i.rawLabel,ys(_).eventData=x}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",T=x;m&&(i[s][M]||(i[s][M]={p:x,n:x}),T=i[s][M][I]);var C=void 0,A=void 0,D=void 0,L=void 0;if("radius"===c.dim){var k=c.dataToCoord(S)-x,P=o.dataToCoord(M);Math.abs(k)=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return xR(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return xR(e)===this?this.pointToData(n):null},t}();function xR(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var bR={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new _R(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Or).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:_R.prototype.dimensions},wR=["x","y"],SR=["width","height"],MR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=CR(a,1-TR(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=sO(i),c=IR[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}cO(e,t,pR(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=pR(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=hO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=TR(r),s=CR(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=CR(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(eO),IR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:pO([e,n[0]],[e,n[1]],TR(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:dO([e-i/2,n[0]],[i,r],TR(t))}}};function TR(t){return t.isHorizontal()?0:1}function CR(t,e){var n=t.getRect();return[n[wR[e]],n[wR[e]]+n[SR[e]]]}var AR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(pf);var DR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=Pc(e);t.prototype.init.apply(this,arguments),LR(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),LR(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Nc);function LR(t,e){var n,i=t.cellSize;1===(n=F(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=O([0,1],(function(t){return function(t,e){return null!=t[Ic[e][0]]||null!=t[Ic[e][1]]&&null!=t[Ic[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));kc(t,e,{type:"box",ignoreSize:r})}var kR={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},PR={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},OR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,a,i),this._renderWeekText(t,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new os({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function p(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}p(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new $l({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,P(e,(function(t,e){n=n.replace("{"+e+"}",i?gc(t):t)})),n):"function"==typeof t?t(e):e.nameMap;var n,i},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},g=this._formatterLabel(d,f),y=new ls({z2:30,style:nh(r,{text:g})});y.attr(this._yearTextPositionControl(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];H(r)&&(r=kR[r.toUpperCase()]||[]);var u="start"===a?0:1,h="horizontal"===e?0:1;o="start"===a?-o:o;for(var c="center"===s,p=0;p=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/RR)-Math.floor(n[0].time/RR)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function ER(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var zR=Lr(),BR={path:null,compoundPath:null,group:zi,image:Ja,text:ls},VR=function(t){var e=t.graphic;F(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},FR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=Sr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];P(a,(function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=I({},n),r=t[e],o=n.$action||"merge";if("merge"===o){if(r)S(r,i,!0),kc(r,i,{ignoreSize:!0}),Oc(n,r);else t[e]=i}else"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(!t)return;if(t.hv=e.hv=[YR(e,["left","right"]),YR(e,["top","bottom"])],"group"===t.type){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))}),this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){P(t,(function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Nc),GR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this._elMap=ht()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;P(e,(function(e){var r=Tr(e.id,null),o=null!=r?n.get(r):null,a=Tr(e.parentId,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=u.verticalAlign=u.align=null);var h=e.textContent,c=e.textConfig;if(u&&Sk(u,l,!!c,!!h)){var p=Mk(u,l,!0);!c&&p.textConfig&&(c=e.textConfig=p.textConfig),!h&&p.textContent&&(h=p.textContent)}var d=function(t){return t=I({},t),P(["id","parentId","$action","hv","bounding","textContent"].concat(Mc),(function(e){delete t[e]})),t}(e);var f=e.$action||"merge";"merge"===f?o?o.attr(d):HR(r,s,d,n):"replace"===f?(WR(o,n),HR(r,s,d,n)):"remove"===f&&WR(o,n);var g=n.get(r);if(g&&h)if("merge"===f){var y=g.getTextContent();y?y.attr(h):g.setTextContent(new ls(h))}else"replace"===f&&g.setTextContent(new ls(h));if(g){var v=zR(g);v.__ecGraphicWidthOption=e.width,v.__ecGraphicHeightOption=e.height,function(t,e,n){var i=ys(t).eventData;t.silent||t.ignore||i||(i=ys(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(g,t,e)}}))}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s=0;s--){var c,p,d;if(d=null!=(p=Tr((c=n[s]).id,null))?r.get(p):null){var f=d.parent;h=zR(f);Dc(d,c,f===i?{width:o,height:a}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight},null,{hv:c.hv,boundingMode:c.bounding})}}},e.prototype._clear=function(){var t=this._elMap;t.each((function(e){WR(e,t)})),this._elMap=ht()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(pf);function HR(t,e,n,i){var r=n.type;var o=dt(BR,r)?BR[r]:Iu(r);var a=new o(n);e.add(a),i.set(t,a),zR(a).__ecGraphicId=t}function WR(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){WR(t,e)})),e.removeKey(zR(t).__ecGraphicId),n.remove(t))}function YR(t,e){var n;return P(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var XR=["x","y","radius","angle","single"],UR=["cartesian2d","polar","singleAxis"];function ZR(t){return t+"Axis"}function jR(t,e){var n,i=ht(),r=[],o=ht();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function qR(t){var e=t.ecModel,n={infoList:[],infoMap:ht()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(ZR(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var KR=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),$R=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=JR(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=JR(t);S(this.option,t,!0),S(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ht();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return P(XR,(function(n){var i=this.getReferringComponents(ZR(n),Rr);if(i.specified){e=!0;var r=new KR;P(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new KR;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Or).models[0];a&&P(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Or).models[0]&&o.add(t.componentIndex)}))}}}i&&P(XR,(function(e){if(i){var r=n.findComponents({mainType:ZR(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new KR;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");P([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(ZR(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){P(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(ZR(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;P(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=ZR(this._dimName),i=e.getReferringComponents(n,Or).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return w(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];nN(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Ui(h,o,n))):(e=!0,h=Ui(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),iN(s),iN(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";sA(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Ui(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];nN(n,(function(t){!function(t,e,n){e&&P(Z_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=z_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&nN(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(n=!0),c&&(r=!0)}return a&&n&&r})):nN(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}})),nN(i,(function(t){e.setApproximateExtent(o,t)})))}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;nN(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Ui(n[0]+o,n,[0,100],!0):null!=r&&(o=Ui(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Ji(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var oN={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(ZR(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new rN(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=ht();return P(n,(function(t){P(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var aN=!1;function sN(t){aN||(aN=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,oN),function(t){t.registerAction("dataZoom",(function(t,e){P(jR(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function lN(t){t.registerComponentModel(QR),t.registerComponentView(eN),sN(t)}var uN=function(){},hN={};function cN(t,e){hN[t]=e}function pN(t){return hN[t]}var dN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;P(this.option.feature,(function(t,n){var i=pN(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),S(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}},e}(Nc);function fN(t,e){var n=pc(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new os({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var gN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a=t.get("feature")||{},s=this._features||(this._features={}),l=[];P(a,(function(t,e){l.push(e)})),new rm(this._featureNames||[],l).add(u).update(u).remove(V(u,null)).execute(),this._featureNames=l,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Ac(i,o,r);Cc(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Dc(t,i,o,r)}(r,t,n),r.add(fN(r.getBoundingRect(),t)),r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.states.emphasis;if(l&&!G(l)&&e){var u=l.style||(l.style={}),h=Fn(e,ls.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+8;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function u(u,h){var c,p=l[u],d=l[h],f=a[p],g=new Sh(f,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(f.title=i.newTitle),p&&!d){if(function(t){return 0===t.indexOf("my")}(p))c={onclick:g.option.onclick,featureName:p};else{var y=pN(p);if(!y)return;c=new y}s[p]=c}else if(!(c=s[d]))return;if(c.uid=Ih("toolbox-feature"),c.model=g,c.ecModel=e,c.api=n,c instanceof uN){if(!p&&d)return void(c.dispose&&c.dispose(e,n));if(!g.get("show")||c.unusable)return void(c.remove&&c.remove(e,n))}!function(i,a,s){var l,u,h=i.getModel("iconStyle"),c=i.getModel(["emphasis","iconStyle"]),p=a instanceof uN&&a.getIcons?a.getIcons():i.get("icon"),d=i.get("title")||{};"string"==typeof p?(l={})[s]=p:l=p;"string"==typeof d?(u={})[s]=d:u=d;var f=i.iconPaths={};P(l,(function(s,l){var p=Uu(s,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(h.getItemStyle()),p.ensureState("emphasis").style=c.getItemStyle();var d=new ls({style:{text:u[l],align:c.get("textAlign"),borderRadius:c.get("textBorderRadius"),padding:c.get("textPadding"),fill:null},ignore:!0});p.setTextContent(d);var g=t.getModel("tooltip");g&&g.get("show")&&(p.tooltip=I({content:u[l],formatter:g.get("formatter",!0)||function(){return u[l]},formatterParams:{componentType:"toolbox",name:l,title:u[l],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),p.__title=u[l],p.on("mouseover",(function(){var e=c.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";d.setStyle({fill:c.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:c.get("textBackgroundColor")}),p.setTextConfig({position:c.get("textPosition")||n}),d.ignore=!t.get("showTitle"),Hs(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",l])&&Ws(this),d.hide()})),("emphasis"===i.get(["iconStatus",l])?Hs:Ws)(p),r.add(p),p.on("click",B(a.onclick,a,e,n,l)),f[l]=p}))}(g,c,p),g.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Hs:Ws)(i[t])},c instanceof uN&&c.render&&c.render(g,e,n,i)}},e.prototype.updateView=function(t,e,n,i){P(this._features,(function(t){t instanceof uN&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){P(this._features,(function(n){n instanceof uN&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){P(this._features,(function(n){n instanceof uN&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(pf);var yN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!a.browser.newEdge&&(a.browser.ie||a.browser.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=s.split(","),u=l[0].indexOf("base64")>-1,h=r?decodeURIComponent(l[1]):l[1];u&&(h=atob(h));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var p=h.length,d=new Uint8Array(p);p--;)d[p]=h.charCodeAt(p);var f=new Blob([d]);window.navigator.msSaveOrOpenBlob(f,c)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,v=y.document;v.open("image/svg+xml","replace"),v.write(h),v.close(),y.focus(),v.execCommand("SaveAs",!0,c),document.body.removeChild(g)}}else{var m=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=s;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(uN);yN.prototype.unusable=!a.canvasSupported;var vN="__ec_magicType_stack__",mN=[["line","bar"],["stack"]],_N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return P(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(xN[n]){var o,a={series:[]};P(mN,(function(t){A(t,n)>=0&&P(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=xN[n](e,r,t,i);o&&(T(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Or).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}})),"stack"===n&&(o=S({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:a,newTitle:o,featureName:"magicType"})}},e}(uN),xN={line:function(t,e,n,i){if("bar"===t)return S({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return S({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===vN;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),S({id:e,stack:r?"":vN},i.get(["option","stack"])||{},!0)}};Yv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var bN=new Array(60).join("-"),wN="\t";function SN(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var MN=new RegExp("[\t]+","g");function IN(t,e){var n=t.split(new RegExp("\n*"+bN+"\n*","g")),i={series:[]};return P(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(wN)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=O(SN(e.shift()).split(MN),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=FN[t.brushType](0,n,e);t.__rangeOffset={offset:HN[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){P(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&P(i.coordSyses,(function(i){var r=FN[t.brushType](1,i,t.range);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){P(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=FN[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?HN[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=YN(n),o=YN(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return O(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:uD(i),isTargetByCursor:cD(i,t,n.coordSysModel),getLinearBrushOtherExtent:hD(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&A(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=EN(e,t),r=0;rt[1]&&t.reverse(),t}function EN(t,e){return Pr(t,e,{includeMainTypes:ON})}var zN={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=ht(),a={},s={};(n||i||r)&&(P(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),P(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),P(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];P(r.getCartesians(),(function(t,e){(A(n,t.getAxis("x").model)>=0||A(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:VN.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){P(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:VN.geo})}))}},BN=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],VN={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Vu(t)),e}},FN={lineX:V(GN,0),lineY:V(GN,1),rect:function(t,e,n){var i=e[PN[t]]([n[0][0],n[1][0]]),r=e[PN[t]]([n[0][1],n[1][1]]),o=[NN([i[0],r[0]]),NN([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:O(n,(function(n){var r=e[PN[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r})),xyMinMax:i}}};function GN(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=NN(O([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var HN={lineX:V(WN,0),lineY:V(WN,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return O(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function WN(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function YN(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var XN,UN,ZN=P,jN=mr+"toolbox-dataZoom_",qN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new PA(n.getZr()),this._brushController.on("brush",B(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new RN($N(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return LN(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){KN[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new RN($N(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=LN(t);AN(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=sA(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];ZN(t,(function(t,n){e.push(w(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(uN),KN={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=LN(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return AN(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function $N(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}XN="dataZoom",UN=function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=Pr(t,$N(n));return ZN(r.xAxisModels,(function(t){return o(t,"xAxis","xAxisIndex")})),ZN(r.yAxisModels,(function(t){return o(t,"yAxis","yAxisIndex")})),i}function o(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:jN+e+o};a[r]=o,i.push(a)}},rt(null==ip.get(XN)&&UN),ip.set(XN,UN);var JN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Nc);function QN(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}var tE=["-ms-","-moz-","-o-","-webkit-",""];function eE(t,e,n){var i=[],r=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),h=t.get("shadowOffsetY"),c=t.getModel("textStyle"),p=Jd(t,"html"),d=u+"px "+h+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&r&&i.push(function(t,e){var n="cubic-bezier(0.23, 1, 0.32, 1)",i="opacity "+t/2+"s "+n+",visibility "+t/2+"s "+n;return e||(i+=",left "+t+"s "+n+",top "+t+"s "+n),O(tE,(function(t){return t+"transition:"+i})).join(";")}(r,n)),o&&(a.canvasSupported?i.push("background-Color:"+o):(i.push("background-Color:#"+Je(o)),i.push("filter:alpha(opacity=70)"))),P(["width","color","radius"],(function(e){var n="border-"+e,r=cc(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))})),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var r=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return r&&o&&e.push("text-shadow:"+a+"px "+s+"px "+o+"px "+r),P(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(c)),null!=p&&i.push("padding:"+pc(p).join("px ")+"px"),i.join(";")+";"}function nE(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&function(t,e,n,i,r){Xt(Yt,e,i,r,!0)&&Xt(t,n,Yt[0],Yt[1])}(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var iE=function(){function t(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,a.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;nE(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!s._enterable){var e=r.handler;Qt(r.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=this._styleCoord,r=n.offsetHeight/2;e=bc(e),n.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+eE(t,!this._firstShow,this._longHide)+";left:"+i[0]+"px;top:"+(i[1]-r)+"px;border-color: "+e+";"+(t.get("extraCssText")||""),n.style.display=n.innerHTML?"block":"none",n.style.pointerEvents=this._enterable?"auto":"none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,r){if(null!=t){var o=this.el;if(H(r)&&"item"===n.get("trigger")&&!QN(n)&&(t+=function(t,e,n){if(!H(n)||"inside"===n)return"";e=bc(e);var i,r="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",o="",a="";return A(["left","right"],r)>-1?(o=r+":-6px;top:50%;",a="translateY(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o=r+":-6px;left:50%;",a="translateX(-50%) rotate("+("top"===r?225:45)+"deg)"),'
'}(n.get("backgroundColor"),i,r)),H(t))o.innerHTML=t;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var a=0;a=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!a.node){var r=fE(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=cE;s.x=i.x,s.y=i.y,s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=CO(i,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(fE(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===dE([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t]).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&Jg(n,(function(t){return null!=ys(t).dataIndex}),!0)?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=B(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=dE([e.tooltipOption,i]),a=this._renderMode,s=[],l=Yd("section",{blocks:[],noHeader:!0}),u=[],h=new Qd;uE(t,(function(t){uE(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var r=uO(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),o=Yd("section",{header:r,noHeader:!ot(r),sortBlocks:!0,blocks:[]});l.blocks.push(o),P(t.seriesDataIndices,(function(l){var c=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,d=c.getDataParams(p);d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=W_(e.axis,{value:i}),d.axisValueLabel=r,d.marker=h.makeTooltipMarker("item",bc(d.color),a);var f=vd(c.formatTooltip(p,!0,null));f.markupFragment&&o.blocks.push(f.markupFragment),f.markupText&&u.push(f.markupText),s.push(d)}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=Zd(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=Jg(e,(function(t){return null!=ys(t).dataIndex}),!0),r=this._ecModel,o=ys(i),a=o.seriesIndex,s=r.getSeriesByIndex(a),l=o.dataModel||s,u=o.dataIndex,h=o.dataType,c=l.getData(h),p=this._renderMode,d=dE([c.getItemModel(u),l,s&&(s.coordinateSystem||{}).model,this._tooltipModel]),f=d.get("trigger");if(null==f||"item"===f){var g=l.getDataParams(u,h),y=new Qd;g.marker=y.makeTooltipMarker("item",bc(g.color),p);var v=vd(l.formatTooltip(u,!1,h)),m=d.get("order"),_=v.markupFragment?Zd(v.markupFragment,y,p,m,r.get("useUTC"),d.get("textStyle")):v.markupText,x="item_"+l.name+"_"+u;this._showOrMove(d,(function(){this._showTooltipContent(d,_,g,x,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:u,dataIndex:c.getRawIndex(u),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=e.tooltip;if(H(i)){i={content:i,formatter:i}}var r=new Sh(i,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random()+"",s=new Qd;this._showOrMove(r,(function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e,s)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor"));if(h&&H(h)){var d=t.ecModel.get("useUTC"),f=F(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Zh(f.axisValue,c,d)),c=_c(c,n,!0)}else if(G(h)){var g=lE((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p.color,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}u.setContent(c,l,t,p.color,a),u.show(t,p.color),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),G(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),F(e))n=hE(e[0],s),i=hE(e[1],l);else if(X(e)){var d=e;d.width=u[0],d.height=u[1];var f=Ac(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(H(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=10,a=5,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-i/2,l=e.y-r-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+o+a,l=e.y+h/2-r/2}return[s,l]}(e,p,u);n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=gE(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=gE(c)?u[1]/2:"bottom"===c?u[1]:0),QN(t)){g=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&uE(e,(function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&uE(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&uE(r,(function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){a.node||(this._tooltipContent.dispose(),IO("itemTooltip",e))},e.type="tooltip",e}(pf);function dE(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof Sh&&(n=n.get("tooltip",!0)),H(n)&&(n={formatter:n}),e=new Sh(n,e,e.ecModel))}return e}function fE(t,e){return t.dispatchAction||B(e.dispatchAction,e)}function gE(t){return"center"===t||"middle"===t}var yE=["rect","polygon","keep","clear"];function vE(t,e){var n=_r(t?t.brush:[]);if(n.length){var i=[];P(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;F(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};P(t,(function(t){e[t]=1})),t.length=0,P(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,yE)}}var mE=P;function _E(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function xE(t,e,n){var i={};return mE(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);mE(t[e],(function(t,i){if(eT.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new eT(r),"opacity"===i&&((r=w(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new eT(r))}}))})),i}function bE(t,e,n){var i;P(n,(function(t){e.hasOwnProperty(t)&&_E(e[t])&&(i=!0)})),i&&P(n,(function(n){e.hasOwnProperty(n)&&_E(e[n])?t[n]=w(e[n]):delete t[n]}))}var wE={lineX:SE(0),lineY:SE(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&J_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(J_(i,r,o)||J_(i,r+a,o)||J_(i,r,o+s)||J_(i,r+a,o+s)||Rn.create(t).contain(l[0],l[1])||Zu(r,o,r+a,o,i)||Zu(r,o,r,o+s,i)||Zu(r+a,o,r+a,o+s,i)||Zu(r,o+s,r+a,o+s,i))||void 0}}};function SE(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return ME(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&OE(e)}};function OE(t){return new Rn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var RE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new PA(e.getZr())).on("brush",B(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){AE(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:w(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:w(n),$from:e})},e.type="brush",e}(pf),NE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return n(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&bE(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=O(t,(function(t){return EE(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=EE(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Nc);function EE(t,e){return S({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Sh(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var zE=["rect","polygon","lineX","lineY","keep","clear"],BE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,P(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return P(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:zE.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocale(["toolbox","brush","title"])}},e}(uN);var VE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Nc),FE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=tt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new ls({style:nh(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new ls({style:nh(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){wc(p,"_"+t.get("target"))})),d&&c.on("click",(function(){wc(d,"_"+t.get("subtarget"))})),ys(l).eventData=ys(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=Ac(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new os({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(pf);var GE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],P(n,(function(e,n){var i,o=Tr(wr(e),"");X(e)?(i=w(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new Pm([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Nc),HE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultOption=Th(GE.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(GE);L(HE,yd.prototype);var WE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(pf),YE=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(vx),XE=Math.PI,UE=Lr(),ZE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return Yd("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},P(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:XE/2},p="vertical"===s?l.height:l.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*XE/180;var _=d.get("position",!0),x=f&&d.get("showPlayBtn",!0),b=f&&d.get("showPrevBtn",!0),w=f&&d.get("showNextBtn",!0),S=0,M=p;"left"===_||"bottom"===_?(x&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(x&&(i=[M-g,0],M-=v),b&&(r=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:c[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;me(o,o,[-a,-s]),_e(o,o,-XE/2),me(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=y(r),u=y(n.getBoundingRect()),h=y(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelPosOpt;null==f||H(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Qm({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new g_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new e_}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new YE("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new zi;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new tu({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:I({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new tu({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:T({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],P(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:B(r._changeTimeline,r,t.value)},p=jE(s,l,e,c);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=h.getItemStyle(),Js(p);var d=ys(p);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],P(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),p=new ls({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:B(r._changeTimeline,r,a),silent:!1,style:nh(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=nh(u),p.ensureState("progress").style=nh(h),e.add(p),Js(p),UE(p).dataIndex=a,r._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=Yn(tt(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=Uu(t.get(["controlStyle",e]),i||{},new Rn(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{position:t,origin:[r/2,0],rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),Js(c)}}h(t.nextBtnPosition,"next",B(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",B(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",B(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=B(s._handlePointerDrag,s),t.ondragend=B(s._handlePointerDragend,s),qE(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){qE(t,s._progressLine,o,n,i)}};this._currentPointer=jE(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=qi(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var rz={min:V(iz,"min"),max:V(iz,"max"),average:V(iz,"average"),median:V(iz,"median")};function oz(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!F(e.coord)&&i){var r=i.dimensions,o=az(e,n,i,t);if((e=w(e)).type&&rz[e.type]&&o.baseAxis&&o.valueAxis){var a=A(r,o.baseAxis.dim),s=A(r,o.valueAxis.dim),l=rz[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)rz[u[h]]&&(u[h]=uz(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function az(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0&&"number"==typeof l&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[oz(t,r[0]),oz(t,r[1]),I({},r[2])];return g[2].type=g[2].type||null,S(g[2],g[0]),S(g[2],g[1]),g};function vz(t){return!isNaN(t)&&!isFinite(t)}function mz(t,e,n,i){var r=1-t,o=i.dimensions[t];return vz(e[r])&&vz(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function _z(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(mz(1,n,i,t)||mz(0,n,i,t)))return!0}return sz(t,e[0])&&sz(t,e[1])}function xz(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Zi(s.get("x"),r.getWidth()),u=Zi(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(Wb(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;vz(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):vz(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var bz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=ez.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=gz(e).from,o=gz(e).to;r.each((function(e){xz(r,e,!0,t,n),xz(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new dC);this.group.add(l.group);var u=function(t,e,n){var i;i=t?O(t&&t.dimensions,(function(t){return T({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})})):[{name:"value",type:"float"}];var r=new Pm(i,n),o=new Pm(i,n),a=new Pm([],n),s=O(n.get("data"),V(yz,e,t,n));t&&(s=N(s,V(_z,t)));var l=t?lz:function(t){return t.value};return r.initData(O(s,(function(t){return t[0]})),null,l),o.initData(O(s,(function(t){return t[1]})),null,l),a.initData(O(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;gz(e).from=h,gz(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize");function g(e,n,r){var o=e.getItemModel(n);xz(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=dg(a,"color")),e.setItemVisual(n,{symbolRotate:o.get("symbolRotate"),symbolSize:o.get("symbolSize")||f[r?0:1],symbol:o.get("symbol",!0)||d[r?0:1],style:s})}F(d)||(d=[d,d]),F(f)||(f=[f,f]),u.from.each((function(t){g(h,t,!0),g(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t,n){t.traverse((function(t){ys(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(cz);var wz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(ez),Sz=Lr(),Mz=function(t,e,n,i){var r=oz(t,i[0]),o=oz(t,i[1]),a=r.coord,s=o.coord;a[0]=Q(a[0],-1/0),a[1]=Q(a[1],-1/0),s[0]=Q(s[0],1/0),s[1]=Q(s[1],1/0);var l=M([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function Iz(t){return!isNaN(t)&&!isFinite(t)}function Tz(t,e,n,i){var r=1-t;return Iz(e[r])&&Iz(n[r])}function Cz(t,e){var n=e.coord[0],i=e.coord[1];return!!(Wb(t,"cartesian2d")&&n&&i&&(Tz(1,n,i)||Tz(0,n,i)))||(sz(t,{coord:n,x:e.x0,y:e.y0})||sz(t,{coord:i,x:e.x1,y:e.y1}))}function Az(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Zi(s.get(n[0]),r.getWidth()),u=Zi(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[d=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(Wb(a,"cartesian2d")){var c=a.getAxis("x"),p=a.getAxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);Iz(d)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):Iz(f)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Dz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Lz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=ez.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=O(Dz,(function(r){return Az(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new zi});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];t?(i=O(t&&t.dimensions,(function(t){var n=e.getData();return T({name:t},n.getDimensionInfo(n.mapDimension(t))||{})})),r=new Pm(O(o,(function(t,e){return{name:t,type:i[e%2].type}})),n)):r=new Pm(i=[{name:"value",type:"float"}],n);var a=O(n.get("data"),V(Mz,e,t,n));t&&(a=N(a,V(Cz,t)));var s=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(a,null,s),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each((function(e){var n=O(Dz,(function(n){return Az(u,e,n,t,i)})),o=!0;P(Dz,(function(t){if(o){var n=u.get(t[0],e),i=u.get(t[1],e);(Iz(n)||r.getAxis("x").containData(n))&&(Iz(i)||r.getAxis("y").containData(i))&&(o=!1)}})),u.setItemLayout(e,{points:n,allClipped:o});var s=u.getItemModel(e).getModel("itemStyle").getItemStyle(),l=dg(a,"color");s.fill||(s.fill=l,"string"==typeof s.fill&&(s.fill=on(s.fill,.4))),s.stroke||(s.stroke=l),u.setItemVisual(e,"style",s)})),u.diff(Sz(l).data).add((function(t){var e=u.getItemLayout(t);if(!e.allClipped){var n=new ql({shape:{points:e.points}});u.setItemGraphicEl(t,n),l.group.add(n)}})).update((function(t,n){var i=Sz(l).data.getItemGraphicEl(n),r=u.getItemLayout(t);r.allClipped?i&&l.group.remove(i):(i?Ou(i,{shape:{points:r.points}},e,t):i=new ql({shape:{points:r.points}}),u.setItemGraphicEl(t,i),l.group.add(i))})).remove((function(t){var e=Sz(l).data.getItemGraphicEl(t);l.group.remove(e)})).execute(),u.eachItemGraphicEl((function(t,n){var i=u.getItemModel(n),r=u.getItemVisual(n,"style");t.useStyle(u.getItemVisual(n,"style")),th(t,eh(i),{labelFetcher:e,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:"string"==typeof r.fill?on(r.fill,1):"#000"}),nl(t,i),Js(t),ys(t).dataModel=e})),Sz(l).data=u,l.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(cz);var kz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),F(e)&&P(e,(function(t,i){H(t)&&(t={type:t}),e[i]=S(t,function(t,e){return"all"===e?{type:"all",title:t.getLocale(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocale(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Nc),Pz=V,Oz=P,Rz=zi,Nz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new Rz),this.group.add(this._selectorGroup=new Rz),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=Ac(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=Ac(T({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=fN(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=ht(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),Oz(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new Rz;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("style"),g=f[d.getVisual("drawType")]||f.fill,y=f.stroke,v=f.decal,m=d.getVisual("legendSymbol")||"roundRect",_=d.getVisual("symbol");this._createItem(a,o,r,e,m,_,t,g,y,v,u).on("click",Pz(zz,a,null,i,h)).on("mouseover",Pz(Vz,p.name,null,i,h)).on("mouseout",Pz(Fz,p.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),p=s.getItemVisual(c,"style"),d=p.stroke,f=p.decal,g=p.fill,y=qe(p.fill);y&&0===y[3]&&(y[3]=.2,g=an(y,"rgba"));this._createItem(a,o,r,e,"roundRect",null,t,g,d,f,u).on("click",Pz(zz,null,a,i,h)).on("mouseover",Pz(Vz,null,a,i,h)).on("mouseout",Pz(Fz,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();Oz(t,(function(t){var i=t.type,r=new ls({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),th(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Js(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=i.get("itemWidth"),p=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),g=i.get("symbolKeepAspect"),y=i.getModel("itemStyle"),v=i.isSelected(t),m=new Rz,_=n.getModel("textStyle"),x=n.get("icon"),b=n.getModel("tooltip"),w=b.parentModel,S=uy(r=x||r,0,0,c,p,v?s:d,null==g||g);if(m.add(Ez(S,r,y,l,f,u,v)),!x&&o&&(o!==r||"none"===o)){var M=.8*p;"none"===o&&(o="circle");var T=uy(o,(c-M)/2,(p-M)/2,M,M,v?s:d,null==g||g);m.add(Ez(T,o,y,l,f,u,v))}var C="left"===a?c+5:-5,A=a,D=i.get("formatter"),L=t;"string"==typeof D&&D?L=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(L=D(t)),m.add(new ls({style:nh(_,{text:L,x:C,y:p/2,fill:v?_.getTextColor():d,align:A,verticalAlign:"middle"})}));var k=new os({shape:m.getBoundingRect(),invisible:!0});if(b.get("show")){var P={componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]};k.tooltip=I({content:t,formatter:w.get("formatter",!0)||function(t){return t.name},formatterParams:P},b.option)}return m.add(k),m.eachChild((function(t){t.silent=!0})),k.silent=!h,this.getContentGroup().add(m),Js(m),m.__legendDataIndex=e,m},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Cc(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Cc("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(pf);function Ez(t,e,n,i,r,o,a){var s;return"line"!==e&&e.indexOf("empty")<0?(s=n.getItemStyle(),t.style.stroke=i,t.style.decal=o,a||(s.stroke=r)):s=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(s),t}function zz(t,e,n,i){Fz(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),Vz(t,e,n,i)}function Bz(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-p[r]-v,0),_[o]=m[o],u.setClipPath(new os({shape:_})),u.__rectSize=_[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Ou(l,{x:x.contentPosition[0],y:x.contentPosition[1]},d?t:null),this._updatePageInfoView(t,x),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;P(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",H(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=Zz[r],a=jz[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!_(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&_(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(Nz);function Kz(t){em(Wz),t.registerComponentModel(Yz),t.registerComponentView(qz),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var $z=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=Th($R.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}($R),Jz=Lr();function Qz(t,e,n){Jz(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function tB(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function eB(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function nB(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function iB(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=Jz(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=ht());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){P(qR(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:V(nB,e),dispatchAction:V(eB,t),dataZoomInfoMap:null,controller:null},i=n.controller=new QS(t.getZr());return P(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ht())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Tf(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else tB(i,t)}))}))}var rB=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Qz(i,e,{pan:B(oB.pan,this),zoom:B(oB.zoom,this),scrollMove:B(oB.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Jz(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return sA(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:aB((function(t,e,n,i,r,o){var a=sB[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:aB((function(t,e,n,i,r,o){return sB[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function aB(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return sA(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var sB={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function lB(t){sN(t),t.registerComponentModel($z),t.registerComponentView(rB),iB(t)}var uB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Th($R.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}($R),hB=os,cB="horizontal",pB="vertical",dB=["line","bar","candlestick","scatter"],fB={easing:"cubicOut",duration:100},gB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Tf(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){var t,e,n;(n=(t=this)[e="_dispatchZoomAction"])&&n[wf]&&(t[e]=n[wf]);var i=this.api.getZr();i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new zi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===cB?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Pc(t.option);P(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Ac(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===pB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==cB||r?n===cB&&r?{scaleY:a?1:-1,scaleX:-1}:n!==pB||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new hB({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new hB({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:B(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],p=u[1]/(i.count()-1),d=0,f=Math.round(i.count()/e[0]);i.each([r],(function(t,e){if(f>0&&e%f)d+=p;else{var n=null==t||isNaN(t)||""===t,i=n?0:Ui(t,o,l,!0);n&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(h.push([d,0]),c.push([d,0])),h.push([d,i]),c.push([d,i]),d+=p,s=n}}));for(var g=this.dataZoomModel,y=0;y<3;y++){var v=m(1===y);this._displayables.sliderGroup.add(v),this._displayables.dataShadowSegs.push(v)}}}function m(t){var e=g.getModel(t?"selectedDataBackground":"dataBackground"),n=new zi,i=new ql({shape:{points:h},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new $l({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){P(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&A(dB,t.get("type"))<0)){var a,s=i.getComponent(ZR(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new hB({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new hB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),P([0,1],(function(e){var o=a.get("handleIcon");!ay[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=uy(o,-1,0,2,2,null,!0);s.attr({cursor:yB(this._orient),draggable:!0,drift:B(this._onDragMove,this,e),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Zi(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Js(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new ls({silent:!0,invisible:!0,style:{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()},z2:10}))}),this);var c=h;if(u){var p=Zi(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new os({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=uy(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new os({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:yB(this._orient),drift:B(this._onDragMove,this,"all"),ondragstart:B(this._showDataInfo,this,!0),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Ui(t[0],[0,100],e,!0),Ui(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];sA(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Ui(o.minSpan,a,r,!0):null,null!=o.maxSpan?Ui(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=qi([Ui(i[0],r,a,!0),Ui(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=qi(n.slice()),r=this._size;P([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new In(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=qi([Ui(n.x,i,r,!0),Ui(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ee(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new hB({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?fB:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=qR(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(tN);function yB(t){return"vertical"===t?"ns-resize":"ew-resize"}function vB(t){t.registerComponentModel(uB),t.registerComponentView(gB),sN(t)}var mB=function(t,e,n){var i=w((_B[t]||{})[e]);return n&&F(i)?i[i.length-1]:i},_B={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},xB=eT.mapVisual,bB=eT.eachVisual,wB=F,SB=P,MB=qi,IB=Ui,TB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;a.canvasSupported||(n.realtime=!1),!e&&bE(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=B(t,this),this.controllerVisuals=xE(this.option.controller,e,t),this.targetVisuals=xE(this.option.target,e,t)},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=_r(t),e},e.prototype.eachTargetSeries=function(t,e){P(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],F(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return H(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):G(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=MB([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimension=function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var o=i[r];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});S(i,n),S(r,n);var o=this.isCategory();function a(n){wB(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},SB(i,(function(t,e){if(eT.isValidType(e)){var n=mB(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor");SB(this.stateList,(function(r){var a=this.itemSize,s=t[r];s||(s=t[r]={color:o?i:[i]}),null==s.symbol&&(s.symbol=e&&w(e)||(o?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&w(n)||(o?a[0]:[a[0],a[0]])),s.symbol=xB(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var u=-1/0;bB(l,(function(t){t>u&&(u=t)})),s.symbolSize=xB(l,(function(t){return IB(t,[0,u],[0,a[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Nc),CB=[20,140],AB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=CB[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=CB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):F(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),P(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=qi((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=DB(this,"outOfRange",this.getExtent()),n=DB(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new zi("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();NB([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=RB(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var p=Fu(n.handleLabelPoints[l],Vu(u,this.group));o[l].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=RB(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=Fu(l.indicatorLabelPoint,Vu(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var _={x:d,y:p,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),y.animateTo(x,b)}else u.attr(_),y.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||FB(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(HB,WB),P(YB,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(ZB))}function $B(t){t.registerComponentModel(AB),t.registerComponentView(BB),KB(t)}var JB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],QB[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=w(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=O(this._pieceList,(function(t){return t=w(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=eT.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}P(e.pieces,(function(t){P(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),P(n,(function(t,n){var i=!1;P(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&P(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=mB(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,P(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;P(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=w(t)},e.prototype.getValueState=function(t){var e=eT.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimension(o),(function(e,i){eT.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return P(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Th(TB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(TB),QB={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function tV(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var eV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Q(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),P(l.viewPieceList,(function(i){var l=i.piece,u=new zi;u.onclick=B(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(c);u.add(new ls({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Cc(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:OB(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return PB(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new zi,a=this.visualMapModel.textStyleModel;o.add(new ls({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=O(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(uy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=w(n.selected),r=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[r]=!0,P(i,(function(t,e){i[e]=e===r}))):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(LB);function nV(t){t.registerComponentModel(JB),t.registerComponentView(eV),KB(t)}var iV={label:{enabled:!0},decal:{show:!1}},rV=Lr(),oV={};function aV(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=w(iV);S(i.label,t.getLocaleModel().get("aria"),!1),S(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=ht();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),rV(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if("function"!=typeof e.enableAriaDecal){var n=e.getData();if(e.useColorPaletteOnData){var i=e.getRawData(),r={},o=rV(e).scope;n.each((function(t){var e=n.getRawIndex(t);r[e]=t}));var a=i.count();i.each((function(t){var s=r[t],l=i.getName(t)||t+"",h=hp(e.ecModel,l,o,a),c=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",u(c,h))}))}else{var s=hp(e.ecModel,e.name,oV,t.getSeriesCount()),l=n.getVisual("decal");n.setVisual("decal",u(l,s))}}else e.enableAriaDecal();function u(t,e){var n=t?I(I({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=T(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var d=o.get(["general","withTitle"]);s=r(d,{title:p})}else s=o.get(["general","withoutTitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=[],p=0;p":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uV=function(){function t(t){if(null==(this._condVal=H(t)?new RegExp(t):$(t)?t:null)){var e="";0,yr(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},t}(),hV=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),cV=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;er&&(l=r-n.offsetWidth),n.style.left=l+"px",this._signal("show"),h=null,u.isOpen=!0},u.goTo=function(e){var t=this.getRow(),i=this.session.getLength()-1;switch(e){case"up":t=t<=0?i:t-1;break;case"down":t=i<=t?-1:t+1;break;case"start":t=0;break;case"end":t=i}this.setRow(t)},u.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},u.$imageSize=0,u.$borderSize=1,u},t.$singleLineEditor=c}),define("ace/autocomplete/util",["require","exports","module"],function(e,t,i){"use strict";t.parForEach=function(e,t,i){var n=0,o=e.length;0===o&&i();for(var r=0;rthis.filterText&&0===e.lastIndexOf(this.filterText,0)?this.filtered:this.all,this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var i=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=r.caption||r.value||r.snippet;if(a){var c,l=-1,h=0,p=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var u=a.toLowerCase().indexOf(o);if(-1",r.escapeHTML(e.caption),"","
",r.escapeHTML(e.snippet)].join(""))}},p=[h,a,c];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=a,t.keyWordCompleter=c,t.snippetCompleter=h;function u(e,t){f(t.session.$mode)}function d(e){var t,i=e.editor,n=i.completer&&i.completer.activated;"backspace"===e.command.name?n&&!s.getCompletionPrefix(i)&&i.completer.detach():"insertstring"===e.command.name&&s.getCompletionPrefix(i)&&!n&&((t=o.for(i)).autoInsert=!1,t.showPopup(i))}var g={name:"expandSnippet",exec:function(e){return l.expandWithTab(e)},bindKey:"Tab"},f=function(e){"string"==typeof e&&(e=n.$modes[e]),e&&(l.files||(l.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(f))},m=function(t,e){e&&t&&!l.files[t]&&(l.files[t]={},n.loadModule(e,function(e){e&&(!(l.files[t]=e).snippets&&e.snippetText&&(e.snippets=l.parseSnippetFile(e.snippetText)),l.register(e.snippets||[],e.scope),e.includeScopes&&(l.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach(function(e){f("ace/mode/"+e)})))}))},b=e("../editor").Editor;e("../config").defineOptions(b.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",d)):this.commands.removeListener("afterExec",d)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(g),this.on("changeMode",u),u(0,this)):(this.commands.removeCommand(g),this.off("changeMode",u))},value:!1}})}),window.require(["ace/ext/language_tools"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}); \ No newline at end of file diff --git a/src/static/js/lib/ext-searchbox.js b/src/static/js/lib/ext-searchbox.js new file mode 100644 index 0000000000000000000000000000000000000000..3bafdc4b6b0b9f024d4ed15e85391c5eb5bd0a3d --- /dev/null +++ b/src/static/js/lib/ext-searchbox.js @@ -0,0 +1 @@ +define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){"use strict";var s=e("../lib/dom"),n=e("../lib/lang"),a=e("../lib/event"),c='.ace_search {background-color: #ddd;color: #666;border: 1px solid #cbcbcb;border-top: 0 none;overflow: hidden;margin: 0;padding: 4px 6px 0 4px;position: absolute;top: 0;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {margin: 0 20px 4px 0;overflow: hidden;line-height: 1.9;}.ace_replace_form {margin-right: 0;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {border-radius: 3px 0 0 3px;background-color: white;color: black;border: 1px solid #cbcbcb;border-right: 0 none;outline: 0;padding: 0;font-size: inherit;margin: 0;line-height: inherit;padding: 0 6px;min-width: 17em;vertical-align: top;min-height: 1.8em;box-sizing: content-box;}.ace_searchbtn {border: 1px solid #cbcbcb;line-height: inherit;display: inline-block;padding: 0 6px;background: #fff;border-right: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;margin: 0;position: relative;color: #666;}.ace_searchbtn:last-child {border-radius: 0 3px 3px 0;border-right: 1px solid #cbcbcb;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn:hover {background-color: #eef1f6;}.ace_searchbtn.prev, .ace_searchbtn.next {padding: 0px 0.7em}.ace_searchbtn.prev:after, .ace_searchbtn.next:after {content: "";border: solid 2px #888;width: 0.5em;height: 0.5em;border-width: 2px 0 0 2px;display:inline-block;transform: rotate(-45deg);}.ace_searchbtn.next:after {border-width: 0 2px 2px 0 ;}.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;font: 16px/16px Arial;padding: 0;height: 14px;width: 14px;top: 9px;right: 7px;position: absolute;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;box-sizing: border-box!important;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;clear: both;}.ace_search_counter {float: left;font-family: arial;padding: 0 8px;}',o=e("../keyboard/hash_handler").HashHandler,r=e("../lib/keys");s.importCssString(c,"ace_searchbox");function h(e,t,i){var n=s.createElement("div");s.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:"Search for",spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},"All"]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:"Replace with",spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},"Replace"],["span",{action:"replaceAll",class:"ace_searchbtn"},"All"]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:"Toggle Replace mode",style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:"RegExp Search"},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:"CaseSensitive Search"},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:"Whole Word Search"},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:"Search In Selection"},"S"]]],n),this.element=n.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e),s.importCssString(c,"ace_searchbox",e.container)}(function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var c=this;a.addListener(e,"mousedown",function(e){setTimeout(function(){c.activeInput.focus()},0),a.stopPropagation(e)}),a.addListener(e,"click",function(e){var t=(e.target||e.srcElement).getAttribute("action");t&&c[t]?c[t]():c.$searchBarKb.commands[t]&&c.$searchBarKb.commands[t].exec(c),a.stopPropagation(e)}),a.addCommandKeyListener(e,function(e,t,i){var n=r.keyCodeToString(i),s=c.$searchBarKb.findKeyCommand(t,n);s&&s.exec&&(s.exec(c),a.stopEvent(e))}),this.$onChange=n.delayedCall(function(){c.find(!1,!1)}),a.addListener(this.searchInput,"input",function(){c.$onChange.schedule(20)}),a.addListener(this.searchInput,"focus",function(){c.activeInput=c.searchInput,c.searchInput.value&&c.highlight()}),a.addListener(this.replaceInput,"focus",function(){c.activeInput=c.replaceInput,c.searchInput.value&&c.highlight()})},this.$closeSearchBarKb=new o([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new o,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.editor.getReadOnly()||(e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus())},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),this.setSearchRange=function(e){(this.searchRange=e)?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){s.setCssClass(this.replaceOption,"checked",this.searchRange),s.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",s.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),s.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),s.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var t=this.editor.getReadOnly();this.replaceOption.style.display=t?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!t?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,i){var n=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:i,range:this.searchRange})&&this.searchInput.value;s.setCssClass(this.searchBox,"ace_nomatch",n),this.editor._emit("findSearchBox",{match:!n}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,i=0,n=0;if(t){var s=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),c=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(c-=e.session.doc.positionToIndex(this.searchRange.start));for(var a,o=t.lastIndex=0;(a=t.exec(s))&&(i++,(o=a.index)<=c&&n++,!(999=s.length))););}this.searchCounter.textContent=n+" of "+(999=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw r}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1;)i=i.replace(" ".concat(r," ")," ");a!==(c=i.trim())&&t.setAttribute("class",c)}return this},removeDom:function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},padLeft:function(t,e){var n="00000".concat(t);return n.substr(n.length-e)},hasClass:function(t,e){var n;return n=" ".concat(e," "),1===t.nodeType&&" ".concat(u(t)," ").replace(s," ").indexOf(n)>-1},initParam:function(t,e,n){if(this.isArray(n)&&this.isObject(t)&&this.isObject(t)){var i,a=r(n);try{for(a.s();!(i=a.n()).done;){var o=i.value;e[o]&&(t[o]=e[o])}}catch(t){a.e(t)}finally{a.f()}}return t},toggleValue:function(t,e){if(!this.isArray(t))return[e];var n=this.extend([],t),i=t.filter((function(t){return t==e}));return i.length>0?n.splice(t.indexOf(i[0]),1):n.push(e),n},toggleValueByKey:function(t,e,n){if(this.isArray(t)){var i=t.findIndex((function(t){return t[e]===n.key}));-1!=i?t.splice(i,1):t.push(n)}},getArray:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",i=[],a=r(t);try{for(a.s();!(e=a.n()).done;){var o=e.value;i.push(o[n])}}catch(t){a.e(t)}finally{a.f()}return i},numList:function(t,e,n){for(var i=[],a=t;a').concat(t,""),event:{close:i},timeout:e,parent:u};return(c=r.default.extend({},o,c,!0)).timeout<1&&(c.hasCloseIcon=!0),(0,a.default)(c)}function d(t,e,n){return r.default.isObject(t)?c(t.text,t.timeout,t.type||"info",t.onClose):c(t,e,"info",n)}d.info=function(t,e,n){return c(t,e,"info",n)},d.success=function(t,e,n){return c(t,e,"success",n)},d.warn=function(t,e,n){return c(t,e,"warn",n)},d.error=function(t,e,n){return c(t,e,"error",n)},d.loading=function(t,e,n){return c(t,e,"loading",n)},d.config=function(t){null!=t.timeout&&(o.timeout=t.timeout)};var f=d;e.default=f},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(254)),r=i(n(255)),o=i(n(2)),s=(0,i(n(256)).default)(),l=a.default,u={zh:a.default,en:r.default},c=null,d={},f=null,h=function(){if((f=this.$i18n||f)&&f.locale){var t;if(!d[f.locale]||c!=f.locale){d[f.locale]=!0;var e=f.getLocaleMessage(f.locale)||{},n={};o.default.extend(!0,n,u[f.locale],e),l=n,f.setLocaleMessage(f.locale,n),c=f.locale}return(t=f).t.apply(t,arguments)}},p={use:function(t){l=t||l},t:function(t,e){var n=h.apply(this,arguments);if(null!=n)return n;for(var i=t.split("."),a=l,r=0,o=i.length;r
',innerSelector:".h-dropdown-inner",preventOverflow:!0,type:"dropdown",delay:0,offset:"0, 1"},f=function(t){(0,r.default)(n,t);var e=c(n);function n(t,i){return(0,a.default)(this,n),(i=u.default.extend({},d,{},i)).container||(i.getContainer=function(t){for(var e=t||document.body;e&&"BODY"!=e.tagName&&"HTML"!=e.tagName&&!u.default.hasClass(e,"h-dropdown-common-container");)e=e.parentNode;return e}),e.call(this,t,i)}return n}(l.default);e.default=f},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n')),r.type===h&&r.hasMask&&(d+='
')),d+='
'),r.hasCloseIcon&&(d+='')),r.title&&(d+='
').concat(r.title,"
")),d+='
'),r.hasFooter=o.default.isArray(r.buttons)&&r.buttons.length>0&&!r.component,r.hasFooter){var p,v="",m=c(r.buttons);try{for(m.s();!(p=m.n()).done;){var y=p.value,g="",b="",w="";"cancel"==y?(g=y.name||s.default.t("h.common.cancel"),b=y):"ok"==y?(g=y.name||s.default.t("h.common.confirm"),b="ok",w="primary"):o.default.isObject(y)&&(b=y.type,g=y.name,w=y.color),w&&(w="h-btn-".concat(w)),v+='")}}catch(t){m.e(t)}finally{m.f()}d+='
').concat(v,"
")}r.type===h&&(d+="
"),d+="
";var _=document.createElement("div");o.default.addClass(_,"h-notify"),r.hasMask?o.default.addClass(_,"h-notify-has-mask"):o.default.addClass(_,"h-notify-no-mask"),r.class&&o.default.addClass(_,r.class),r.className&&o.default.addClass(_,r.className),_.innerHTML=d;var k=this.$content=_.querySelector(".".concat("h-notify-content")),x=this.$container=_.querySelector(".".concat("h-notify-container"));this.$body=_;var O=r.content;if(1===O.nodeType)k.appendChild(O);else if(o.default.isFunction(O)){var C=O.call(this);k.innerHTML=C}else k.innerHTML=O;var S=u.default||window.Vue;if(null!=r.component&&S&&(this.vue=new S({el:k,i18n:r.$i18n,router:r.$router,store:r.$store,render:function(t){for(var e=this,n=Object.keys(r.events||{}),i={event:this.trigger,close:this.close},a=function(){var t=s[o];if(i[t])return"continue";i[t]=function(){for(var n=arguments.length,i=new Array(n),a=0;a1?e-1:0),a=1;afooter>button")));try{for(A.s();!(D=A.n()).done;){D.value.onclick=function(t){var e=t.target.getAttribute("attr");e&&("cancel"==e&&i.close(),i.trigger(e))}}}catch(t){A.e(t)}finally{A.f()}}if(window.setTimeout((function(){if(o.default.addClass(_,"h-notify-show"),r.hasMask){var t=document.documentElement,e=window.innerWidth-t.clientWidth;t.style.overflow="hidden",t.style.paddingRight="".concat(e,"px")}}),20),r.events&&o.default.isFunction(r.events.$init)&&r.events.$init.call(null,i,k),r.timeout&&(_.addEventListener("mouseover",(function(){n.mouseOver=!0})),_.addEventListener("mouseleave",(function(){n.mouseOver=!1,n.closeTimeout&&i.close()})),window.setTimeout((function(){n.closeTimeout=!0,n.mouseOver||i.close()}),r.timeout)),r.closeOnMask&&r.hasMask){_.querySelector(".".concat("h-notify-mask")).onclick=function(){n.close()};var P=_.querySelector(".".concat("h-notify-body"));P&&(P.onclick=function(t){t.target==P&&n.close()})}this.popstateEvent=function(){n.close()},window.addEventListener("popstate",this.popstateEvent)}return(0,r.default)(t,[{key:"trigger",value:function(t){var e=this.param;if(e.events&&o.default.isFunction(e.events[t])){for(var n,i=arguments.length,a=new Array(i>1?i-1:0),r=1;r=e?t:(e-=t.length,(n+=Array(e+1).join(n)).slice(0,e)+String(t))},parse:function(t,e){if(l.isString(e)){var n={Y:0,M:1,D:1,H:0,m:0,S:0};return e.replace(/([^YyMDdHhmsS]*?)(([YyMDdHhmsS])\3*)([^YyMDdHhmsS]*?)/g,(function(e,i,a,r,o,s,l){var u=parseInt(t.substr(s+i.length,a.length),10);return"m"==r.toLowerCase()?n[r]=u:n[r.toUpperCase()]=u,""})),n.M--,l.initDateWithArray([n.Y,n.M,n.D,n.H,n.m,n.S])}var i,a=/^(\d{4,})\-(\d{2})\-(\d{2})\s?\:?(\d{2})?\:?(\d{2})?\:?(\d{2})?$/i.exec(t);if(null!==a)return a.shift(),l.padMonth(a),l.popUndefined(a),l.initDateWithArray(a);if("Invalid Date"==(i=new Date(t)))throw new Error("Invalid date parse from "+t);return i},popUndefined:function(t){return 0=i.height+this.cFixedOffsetTop+this.cFixedOffsetBottom?(this.isFixed=!0,this.isAbsolute=!1,this.fixPosition="top"):a.top>this.cFixedOffsetTop-this.offsetTop||a.heightthis.offsetTop&&(this.isFixed=!1),this.isFixed&&null!=this.offsetBottom&&"bottom"==this.fixPosition&&window.innerHeight>r.top+e.clientHeight+this.offsetBottom&&(this.isFixed=!1)}}else{var o=e.getBoundingClientRect();void 0!==this.offsetTop&&o.top300?t.show=!0:t.show=!1})),t.$el.addEventListener("webkitAnimationEnd",(function(){t.$el.style.display=t.show?"block":"none"}))}))},methods:{backtop:function(){if(!this.timeout){var t=this.target();t&&this.scrollTop(t,(t.scrollHeight-t.offsetHeight)/10),this.$emit("backtop")}},scrollTop:function(t,e){var n=this;this.timeout=setTimeout((function(){t.scrollTop>e?(t.scrollTop-=e,n.scrollTop(t,.9*e)):(t.scrollTop=0,n.timeout=null)}),5)}},computed:{backtopCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-backtop"),!0),(0,a.default)(t,"".concat("h-backtop","-show"),this.show),(0,a.default)(t,this.className,!!this.className),t},backtopStyle:function(){return{bottom:"".concat(this.bottom,"px"),right:"".concat(this.right,"px")}}}};e.default=r},function(t,e,n){"use strict";n.r(e);var i=n(24),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r={position:["right","left"]},o={name:"hBadge",props:{count:{type:Number,default:0},maxCount:{type:Number,default:100},showZero:{type:Boolean,default:!1},dot:{type:Boolean,default:!1},position:{type:String,validator:function(t){return-1!=r.position.indexOf(t)}}},data:function(){return{}},methods:{},computed:{showCount:function(){return this.dot?"":this.count>this.maxCount?"".concat(this.maxCount,"+"):this.count},badgeCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-badge"),!0),(0,a.default)(t,"".concat("h-badge","-position-right"),"right"==this.position),t},badgeCountCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-badge","-count"),!0),(0,a.default)(t,"".concat("h-badge","-count-show"),this.count>0||this.showZero),(0,a.default)(t,"".concat("h-badge","-count-dot"),this.dot),t}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(26),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hBreadcrumb",props:{datas:{Array:Array,default:function(){return{}}},separator:{type:String,default:"/"},selfControl:{type:Boolean,default:!1}},data:function(){return{}},mounted:function(){},methods:{trigger:function(t){!this.selfControl&&t.route&&this.$router&&this.$router.push(t.route),this.$emit("click",t)}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(28),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(4)),r=i(n(2)),o=i(n(7)),s={name:"hCheckbox",mixins:[i(n(5)).default],model:{prop:"checkStatus",event:"input"},props:{dict:String,datas:[Object,Array],disabled:{type:Boolean,default:!1},value:[Object,Number,String],checked:{type:Boolean},checkStatus:[Array,Boolean,Object,Number,String],indeterminate:{type:Boolean,default:!1},keyName:{type:String,default:function(){return a.default.getOption("dict","keyName")}},titleName:{type:String,default:function(){return a.default.getOption("dict","titleName")}},limit:Number,trueValue:{default:!0},falseValue:{default:!1}},data:function(){return{isChecked:null,key:this.keyName,title:this.titleName}},mounted:function(){this.updateChecked()},watch:{checked:function(){this.updateChecked()},checkStatus:function(){this.updateChecked()}},methods:{updateChecked:function(){this.isSingle&&(r.default.isNull(this.value)?!0===this.checked?this.isChecked=this.checked:this.checkStatus===this.trueValue?this.isChecked=!0:(this.checkStatus,this.falseValue,this.isChecked=!1):this.isChecked=-1!=this.checkList.indexOf(this.value))},setvalue:function(t){if(!(this.disabled||t&&t.disabled)){var e=null;if(this.isSingle)e=r.default.isNull(this.value)?r.default.isNull(this.checkStatus)&&!0===this.checked?this.checked:this.isChecked?this.falseValue:this.trueValue:r.default.toggleValue(this.checkList,this.value);else{e=r.default.copy(this.checkStatus);var n=t[this.key];if(e=r.default.toggleValue(e,n),this.limit&&this.limit-1}},computed:{checkList:function(){var t=this.checkStatus||[];return r.default.isNull(this.value)&&this.isSingle||r.default.isArray(t)||console.warn("[HeyUI WARNING] Checkbox Component: It's not allowed to use v-model with non-array value."),r.default.isArray(t)?t:[]},isSingle:function(){return 0==this.arr.length},arr:function(){if(!this.datas&&!this.dict)return[];var t=this.datas;return this.dict&&(t=a.default.getDict(this.dict)),a.default.initOptions(t,this)}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(30),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hCircle",props:{color:{type:String,default:"#3B91FF"},percent:{type:Number,default:0},strokeWidth:{type:Number,default:12},size:{type:Number,default:120}},data:function(){return{}},computed:{circleStyle:function(){return{height:"".concat(this.circleSize,"px")}},circleSize:function(){return this.size+this.strokeWidth/2},radius:function(){return this.circleSize-this.strokeWidth/2},pathString:function(){return"M ".concat(this.circleSize,",").concat(this.circleSize," m 0,-").concat(this.radius,"\n a ").concat(this.radius,",").concat(this.radius," 0 1 1 0,").concat(2*this.radius,"\n a ").concat(this.radius,",").concat(this.radius," 0 1 1 0,-").concat(2*this.radius)},len:function(){return 2*Math.PI*this.radius},pathStyle:function(){return{"stroke-dasharray":"".concat(this.len,"px ").concat(this.len,"px"),"stroke-dashoffset":"".concat((100-Math.min(this.percent,100))/100*this.len,"px"),transition:"stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease"}}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(32),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(6)),o=i(n(4)),s=i(n(2)),l=i(n(267)),u=i(n(5)),c=i(n(155));function d(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0){var e,n=d(this.value);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push(this.getValue(i))}}catch(t){n.e(t)}finally{n.f()}}this.objects=t}else this.object=this.getValue(this.value)},getValue:function(t){return s.default.isNull(t)?null:"key"==this.type?this.categoryObj[t]:s.default.getValue(t,this.param)},dispose:function(){var t=this;return this.multiple?this.objects.map((function(e){return"key"==t.type?e.key:e.value})).filter((function(t){return void 0!==t})):this.object?"key"==this.type?this.object.key:this.object.value:null},setvalue:function(){var t=this.dispose();this.$emit("input",t),this.$emit("change",s.default.copy(this.multiple?this.objects:this.object));var e=document.createEvent("CustomEvent");e.initCustomEvent("setvalue",!0,!0,t),this.$el.dispatchEvent(e)},initCategoryDatas:function(){var t=this,e=[];if(s.default.isArray(this.param.datas)?e=this.param.datas:s.default.isFunction(this.param.datas)&&(e=this.param.datas.apply(this.param)),s.default.isFunction(this.param.getTotalDatas)||s.default.isFunction(this.param.getDatas)){e=[],this.globalloading=!0;var n=this.param.getTotalDatas||this.param.getDatas,i=[function(e){t.categoryDatas=t.initDatas(s.default.copy(e)),t.parse(),t.globalloading=!1,t.$emit("loadDataSuccess")},function(){t.globalloading=!1}];this.param.getDatas&&i.unshift(null),n.apply(this.param,i)}this.categoryDatas=this.initDatas(e),this.parse()},initDatas:function(t){var e=s.default.copy(t);"list"==this.param.dataMode&&t.length>0&&(e=s.default.generateTree(e,this.param));var n=s.default.isFunction(this.param.getDatas);return this.initTreeModeData(e,null,n)},initTreeModeData:function(t,e,n){var i,a=[],r=d(t);try{for(r.s();!(i=r.n()).done;){var o=i.value,s={key:o[this.param.keyName],title:o[this.param.titleName],value:o,parentKey:e,status:{loading:!1,isWait:n,opened:!1,selected:!1,checkable:!1!==o.checkable}},l=o[this.param.childrenName]||[];s[this.param.childrenName]=this.initTreeModeData(l,s.key),this.categoryObj[s.key]=s,a.push(s)}}catch(t){r.e(t)}finally{r.f()}return a}},computed:{showPlaceholder:function(){return this.placeholder||this.t("h.category.placeholder")},param:function(){return this.config?s.default.extend({},o.default.getOption("category.default"),o.default.getOption("category.configs.".concat(this.config)),this.option):s.default.extend({},o.default.getOption("category.default"),this.option)},categoryCls:function(){var t;return t={},(0,a.default)(t,"".concat(h),!0),(0,a.default)(t,"".concat(h,"-input-border"),!0),(0,a.default)(t,"".concat(h,"-no-autosize"),!0),(0,a.default)(t,"".concat(h,"-multiple"),this.multiple),(0,a.default)(t,"".concat(h,"-disabled"),this.disabled),t}}};e.default=p},function(t,e,n){"use strict";n.r(e);var i=n(34),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=i(n(5)),o=i(n(7)),s=i(n(15)),l=i(n(11)),u={name:"hCategoryModal",mixins:[r.default],components:{Search:s.default,Checkbox:l.default},props:{param:Object},data:function(){return{params:this.param.param,list:this.param.categoryDatas,searchText:"",tabs:[{title:this.t("h.categoryModal.total"),key:"-------"}],tab:"-------",tabIndex:0}},mounted:function(){},methods:{isChecked:function(t){return this.param.multiple?this.param.objects.some((function(e){return e.key==t.key})):!!this.param.object&&this.param.object.key==t.key},change:function(t,e){if(e&&(e.stopPropagation(),e.preventDefault()),!1!==t.status.checkable)if(this.param.multiple){if(this.param.objects.length>=this.param.limit&&!this.param.objects.some((function(e){return e.key===t.key})))return void o.default.error(this.t("h.categoryModal.limitWords",{size:this.param.limit}));a.default.toggleValueByKey(this.param.objects,"key",t)}else this.param.object=t},openNew:function(t){var e=this;t.children&&t.children.length?(this.tabIndex=this.tabIndex+1,this.tabs.splice(this.tabIndex),this.tabs.push(t),this.tab=t.key,this.list=t.children):t.status.isWait?this.$emit("event","load",{data:t,callback:function(){e.openNew(t)}}):this.change(t)},remove:function(t){this.param.objects.splice(this.param.objects.indexOf(t),1)},focusTab:function(t,e){this.tab=t.key,this.tabIndex=e,"-------"===t.key?this.list=this.param.categoryDatas:this.list=t.children},confirm:function(){this.$emit("event","setvalue",this.param),this.close()},close:function(){this.$emit("close")}},computed:{cancelWord:function(){return this.t("h.common.cancel")},confirmWord:function(){return this.t("h.common.confirm")},showEmptyContent:function(){return this.t("h.categoryModal.emptyContent")},searchlist:function(){var t=[];for(var e in this.param.categoryObj){var n=this.param.categoryObj[e];n.status.checkable&&-1!=n.title.indexOf(this.searchText)&&t.push(n)}return t}}};e.default=u},function(t,e,n){"use strict";n.r(e);var i=n(36),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(5)),o="h-search",s={name:"hSearch",mixins:[r.default],props:{position:{type:String,default:"end"},placeholder:{type:String},block:{type:Boolean,default:!1},triggerType:{type:String,default:"enter"},value:String,showSearchButton:{type:Boolean,default:!1},searchText:{type:String},height:Number,width:Number},data:function(){return{inputValue:this.value}},watch:{value:function(){this.inputValue=this.value}},methods:{search:function(t){t=null===t?"":t,this.inputValue=t,this.$emit("input",t),this.$emit("onsearch",t.trim()),this.$emit("search",t.trim()),this.$emit("change",t.trim())},inputTrigger:function(t){"input"==this.triggerType?this.search(t):this.$emit("input",t)}},computed:{showPlaceholder:function(){return this.placeholder||this.t("h.search.placeholder")},widthStyles:function(){var t={};return this.width&&(t.width="".concat(this.width,"px")),t},heightStyles:function(){var t={};return this.height&&(t.height="".concat(this.height,"px")),t},cls:function(){var t;return t={},(0,a.default)(t,"".concat(o),!0),(0,a.default)(t,"".concat(o,"-block"),this.block),(0,a.default)(t,"".concat(o,"-searching"),""!==this.value&&null!==this.value&&void 0!==this.value),(0,a.default)(t,"".concat(o,"-has-button"),this.showSearchButton),(0,a.default)(t,"".concat(o,"-").concat(this.position),!0),t}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(38),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(10)),o=i(n(6)),s=i(n(4)),l=i(n(2)),u=i(n(9)),c=i(n(5)),d=i(n(7)),f=i(n(11));function h(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0){var e,n=h(this.value);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push(this.getValue(i))}}catch(t){n.e(t)}finally{n.f()}}this.objects=t,this.object=null}else this.object=this.getValue(this.value),this.objects=[]},getValue:function(t){return l.default.isNull(t)?null:"key"==this.type?this.categoryObj[t]:l.default.getValue(t,this.param)},getShow:function(t){return this.showAllLevels?(t=this.categoryObj[t.key]||t,this.getParentTitle(t).reverse().join("/")):t.title},getParentTitle:function(t){var e=[t.title];return null!=t.parentKey&&this.categoryObj[t.parentKey]&&e.push.apply(e,(0,o.default)(this.getParentTitle(this.categoryObj[t.parentKey]))),e},getFullData:function(){if(this.multiple){var t,e=[],n=h(this.objects);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=this.categoryObj[i.key]||this.object;e.push(this.getParent(a))}}catch(t){n.e(t)}finally{n.f()}return e}if(this.object){var r=this.categoryObj[this.object.key]||this.object;return this.getParent(r)}return null},getParent:function(t){var e=[l.default.copy(t.value)];return null!=t.parentKey&&this.categoryObj[t.parentKey]&&e.push.apply(e,(0,o.default)(this.getParent(this.categoryObj[t.parentKey]))),e},dispose:function(){var t=this;return this.multiple?this.objects.map((function(e){return"key"==t.type?e.key:e.value})).filter((function(t){return void 0!==t})).map((function(e){return"key"==t.type?e:t.getDisposeValue(e)})):this.object?"key"==this.type?this.object.key:this.getDisposeValue(this.object.value):null},getDisposeValue:function(t){var e=(0,r.default)({},t);return delete e[this.param.childrenName],e},setvalue:function(t){var e=this.dispose();this.$emit("input",e),this.$emit("change",l.default.copy(this.multiple?this.objects:this.object)),"clear"!=t&&(this.valueBak=e);var n=document.createEvent("CustomEvent");n.initCustomEvent("setvalue",!0,!0,e),this.$el.dispatchEvent(n),this.dropdownUpdate()},initCategoryDatas:function(){var t=this,e=[];if(l.default.isArray(this.param.datas)?e=this.param.datas:l.default.isFunction(this.param.datas)&&(e=this.param.datas.apply(this.param)),l.default.isFunction(this.param.getTotalDatas)||l.default.isFunction(this.param.getDatas)){e=[],this.globalloading=!0;var n=this.param.getTotalDatas||this.param.getDatas,i=[function(e){t.initDatas(l.default.copy(e)),t.globalloading=!1,t.$emit("loadDataSuccess")},function(){t.globalloading=!1}];this.param.getDatas&&i.unshift(null),n.apply(this.param,i)}this.initDatas(e)},initDatas:function(t){var e=l.default.copy(t);"list"==this.param.dataMode&&t.length>0&&(e=l.default.generateTree(e,this.param));var n=l.default.isFunction(this.param.getDatas);this.categoryDatas=this.initTreeModeData(e,null,n,0),this.list=this.categoryDatas,this.parse()},initTreeModeData:function(t,e,n,i){var a,r=[],o=h(t);try{for(o.s();!(a=o.n()).done;){var s=a.value,l={key:s[this.param.keyName],title:s[this.param.titleName],value:s,parentKey:e,status:{level:i,loading:!1,isWait:n,opened:!1,selected:!1,selectable:this.param.selectable?this.param.selectable(s,i):!1!==s.selectable,checkable:this.param.checkable?this.param.checkable(s,i):!1!==s.checkable}},u=s[this.param.childrenName]||[];l.children=this.initTreeModeData(u,l.key,n,i+1),this.categoryObj[l.key]=l,r.push(l)}}catch(t){o.e(t)}finally{o.f()}return r},openNew:function(t,e){var n=this;e&&(e.stopPropagation(),e.preventDefault()),t.children&&t.children.length?(this.tabIndex=this.tabIndex+1,this.tabs.splice(this.tabIndex),this.tabs.push(t),this.tab=t.key,this.list=t.children,this.multiple||this.change(t),this.dropdownUpdate()):t.status.isWait?(t.status.loading=!0,this.param.getDatas.call(this.param,t.value,(function(e){t.children=n.initTreeModeData(e,t.key,!0,t.status.level+1),t.status.isWait=!1,t.status.loading=!1,t.status.opened=!0,n.openNew(t)}),(function(){t.status.loading=!1}))):this.change(t)},focusTab:function(t,e){this.tab=t.key,this.tabIndex=e,"-------"===t.key?this.list=this.categoryDatas:this.list=t.children},change:function(t,e){if(e&&(e.stopPropagation(),e.preventDefault()),(this.multiple||!1!==t.status.selectable)&&(!this.multiple||!1!==t.status.checkable)){if(this.multiple){if(this.objects.length>=this.limit&&!this.param.objects.some((function(e){return e.key===t.key})))return void d.default.error(this.t("h.categoryPicker.limitWords",{size:this.limit}));l.default.toggleValueByKey(this.objects,"key",t)}else this.object=t;this.multiple?this.dropdownUpdate():t.children&&t.children.length||this.dropdown.hide(),this.setvalue("picker")}},dropdownUpdate:function(){var t=this;this.$nextTick((function(){t.dropdown.update()}))},isChecked:function(t){return this.multiple?this.objects.some((function(e){return e.key==t.key})):!!this.object&&this.object.key==t.key}},computed:{showPlaceholder:function(){return this.placeholder||this.t("h.categoryPicker.placeholder")},param:function(){return this.config?l.default.extend({},s.default.getOption("categoryPicker.default"),s.default.getOption("categoryPicker.configs.".concat(this.config)),this.option):l.default.extend({},s.default.getOption("categoryPicker.default"),this.option)},categoryCls:function(){var t;return t={},(0,a.default)(t,"".concat(v),!0),(0,a.default)(t,"".concat(v,"-input-border"),!0),(0,a.default)(t,"".concat(v,"-no-autosize"),!0),(0,a.default)(t,"".concat(v,"-multiple"),this.multiple),(0,a.default)(t,"".concat(v,"-disabled"),this.disabled),t},groupCls:function(){var t;return t={},(0,a.default)(t,"".concat(v,"-group"),!0),(0,a.default)(t,"".concat(v,"-multiple"),this.multiple),(0,a.default)(t,"".concat(this.className,"-dropdown"),!!this.className),t}}};e.default=m},function(t,e,n){"use strict";n.r(e);var i=n(40),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(16)),o=i(n(4)),s=i(n(2)),l=i(n(9)),u=i(n(156)),c=i(n(5));function d(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n.h-datetime-show")),i=t.$el.querySelector(".h-date-picker");t.dropdown=new l.default(n,{trigger:"click",triggerOnce:!0,content:i,disabled:t.disabled,placement:t.placement,events:{show:function(){e.isShow=!0,e.$nextTick((function(){e.parse(e.value),e.$refs.datebase.resetView(),e.nowDate&&(e.nowView=(0,r.default)(e.nowDate))}))}}}),t.disabled&&t.dropdown.disabled()}}))},methods:{setShortcutValue:function(t){var e=t.value.call(null);this.parse(e),this.setvalue(this.nowDate),this.hide()},clear:function(){this.$emit("clear"),this.setvalue(""),this.hide()},confirm:function(){this.$emit("confirm"),this.hide()},updateView:function(t){var e=this;this.nowView=(0,r.default)(t),this.$nextTick((function(){e.updateDropdown()}))},updateDropdown:function(){this.dropdown&&this.dropdown.update()},inputEvent:function(t){var e=t.target.value;try{(0,r.default)(e)}catch(t){return}this.setvalue(e)},changeEvent:function(t){var e=t.target.value;if(this.parse(e),this.nowDate&&s.default.isObject(this.option)&&"time"!=this.type){var n=!1,i=(0,r.default)(this.nowDate),a=p[this.type];this.option.start&&i.distance(this.option.start,a)<0&&(n=this.option.start),this.option.end&&!n&&i.distance(this.option.end,a)>0&&(n=this.option.end),this.option.disabled&&this.option.disabled.call(null,n||i)&&(n=""),!1!==n&&this.parse(n)}this.setvalue(this.nowDate)},parse:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(""!=t&&!s.default.isNull(t))try{return this.nowView=(0,r.default)(t,this.nowFormat),this.nowDate=this.nowView.format("k"),void(e&&("week"==this.type?this.showDate=this.t("h.date.show.weekInput",{year:this.nowView.year(),week:this.nowView.getWeekOfYear(this.startWeek)}):"quarter"==this.type?this.showDate=this.t("h.date.show.quarter",{year:this.nowView.year(),quarter:Math.ceil(this.nowView.month()/3)}):this.showDate=this.nowView.format(this.nowFormat)))}catch(t){}this.nowView=(0,r.default)(),this.nowDate="",e&&(this.showDate="")},hide:function(){this.dropdown&&this.dropdown.hide()},setvalue:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t;""!=t&&(n=(0,r.default)(t).format(this.nowFormat)),this.$emit("input",n),this.$emit("change",n);var i=document.createEvent("CustomEvent");i.initCustomEvent("setvalue",!0,!0,n),this.$el.dispatchEvent(i),e&&this.hide(),this.updateDropdown()}},computed:{showPlaceholder:function(){return this.placeholder||this.t("h.datepicker.placeholder")},nowFormat:function(){var t=this.format;return t||(t=v.format[this.type],"datetime"==this.type&&this.hasSeconds&&(t=v.format.datetimesecond)),t},hasConfirm:function(){return"datetime"==this.type||"datehour"==this.type||this.hasButtons},shortcuts:function(){var t=[],e=null;if(this.option&&this.option.shortcuts&&(e=this.option.shortcuts),s.default.isArray(e)){var n,i=d(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;s.default.isString(a)?t.push(v.shortcuts[a]):s.default.isObject(a)&&t.push(a)}}catch(t){i.e(t)}finally{i.f()}}return t},dateCls:function(){var t;return t={},(0,a.default)(t,"".concat(h),!this.inline),(0,a.default)(t,"".concat(h,"-inline"),this.inline),(0,a.default)(t,"".concat(h,"-input-border"),!this.noBorder),(0,a.default)(t,"".concat(h,"-disabled"),this.disabled),t},datePickerCls:function(){return(0,a.default)({},"".concat(h,"-has-shortcut"),this.shortcuts.length>0)}},components:{dateBase:u.default}};e.default=m},function(t,e,n){"use strict";n.r(e);var i=n(42),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(6)),r=i(n(3)),o=i(n(16)),s=i(n(4)),l=i(n(2)),u=i(n(5));function c(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0),a.option.disabled&&!s&&(s=a.option.disabled.call(null,e)));var u=e.distance(a.today,n),c=0==u;return"quarter"==o&&(c=u>=-2&&u<=0),{date:e,show:i,string:e.format(a.format),disabled:s,isToday:c,isNowDays:r}},w={name:"hDateBase",mixins:[u.default],props:{type:{type:[String],default:"date"},option:Object,format:String,value:[Object,String],nowView:Object,range:String,rangeEnd:String,startWeek:{type:Number,default:function(){return s.default.getOption("datepicker.startWeek")}}},data:function(){return{options:l.default.extend({},v.datetimeOptions,this.option),today:(0,o.default)(),view:m[this.type]}},filters:{hoursString:function(t){return"".concat(l.default.padLeft(t.hours(),2),":00")}},watch:{type:function(){this.options=l.default.extend({},v.datetimeOptions,this.option),this.view=m[this.type]}},mounted:function(){var t=this;this.$nextTick((function(){t.range&&(t.$el.addEventListener("mouseenter",(function(e){if("date"==t.view&&t.value.start&&!t.value.end){var n=e.target;if("SPAN"==n.tagName){var i=n.getAttribute("string");i&&t.$emit("updateRangeEnd",i)}}}),!0),t.$el.addEventListener("mouseout",(function(){"date"==t.view&&t.value.start&&!t.value.end&&t.$emit("updateRangeEnd","")}),!0))}))},methods:{changeView:function(t){this.view=t,this.$emit("changeView")},resetView:function(){this.view=m[this.type]},updateView:function(t,e){var n=o.default.DAY,i=(0,o.default)(this.nowView);"month"==t?(n=o.default.MONTH,i=i.startOf(o.default.MONTH)):"hour"==t?n=o.default.HOUR:(n=o.default.YEAR,"hour"==this.view||"minute"==this.view?n=o.default.DAY:"year"==this.view&&(e*=12,n=o.default.YEAR)),i.add(e,n),this.$emit("updateView",i.time(),this.range)},getDateCls:function(t){var e=!1,n=!1,i=!1,a=!1,r=t.date.time();if(l.default.isObject(this.value))e=this.value.start==t.string,n=this.value.end==t.string;else{var o=g[this.view];a=this.value.substring(0,o)==t.string.substring(0,o)}return this.range&&l.default.isObject(this.value)&&this.value.start&&this.rangeEnd&&(i=this.valueTime.startr||this.valueTime.start>r&&this.rangeEndTimet.date.month()&&(e.date(1),e=e.add(-1,o.default.DAY));break;case"year":e.year(t.date.year())}}this.options.start&&(0,o.default)(e).time()<(0,o.default)(this.options.start).time()&&(e=this.options.start),this.options.end&&(0,o.default)(e).time()>(0,o.default)(this.options.end).time()&&(e=this.options.end),this.range||this.setvalue(e,!1)}var n=f;"week"==this.type?n=h:"quarter"==this.type&&(n=p);var i=n.indexOf(this.view);this.view=n[i+1],this.$emit("updateView",(0,o.default)(e).time(),this.range)}},setvalue:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="";l.default.isNull(t)||(n=(0,o.default)(t).format(this.format)),this.$emit("input",n,e,this.range)}},computed:{valueTime:function(){return this.value?{start:this.value.start?(0,o.default)(this.value.start,this.format).time():null,end:this.value.end?(0,o.default)(this.value.end,this.format).time():null}:{start:null,end:null}},rangeEndTime:function(){return this.rangeEnd?(0,o.default)(this.rangeEnd,this.format).time():null},dateBodyCls:function(){var t;return t={},(0,r.default)(t,"".concat("h-date","-body"),!0),(0,r.default)(t,"".concat("h-date","-body-").concat(this.view),!0),t},weeks:function(){var t=[this.t("h.date.weeks.monday"),this.t("h.date.weeks.tuesday"),this.t("h.date.weeks.wednesday"),this.t("h.date.weeks.thursday"),this.t("h.date.weeks.friday"),this.t("h.date.weeks.saturday"),this.t("h.date.weeks.sunday")],e=t.splice(0,this.startWeek-1);return t.push.apply(t,(0,a.default)(e)),t},months:function(){return[this.t("h.date.months.january"),this.t("h.date.months.february"),this.t("h.date.months.march"),this.t("h.date.months.april"),this.t("h.date.months.may"),this.t("h.date.months.june"),this.t("h.date.months.july"),this.t("h.date.months.august"),this.t("h.date.months.september"),this.t("h.date.months.october"),this.t("h.date.months.november"),this.t("h.date.months.december")]},dates:function(){var t=this.nowView;if("date"==this.view){var e=t.endOf(o.default.MONTH),n=t.startOf(o.default.MONTH),i=n.day();i=i==this.startWeek?-1:this.startWeek>i?7-(this.startWeek-i)-1:i-this.startWeek-1;for(var a=n.add(-1,o.default.DAY),r=[],s=a.date()-i;s<=a.date();s++)r.push(b({date:(0,o.default)([a.year(),a.month(),s]),type:o.default.DAY,show:s,vm:this,isNowDays:!1}));for(var u=1;u<=e.date();u++)r.push(b({date:(0,o.default)([e.year(),e.month(),u]),type:o.default.DAY,show:u,vm:this,isNowDays:!0}));for(var d=e.add(1,o.default.DAY),f=42-r.length,h=1;h<=f;h++)r.push(b({date:(0,o.default)([d.year(),d.month(),h]),type:o.default.DAY,show:h,vm:this,isNowDays:!1}));return r}if("month"==this.view){for(var p=[],v=1;v<=12;v++)p.push(b({date:(0,o.default)([t.year(),v,1]),type:o.default.MONTH,show:this.months[v-1],vm:this,isNowDays:!0}));return p}if("year"==this.view){for(var m=[],y=t.year(),g=y-6;g<=y+5;g++)m.push(b({date:(0,o.default)([g,1,1]),type:o.default.YEAR,show:g,vm:this,isNowDays:!0}));return m}if("hour"==this.view){var w,_=[],k=c(l.default.isFunction(this.options.hours)?this.options.hours.call(null):l.default.numList(0,24,1));try{for(k.s();!(w=k.n()).done;){var x=w.value;_.push(b({date:(0,o.default)(t.time()).hours(x).minutes(0),type:o.default.HOUR,show:l.default.padLeft(x,2)+":00",vm:this,isNowDays:!0}))}}catch(t){k.e(t)}finally{k.f()}return _}if("minute"==this.view){var O,C=[],S=t.hours(),j=c(l.default.isFunction(this.options.minutes)?this.options.minutes.call(null,S):l.default.numList(0,60,this.options.minuteStep));try{for(j.s();!(O=j.n()).done;){var T=O.value;C.push(b({date:(0,o.default)(t.time()).minutes(T),type:o.default.MINUTE,show:l.default.padLeft(S,2)+":"+l.default.padLeft(T,2),vm:this,isNowDays:!0}))}}catch(t){j.e(t)}finally{j.f()}return C}if("week"==this.view){var N=[],M=(0,o.default)(t).add(-1,o.default.MONTH).endOf(o.default.MONTH).endOf(o.default.WEEK,this.startWeek),E=0;M.month()==t.month()?(M=M.startOf(o.default.WEEK,this.startWeek),E=1):M=M.add(7,o.default.DATE).startOf(o.default.WEEK,this.startWeek);var $=M.month(),D=E+$;for(D=D>12?1:D;M.month()==$||M.month()==D;)N.push(b({date:(0,o.default)(M.time()),type:o.default.WEEK,show:this.t("h.date.show.week",{year:M.year(),weeknum:M.getWeekOfYear(this.startWeek),daystart:M.format("MM-DD"),dayend:(0,o.default)(M).add(6).format("MM-DD")}),vm:this,isNowDays:!0})),M=M.add(7);return N}if("quarter"==this.view){for(var A=[],P=t.startOf(o.default.YEAR),I=1;I<5;I++)A.push(b({date:(0,o.default)(P.time()),type:o.default.MONTH,show:this.t("h.date.show.quarter",{year:P.year(),quarter:I}),vm:this,isNowDays:!0,view:this.view})),P=P.add(3,o.default.MONTH);return A}return[]}}};e.default=w},function(t,e,n){"use strict";n.r(e);var i=n(44),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(16)),o=i(n(4)),s=i(n(2)),l=i(n(9)),u=i(n(156)),c=i(n(5));function d(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n.h-datetime-show")),i=t.$el.querySelector(".h-date-picker");t.dropdown=new l.default(n,{trigger:"click",content:i,placement:t.placement,disabled:t.disabled,events:{show:function(){e.isShow=!0,e.$nextTick((function(){e.initNowView()}))}}})}))},methods:{updateRangeEnd:function(t){this.rangeEnd=t},setShortcutValue:function(t){var e=t.value.call(null);this.parse(e),this.updateValue(this.nowDate),this.hide()},updateView:function(t,e){this.nowView[e]=(0,r.default)(t,this.nowFormat),this.nowView.start.time()>=this.nowView.end.time()&&("end"==e?this.nowView.start=(0,r.default)(t,this.nowFormat).add(-1,r.default.MONTH):this.nowView.end=(0,r.default)(t,this.nowFormat).add(1,r.default.MONTH)),this.dropdown.update()},changeView:function(){this.dropdown.update()},parseSingle:function(t,e){if(s.default.isObject(t)&&t[this.paramName[e]])try{var n=(0,r.default)(t[this.paramName[e]],this.nowFormat);return void(this.nowDate[e]=n.format(this.nowFormat))}catch(t){}this.nowDate[e]=""},parse:function(t){this.parseSingle(t,"start"),this.parseSingle(t,"end"),this.rangeEnd=this.nowDate.end},initNowView:function(){var t=(0,r.default)();this.nowDate.start&&(t=(0,r.default)(this.nowDate.start,this.nowFormat));this.nowView={start:t,end:(0,r.default)(t,this.nowFormat).add(1,r.default.MONTH)},this.$refs.start.resetView(),this.$refs.end.resetView()},confirm:function(){this.$emit("confirm"),this.hide()},hide:function(){this.dropdown.hide()},clear:function(){this.$emit("clear"),this.updateValue({}),this.initNowView(),this.hide()},setvalue:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;t=t||"";var i=s.default.copy(this.nowDate);if(e?i.start?i.end?(i.start=t,i.end=""):i.end=t:i.start=t:"start"==n?i.start=t:"end"==n&&(i.end=t),e&&i.start&&i.end&&(0,r.default)(i.start,this.nowFormat).time()>(0,r.default)(i.end,this.nowFormat).time()){var a=i.start;i.start=i.end,i.end=a}this.updateValue(i)},updateValue:function(t){var e;e={},(0,a.default)(e,this.paramName.start,t.start),(0,a.default)(e,this.paramName.end,t.end),t=e,this.parse(t),this.$emit("input",t),this.$emit("change",t);var n=document.createEvent("CustomEvent");n.initCustomEvent("setvalue",!0,!0,t),this.$el.dispatchEvent(n),this.dropdown.update()}},computed:{showPlaceholder:function(){return this.placeholder||this.t("h.datepicker.placeholder")},nowFormat:function(){var t=this.format||o.default.getOption("datepicker.format")[this.type];return"datetime"==this.type&&this.hasSeconds&&(t=o.default.getOption("datepicker.format.datetimesecond")),t},show:function(){return s.default.isObject(this.value)?"".concat(this.value.start||this.t("h.datepicker.start")," - ").concat(this.value.end||this.t("h.datepicker.end")):""},shortcuts:function(){var t=[],e=null;if(this.option&&this.option.shortcuts&&(e=this.option.shortcuts),s.default.isArray(e)){var n,i=d(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;s.default.isString(a)?t.push(o.default.getOption("datepicker.shortcuts")[a]):s.default.isObject(a)&&t.push(a)}}catch(t){i.e(t)}finally{i.f()}}return t},dateCls:function(){var t;return t={},(0,a.default)(t,"".concat(h),!0),(0,a.default)(t,"".concat(h,"-range"),!0),(0,a.default)(t,"".concat(h,"-input-border"),!this.noBorder),(0,a.default)(t,"".concat(h,"-disabled"),this.disabled),t},datePickerCls:function(){var t;return t={},(0,a.default)(t,"".concat(h,"-range-picker"),!0),(0,a.default)(t,"".concat(h,"-has-shortcut"),this.shortcuts.length>0),t},startOption:function(){return this.option},endOption:function(){return this.option}},components:{dateBase:u.default}};e.default=p},function(t,e,n){"use strict";n.r(e);var i=n(46),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(16)),o=i(n(4)),s=i(n(2)),l=i(n(9)),u=i(n(156)),c=i(n(5));function d(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n.h-datetime-show")),i=t.$el.querySelector(".h-date-picker");t.dropdown=new l.default(n,{trigger:"click",content:i,placement:t.placement,events:{show:function(){e.isShow=!0,e.$nextTick((function(){e.initNowView()}))}}})}))},methods:{setShortcutValue:function(t){var e=t.value.call(null);this.parse(e),this.updateValue(this.nowDate),this.hide()},changeView:function(){this.initNowView(),this.updateDropdown()},updateView:function(t){this.nowView.start=(0,r.default)(t),this.dropdown.update()},updateDropdown:function(){this.dropdown.update()},parseSingle:function(t,e){if(s.default.isObject(t)&&t[this.paramName[e]])try{var n=(0,r.default)(t[this.paramName[e]]);return"end"==e&&(n=n.add(-1)),void(this.nowDate[e]=n.format(this.nowFormat))}catch(t){}this.nowDate[e]=""},parse:function(t){this.value&&this.value.type&&(this.view=this.value.type),this.parseSingle(t,"start"),this.parseSingle(t,"end")},initNowView:function(){var t=(0,r.default)();this.nowDate.start&&(t=(0,r.default)(this.nowDate.start));var e=(0,r.default)();this.nowDate.end&&(e=(0,r.default)(this.nowDate.end)),this.nowView={start:t,end:e}},hide:function(){this.dropdown.hide()},confirm:function(){this.$emit("confirm"),this.hide()},clear:function(){this.$emit("clear"),this.updateValue({}),this.initNowView(),this.hide()},setvalue:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=t||"","customize"==this.view){var n=s.default.copy(this.nowDate);return n.end&&(n.end=(0,r.default)(n.end).add(1).format(this.nowFormat)),void this.updateValue(n)}var i={},a=(0,r.default)(t);"week"==this.view?i={start:a.format(),end:a.add(7).format()}:"year"==this.view?i={start:a.format(),end:a.add(1,r.default.YEAR).format()}:"month"==this.view?i={start:a.format(),end:a.add(1,r.default.MONTH).format()}:"quarter"==this.view?i={start:a.format(),end:a.add(3,r.default.MONTH).format()}:"date"==this.view&&(i={start:a.format(),end:a.add(1,r.default.DAY).format()}),i.start||(i.start=null),i.end||(i.end=null),this.updateValue(i),e&&this.hide()},updateValue:function(t){var e;e={},(0,a.default)(e,this.paramName.start,t.start),(0,a.default)(e,this.paramName.end,t.end),(0,a.default)(e,"type",this.view),t=e,this.parse(t),this.$emit("input",t),this.$emit("change",t);var n=document.createEvent("CustomEvent");n.initCustomEvent("setvalue",!0,!0,t),this.$el.dispatchEvent(n),this.dropdown.update()}},computed:{views:function(){var t,e={},n=d(this.layout);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.allviews[i]?e[i]=this.allviews[i]:console.warn("[HeyUI WARNING] DateFullRangePicker Component: Props ".concat(i," for layout don't exsits."))}}catch(t){n.e(t)}finally{n.f()}return e},showPlaceholder:function(){return this.placeholder||this.t("h.datepicker.placeholder")},showValue:function(){if(!s.default.isObject(this.value))return"";if(this.value.type&&this.value.start){var t=(0,r.default)(this.value.start);switch(this.value.type){case"year":return t.year();case"month":return t.format("YYYY-MM");case"quarter":return this.t("h.date.show.quarter",{year:t.year(),quarter:parseInt(t.month()/3,10)+1});case"week":return this.t("h.date.show.week",{year:t.year(),weeknum:t.getWeekOfYear(this.startWeek),daystart:t.format("MM-DD"),dayend:(0,r.default)(t).add(6).format("MM-DD")})}}return this.value.start||this.value.end?"".concat(this.value.start||this.t("h.datepicker.start")," - ").concat(this.value.end?(0,r.default)(this.value.end).add(-1).format(this.nowFormat):this.t("h.datepicker.end")):""},shortcuts:function(){var t=[],e=null;if(this.option&&this.option.shortcuts&&(e=this.option.shortcuts),s.default.isArray(e)){var n,i=d(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;s.default.isString(a)?t.push(o.default.getOption("datepicker.shortcuts")[a]):s.default.isObject(a)&&t.push(a)}}catch(t){i.e(t)}finally{i.f()}}return t},dateCls:function(){var t;return t={},(0,a.default)(t,"".concat(h),!0),(0,a.default)(t,"".concat(h,"-full-range"),!0),(0,a.default)(t,"".concat(h,"-input-border"),!this.noBorder),t},datePickerCls:function(){return(0,a.default)({},"".concat(h,"-has-shortcut"),this.shortcuts.length>0)},startOption:function(){return this.option},endOption:function(){return this.option}},components:{dateBase:u.default}};e.default=p},function(t,e,n){"use strict";n.r(e);var i=n(48),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(9)),o="h-dropdowncustom",s={name:"hDropdownCustom",props:{trigger:{type:String,default:"click"},equalWidth:{type:Boolean,default:!1},toggleIcon:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},placement:{type:String},delay:{type:Number,default:0},className:{type:String,default:"h-dropdownmenu-default"},offset:[String,Number],showClass:String,button:{type:Boolean,default:!1}},data:function(){return{isShow:!1,dropdown:null,el:null}},mounted:function(){var t=this;this.$nextTick((function(){var e=t.el=t.$el.querySelector(".h-dropdowncustom-show"),n=t.$el.querySelector(".h-dropdowncustom-group"),i=t;t.dropdown=new r.default(e,{content:n,className:"".concat(t.className,"-dropdown-container"),offset:t.offset,trigger:t.trigger,equalWidth:t.equalWidth,placement:t.placement,disabled:t.disabled,delay:t.delay,events:{show:function(t){i.isShow=!0,i.$emit("show",t)},hide:function(){i.$emit("hide")}}})}))},watch:{disabled:function(){this.disabled?this.dropdown.disabled():this.dropdown.enabled()}},beforeDestroy:function(){var t=this.el;t&&(t.style.display="none",this.$el.appendChild(t)),this.dropdown&&this.dropdown.destory()},computed:{dropdowncustomCls:function(){var t;return t={},(0,a.default)(t,"".concat(o),!0),(0,a.default)(t,"h-btn",this.button),t},showCls:function(){var t;return t={},(0,a.default)(t,"".concat(o,"-show"),!0),(0,a.default)(t,"".concat(o,"-disabled"),!!this.disabled),(0,a.default)(t,"".concat(o,"-show-toggle"),!!this.toggleIcon),(0,a.default)(t,this.className,!!this.className),(0,a.default)(t,this.showClass,!!this.showClass),(0,a.default)(t,"h-dropdowncustom-empty",!this.$slots.default),t},groupCls:function(){return(0,a.default)({},"".concat(o,"-group"),!0)}},methods:{update:function(){this.dropdown.update()},hide:function(){this.dropdown.hide()},show:function(){this.dropdown.show()}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(50),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(4)),o=i(n(236)),s=i(n(229)),l="h-dropdownmenu",u={name:"hDropdownMenu",props:{dict:String,datas:[Array,Object],trigger:{type:String,default:"click"},equalWidth:{type:Boolean,default:!1},width:Number,toggleIcon:{type:Boolean,default:!0},placement:{type:String,default:"bottom-start"},showCount:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxCount:{type:Number,default:99},delay:{type:Number,default:0},className:{type:String,default:"h-dropdownmenu-default"},keyName:{type:String,default:function(){return r.default.getOption("dict","keyName")}},titleName:{type:String,default:function(){return r.default.getOption("dict","titleName")}},offset:[String,Number],button:{type:Boolean,default:!1}},data:function(){return{key:this.keyName,title:this.titleName,html:"dropdownmenuHtml",isShow:!1,el:null}},mounted:function(){},beforeDestroy:function(){},methods:{onclick:function(t,e){e.disabled||(this.$emit("onclick",e[this.key],e,t),this.$emit("click",e[this.key],e,t),this.$refs.dropdown.hide())},showEvent:function(t){this.$emit("show",t)},hideEvent:function(t){this.$emit("hide",t)}},computed:{dropdownmenuCls:function(){return(0,a.default)({},"".concat(l),!0)},groupStyle:function(){var t={};return this.width&&(t.width="".concat(this.width,"px")),t},showCls:function(){var t;return t={},(0,a.default)(t,"".concat(l,"-show"),!0),(0,a.default)(t,"".concat(l,"-disabled"),!!this.disabled),(0,a.default)(t,this.className,!0),t},groupCls:function(){var t;return t={},(0,a.default)(t,"".concat(this.className,"-dropdown"),!!this.className),(0,a.default)(t,"h-dropdownmenu-group",!0),t},options:function(){if(!this.datas&&!this.dict)return console.error("[HeyUI Error] Dropdownmenu Component: Datas or dict parameters need to be defined at least."),[];var t=this.datas;return this.dict&&(t=r.default.getDict(this.dict)),t=r.default.initOptions(t,this)}},components:{Badge:s.default,DropdownCustom:o.default}};e.default=u},function(t,e,n){"use strict";n.r(e);var i=n(52),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=function(t){return a.default.isString(t)?{url:t}:a.default.isObject(t)?{url:t.thumbUrl||t.url}:{url:null}},o={name:"hImagePreview",props:{width:{type:Number,default:60},distance:{type:Number,default:10},datas:{type:[Array,String],default:function(){return[]}},borderRadius:{type:Number,default:3}},methods:{click:function(t,e){this.isSingle?this.$emit("click",this.datas):this.$emit("click",t,e)},itemStyles:function(t){return{height:"".concat(this.width,"px"),width:"".concat(this.width,"px"),"margin-right":"".concat(this.distance,"px"),"margin-bottom":"".concat(this.distance,"px"),"border-radius":"".concat(this.borderRadius,"px"),"background-image":"url(".concat(t.url,")")}}},computed:{listStyles:function(){return{"margin-right":"-".concat(this.distance,"px"),"margin-bottom":"-".concat(this.distance,"px")}},isSingle:function(){return a.default.isString(this.datas)},computedList:function(){return this.isSingle?[r(this.datas)]:a.default.isArray(this.datas)?this.datas.map((function(t){return r(t)})):[]}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(54),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(10)),o=i(n(6)),s=i(n(288)),l=i(n(2)),u=i(n(237)),c=i(n(7)),d={name:"hForm",props:{top:{type:Number},topOffset:{type:Number,default:0},mode:{type:String,default:"single"},model:[Object,Array],labelWidth:{type:Number,default:80},rules:Object,labelPosition:{type:String,default:"right"},readonly:{type:Boolean,default:!1},showErrorTip:{type:Boolean,default:!1},validOnChange:{type:Boolean,default:!0}},provide:function(){return{validField:this.validField,requireds:this.requireds,removeProp:this.removeProp,setConfig:this.setConfig,updateErrorMessage:this.updateErrorMessage,updateProp:this.updateProp,labelWidth:this.labelWidth,params:this.childParams}},data:function(){return{messages:{},dynamicRequireds:[],requireds:[],validator:null,childParams:{mode:this.mode}}},beforeMount:function(){this.model&&this.rules&&(this.validator=new s.default(this.rules))},destroyed:function(){this.validator&&this.validator.destroy()},mounted:function(){var t=this;this.initRequires(),this.$nextTick((function(){t.$el.addEventListener("blur",(function(e){"INPUT"!=e.target.tagName&&"TEXTAREA"!=e.target.tagName||t.trigger(e.target)}),!0),t.$el.addEventListener("setvalue",(function(e){t.trigger(e.target)}))}))},watch:{mode:function(){this.childParams.mode=this.mode},rules:{handler:function(){var t=this;this.validator?(this.rules&&this.validator.updateRule(this.rules),this.dynamicRequireds.forEach((function(e){t.validator.setConfig(e,{required:!0})}))):this.model&&this.rules&&(this.validator=new s.default(this.rules)),this.initRequires()},deep:!0}},methods:{initRequires:function(){if(this.requireds.splice(0),this.rules){var t,e=l.default.toArray(this.rules.rules,"key").filter((function(t){return!0===t.required})).map((function(t){return t.key}));(t=this.requireds).push.apply(t,(0,o.default)(this.rules.required||[]).concat((0,o.default)(e),(0,o.default)(this.dynamicRequireds)))}},reset:function(){for(var t in console.warn("[HeyUI WARNING] Form Component: form.reset() will be decapitated, please use method form.resetValid()"),this.messages)this.messages[t].valid=!0},resetValid:function(){for(var t in this.messages)this.messages[t].valid=!0},trigger:function(t){if(!this.validOnChange)return!1;var e=function(t,e){for(var n=t;n!=e;){if(l.default.hasClass(n,"h-form-item")&&n.getAttribute("prop"))return n;n=n.parentElement}return null}(t,this.$el);e&&"true"==e.getAttribute("validable")&&this.validField(e.getAttribute("prop"))},validField:function(t){var e=this;if(!t||!this.validator||!this.model)return{valid:!0};var n=this.validator.validField(t,this.model,{next:function(t){l.default.extend(!0,e.messages,t)}});return l.default.extend(!0,this.messages,n),l.default.extend({},this.messages[t])},validFieldJs:function(t,e){if(!t||!this.validator||!this.model)return{valid:!0};var n=this.messages[t],i=this.validator.validField(t,this.model,{next:function(){e(l.default.extend({},n,i[t]))}});return l.default.extend({},n,i[t])},setConfig:function(t,e){var n=this.dynamicRequireds.indexOf(t);if(e.required?-1==n&&this.dynamicRequireds.push(t):n>-1&&this.dynamicRequireds.splice(n,1),this.initRequires(),!this.validator)return!1;this.validator.setConfig(t,e)},updateErrorMessage:function(t,e){var n={valid:!0,message:null,label:e};return this.messages[t]?((0,r.default)(this.messages[t],n),this.messages[t]):(this.messages[t]=n,this.messages[t])},updateProp:function(t,e){var n=l.default.copy(this.messages[e]);return l.default.isNull(n)&&(n={valid:!0,message:null}),this.messages[t]=n,n},removeProp:function(t){var e=this.dynamicRequireds.indexOf(t);e>-1&&this.dynamicRequireds.splice(e,1),this.setConfig(t,{required:!1})},renderMessage:function(t){var e=!0;for(var n in t)if(!t[n].valid){e=!1;break}return l.default.extend(!0,this.messages,t),{result:e,messages:l.default.toArray(this.messages,"prop").filter((function(t){return!t.valid}))}},tipError:function(t){var e=this;if(t&&!t.result){var n=t.messages[0];this.showErrorTip&&("base"==n.type?c.default.error("".concat(n.label).concat(n.message)):c.default.error("".concat(n.message))),this.$nextTick((function(){var t=e.$el.querySelector(".h-form-item-valid-error[prop='".concat(n.prop,"']"));t&&(0,u.default)(t,{time:500,align:{top:e.top,topOffset:e.topOffset}})}))}},validAsync:function(){var t=this;return new Promise((function(e){var n=t.valid((function(i){var a=t.renderMessage(i);n&&n.result&&t.tipError(a),e(a)}))}))},valid:function(t){var e=this;if(!this.validator||!this.model)return{result:!0,messages:[]};var n=this.validator.valid(this.model,(function(t){l.default.extend(!0,e.messages,t)}),(function(e){t&&t.call(null,e)})),i=this.renderMessage(n);return this.tipError(i),i}},computed:{formCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-form"),!0),(0,a.default)(t,"".concat("h-form","-").concat(this.mode),!0),(0,a.default)(t,"".concat("h-form","-label-").concat(this.labelPosition),!!this.labelPosition),(0,a.default)(t,"".concat("h-form","-readonly"),this.readonly),t}}};e.default=d},function(t,e,n){"use strict";n.r(e);var i=n(56),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(2)),o="h-form-item",s={name:"hFormItem",props:{label:String,prop:String,icon:String,required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},single:{type:Boolean,default:!1},validable:{type:Boolean,default:!0},noPadding:{type:Boolean,default:!1}},inject:["validField","removeProp","requireds","setConfig","updateProp","updateErrorMessage","labelWidth","params"],data:function(){return{validResult:null,errorMessage:{valid:!0}}},beforeDestroy:function(){this.prop&&this.required&&this.removeProp(this.prop)},watch:{prop:function(t,e){this.prop&&(this.errorMessage=this.updateProp(t,e))},label:function(){this.prop&&(this.errorMessage=this.updateErrorMessage(this.prop,this.label))},required:function(){this.setConfig(this.prop,{required:this.required})}},mounted:function(){this.prop&&(this.required&&this.setConfig(this.prop,{required:this.required}),this.errorMessage=this.updateErrorMessage(this.prop,this.label))},methods:{reset:function(){console.warn("[HeyUI WARNING] FormItem Component: FormItem.reset() will be decapitated, please use method FormItem.resetValid()"),this.errorMessage.valid=!0},resetValid:function(){this.errorMessage.valid=!0},trigger:function(){var t=this.prop;this.validable&&!r.default.isNull(t)&&this.validField(t)}},computed:{configRequired:function(){if(!this.prop)return!1;var t=this.prop.replace(/\[\w+\]/,"[]");return this.requireds.indexOf(this.prop)>-1||this.requireds.indexOf(t)>-1},initLabelWidth:function(){var t=this.params.mode,e=(!("block"==t||"inline"==t)||this.single&&"twocolumn"==t)&&this.labelWidth||!1;return e?"".concat(e,"px"):"auto"},formItemCls:function(){var t;return t={},(0,a.default)(t,"".concat(o),!0),(0,a.default)(t,"".concat(o,"-single"),this.single),(0,a.default)(t,"".concat(o,"-readonly"),!!this.readonly),(0,a.default)(t,"".concat(o,"-required"),this.required||this.configRequired),(0,a.default)(t,"".concat(o,"-valid-error"),!this.errorMessage.valid),(0,a.default)(t,"".concat(o,"-no-padding"),!!this.noPadding),t},labelCls:function(){return(0,a.default)({},"".concat(o,"-label"),!0)},labelStyleCls:function(){var t={};return"block"!=this.params.mode?t.width=this.initLabelWidth:t.width="100%",t},contentStyleCls:function(){var t={};return"block"!=this.params.mode&&this.showLabel?t["margin-left"]=this.initLabelWidth:t["margin-left"]="0px",t}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(58),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={name:"hFormItemList",data:function(){return{}}}},function(t,e,n){"use strict";n.r(e);var i=n(60),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(6)),o=i(n(2)),s=i(n(4)),l=i(n(298));function u(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1},default:"normal"},inlineCollapsed:{type:Boolean,default:!1},activeAll:{type:Boolean,default:!1}},data:function(){return{param:o.default.extend({},s.default.getOption("menu"),this.option),status:{selected:null,opened:[]}}},computed:{classes:function(){var t;return t={},(0,a.default)(t,"".concat("h-menu"),!0),(0,a.default)(t,this.className,!0),(0,a.default)(t,"".concat("h-menu","-mode-").concat(this.mode),!this.isDropdownMenu),(0,a.default)(t,"".concat("h-menu","-mode-vertical"),this.isDropdownMenu),(0,a.default)(t,"".concat("h-menu","-size-collapse"),this.inlineCollapsed),t},isDropdownMenu:function(){return"vertical"===this.mode||this.inlineCollapsed},menuobj:function(){return function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,a={},r=u(n);try{for(r.s();!(e=r.n()).done;){var s=e.value,l=s.key;l&&(a[l]=s);var c=s.children;c&&c.length&&o.default.extend(a,t(c,i))}}catch(t){r.e(t)}finally{r.f()}return a}(this.menuDatas)},menuDatas:function(){return function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,r=[],o=u(n);try{for(o.s();!(e=o.n()).done;){var s=e.value,l={key:s[i.keyName],title:s[i.titleName],icon:s.icon,count:s.count,value:s,status:{opened:!1,disabled:!!s.disabled},parent:a},c=s[i.childrenName]||[];l.children=t(c,i,l),r.push(l)}}catch(t){o.e(t)}finally{o.f()}return r}(this.datas,this.param)}},methods:{select:function(t){var e=this.menuobj[t];e?(this.status.selected=t,this.status.opened=function t(e){var n=[];return e.parent&&(n.push(e.parent.key),n.push.apply(n,(0,r.default)(t(e.parent)))),n}(e)):(this.status.selected=null,this.status.opened=[])},trigger:function(t){if("togglemenuEvent"==t.type){var e=t.data;if(this.status.opened=o.default.toggleValue(this.status.opened,e.key),this.accordion&&this.status.opened.indexOf(e.key)>-1)for(var n in this.menuobj){var i=this.menuobj[n];i.parent===e.parent&&e.key!=n&&this.status.opened.indexOf(i.key)>-1&&this.status.opened.splice(this.status.opened.indexOf(i.key),1)}if(this.$emit("click",e),e.children&&e.children.length>0&&(!this.activeAll||this.status.selected==e.key))return;this.status.selected=e.key,this.$emit("select",e.value),this.$emit("onclick",e.value)}}},components:{hMenuItem:l.default}};e.default=f},function(t,e,n){"use strict";n.r(e);var i=n(62),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r={name:"hMenuItem",components:{MenuItemShow:i(n(299)).default},props:{data:Object,param:Object,status:Object,inlineCollapsed:{type:Boolean,default:!1},mode:String},data:function(){return{}},methods:{trigger:function(t){this.$emit("trigger",t)},triggerClick:function(t){!0===this.data.value.nativeLink||t.altKey||t.ctrlKey||t.shiftKey||t.metaKey||t.preventDefault(),this.trigger(this.data)}},computed:{href:function(){var t=this.data.value.href;if(t){if(a.default.isString(t))return t;if(this.$router)return this.$router.resolve(t).href}return null}}};e.default=r},function(t,e,n){"use strict";n.r(e);var i=n(64),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hMenuItemShow",props:{data:Object,param:Object,status:Object,inlineCollapsed:{type:Boolean,default:!1},mode:String},data:function(){return{}},methods:{togglemenu:function(t){this.$emit("trigger",{type:"togglemenuEvent",data:t})}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(66),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(4)),o="h-modal",s={name:"hModal",props:{hasCloseIcon:{type:Boolean,default:!1},hasMask:{type:Boolean,default:!0},hasDivider:{type:Boolean,default:function(){return r.default.getOption("modal","hasDivider")}},closeOnMask:{type:Boolean,default:!0},middle:{type:Boolean,default:!1},value:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1},className:String,type:String},watch:{value:function(){this.value?this.show():this.hide()}},data:function(){return{isOpened:this.value,isShow:this.value,el:null}},mounted:function(){var t=this;this.$nextTick((function(){var e=t.el=t.$el.firstChild;document.body.appendChild(e),t.value||(e.style.display="none")}))},beforeDestroy:function(){var t=this.el;t&&(t.style.display="none",this.$el.appendChild(t))},methods:{show:function(){var t=this,e=this.el;if(document.body.appendChild(e),e.style.display="block",this.isShow=!0,this.hasMask){var n=document.documentElement,i=window.innerWidth-n.clientWidth;n.style.overflow="hidden",n.style.paddingRight="".concat(i,"px")}setTimeout((function(){t.isOpened=!0}),100)},hide:function(){var t=this,e=this.el;this.isOpened=!1,setTimeout((function(){e.style.display="none",t.isShow=!1}),200);var n=document.documentElement;n.style.overflow="",n.style.paddingRight=""},setvalue:function(t){(!t||t&&this.hasMask&&this.closeOnMask)&&this.$emit("input",!1)}},computed:{contentCls:function(){return(0,a.default)({},"".concat("h-notify","-content"),!0)},containerCls:function(){return(0,a.default)({},"".concat("h-notify","-container"),!0)},noticeCls:function(){var t;return t={},(0,a.default)(t,o,!0),(0,a.default)(t,"h-notify",!0),(0,a.default)(t,"".concat(o,"-type-default"),!this.type),(0,a.default)(t,"".concat("h-notify","-show"),this.isOpened),(0,a.default)(t,"".concat("h-notify","-has-mask"),this.hasMask),(0,a.default)(t,"".concat("h-notify","-no-mask"),!this.hasMask),(0,a.default)(t,"".concat("h-notify","-has-close"),this.hasCloseIcon),(0,a.default)(t,"".concat(o,"-has-divider"),this.hasDivider),(0,a.default)(t,"".concat(o,"-container-center"),!!this.middle),(0,a.default)(t,"".concat(o,"-type-").concat(this.type),this.type),(0,a.default)(t,"".concat(o,"-transparent"),this.transparent),(0,a.default)(t,"".concat(o,"-full-screen"),this.fullScreen),(0,a.default)(t,this.className,!!this.className),t},hasHeader:function(){return!!this.$slots.header},hasFooter:function(){return!!this.$slots.footer}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(68),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(4)),o={name:"hModalComponent",props:{hasCloseIcon:{type:Boolean,default:!0},hasMask:{type:Boolean,default:!0},hasDivider:{type:Boolean,default:function(){return r.default.getOption("modal","hasDivider")}},closeOnMask:{type:Boolean,default:!0},middle:{type:Boolean,default:!1},value:{type:Boolean,default:!1},component:Object,propsData:[Boolean,Object,String,Array]},watch:{value:function(){var t=this;if(this.value){if(this.el.style.display="block",this.nowComponent=this.$options.propsData.component,this.hasMask){var e=document.documentElement,n=window.innerWidth-e.clientWidth;e.style.overflow="hidden",e.style.paddingRight="".concat(n,"px")}setTimeout((function(){t.isOpened=t.value}),100)}else{this.isOpened=this.value;var i=document.documentElement;i.style.overflow="",i.style.paddingRight="",setTimeout((function(){t.el.style.display="none",t.nowComponent=""}),200)}}},data:function(){return{nowComponent:"",isOpened:this.value}},beforeDestroy:function(){var t=this.el;t.style.display="none",this.$el.appendChild(t)},mounted:function(){var t=this;this.$nextTick((function(){t.el=t.$el.firstChild,document.body.appendChild(t.el),t.value||(t.el.style.display="none")}))},methods:{trigger:function(t,e){this.$emit(t,e)},close:function(){var t=this;this.isOpened=!1,setTimeout((function(){t.el.style.display="none",t.nowComponent=""}),200),this.$emit("input",!1)},setvalue:function(t){(!t||t&&this.hasMask&&this.closeOnMask)&&this.$emit("input",!this.value)}},computed:{contentCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-notify","-content"),!0),(0,a.default)(t,"".concat("h-notify","-content-component"),!0),t},containerCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-notify","-container"),!0),(0,a.default)(t,"".concat("h-notify","-container-center"),!!this.middle),t},noticeCls:function(){var t;return t={},(0,a.default)(t,"h-modal",!0),(0,a.default)(t,"h-notify",!0),(0,a.default)(t,"".concat("h-notify","-show"),this.isOpened),(0,a.default)(t,"".concat("h-notify","-has-mask"),this.hasMask),(0,a.default)(t,"".concat("h-notify","-has-close"),this.hasCloseIcon),(0,a.default)(t,"".concat("h-notify","-has-divider"),this.hasDivider),t}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(70),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(10)),o=i(n(4)),s=i(n(2)),l=i(n(5)),u=i(n(7)),c=i(n(238)),d={name:"hPagination",mixins:[l.default],components:{Select:c.default},props:{size:{type:Number,default:function(){return o.default.getOption("page.size")}},sizes:{type:Array,default:function(){return o.default.getOption("page.sizes")}},align:{type:String,default:"left"},cur:{type:Number,default:1},total:{type:Number,default:0},pagerSize:{type:Number,default:5},small:{type:Boolean,default:function(){return o.default.getOption("page.small")}},layout:{type:String,default:function(){return o.default.getOption("page.layout")}},value:{type:Object,default:function(){return{}}}},data:function(){var t=this.layout.replace(" ","").split(","),e={total:-1,pager:-1,jumper:-1,sizes:-1};for(var n in e)e[n]=t.indexOf(n);return{sizeNow:this.value.size||this.size,orders:e,curValue:null}},watch:{cur:function(){this.curValue=null},size:function(){this.sizeNow=this.value.size||this.size},"value.page":function(){this.curValue=null},"value.size":function(){this.sizeNow=this.value.size||this.size}},methods:{prev:function(){1!=this.curNow&&this.change(this.curNow-1)},next:function(){this.curNow!=this.count&&this.change(this.curNow+1)},jump:function(t){var e=parseInt(t.target.value,10);if(isNaN(e))u.default.error(this.t("h.pagination.incorrectFormat"));else if(e>this.count||e<1)u.default.error(this.t("h.pagination.overSize"));else{var n=parseInt(t.target.value,10);n!=(this.value.page||this.cur)&&this.setvalue({cur:n,size:this.sizeNow})}},change:function(t){if(this.curNow!=t){var e=o.default.getOption("page.onChange");s.default.isFunction(e)&&e({cur:t,size:this.sizeNow}),this.setvalue({cur:t,size:this.sizeNow})}},setvalue:function(t){var e={page:t.cur,total:this.totalNow};(0,r.default)(e,t),this.curValue=t.cur;var n=(0,r.default)({},e);delete n.cur,this.$emit("input",n),this.$emit("change",e)},changesize:function(){this.setvalue({cur:1,size:this.sizeNow}),this.$emit("changeSize",this.sizeNow);var t=o.default.getOption("page.onChangeSize");s.default.isFunction(t)&&t(this.sizeNow)},genPagerCls:function(t){var e;return e={},(0,a.default)(e,"".concat("h-page","-pager"),!0),(0,a.default)(e,"".concat("h-page","-pager-selected"),this.curNow==t),e}},computed:{sizesShow:function(){var t=this,e=o.default.getOption("dict","keyName"),n=o.default.getOption("dict","titleName");return this.sizes.map((function(i){var r;return r={},(0,a.default)(r,e,i),(0,a.default)(r,n,t.t("h.pagination.sizeOfPage",{size:i})),r}))},curNow:function(){return this.curValue||this.value.page||this.cur},totalNow:function(){return this.value.total||this.total||0},count:function(){return Math.ceil(this.totalNow/this.sizeNow)},pagers:function(){if(this.count<3)return[];var t=this.curNow-Math.floor(this.pagerSize/2),e=(t=Math.max(2,t))+this.pagerSize-1;e=Math.min(this.count-1,e),t=Math.min(t,e-this.pagerSize+1);for(var n=[],i=t=Math.max(2,t);i<=e;i++)n.push(i);return n},prefix:function(){return"h-page"},prevCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-page","-pager-disabled"),1==this.curNow),(0,a.default)(t,"h-page-pager",!0),t},nextCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-page","-pager-disabled"),this.curNow==this.count),(0,a.default)(t,"h-page-pager",!0),t},pagerCls:function(){return(0,a.default)({},"".concat("h-page","-pager"),!0)},pageCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-page"),!0),(0,a.default)(t,"".concat("h-page","-small"),this.small),(0,a.default)(t,"".concat("h-page","-align-").concat(this.align),!!this.align),t},containerCls:function(){return{}},noticeCls:function(){return{}}}};e.default=d},function(t,e,n){"use strict";n.r(e);var i=n(72),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(4)),o=i(n(2)),s=i(n(9)),l=i(n(5)),u=i(n(7));function c(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1){var e=t.content.querySelector(".h-select-item-picked"),n=t.content.querySelector(".h-select-list");e&&n&&(e.offsetTop+e.offsetHeight-n.scrollTop>n.offsetHeight?n.scrollTop=e.offsetTop+e.offsetHeight-n.offsetHeight:e.offsetTop-n.scrollTop<0&&(n.scrollTop=e.offsetTop))}}))}},beforeMount:function(){this.parse()},beforeDestroy:function(){var t=this.el;t&&(t.style.display="none",this.$el.appendChild(t)),this.dropdown&&this.dropdown.destory()},mounted:function(){var t=this;this.$nextTick((function(){var e=t.el=t.$el.querySelector(".h-select-show"),n=t.content=t.$el.querySelector(".h-select-group"),i=t;t.dropdown=new s.default(e,{content:n,disabled:t.disabled,equalWidth:t.equalWidth,trigger:"click foucs",triggerOnce:t.filterable,events:{show:function(){i.isShow=!0}}})}))},methods:{focusSearchInput:function(){this.$el.querySelector(".h-select-search-input").focus()},handle:function(t){var e=t.keyCode||t.which||t.charCode;38==e?this.nowSelected>0&&(this.nowSelected-=1):40==e&&this.nowSelected=0&&(this.setvalue(this.filterOptions[this.nowSelected],"enter"),this.multiple||t.target.blur())},blurHandle:function(t){var e=this;this.nowSelected=-1,setTimeout((function(){e.searchInput=""}),300)},search:function(t){this.searchInput=t},clear:function(){this.setvalue((0,a.default)({},"".concat(this.keyName),null),"clear")},setObjects:function(){if(this.multiple){var t,e=[],n=c(this.codes);try{for(n.s();!(t=n.n()).done;){var i=t.value;null!=this.optionsMap[i]&&e.push(this.optionsMap[i])}}catch(t){n.e(t)}finally{n.f()}this.objects=e}else this.objects=this.optionsMap[this.codes]},parse:function(){var t=this;if(this.multiple){var e=this.value||[];o.default.isArray(e)||(console.warn("[HeyUI WARNING] Select Component: value '".concat(e,"' can't be a value of a multiple select")),e=[]),this.codes=e.map((function(e){return"key"==t.type?t.getValue(e):e[t.keyName]})).filter((function(t){return null!==t}))}else"key"==this.type?this.codes=this.getValue(this.value):o.default.isObject(this.value)?this.codes=this.value[this.keyName]:this.codes=null;this.setObjects()},getValue:function(t){return o.default.isNull(t)?null:t},setvalue:function(t,e){var n=this;if(!this.disabled&&!t.disabled&&!t.isLabel){var i=t[this.keyName];if(this.multiple){if(!o.default.isNull(this.limit)&&!this.isIncludes(i)&&this.codes.length>=this.limit)return void u.default.error(this.t("h.select.limitSize",{limitSize:this.limit}));this.codes=o.default.toggleValue(this.codes,i)}else this.codes=i;this.setObjects();var a="key"==this.type?this.codes:this.objects;this.$emit("input",a),this.$emit("change",this.objects);var r=document.createEvent("CustomEvent");r.initCustomEvent("setvalue",!0,!0,this.objects),this.$el.dispatchEvent(r),this.nowSelected=-1,this.multiple?(this.searchInput="",this.$nextTick((function(){n.dropdown.update()}))):(this.dropdown.hide(),setTimeout((function(){n.searchInput=""}),100))}},isIncludes:function(t){var e=this;return this.codes.some((function(n){return e.isEqual(n,t)}))},isEqual:function(t,e){return t==e&&String(t)==String(e)},getLiCls:function(t,e){var n,i=t[this.keyName];return t.isLabel?(0,a.default)({},"".concat(f,"-item-label"),t.isLabel):(n={},(0,a.default)(n,"".concat(f,"-item-disabled"),t.disabled),(0,a.default)(n,"".concat(f,"-item"),!0),(0,a.default)(n,"".concat(f,"-item-selected"),this.multiple?this.isIncludes(i):this.isEqual(this.codes,i)),(0,a.default)(n,"".concat(f,"-item-picked"),this.nowSelected===e),n)}},filters:{showText:function(t,e){return e.indexOf(t)>-1}},computed:{hasClose:function(){return!this.nullOptionText&&this.nullOption&&this.deletable&&!this.multiple&&this.hasValue&&!this.disabled},hasNullOption:function(){return this.nullOptionText},hasValue:function(){return this.multiple?this.codes.length>0:!o.default.isNull(this.codes)&&this.objects},singleValue:function(){return this.hasValue?this.objects[this.titleName]:null},showEmptyContent:function(){return this.emptyContent||this.t("h.select.emptyContent")},hasLabel:function(){return this.options.some((function(t){return t.isLabel}))},showNullOptionText:function(){return this.nullOptionText||this.t("h.select.nullOptionText")},showPlaceholder:function(){return this.placeholder||this.t("h.select.placeholder")},selectCls:function(){var t,e=this.autosize||!!this.noBorder;return t={},(0,a.default)(t,"".concat(f),!0),(0,a.default)(t,"".concat(f,"-input-border"),!this.noBorder),(0,a.default)(t,"".concat(f,"-input-no-border"),this.noBorder),(0,a.default)(t,"".concat(f,"-multiple"),this.multiple),(0,a.default)(t,"".concat(f,"-no-autosize"),!e),(0,a.default)(t,"".concat(f,"-disabled"),this.disabled),t},showCls:function(){var t;return t={},(0,a.default)(t,"".concat(f,"-show"),!0),(0,a.default)(t,"".concat(this.className,"-show"),!!this.className),t},groupCls:function(){var t;return t={},(0,a.default)(t,"".concat(f,"-group"),!0),(0,a.default)(t,"".concat(f,"-group-has-label"),this.hasLabel),(0,a.default)(t,"".concat(f,"-multiple"),this.multiple),(0,a.default)(t,"".concat(f,"-single"),!this.multiple),(0,a.default)(t,"".concat(this.className,"-dropdown"),!!this.className),t},optionsMap:function(){var t=o.default.toObject(this.options,this.keyName);return delete t.null,t},filterOptions:function(){var t=this;if(this.searchInput){this.dropdown&&this.dropdown.update();var e=this.searchInput.toLocaleLowerCase();return this.options.filter((function(n){return-1!=(n[t.html]||n[t.titleName]).toLocaleLowerCase().indexOf(e)}))}return this.options},options:function(){if(!this.datas&&!this.dict)return console.error("[HeyUI Error] Select Component: Datas or dict parameters need to be defined at least."),[];var t,e=this.datas;(this.dict&&(e=r.default.getDict(this.dict)),e=r.default.initOptions(e,this),!this.multiple&&this.hasNullOption)&&e.unshift((t={},(0,a.default)(t,"".concat(this.keyName),null),(0,a.default)(t,"".concat(this.titleName),this.showNullOptionText),(0,a.default)(t,"".concat(this.html),this.showNullOptionText),t));return e}}};e.default=h},function(t,e,n){"use strict";n.r(e);var i=n(74),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hPoptip",props:{content:String,placement:{type:String,default:"top"},theme:{type:String,default:"white"},disabled:{type:Boolean,default:!1}},methods:{close:function(){this.$refs.tooltip.hide()},trigger:function(){this.$emit("confirm"),this.close()}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(76),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=["red","blue","primary","gray","yellow","green"],a={name:"hProgress",props:{color:{type:String,default:"primary"},percent:{type:Number,default:0},strokeWidth:{type:Number,default:10}},data:function(){return{}},computed:{progressInnerStyle:function(){var t={};return t.height="".concat(this.strokeWidth,"px"),t},progressBgStyle:function(){var t={};return!i.indexOf(this.color)>-1&&(t["background-color"]=this.color),t.width="".concat(Math.min(this.percent,100),"%"),t.height="".concat(this.strokeWidth,"px"),t},progressBgClass:function(){var t={};return i.indexOf(this.color)>-1&&(t["bg-".concat(this.color,"-color")]=!0),t}}};e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(78),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=i(n(4)),o={name:"hRadio",model:{prop:"selectStatus",event:"input"},props:{datas:[Object,Array],disabled:{type:Boolean,default:!1},value:[Object,String,Boolean,Number],dict:String,selectStatus:[Object,String,Boolean,Number],keyName:{type:String,default:function(){return r.default.getOption("dict","keyName")}},titleName:{type:String,default:function(){return r.default.getOption("dict","titleName")}}},data:function(){return{key:this.keyName,title:this.titleName}},methods:{setvalue:function(t){if(!this.disabled){var e=null;e=this.isSingle?this.value:t[this.key],this.$emit("input",e),this.$emit("change",t);var n=document.createEvent("CustomEvent");n.initCustomEvent("setvalue",!0,!0,e),this.$el.dispatchEvent(n)}}},computed:{isSingle:function(){return!a.default.isNull(this.value)&&0==this.arr.length},arr:function(){if(!this.datas&&!this.dict)return[];var t=this.datas;return this.dict&&(t=r.default.getDict(this.dict)),r.default.initOptions(t,this)}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(80),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hRate",props:{readonly:{type:Boolean,default:!1},showText:{type:Boolean,default:!1},iconClass:{type:String,default:"h-icon-star-on"},value:{type:[String,Number],default:0}},data:function(){return{mouseValue:!1}},methods:{setvalue:function(t){if(!this.readonly){this.$emit("input",t),this.$emit("change",t);var e=document.createEvent("CustomEvent");e.initCustomEvent("setvalue",!0,!0,this.value),this.$el.dispatchEvent(e)}},mouseover:function(t){this.readonly||(this.mouseValue=t)},mouseleave:function(){this.readonly||(this.mouseValue=!1)},starCls:function(t){var e=this.mouseValue||Number(this.value);return{"h-rate-on":e>=t,"h-rate-off":e-1}},computed:{}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(82),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(10)),r=i(n(3)),o=i(n(2)),s=i(n(157)),l={name:"hSlider",props:{readonly:{type:Boolean,default:!1},step:{type:Number,default:1},value:{type:[Number,Object],default:0},show:Function,multiple:{type:Boolean,default:!1},showtip:{type:Boolean,default:!0},range:{default:function(){return{start:0,end:100}}},trackStyle:Object},data:function(){return{eventControl:{type:null,x:null,init:null},tooltip:{start:null,end:null}}},mounted:function(){var t=this;this.$nextTick((function(){if(t.showtip){if(t.hasStart){var e=t.$el.querySelector(".h-slider-start-node");t.tooltip.start=new s.default(e,{content:t.$el.querySelector(".h-slider-start-node-value"),theme:t.theme,html:!0,trigger:"manual hover",container:document.body,placement:t.placement})}var n=t.$el.querySelector(".h-slider-end-node");t.tooltip.end=new s.default(n,{content:t.$el.querySelector(".h-slider-end-node-value"),theme:t.theme,html:!0,trigger:"manual hover",container:document.body,placement:t.placement})}}))},methods:{choosePosition:function(t){if(!this.multiple){this.eventControl.type="end";var e=this.$el.querySelector(".h-slider-end-node").getBoundingClientRect();this.eventControl.x=e.left+e.width/2,this.eventControl.init=this.values.end,this.mousemove(t),document.body.addEventListener("mousemove",this.mousemove),document.body.addEventListener("mouseup",this.mouseup),document.body.addEventListener("click",this.click)}},showContent:function(t){return this.show?this.show.call(null,t):t||this.range.start},mousedown:function(t,e){this.readonly||(o.default.addClass(e.target,"h-slider-node-dragging"),this.eventControl.type=t,this.eventControl.x=e.clientX,this.eventControl.init=this.values[t],document.body.addEventListener("mousemove",this.mousemove),document.body.addEventListener("mouseup",this.mouseup),document.body.addEventListener("click",this.click),this.tooltip[t]&&this.tooltip[t].show())},mouseup:function(t){var e=this;if(t.stopPropagation(),!this.readonly){document.body.removeEventListener("mousemove",this.mousemove),document.body.removeEventListener("mouseup",this.mouseup),setTimeout((function(){document.body.removeEventListener("click",e.click)}),200);var n=this.$el.querySelector(".h-slider-node-dragging");n&&o.default.removeClass(n,"h-slider-node-dragging");var i=this.eventControl.type;this.tooltip[i]&&this.tooltip[i].hide()}},click:function(t){t.stopPropagation()},mousemove:function(t){if(!this.readonly){var e=t.clientX-this.eventControl.x;if(0!=e){var n=e/this.$el.querySelector(".h-slider-line").clientWidth;n=parseInt(n*(this.range.end-this.range.start),10);var i=(n=this.eventControl.init+n)%this.step;0!=i&&(n-=i),n=Math.max(n,this.range.start),n=Math.min(n,this.range.end);var a=null,s=this.eventControl.type;this.hasStart?(a={},this.values.start>n&&"end"==s?(s="start",a=o.default.extend(this.values,{start:n,end:this.values.start})):this.values.end=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);ne;)t=this.datas[e]!==this.datasBak[e],e+=1;t&&(this.labelDatas(this.datas),this.update.datas+=1,this.checks.splice(0,this.checks.length),this.tableDatas=(0,r.default)(this.datas)),this.datasBak=(0,r.default)(this.datas)},deep:!0},columns:{handler:function(){this.initColumns(),(this.height||this.fixedColumnLeft.length||this.fixedColumnRight.length)&&this.resize(),this.update.columns+=1},deep:!0},checks:{handler:function(){this.$emit("select",this.checks)},deep:!0},checkbox:function(){(this.height||this.fixedColumnLeft.length||this.fixedColumnRight.length)&&this.resize()},radio:function(){(this.height||this.fixedColumnLeft.length||this.fixedColumnRight.length)&&this.resize()}},beforeDestroy:function(){window.removeEventListener("resize",this.resize)},beforeMount:function(){this.labelDatas(this.datas)},mounted:function(){var t=this;this.isMounted=!0,this.initColumns(),this.$nextTick((function(){var e=t.$el.querySelector(".h-table-body");if(e){var n=function(n){e.scrollLeft=e.scrollLeft+n.deltaX,e.scrollTop=e.scrollTop+n.deltaY,t.scrollTop!=e.scrollTop&&(n.stopPropagation(),n.preventDefault()),t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop};e.addEventListener("scroll",(function(){t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop}));var i=t.$el.querySelector(".h-table-fixed-right"),a=t.$el.querySelector(".h-table-fixed-left");i&&i.addEventListener("mousewheel",n),a&&a.addEventListener("mousewheel",n)}(t.fixedColumnLeft.length||t.fixedColumnRight.length)&&window.addEventListener("resize",t.resize),t.resize(),setTimeout((function(){t.resize()}),100);var r,s=p(t.$el.querySelectorAll(".h-table-tbody"));try{for(s.s();!(r=s.n()).done;){var l=r.value;l.addEventListener("mouseover",(function(e){for(var n=null,i=e.target;i.parentNode!=window.document.body;){if("TH"==i.tagName)return;if("TR"==i.tagName){n=i;break}i=i.parentNode}if(n){o.default.addClass(n,"h-table-tr-hovered");var a,r=n.getAttribute("trIndex"),s=p(t.$el.querySelectorAll(".h-table-tbody>tr[trIndex='".concat(r,"']"))||[]);try{for(s.s();!(a=s.n()).done;){var l=a.value;o.default.addClass(l,"h-table-tr-hovered")}}catch(t){s.e(t)}finally{s.f()}}}),!1),l.addEventListener("mouseout",(function(e){var n,i=p(t.$el.querySelectorAll(".h-table-tr-hovered")||[]);try{for(i.s();!(n=i.n()).done;){var a=n.value;o.default.removeClass(a,"h-table-tr-hovered")}}catch(t){i.e(t)}finally{i.f()}}),!1)}}catch(t){s.e(t)}finally{s.f()}}))},methods:{labelDatas:function(t){var e,n=p(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;i._heyui_uuid||this.$set(i,"_heyui_uuid",o.default.uuid())}}catch(t){n.e(t)}finally{n.f()}},toggleTree:function(t){t._opened?this.foldTree(t):this.expandTree(t)},foldAll:function(){var t=this;this.tableDatas.forEach((function(e){t.foldTree(e)}))},expandAll:function(){var t=this;this.datas.forEach((function(e){t.expandTree(e,{expandAll:!0})}))},expandTree:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t._opened)return!1;if(t.children&&t.children.length){var i;this.labelDatas(t.children),this.$set(t,"_opened",!0);var a=this.tableDatas.indexOf(t);(i=this.tableDatas).splice.apply(i,[a+1,0].concat((0,r.default)(t.children))),t.children.forEach((function(i){e.$set(i,"_level",(t._level||0)+1),n.expandAll&&e.expandTree(i)}))}},foldTree:function(t){var e=this;if(!t._opened)return!1;t.children&&t.children.length&&(t.children.forEach((function(t){e.foldTree(t);var n=e.tableDatas.indexOf(t),i=e.checks.indexOf(t);n>-1&&e.tableDatas.splice(n,1),i>-1&&e.checks.splice(i,1)})),this.$set(t,"_opened",!1))},getTrCls:function(t,e){var n={"h-table-tr-selected":this.isChecked(t),"h-table-tr-select-disabled":t._disabledSelect};if(this.getTrClass){var i=this.getTrClass(t,e);o.default.isString(i)?n[i]=!0:o.default.isArray(i)&&i.forEach((function(t){n[t]=!0}))}return n},isChecked:function(t){return this.checks.indexOf(t)>-1||this.selectRow&&t==this.rowSelected},setRowSelect:function(t){this.rowSelected=t},clearRowSelect:function(){this.rowSelected=null},invereSelection:function(){var t=this;this.checks=this.tableDatas.filter((function(e){return-1==t.checks.indexOf(e)}))},clearSelection:function(){this.checks=[]},clearSort:function(){this.sortStatus.prop=null,this.sortStatus.type=null},triggerSort:function(t,e){this.sortStatus.prop=t.prop,this.sortStatus.type=t.type,!0===e?this.$emit("sort",o.default.copy(t)):"auto"==e&&this.tableDatas.sort((function(e,n){var i=e[t.prop],a=n[t.prop],r=i==a?0:i>a?1:-1;return"asc"==t.type?r:-r}))},setSelection:function(t){o.default.isArray(t)&&(this.checks=(0,r.default)(t))},getSelection:function(){return(0,r.default)(this.checks||[])},checkAll:function(){this.checks.length==this.checkableDatas.length?this.checks.splice(0,this.checkableDatas.length):this.checks=o.default.extend([],this.checkableDatas),this.$emit("selectAll",this.checks)},getWidth:function(t){return o.default.isObject(t)&&t.width?t.width:""},resize:function(){var t=this;this.$nextTick((function(){var e=t.$el.querySelector(".h-table-body");e&&(t.scrollWidth=e.offsetWidth-e.clientWidth,t.scrollHeight=e.offsetHeight-e.clientHeight),t.emptyWidth=t.$el.querySelector(".h-table-header-table").clientWidth,t.tableWidth=t.$el.querySelector(".h-table-container").clientWidth,t.initFixedWidth()}))},mouseover:function(t){this.hoveredTr=t},mouseout:function(){this.hoveredTr=null},initFixedWidth:function(){for(var t=this.$el.querySelectorAll(".h-table-header table>tr>th"),e=this.fixedColumnLeft.length+(this.checkbox||this.radio?1:0),n=0,i=0;it.length-a-1;o--)r+=t[o].clientWidth||0;this.rightWidth=r},refresh:function(){var t=this;this.isMounted&&(0,u.default)((function(){t.initColumns(),t.$nextTick((function(){t.resize()}))}),10)()},initColumns:function(){if(this.columns.length)this.computeColumns=this.columns;else{var t=[];if(this.$slots.default){var e,n=p(this.$slots.default);try{for(n.s();!(e=n.n()).done;){var i=e.value,a=i.componentOptions;!a||"TableItem"!=a.tag&&"h-table-item"!=a.tag&&"h-tableitem"!=a.tag||t.push(i.componentOptions.propsData)}}catch(t){n.e(t)}finally{n.f()}}this.computeColumns=t}},triggerTrClicked:function(t,e,n){if(this.selectRow&&!t._disabledSelect&&(this.rowSelected=t,this.$emit("rowSelect",t)),this.checkbox&&this.selectWhenClickTr&&!o.default.hasClass(n.target,"h-checkbox-native")&&!t._disabledSelect){var i=this.checks;i.some((function(e){return e==t}))?i.splice(i.indexOf(t),1):i.push(t)}this.$emit("trclick",t,n,e)},triggerTrDblclicked:function(t,e,n){this.$emit("trdblclick",t,n,e)}},computed:{checkableDatas:function(){return this.tableDatas.filter((function(t){return!t._disabledSelect}))},isTemplateMode:function(){var t=this.$scopedSlots.default;return t&&("normalized"==t.name||!this.$slots.default)},totalCol:function(){return(this.checkbox||this.radio?1:0)+this.computeColumns.length},fixedColumnLeft:function(){var t,e=[],n=p(this.computeColumns);try{for(n.s();!(t=n.n()).done;){var i=t.value;"left"==i.fixed&&e.push(i)}}catch(t){n.e(t)}finally{n.f()}return e},fixedColumnRight:function(){var t,e=[],n=p(this.computeColumns);try{for(n.s();!(t=n.n()).done;){var i=t.value;"right"==i.fixed&&e.push(i)}}catch(t){n.e(t)}finally{n.f()}return e},tableCls:function(){var t;return t={},(0,a.default)(t,"h-table",!0),(0,a.default)(t,"".concat("h-table","-border"),!!this.border),(0,a.default)(t,"".concat("h-table","-stripe"),this.stripe),t},fixedBodyStyle:function(){var t={};return t.bottom="".concat(this.scrollHeight,"px"),this.height&&(t.maxHeight="".concat(this.height,"px")),this.leftWidth&&(t.width="".concat(this.leftWidth,"px")),t},fixedRightBodyStyle:function(){var t={};return t["margin-right"]="".concat(this.scrollWidth,"px"),t.bottom="".concat(this.scrollHeight,"px"),this.height&&(t.maxHeight="".concat(this.height,"px")),this.rightWidth&&(t.width="".concat(this.rightWidth,"px")),t},bodyStyle:function(){var t={};return this.height&&(t.maxHeight="".concat(this.height,"px")),t}}};e.default=m},function(t,e,n){"use strict";n.r(e);var i=n(96),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(4)),o={name:"hTableTd",props:{index:Number,prop:String,dict:String,data:[Object,Array],align:String,attrs:Function,unit:String,render:Function,format:Function,treeOpener:Boolean,className:String},data:function(){return{}},methods:{toggleTree:function(){this.$emit("toggleTree",this.data)}},computed:{tdAttrs:function(){var t={};return this.attrs&&(t=this.attrs.call(null,this.data,this.index)),t},level:function(){return this.data._level||0},cls:function(){var t;return t={},(0,a.default)(t,"text-".concat(this.align),!!this.align),(0,a.default)(t,this.className,!!this.className),t},show:function(){if("$index"==this.prop)return this.index;if("$serial"==this.prop)return this.index+1;if(this.render)return this.render.call(null,this.data);var t=this.data[this.prop];return this.dict?r.default.dictMapping(t,this.dict):this.unit?""===t||null==t?"":"".concat(t).concat(this.unit):this.format?this.format(t):t}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(98),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(2)),o={name:"hTableTh",props:{rowspan:Number,colspan:Number,title:String,width:Number,className:String,fixed:String,label:String,prop:String,dict:String,align:String,format:Function,render:Function,unit:String,tooltip:{type:[Boolean,Object],default:!1},sortProp:String,sort:{type:[Boolean,String],default:!1},sortStatus:{type:Object,default:function(){return{type:null,prop:null}}},placement:String,content:String},data:function(){return{}},methods:{triggerSort:function(){if(!this.sort)return!1;var t=r.default.copy(this.sortStatus);this.sortStatus.type&&this.sortStatus.prop==this.sortUseProp?t.type="asc"==this.sortStatus.type?"desc":"asc":(t.type="desc",t.prop=this.sortUseProp);var e=this.$parent;"Table"!=e.$options._componentTag&&"h-table"!=e.$options._componentTag||e.triggerSort(t,this.sort)}},computed:{tooltipParam:function(){return!0===this.tooltip?{enable:!0,content:this.content,placement:this.placement}:r.default.isObject(this.tooltip)?{enable:!0,content:this.tooltip.content,placement:this.tooltip.placement}:{enable:!1}},cls:function(){var t;return t={},(0,a.default)(t,"text-".concat(this.align),!!this.align),(0,a.default)(t,this.className,!!this.className),(0,a.default)(t,"pointer",this.sort),t},sortUseProp:function(){return this.sortProp||this.prop}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(100),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={components:{Checkbox:i(n(11)).default},props:{checks:{type:Array,default:function(){return[]}},checkableDatas:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{checkAll:function(){this.$emit("checkAll")}},computed:{}};e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(102),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hTableItem",props:{rowspan:Number,colspan:Number,title:String,width:Number,fixed:String,label:String,prop:String,attrs:Function,dict:String,align:String,className:String,treeOpener:Boolean,unit:String,format:Function,render:Function,sortProp:String,tooltip:{type:[Boolean,Object],default:!1},sort:{type:[Boolean,String],default:!1},placement:String,content:String},beforeMount:function(){this.init()},beforeDestroy:function(){this.init()},data:function(){return{}},methods:{init:function(){var t=this.$parent;"Table"!=t.$options._componentTag&&"h-table"!=t.$options._componentTag||t.refresh()}},watch:{title:function(){this.init()},width:function(){this.init()},fixed:function(){this.init()},label:function(){this.init()},prop:function(){this.init()},align:function(){this.init()}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(104),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(4)),o={name:"hTabs",props:{dict:String,datas:[Object,Array],value:[String,Number],className:{type:String,default:"h-tabs-default"},keyName:{type:String,default:function(){return r.default.getOption("dict","keyName")}},titleName:{type:String,default:function(){return r.default.getOption("dict","titleName")}}},data:function(){return{key:this.keyName,title:this.titleName}},methods:{trigger:function(t,e){this.value!=t[this.key]&&(this.$emit("input",t[this.key]),this.$emit("change",t,e)),this.$emit("click",t,e)}},computed:{tabsCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-tabs"),!0),(0,a.default)(t,this.className,!!this.className),t},arr:function(){if(!this.datas&&!this.dict)return console.error("[HeyUI Error] Tabs Component: Datas or dict parameters need to be defined at least."),[];var t=this.datas;return this.dict&&(t=r.default.getDict(this.dict)),r.default.initOptions(t,this)}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(106),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(2)),o=i(n(5)),s=i(n(7)),l={name:"hTagInput",mixins:[o.default],props:{readonly:{type:Boolean,default:!1},noBorder:{type:Boolean,default:!1},placeholder:{type:String},type:{type:String,default:"Array"},split:{type:String,default:","},wordlimit:{type:Number,default:50},limit:{type:Number,default:1e4},value:[Array,String,Number]},data:function(){return{focusing:!1,tagvalue:""}},methods:{removeLast:function(t){""===t.target.value&&this.values.length&&this.remove(this.values.length-1)},remove:function(t){if(!this.readonly){var e=r.default.copy(this.values);e.splice(t,1),this.setvalue(e)}},add:function(){if(this.wordlimit=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1)this.treeDatas.splice(n,1);else if(e.parentKey&&this.treeObj[e.parentKey]){var i=this.treeObj[e.parentKey];i.children.indexOf(e)>-1&&i.children.splice(i.children.indexOf(e),1)}delete this.treeObj[t]}},searchTree:function(t){if(this.searchValue=t,o.default.isNull(this.searchValue)||""===this.searchValue)for(var e=0,n=Object.keys(this.treeObj);e0&&(e=o.default.generateTree(t,this.param));var n=o.default.isFunction(this.param.getDatas);return this.initTreeModeData(e,n)},initTreeModeData:function(t,e,n){var i,a=[],r=u(t);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=this.initTreeNode(o,n,e),l=o[this.param.childrenName]||[];s.children=this.initTreeModeData(l,e,s.key),this.treeObj[s.key]=s,a.push(s)}}catch(t){r.e(t)}finally{r.f()}return a},initTreeNode:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{key:t[this.param.keyName],title:t[this.param.titleName],value:t,parentKey:e,icon:t.treeIcon,status:{hide:!1,opened:!1,loading:!1,checkable:!1!==t.checkable,isWait:n,selected:!1,indeterminate:!1,choose:!1,disabled:!!t.disabled},children:[]}},refresh:function(){this.initTreeDatas()},expandAll:function(){for(var t=0,e=Object.keys(this.treeObj);t-1}},chooseAll:function(){for(var t in this.treeObj)this.treeObj[t].status.choose=!0;this.setvalue()},updateSelect:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(null===t)this.status.selected=null;else{var n=this.treeObj[t];n&&(this.status.selected=t,f(this.treeObj,n,"opened",!0))}e&&this.setvalue()},getSelect:function(){return o.default.isNull(this.status.selected)?null:this.treeObj[this.status.selected].value},updateChoose:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.multiple){t=t||[];for(var n=0,i=Object.keys(this.treeObj);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw r}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n.h-treepicker-show")),n=t.$el.querySelector(".h-treepicker-group");t.dropdown=new s.default(e,{trigger:"click",content:n,disabled:t.disabled}),t.disabled&&t.dropdown.disabled()}}))},watch:{value:function(){this.parse()},disabled:function(){if(!this.dropdown)return!1;this.disabled?this.dropdown.disabled():this.dropdown.enabled()}},methods:{refresh:function(){if(this.$refs.tree)return this.$refs.tree.refresh()},loadDataSuccess:function(){this.parse(),this.$emit("loadDataSuccess")},getChoose:function(){return this.$refs.tree?this.$refs.tree.getChoose():[]},getFullChoose:function(){return this.$refs.tree?this.$refs.tree.getFullChoose():[]},select:function(t){this.stashObject=t,this.multiple||this.useConfirm||this.confirm(t)},choose:function(t){this.objects=t,this.$emit("choose",t),this.multiple&&this.setvalue()},chooseAll:function(){this.$refs.tree&&this.$refs.tree.chooseAll()},remove:function(t){var e=this.objects.indexOf(t);this.objects.splice(e,1),this.valuebak.splice(e,1),this.setvalue(),this.triggerChange()},updateShow:function(t){o.default.isObject(t)&&!this.multiple&&(this.object=t),o.default.isArray(t)&&this.multiple&&(this.objects=t),this.setvalue()},parse:function(){var t=this;"key"==this.type?(this.valuebak=o.default.copy(this.value),this.$nextTick((function(){t.multiple?t.objects=t.$refs.tree.getChoose():t.object=t.$refs.tree.getSelect()}))):this.multiple?(this.valuebak=(this.value||[]).map((function(e){return e[t.param.keyName]})),this.objects=o.default.copy(this.value)):(this.valuebak=this.value?this.value[this.param.keyName]:null,this.object=o.default.copy(this.value))},dispose:function(){var t=this;return this.multiple?this.objects.map((function(e){return"key"==t.type?e[t.param.keyName]:e})).filter((function(t){return void 0!==t})):this.object?"key"==this.type?this.object[this.param.keyName]:this.object:null},clear:function(){this.stashObject=null,this.objects=[],this.$refs.tree.searchTree(null),this.confirm()},confirm:function(){this.multiple||(this.object=this.stashObject,this.$emit("select",this.object)),this.setvalue(),this.triggerChange(),this.dropdown.hide()},setvalue:function(){var t=this,e=this.dispose();this.$emit("input",e),this.stashObject=this.object;var n=document.createEvent("CustomEvent");n.initCustomEvent("setvalue",!0,!0,e),this.$el.dispatchEvent(n),this.$nextTick((function(){t.dropdown&&t.dropdown.update()}))},triggerChange:function(){var t=this;this.$nextTick((function(){t.$emit("change",o.default.copy(t.multiple?t.objects:t.object))}))},expandAll:function(){if(this.$refs.tree)return this.$refs.tree.expandAll()},expand:function(t){if(this.$refs.tree)return this.$refs.tree.expand(t)},foldAll:function(){if(this.$refs.tree)return this.$refs.tree.foldAll()}},computed:{param:function(){return this.config?o.default.extend({},r.default.getOption("tree.default"),r.default.getOption("tree.configs.".concat(this.config)),this.option):o.default.extend({},r.default.getOption("tree.default"),this.option)},showCls:function(){return(0,a.default)({},"".concat(this.className,"-show"),!!this.className)},groupCls:function(){return(0,a.default)({},"".concat(this.className,"-dropdown"),!!this.className)},treepickerCls:function(){var t;return t={},(0,a.default)(t,"".concat(u),!0),(0,a.default)(t,"".concat(u,"-input-border"),!0),(0,a.default)(t,"".concat(u,"-no-autosize"),!0),(0,a.default)(t,"".concat(u,"-multiple"),this.multiple),(0,a.default)(t,"".concat(u,"-disabled"),this.disabled),t}}};e.default=c},function(t,e,n){"use strict";n.r(e);var i=n(114),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(2)),o={name:"hNumberInput",props:{value:[Number,String],min:Number,max:Number,disabled:{type:Boolean,default:!1},step:{type:Number,default:1},placeholder:{type:String},useInt:{type:Boolean,default:!1},useOperate:{type:Boolean,default:!1},precision:{type:Number}},data:function(){return{focusing:!1,editValue:this.value,valueBak:this.value}},watch:{value:function(){this.valueBak!=this.value&&(this.editValue=this.value,this.valueBak=this.value)}},mounted:function(){},methods:{plus:function(){if(this.disabled)return!1;var t=this.getValue(this.value);this.setvalue(r.default.add(t||0,this.step),"handler")},minus:function(){if(this.disabled)return!1;var t=this.getValue(this.value);this.setvalue(r.default.add(t||0,-this.step),"handler")},input:function(t){if(isNaN(Number(t.target.value)))return!1;var e=this.getValue(t.target.value);r.default.isNumber(this.value)&&Math.abs(e-this.value)<=1&&this.precision||this.setvalue(e,"input")},blur:function(t){this.focusing=!1;var e=this.getValue(t.target.value);this.setvalue(e,"blur")},getValue:function(t){if(""===t)return null;if(this.useInt){var e=parseInt(t);return isNaN(e)?null:e}var n=parseFloat(t);return isNaN(n)?null:n},setvalue:function(t,e){if(this.disabled)return!1;void 0!==this.max&&null!==t&&(t=Math.min(this.max,t)),void 0!==this.min&&null!==t&&(t=Math.max(this.min,t)),this.precision&&r.default.isNumber(t)&&(t=(t=Math.floor(r.default.mul(t||0,Math.pow(10,this.precision)))/Math.pow(10,this.precision)).toFixed(this.precision)),this.valueBak=t,this.$emit("input",t),"input"!=e&&(this.editValue=t),"input"!=e&&this.$emit("change",t);var n=document.createEvent("CustomEvent");n.initCustomEvent("setvalue",!0,!0,t),this.$el.dispatchEvent(n)}},computed:{numberinputCls:function(){var t;return t={},(0,a.default)(t,"h-numberinput",!0),(0,a.default)(t,"".concat("h-numberinput","-disabled"),!!this.disabled),t}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(116),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(157)),o={name:"hTooltip",props:{trigger:{type:String,default:"hover"},content:String,placement:{type:String,default:"top"},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},className:{type:String},theme:String,delay:{type:Number,default:0},maxWidth:Number},mounted:function(){this.init()},methods:{show:function(){this.tooltip&&this.tooltip.show()},hide:function(){this.tooltip&&this.tooltip.hide()},update:function(){this.tooltip&&this.tooltip.update()},init:function(){var t=this;this.$nextTick((function(){var e=t.$el,n=t.$el.querySelector(".h-tooltip-inner-content");t.tooltip=new r.default(e,{content:n,theme:t.theme,html:!0,trigger:t.trigger,editable:t.editable,className:t.className,container:document.body,placement:t.placement,disabled:t.disabled,maxWidth:t.maxWidth,delay:t.delay,events:{show:function(){t.$emit("show")},hide:function(){t.$emit("hide")}}})}))}},watch:{disabled:function(){this.tooltip&&(this.disabled?this.tooltip.disabled():this.tooltip.enabled())},content:function(){this.tooltip&&this.tooltip.update()}},computed:{tooltipCls:function(){return(0,a.default)({},"".concat("h-tooltip"),!0)},showCls:function(){return(0,a.default)({},"".concat("h-tooltip","-show"),!0)},groupCls:function(){return(0,a.default)({},"".concat("h-tooltip"),!0)}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(118),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(6)),r=i(n(3)),o=i(n(2)),s=i(n(4)),l=i(n(5)),u=i(n(241));function c(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);nthis.files.length)||this.isSingle&&!this.files)},showReUploadWord:function(){return this.t("h.uploader.reUpload")},showUploadWord:function(){return this.t("h.uploader.upload")},isSingle:function(){return"image"==this.type||"file"==this.type},uploaderCls:function(){var t;return t={},(0,r.default)(t,"h-uploader",!0),(0,r.default)(t,"".concat("h-uploader","-").concat(this.type,"-container"),!0),(0,r.default)(t,this.className,this.className),t},fileList:function(){var t,e=[];if(o.default.isArray(this.files)){var n,i=c(this.files);try{for(i.s();!(n=i.n()).done;){var r=n.value;e.push(f(r,this.param))}}catch(t){i.e(t)}finally{i.f()}}else this.files&&e.push(f(this.files,this.param));this.uploadList.length>0&&(this.isSingle?e=[this.uploadList[0]]:(t=e).push.apply(t,(0,a.default)(this.uploadList)));return e},file:function(){return this.fileList.length?this.fileList[0]:null}}};e.default=p},function(t,e,n){"use strict";n.r(e);var i=n(120),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=i(n(158)),o={name:"hImagePreviewModal",props:{isShow:{type:Boolean,default:!1},datas:{type:[Array,String],default:function(){return[]}},index:{type:Number,default:0}},data:function(){return{height:200,width:200,showIndex:-1,changeing:!1,previewFile:{}}},watch:{isShow:function(){this.isShow?(this.width=200,this.height=200,this.change(this.index)):this.changeing=!1}},mounted:function(){this.change(this.index)},methods:{initStyle:function(t){var e=this,n=this.$refs.img.width,i=this.$refs.img.height;if(n>800||i>12e3){var a=Math.max(n/800,i/12e3);n/=a,i/=a}this.width=n,this.height=i,setTimeout((function(){e.changeing=!1}),300)},change:function(t){var e=this;if(t<0||t>this.computedDatas.length-1)return!1;this.changeing=!0,setTimeout((function(){e.showIndex=t,e.updatePreview()}),300)},updatePreview:function(){var t=this;if(0==this.computedDatas.length||!1===this.isShow)return{};var e=this.computedDatas[this.showIndex],n=a.default.isString(e)?{url:e}:e;n.url==this.previewFile.url&&this.$nextTick((function(){t.$refs.img&&t.$refs.img.complete&&setTimeout((function(){t.changeing=!1}),300)})),this.previewFile=n}},computed:{previewStyle:function(){return{height:"".concat(this.height,"px"),width:"".concat(this.width,"px")}},computedDatas:function(){return a.default.isString(this.datas)?[this.datas]:a.default.isArray(this.datas)?this.datas:[]},isShowIndex:function(){return!a.default.isString(this.datas)}},components:{Loading:r.default}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(122),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(6)),o=i(n(4)),s=i(n(2)),l=i(n(9)),u=i(n(5));function c(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1){var e=t.content.querySelector(".h-autocomplete-item-selected"),n=t.content.querySelector(".h-autocomplete-ul");e&&n&&(e.offsetTop+e.offsetHeight-t.content.scrollTop>t.content.offsetHeight?t.content.scrollTop=e.offsetTop+e.offsetHeight-t.content.offsetHeight:e.offsetTop-t.content.scrollTop<0&&(t.content.scrollTop=e.offsetTop))}}))}},beforeMount:function(){this.parse()},beforeDestroy:function(){var t=this.el;t&&(t.style.display="none",this.$el.appendChild(t)),this.dropdown&&this.dropdown.destory()},mounted:function(){var t=this;this.$nextTick((function(){var e=t.el=t.$el.querySelector(".h-autocomplete-show");t.content=t.$el.querySelector(".h-autocomplete-group");var n=t;t.dropdown=new l.default(e,{trigger:"",triggerOnce:!0,content:t.content,disabled:t.disabled,equalWidth:!0,events:{show:function(){n.isShow=!0}}})}))},methods:{parse:function(){var t=this;if(this.tempValue=null,this.multiple){var e=[];if(s.default.isArray(this.value)&&this.value.length>0){var n,i=c(this.value);try{var o=function(){var i=n.value;if("key"==t.type&&!s.default.isNull(i)&&(t.dict||t.datas)){var a=[].concat((0,r.default)(t.results),(0,r.default)(t.objects)).filter((function(t){return t.key==i}));a.length&&(i=a[0].value)}e.push(t.getValue(i))};for(i.s();!(n=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}}this.objects=e}else{var l=null;if("key"==this.type){if(!s.default.isNull(this.value)){if(!this.show&&(this.dict||this.datas)&&this.results){var u=this.results.filter((function(e){return e[t.param.keyName]==t.value}));u.length>0&&(l=u[0].value)}var d;if(s.default.isNull(l))d={},(0,a.default)(d,this.param.keyName,this.value),(0,a.default)(d,this.param.titleName,this.show),l=d}}else if("title"==this.type){var f;if(!s.default.isNull(this.value))f={},(0,a.default)(f,this.param.keyName,this.value),(0,a.default)(f,this.param.titleName,this.value),l=f}else l=this.value;s.default.isNull(l)?this.object={key:null,title:null,value:null}:s.default.extend(this.object,this.getValue(l)),this.tempValue=this.object.title}this.oldValue=this.value},dispose:function(){var t=null;if(this.multiple){if(t=[],s.default.isArray(this.objects)&&this.objects.length>0){var e,n=c(this.objects);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push(this.getV(i))}}catch(t){n.e(t)}finally{n.f()}}return t}if(this.mustMatch)t=this.getV(this.object);else if(s.default.isBlank(this.object.key)){if(!s.default.isBlank(this.tempValue)){t="title"==this.type?this.tempValue:(0,a.default)({},this.param.titleName,this.tempValue),this.object.title=this.tempValue}}else t=this.getV(this.object);return t},getV:function(t){return"key"==this.type?t.key:"title"==this.type?t.title:t.value},getValue:function(t){return s.default.isObject(t)||"object"!=this.type?s.default.getValue(t,this.param):s.default.getValue((0,a.default)({},this.param.titleName,t),this.param)},focus:function(t){this.lastTrigger=null,this.focusing=!0,this.focusValue=t.target.value,this.multiple&&(this.searchValue=null),this.search()},focusData:function(t){this.focusValue=this.object.title,this.multiple&&(this.searchValue=null)},paste:function(t){var e=this;setTimeout((function(){e.search()}),0)},blur:function(t){if(this.focusing=!1,"picker"!=this.lastTrigger&&"clear"!=this.lastTrigger){var e=t.target.value;this.focusValue!==e&&(this.mustMatch?this.multiple||null==this.object.key?this.tempValue=null:(this.object={key:null,title:null,value:null},this.setvalue("blur")):(this.multiple&&e&&this.objects.push(this.getValue(e)),this.setvalue("blur"))),this.loading=!1,this.searchTimeout&&clearTimeout(this.searchTimeout)}},keydownHandle:function(t){8==(t.keyCode||t.which||t.charCode)&&""===t.target.value&&this.objects.length>0?this.remove(this.objects[this.objects.length-1]):this.endInput&&t.key==this.endInput&&(t.preventDefault(),this.enterHandle(t))},handle:function(t){var e=t.keyCode||t.which||t.charCode;38==e?this.nowSelected>0&&(this.nowSelected-=1):40==e?this.nowSelected=0?(this.update(this.results[this.nowSelected]),this.setvalue("enter")):(!this.mustMatch&&this.multiple&&e&&this.objects.push(this.getValue(e)),this.setvalue("enter"))},search:function(){var t=this,e=this.$refs.input,n=e.value;this.tempValue=n||null,n!=this.object.title&&this.object.title&&(this.object.key=null,this.object.title=null,this.object.value=null),this.loading=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),n.length>=this.param.minWord?(this.searchTimeout=setTimeout((function(){t.updateDropdown(),s.default.isFunction(t.param.loadData)?(t.loading=!0,t.param.loadData.call(t.param,n,(function(i){e.value===n&&(t.loading=!1,t.loadDatas=i,t.updateDropdown(),t.nowSelected=t.autoSelectFirst?0:-1)}),(function(e){t.loading=!1}))):t.nowSelected=t.autoSelectFirst?0:-1}),this.delay),this.searchValue=n,this.dropdown.update()):this.dropdown.hide()},updateDropdown:function(){var t=this;this.$nextTick((function(){t.dropdown&&(0!=t.results.length||t.showDropdownWhenNoResult?(t.dropdown.show(),t.dropdown.update()):t.dropdown.hide())}))},update:function(t){this.multiple?this.objects.push(s.default.copy(t)):this.object=null==t?{key:null,title:null,value:null}:s.default.copy(t),this.tempValue=null},remove:function(t){this.objects.splice(this.objects.indexOf(t),1),this.setvalue("remove")},picker:function(t){this.update(t),this.setvalue("picker")},setvalue:function(t){var e=this;if(!this.disabled){this.lastTrigger=t,this.nowSelected=-1;var n=this.oldValue=this.dispose();this.focusValue=null,this.focusData(),this.multiple?this.tempValue=null:this.tempValue=this.object.title,this.$emit("input",n,t),this.$emit("change",s.default.copy(this.multiple?this.objects:this.object),t);var i=document.createEvent("CustomEvent");i.initCustomEvent("setvalue",!0,!0,n),this.$el.dispatchEvent(i),t&&this.$emit(t,n),this.dropdown.hide(),setTimeout((function(){e.searchValue=null}),100)}},hide:function(){this.loading=!1,this.dropdown.hide()},clear:function(){this.tempValue=null,this.focusValue=null,this.object={key:null,title:null,value:null},this.setvalue("clear")}},computed:{showPlaceholder:function(){return this.placeholder||this.t("h.autoComplate.placeholder")},showEmptyContent:function(){return this.emptyContent||this.t("h.autoComplate.emptyContent")},param:function(){return s.default.extend({},o.default.getOption("autocomplete.default"),this.config?o.default.getOption("autocomplete.configs.".concat(this.config)):{},this.option)},autocompleteCls:function(){var t,e=!!this.noBorder;return e||(e=this.autosize),t={},(0,a.default)(t,"".concat(f),!0),(0,a.default)(t,"".concat(f,"-input-border"),!this.noBorder),(0,a.default)(t,"".concat(f,"-multiple"),this.multiple),(0,a.default)(t,"".concat(f,"-no-autosize"),!e),(0,a.default)(t,"".concat(f,"-disabled"),this.disabled),(0,a.default)(t,"focusing",this.focusing),t},showCls:function(){var t;return t={},(0,a.default)(t,"".concat(f,"-show"),!0),(0,a.default)(t,"".concat(this.className,"-show"),!!this.className),(0,a.default)(t,"focusing",this.focusing),t},groupCls:function(){var t;return t={},(0,a.default)(t,"".concat(f,"-group"),!0),(0,a.default)(t,"".concat(f,"-multiple"),this.multiple),(0,a.default)(t,"".concat(this.className,"-dropdown"),!!this.className),t},results:function(){var t=this,e=this.datas;if(this.dict&&(e=o.default.getDict(this.dict)),s.default.isNull(e))e=this.loadDatas;else if(e=o.default.initOptions(e,this),this.searchValue){var n=this.searchValue.toLowerCase();e=e.filter((function(e){return-1!=(e.html||e[t.param.titleName]||"").toLowerCase().indexOf(n)}))}if(this.objects.length>0){var i=s.default.getArray(this.objects,"key").filter((function(t){return!s.default.isNull(t)}));e=e.filter((function(e){return-1==i.indexOf(e[t.param.keyName])}))}var a,r=[],l=c(e);try{for(l.s();!(a=l.n()).done;){var u=a.value;r.push(this.getValue(u))}}catch(t){l.e(t)}finally{l.f()}return r}}};e.default=h},function(t,e,n){"use strict";n.r(e);var i=n(124),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r={type:["flex"],align:["top","middle","bottom"],justify:["start","end","center","space-around","space-between"],direction:["row","row-reverse","column","column-reverse"]},o=function(t,e){return Math.floor(t/-2)+(e?t%2:0)+"px"},s={name:"hRow",props:{type:{validator:function(t){return-1!=r.type.indexOf(t)}},align:{validator:function(t){return-1!=r.align.indexOf(t)}},justify:{validator:function(t){return-1!=r.justify.indexOf(t)}},direction:{validator:function(t){return-1!=r.direction.indexOf(t)}},space:{type:Number,default:0},spaceX:{type:Number,default:0},spaceY:{type:Number,default:0}},computed:{classes:function(){var t;return[(t={},(0,a.default)(t,"".concat("h-row"),!this.type),(0,a.default)(t,"".concat("h-row","-").concat(this.type),!!this.type),(0,a.default)(t,"".concat("h-row","-").concat(this.type,"-").concat(this.align),!!this.align),(0,a.default)(t,"".concat("h-row","-").concat(this.type,"-").concat(this.direction),this.direction),(0,a.default)(t,"".concat("h-row","-").concat(this.type,"-").concat(this.justify),!!this.justify),t)]},styles:function(){var t={};if(0!==this.space){var e=o(this.space,!0),n=o(this.space,!1);t.marginLeft=e,t.marginRight=n,t.marginTop=e,t.marginBottom=n}return 0!==this.spaceX&&(t.marginLeft=o(this.spaceX,!0),t.marginRight=o(this.spaceX,!1)),0!==this.spaceY&&(t.marginTop=o(this.spaceY,!0),t.marginBottom=o(this.spaceY,!1)),t}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(126),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r=i(n(2)),o=function(t,e){return Math.floor(t/2)+(e?0:t%2)+"px"},s={name:"hCell",props:{width:[Number,String],flex:[Number,String],className:String,xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},computed:{classes:function(){var t,e=this.width,n=["".concat("h-col")];n.push((t={},(0,a.default)(t,"".concat("h-col","-").concat(e),e),(0,a.default)(t,"".concat(this.className),!!this.className),t));for(var i=null,o=0,s=["xl","lg","md","sm","xs"];o=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw r}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0?(this.rtSearchText=null,e.push.apply(e,(0,a.default)(this.ltChecked)),this.ltChecked.length=0):-1===t&&this.rtChecked.length>0&&(this.ltSearchText=null,this.rtChecked.forEach((function(t){e.splice(e.indexOf(t),1)})),this.rtChecked.length=0),this.$emit("input",e),this.$emit("change",e)}},computed:{transferListStyle:function(){var t={};return this.height&&(t.height="".concat(this.height,"px")),t},sources:function(){var t=this,e=this.value||[],n=this.keyName||"key",i=this.datas.filter((function(t){return-1==e.indexOf(t[n])}));return this.ltSearchText&&this.ltSearchText.trim()?i.filter((function(e){return-1!=e.text.indexOf(t.ltSearchText.trim())})):i},targets:function(){var t=this,e=this.value||[],n=this.keyName||"key",i=this.datas.filter((function(t){return-1!=e.indexOf(t[n])}));return this.rtSearchText&&this.rtSearchText.trim()?i.filter((function(e){return-1!=e.text.indexOf(t.rtSearchText.trim())})):i}}};e.default=s},function(t,e,n){"use strict";n.r(e);var i=n(144),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r={size:["l","s","xs"]},o={name:"hButton",props:{color:String,textColor:String,icon:String,loading:Boolean,circle:Boolean,block:Boolean,noBorder:Boolean,disabled:{type:Boolean,default:!1},size:{type:String,validator:function(t){return-1!=r.size.indexOf(t)}},stop:{type:Boolean,default:!1},preventDefault:{type:Boolean,default:!1},text:Boolean,iconCircle:Boolean,transparent:{type:Boolean,default:!1}},data:function(){return{}},methods:{trigger:function(t){this.stop&&t.stopPropagation(),this.preventDefault&&t.preventDefault(),this.$emit("click",t)}},computed:{hasText:function(){var t=this.$slots.default;return!!(t&&t.length>0)},buttonCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-btn"),!0),(0,a.default)(t,"".concat("h-btn","-circle"),!!this.circle||!!this.iconCircle),(0,a.default)(t,"".concat("h-btn","-icon-circle"),!!this.iconCircle),(0,a.default)(t,"".concat("h-btn","-text"),!!this.text),(0,a.default)(t,"".concat("h-btn","-loading"),!!this.loading),(0,a.default)(t,"".concat("h-btn","-block"),!!this.block),(0,a.default)(t,"".concat("h-btn","-text-").concat(this.textColor),!!this.textColor),(0,a.default)(t,"".concat("h-btn","-").concat(this.color),!!this.color),(0,a.default)(t,"".concat("h-btn","-").concat(this.size),!!this.size),(0,a.default)(t,"".concat("h-btn","-transparent"),!!this.transparent),(0,a.default)(t,"".concat("h-btn","-no-border"),!0===this.noBorder),t},iconCode:function(){return this.loading?"h-icon-loading":this.icon},iconCls:function(){var t=this.loading?"h-icon-loading":this.icon;return(0,a.default)({},"".concat(t),!!t)}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(146),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r={size:["l","s","xs"]},o={name:"hButtonGroup",props:{circle:Boolean,size:{type:String,validator:function(t){return-1!=r.size.indexOf(t)}}},data:function(){return{}},computed:{buttonGroupCls:function(){var t;return t={},(0,a.default)(t,"".concat("h-btn-group"),!0),(0,a.default)(t,"".concat("h-btn-group","-circle"),!!this.circle),(0,a.default)(t,"".concat("h-btn-group","-").concat(this.size),!!this.size),t}}};e.default=o},function(t,e,n){"use strict";n.r(e);var i=n(148),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hTextEllipsis",props:{text:String,height:Number,isLimitHeight:{type:Boolean,default:!0},useTooltip:{type:Boolean,default:!1},tooltipTheme:String,placement:String,textStyle:[String,Object,Array],textClass:[String,Object,Array],more:String},data:function(){return{keyIndex:0,oversize:!1,isHide:!1}},watch:{isLimitHeight:function(){this.init()},text:function(){this.init()},height:function(){this.init()}},mounted:function(){this.init()},methods:{init:function(){this.oversize=!1,this.keyIndex+=1,this.$el.querySelector(".h-text-ellipsis-more").style.display="none",this.isLimitHeight&&this.limitShow()},textClick:function(){this.$emit("click")},limitShow:function(){var t=this;this.$nextTick((function(){var e=t.$el.querySelector(".h-text-ellipsis-limit-text"),n=t.$el,i=t.$el.querySelector(".h-text-ellipsis-more"),a=1e3;if(e)if(n.offsetHeight>t.height){i.style.display="inline-block";for(var r=t.text;n.offsetHeight>t.height&&a>0;)n.offsetHeight>3*t.height?e.innerText=r=r.substring(0,Math.floor(r.length/2)):e.innerText=r=r.substring(0,r.length-1),a--;t.$emit("hide"),t.isHide=!0}else t.$emit("show"),t.isHide=!1}))}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(150),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(6)),r={props:{height:{type:Number,default:300},speed:{type:Number,default:3e3},autoplay:{type:Boolean,default:!0},changeSpeed:{type:Number,default:500},arrow:{type:String,default:"hover"},pageTheme:{type:String,default:"square"},datas:Array,isHoverStop:{type:Boolean,default:!0},paginationTrigger:{type:String,default:"click"},effect:{type:String,default:"scroll"}},data:function(){return{activeIndex:1,scrollTimeout:null,redirectTimeout1:null,redirectTimeout2:null}},computed:{carouselList:function(){if(0==this.datas.length)return[];var t=this.datas;return[t[this.datas.length-1]].concat((0,a.default)(t),[t[0]])},carouselItem:function(){return this.carouselList[this.activeIndex-1]},paginationCls:function(){return"h-carousel-pagination-".concat(this.pageTheme)},arrowCls:function(){return"h-carousel-arrow-".concat(this.arrow)}},watch:{autoplay:function(){this.autoplay?this.startAutoplay(!0):this.stopAutoplay(!0)},effect:function(){clearTimeout(this.scrollTimeout),clearTimeout(this.redirectTimeout1),clearTimeout(this.redirectTimeout2),this.init()}},mounted:function(){var t=this;this.$nextTick((function(){t.init()}))},beforeDestroy:function(){clearTimeout(this.scrollTimeout),clearTimeout(this.redirectTimeout1),clearTimeout(this.redirectTimeout2),window.removeEventListener("resize",this.resizeEvent)},methods:{clickTrigger:function(t,e){this.$emit("click",t,e)},isActive:function(t){var e=this.datas,n=this.activeIndex;return t+1==n||0==n&&t==e.length-1||n==e.length+1&&0==t},init:function(){var t=this;this.startAutoplay(!0),setTimeout((function(){t.change({index:t.activeIndex,immediately:!0})}),300),window.addEventListener("resize",this.resizeEvent,!1)},stopAutoplay:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isHoverStop||t)&&clearTimeout(this.scrollTimeout)},startAutoplay:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isHoverStop||e)&&this.autoplay&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((function(){t.next()}),this.speed))},resizeEvent:function(){this.change({index:this.activeIndex,immediately:!0})},scroll:function(t,e){this.activeIndex=t;var n=t*this.$el.clientWidth;switch(this.effect){case"scroll":var i=this.$el.querySelector(".h-carousel-scroll-list");i.style.transitionDuration=e?"0ms":"".concat(this.changeSpeed,"ms"),i.style.transform="translate3d(".concat(-n,"px, 0px, 0px)")}},change:function(t){var e=this,n=t.index,i=void 0===n?1:n,a=t.immediately,r=void 0!==a&&a;this.activeIndex==this.carouselList.length-1?this.scroll(1,!0):0==this.activeIndex&&this.scroll(this.carouselList.length-2,!0),clearTimeout(this.scrollTimeout),clearTimeout(this.redirectTimeout1),clearTimeout(this.redirectTimeout2),r?this.scroll(i,r):(this.scroll(i,r),this.$emit("change",i,this.carouselList[this.activeIndex]),this.activeIndex==this.carouselList.length-1?this.redirectTimeout1=setTimeout((function(){e.scroll(1,!0)}),this.changeSpeed+100):0==this.activeIndex&&(this.redirectTimeout2=setTimeout((function(){e.scroll(e.carouselList.length-2,!0)}),this.changeSpeed+100))),this.startAutoplay(!0)},changePageByStep:function(t){var e=this.activeIndex+t;e>=this.carouselList.length?e=2:e<0&&(e=this.carouselList.length-3),this.change({index:e})},triggerChange:function(t,e){this.paginationTrigger==t&&this.change({index:e})},prev:function(){this.changePageByStep(-1)},next:function(){this.changePageByStep(1)}}};e.default=r},function(t,e,n){"use strict";n.r(e);var i=n(152),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hCollapse",props:{value:{type:[Array,String],default:function(){return[]}},accordion:{type:Boolean,default:function(){return!1}}},data:function(){return{activedKeys:[].concat(this.value)}},watch:{value:function(t,e){this.activedKeys=t},activedKeys:function(t,e){this.setActives()}},provide:function(){return{collapse:this}},mounted:function(){this.setActives()},methods:{setActives:function(){var t=this;this.$children.forEach((function(e,n){var i=e.name||n;e.isActive=t.activedKeys.indexOf(i)>-1,e.index=n}))},toggle:function(t){if(this.accordion){var e=this.activedKeys.indexOf(t);this.activedKeys=e>-1?[]:[].concat(t)}else{var n=this.activedKeys.indexOf(t);n>-1?this.activedKeys.splice(n,1):this.activedKeys.push(t)}this.$emit("input",this.activedKeys),this.$emit("change",this.activedKeys)}}};e.default=i},function(t,e,n){"use strict";n.r(e);var i=n(154),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e.default=a.a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(384)),r={name:"hCollapseItem",props:{name:{type:[String,Number]},title:{type:String}},components:{CollapseTransition:a.default},data:function(){return{isActive:!1}},inject:["collapse"],computed:{},created:function(){},methods:{toggle:function(){this.collapse.toggle(this.name||this.index)}}};e.default=r},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(14)),r=i(n(2)),o=i(n(4)),s=o.default.getOption("modal","hasDivider"),l={middle:!1,hasDivider:s,fullScreen:!1,className:""};function u(t){var e=r.default.extend({hasMask:!0,closeOnMask:!0,buttons:["cancel"]},l,t,!0);return(t.hasDivider||l.hasDivider)&&(e.className+=" h-modal-has-divider"),e.fullScreen&&(e.className+=" h-modal-full-screen"),e.middle&&(e.className+=" h-modal-container-center"),e.transparent&&(e.className+=" h-modal-transparent"),e.type?e.className+=" h-modal-type-".concat(e.type):e.className+=" h-modal-type-default",e.type="h-modal",e.Vue=null,(0,a.default)(e)}function c(t){return this&&(this.$router&&(t.$router=this.$router),this.$i18n&&(t.$i18n=this.$i18n),this.$store&&(t.$store=this.$store)),new u(t)}c.config=function(t){t.middle&&(l.middle=t.middle)};var d=c;e.default=d},function(t,e,n){"use strict";n.r(e);var i=n(221),a=n(41);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/date-picker/datebase.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(12)),r=i(n(13)),o=i(n(232)),s=i(n(233)),l=i(n(234)),u=i(n(235)),c=i(n(2));function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=(0,l.default)(t);if(e){var a=(0,l.default)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return(0,s.default)(this,n)}}var f=function(t){(0,o.default)(n,t);var e=d(n);function n(t,i){(0,a.default)(this,n),i.template='',i.arrowSelector=".h-tooltip-arrow",i.innerSelector=".h-tooltip-inner";var r=[];return i.theme&&r.push("h-tooltip-".concat(i.theme)),i.editable&&r.push("h-tooltip-editable"),i.class=r.join(" "),i.type="tooltip",i.trigger=i.trigger||"hover focus",e.call(this,t,i)}return(0,r.default)(n,[{key:"updateTemplate",value:function(t,e){c.default.extend(this.options,{content:t,html:e}),this.updateContent(t,e)}}]),n}(u.default);e.default=f},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(316)).default;e.default=a},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{class:this.affixCls,style:this.affixStyle},[this._t("default")],2)])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-avatar",class:t.avatarClass,style:t.avatarStyle},[n("div",{staticClass:"h-avatar-image-container",class:t.avatarImageClass,style:t.avatarImageStyle,on:{click:t.click}},[n("div",{staticClass:"h-avatar-image",style:t.imageStyle})]),t._v(" "),n("div",{staticClass:"h-avatar-info",style:t.infoStyle},[t._t("default")],2)])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{class:this.backtopCls,style:this.backtopStyle},[e("div",{staticClass:"h-backtop-inner",on:{click:this.backtop}},[this.$slots.default?this._t("default"):e("i",{staticClass:"h-icon-top"})],2)])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{class:this.badgeCls},[e("sup",{class:this.badgeCountCls},[this._v(this._s(this.showCount))]),this._v(" "),this._t("default")],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-breadcrumb"},t._l(t.datas,(function(e,i){return n("span",{key:e.title,staticClass:"h-breadcrumb-item"},[i>0?n("span",{staticClass:"h-breadcrumb-item-separator"},[t._v(t._s(t.separator))]):t._e(),t._v(" "),n("span",{staticClass:"h-breadcrumb-item-title",class:{"h-breadcrumb-item-link":e.route,"h-breadcrumb-item-current":i==t.datas.length-1},on:{click:function(n){return t.trigger(e,i)}}},[e.icon?n("i",{staticClass:"h-breadcrumb-item-icon",class:e.icon}):t._e(),n("span",{staticClass:"h-breadcrumb-item-word"},[t._v(t._s(e.title))])])])})),0)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-checkbox",attrs:{disabled:t.disabled}},[t.isSingle?n("label",{class:{"h-checkbox-checked":t.isChecked,"h-checkbox-indeterminate":!t.isChecked&&t.indeterminate,"h-checkbox-disabled":t.disabled},on:{click:function(e){return t.setvalue()}}},[n("span",{staticClass:"h-checkbox-native",attrs:{checked:t.isChecked,indeterminate:!t.isChecked&&t.indeterminate,disabled:t.disabled}}),t.$slots.default?n("span",{staticClass:"h-checkbox-text"},[t._t("default")],2):t._e()]):t._l(t.arr,(function(e){return n("label",{key:e[t.key],class:{"h-checkbox-checked":t.isInclude(e),"h-checkbox-disabled":t.disabled||e.disabled},on:{click:function(n){return t.setvalue(e)}}},[n("span",{staticClass:"h-checkbox-native",attrs:{checked:t.isInclude(e),disabled:t.disabled||e.disabled}}),t.$scopedSlots.item?t._t("item",null,{item:e}):n("span",{staticClass:"h-checkbox-text"},[t._v(t._s(e[t.title]))])],2)}))],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-circle",style:t.circleStyle},[n("svg",{attrs:{width:t.circleSize,height:t.circleSize,viewBox:"0 0 "+2*t.circleSize+" "+2*t.circleSize}},[n("path",{attrs:{d:t.pathString,stroke:"#f3f3f3","stroke-width":t.strokeWidth,"fill-opacity":"0"}}),t._v(" "),n("path",{style:t.pathStyle,attrs:{d:t.pathString,"stroke-linecap":"round",stroke:t.color,"stroke-width":t.strokeWidth,"fill-opacity":"0"}})]),t._v(" "),n("div",{staticClass:"h-circle-content"},[t._t("default")],2)])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.categoryCls,attrs:{disabled:t.disabled}},[n("div",{staticClass:"h-category-show",on:{click:t.openPicker}},[t.multiple&&t.objects.length?n("div",{staticClass:"h-category-multiple-tags"},t._l(t.objects,(function(e){return n("span",{key:e.key},[n("span",[t._v(t._s(e.title))]),t.disabled?t._e():n("i",{staticClass:"h-icon-close-min",on:{click:function(n){return n.stopPropagation(),t.remove(e)}}})])})),0):!t.multiple&&t.object?n("div",{staticClass:"h-category-value-single"},[n("span",[t._v(t._s(t.object.title))]),t._v(" "),null==t.object.title||t.disabled?t._e():n("i",{staticClass:"h-icon-close",on:{mousedown:t.clear}})]):n("div",{staticClass:"h-category-placeholder"},[t._v(t._s(t.showPlaceholder))])])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.cls,style:t.widthStyles},["front"==t.position?n("i",{staticClass:"h-icon-search"}):t._e(),t._v(" "),n("div",{staticClass:"h-search-container"},[n("div",{staticClass:"h-search-input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],staticClass:"h-input",style:t.heightStyles,attrs:{type:"text",placeholder:t.showPlaceholder},domProps:{value:t.inputValue},on:{input:[function(e){e.target.composing||(t.inputValue=e.target.value)},function(e){return t.inputTrigger(t.inputValue)}],keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search(t.inputValue)}}}),t._v(" "),n("i",{staticClass:"h-icon-close",on:{click:function(e){return t.search("")}}})]),t._v(" "),t.showSearchButton?n("button",{staticClass:"h-btn h-btn-primary",style:t.heightStyles,attrs:{type:"button"},on:{click:function(e){return t.search(t.inputValue)}}},[t.$slots.default?[t._t("default")]:[t._v(t._s(t._f("hlang")("h.search.searchText",null,t.searchText)))]],2):t._e()]),t._v(" "),"end"==t.position?n("i",{staticClass:"h-icon-search h-icon-search-end",on:{click:function(e){return t.search(t.inputValue)}}}):t._e()])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.categoryCls,attrs:{disabled:t.disabled}},[n("div",{staticClass:"h-categorypicker-show"},[t.multiple&&t.objects.length?n("div",{staticClass:"h-categorypicker-multiple-tags"},t._l(t.objects,(function(e,i){return n("span",{key:i+""+e.key},[n("span",[t._v(t._s(t.getShow(e)))]),t.disabled?t._e():n("i",{staticClass:"h-icon-close-min",on:{click:function(n){return n.stopPropagation(),t.remove(e)}}})])})),0):!t.multiple&&t.object?n("div",{staticClass:"h-categorypicker-value-single"},[n("span",[t._v(t._s(t.getShow(t.object)))]),t._v(" "),t.object&&!t.disabled?n("i",{staticClass:"h-icon-close",on:{mousedown:t.clear}}):t._e()]):n("div",{staticClass:"h-categorypicker-placeholder"},[t._v(t._s(t.showPlaceholder))])]),t._v(" "),n("div",{class:t.groupCls},[n("Tabs",{staticClass:"h-categorypicker-tabs",attrs:{datas:t.tabs,keyName:"key",titleName:"title"},on:{change:t.focusTab},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}}),t._v(" "),n("div",{staticClass:"h-categorypicker-ul",class:{"h-categorypicker-single-picker":!t.multiple}},t._l(t.list,(function(e){return n("div",{key:e.key,staticClass:"h-categorypicker-item",class:{"h-categorypicker-item-selected":t.object&&e.key==t.object.key}},[e.status.loading?n("i",{staticClass:"h-icon-loading"}):e.status.checkable&&t.multiple?n("Checkbox",{attrs:{checked:t.isChecked(e)},nativeOn:{click:function(n){return t.change(e,n)}}}):t._e(),t._v(" "),n("span",{staticClass:"h-categorypicker-item-title",on:{click:function(n){return t.openNew(e,n)}}},[t._v(t._s(e.title)),t.showChildCount&&e.children.length?n("span",[t._v("("+t._s(e.children.length)+")")]):t._e()])],1)})),0)],1)])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.dateCls},[t.inline?t._e():[t.noBorder?n("div",{staticClass:"h-datetime-show text-hover"},[t._v(t._s(t.showDate||t.showPlaceholder))]):n("div",{staticClass:"h-input h-datetime-show"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.showDate,expression:"showDate"}],staticClass:"h-input",attrs:{type:"text",disabled:t.disabled,readonly:t.readonly||"week"==t.type||"quarter"==t.type,placeholder:t.showPlaceholder},domProps:{value:t.showDate},on:{change:t.changeEvent,keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changeEvent(e)},input:function(e){e.target.composing||(t.showDate=e.target.value)}}}),t._v(" "),t.showDate&&!t.disabled&&t.clearable?n("i",{staticClass:"h-icon-close text-hover",on:{click:function(e){return e.stopPropagation(),t.clear(e)}}}):n("i",{staticClass:"h-icon-calendar"})])],t._v(" "),n("div",{staticClass:"h-date-picker",class:t.datePickerCls},[t.isShow?n("div",{staticClass:"h-date-container"},[t.shortcuts.length>0?n("div",{staticClass:"h-date-shortcut"},t._l(t.shortcuts,(function(e){return n("div",{key:e.title,on:{click:function(n){return t.setShortcutValue(e)}}},[t._v(t._s(e.title))])})),0):t._e(),t._v(" "),n("date-base",{ref:"datebase",attrs:{value:t.nowDate,option:t.option,type:t.type,startWeek:t.startWeek,"now-view":t.nowView,format:"k"},on:{updateView:t.updateView,input:t.setvalue,changeView:t.updateDropdown}})],1):t._e(),t._v(" "),t.hasConfirm&!t.inline?n("div",{staticClass:"h-date-footer"},[n("button",{staticClass:"h-btn h-btn-text",attrs:{type:"button"},on:{click:t.clear}},[t._v(t._s(t._f("hlang")("h.common.clear")))]),t._v(" "),n("button",{staticClass:"h-btn h-btn-primary h-btn-s",attrs:{type:"button"},on:{click:t.hide}},[t._v(t._s(t._f("hlang")("h.common.confirm")))])]):t._e()])],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.dateCls},[t.noBorder?n("div",{staticClass:"h-datetime-show text-hover"},[t._v(t._s(t.showDate||t.showPlaceholder))]):n("div",{staticClass:"h-input h-datetime-show"},[n("input",{staticClass:"h-input",attrs:{type:"text",readonly:"",placeholder:t.showPlaceholder,disabled:t.disabled},domProps:{value:t.show}}),t._v(" "),n("i",{staticClass:"h-icon-calendar"})]),t._v(" "),n("div",{staticClass:"h-date-picker",class:t.datePickerCls},[t.isShow?n("div",{staticClass:"h-date-container h-date-range-container"},[t.shortcuts.length>0?n("div",{staticClass:"h-date-shortcut"},t._l(t.shortcuts,(function(e){return n("div",{key:e.title,on:{click:function(n){return t.setShortcutValue(e)}}},[t._v(t._s(e.title))])})),0):t._e(),t._v(" "),n("date-base",{ref:"start",attrs:{value:t.nowDate,range:"start",option:t.startOption,type:t.type,"now-view":t.nowView.start,format:t.nowFormat,startWeek:t.startWeek,rangeEnd:t.rangeEnd},on:{updateView:t.updateView,input:t.setvalue,changeView:t.changeView,updateRangeEnd:t.updateRangeEnd}}),t._v(" "),n("date-base",{ref:"end",attrs:{value:t.nowDate,range:"end",option:t.endOption,type:t.type,"now-view":t.nowView.end,format:t.nowFormat,startWeek:t.startWeek,rangeEnd:t.rangeEnd},on:{updateView:t.updateView,input:t.setvalue,changeView:t.changeView,updateRangeEnd:t.updateRangeEnd}})],1):t._e(),t._v(" "),n("div",{staticClass:"h-date-footer"},[n("button",{staticClass:"h-btn h-btn-text h-btn-s",attrs:{type:"button"},on:{click:t.clear}},[t._v(t._s(t._f("hlang")("h.common.clear")))]),t._v(" "),n("button",{staticClass:"h-btn h-btn-primary h-btn-s",attrs:{type:"button"},on:{click:t.confirm}},[t._v(t._s(t._f("hlang")("h.common.confirm")))])])])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.dateCls},[t.noBorder?n("div",{staticClass:"h-datetime-show text-hover"},[t._v(t._s(t.showValue||t.placeholder))]):n("div",{staticClass:"h-input h-datetime-show"},[n("input",{attrs:{type:"text",readonly:"",placeholder:t.showPlaceholder},domProps:{value:t.showValue}}),t._v(" "),n("i",{staticClass:"h-icon-calendar"})]),t._v(" "),n("div",{staticClass:"h-date-picker",class:t.datePickerCls},[n("div",{staticClass:"h-date-container h-date-full-range-container"},[t.shortcuts.length>0?n("div",{staticClass:"h-date-shortcut"},t._l(t.shortcuts,(function(e){return n("div",{key:e.title,on:{click:function(n){return t.setShortcutValue(e)}}},[t._v(t._s(e.title))])})),0):t._e(),t._v(" "),n("div",[n("Tabs",{attrs:{datas:t.views},on:{change:t.changeView},model:{value:t.view,callback:function(e){t.view=e},expression:"view"}})],1),t._v(" "),"customize"==t.view?n("div",{staticClass:"h-date-self-defined"},[n("DatePicker",{attrs:{option:{end:t.nowDate.end},type:t.hasTime?"datetime":"date",placeholder:t.t("h.datepicker.startTime")},on:{input:function(e){return t.setvalue("start")}},model:{value:t.nowDate.start,callback:function(e){t.$set(t.nowDate,"start",e)},expression:"nowDate.start"}}),t._v("\n -\n "),n("DatePicker",{attrs:{placement:"bottom-end",option:{start:t.nowDate.start},type:t.hasTime?"datetime":"date",placeholder:t.t("h.datepicker.endTime")},on:{input:function(e){return t.setvalue("end")}},model:{value:t.nowDate.end,callback:function(e){t.$set(t.nowDate,"end",e)},expression:"nowDate.end"}})],1):n("date-base",{ref:"datebase",attrs:{value:t.nowDate.start,option:t.option,type:t.view,startWeek:t.startWeek,"now-view":t.nowView.start,format:"k"},on:{updateView:t.updateView,input:t.setvalue,changeView:t.updateDropdown}})],1),t._v(" "),n("div",{staticClass:"h-date-footer"},[n("button",{staticClass:"h-btn h-btn-text h-btn-s",attrs:{type:"button"},on:{click:t.clear}},[t._v(t._s(t._f("hlang")("h.common.clear")))]),t._v(" "),n("button",{staticClass:"h-btn h-btn-primary h-btn-s",attrs:{type:"button"},on:{click:t.confirm}},[t._v(t._s(t._f("hlang")("h.common.confirm")))])])])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.dropdowncustomCls},[n("div",{class:t.showCls},[n("div",{staticClass:"h-dropdowncustom-show-content"},[t._t("default")],2),t._v(" "),t.toggleIcon?n("i",{staticClass:"h-icon-down"}):t._e()]),t._v(" "),n("div",{class:t.groupCls},[t.isShow?t._t("content"):t._e()],2)])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("DropdownCustom",{ref:"dropdown",class:t.dropdownmenuCls,attrs:{button:t.button,delay:t.delay,trigger:t.trigger,equalWidth:t.equalWidth,toggleIcon:t.toggleIcon,placement:t.placement,disabled:t.disabled,className:t.className,offset:t.offset,showClass:"h-dropdownmenu-show"},on:{show:t.showEvent,hide:t.hideEvent}},[t._t("default"),t._v(" "),n("ul",{class:t.groupCls,style:t.groupStyle,attrs:{slot:"content"},slot:"content"},t._l(t.options,(function(e){return n("li",{key:e[t.key],staticClass:"h-dropdownmenu-item",class:{"h-dropdownmenu-item-divider":!!e.divider,disabled:!!e.divider||e.disabled},on:{click:function(n){return t.onclick(n,e)}}},[e[t.html]?n("div",{domProps:{innerHTML:t._s(e[t.html])}}):[e.icon?n("i",{class:e.icon}):t._e(),t._v(" "),n("span",[t._v(t._s(e[t.title]))])],t._v(" "),t.showCount&&e.count?n("Badge",{attrs:{count:e.count,"max-count":t.maxCount,position:"right"}}):t._e()],2)})),0)],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-image-preview-list",style:t.listStyles},t._l(t.computedList,(function(e,i){return n("div",{key:i,staticClass:"h-image-preview-item",style:t.itemStyles(e),on:{click:function(n){return t.click(i,e)}}})})),0)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this.$createElement;return(this._self._c||t)("div",{class:this.formCls},[this._t("default")],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.formItemCls,attrs:{prop:t.prop,validable:t.validable}},[t.showLabel?n("label",{staticClass:"h-form-item-label",style:t.labelStyleCls},[t.icon?n("i",{class:t.icon}):t._e(),t.$scopedSlots.label?t._t("label",null,{label:t.label}):n("span",[t._v(t._s(t.label))])],2):t._e(),t._v(" "),n("div",{staticClass:"h-form-item-content",style:t.contentStyleCls},[n("div",{staticClass:"h-form-item-wrap"},[t._t("default")],2),t._v(" "),t.errorMessage.valid?t._e():n("div",{staticClass:"h-form-item-error"},["base"==t.errorMessage.type?n("span",{staticClass:"h-form-item-error-label"},[t._v(t._s(t.label))]):t._e(),n("span",{staticClass:"h-form-item-error-message"},[t._v(t._s(t.errorMessage.message))]),t._t("error",null,{type:t.errorMessage.type})],2)])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this.$createElement;return(this._self._c||t)("div",[this._t("default")],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{class:t.classes},t._l(t.menuDatas,(function(e){return n("hMenuItem",{key:e.key,attrs:{data:e,param:t.param,status:t.status,inlineCollapsed:t.inlineCollapsed,mode:t.mode},on:{trigger:t.trigger}})})),1)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{class:t.noticeCls},[t.hasMask?n("div",{staticClass:"h-notify-mask",on:{click:function(e){return t.setvalue(!0)}}}):t._e(),t._v(" "),n("div",{staticClass:"h-notify-body",on:{click:function(e){return e.target!==e.currentTarget?null:t.setvalue(!0)}}},[n("transition",{attrs:{name:t.type}},[t.isShow?n("div",{class:t.containerCls},[t.hasCloseIcon?n("span",{staticClass:"h-notify-close h-icon-close",on:{click:function(e){return t.setvalue(!1)}}}):t._e(),t._v(" "),t.hasHeader?n("header",{staticClass:"h-modal-header"},[t._t("header")],2):t._e(),t._v(" "),n("div",{class:t.contentCls},[t._t("default")],2),t._v(" "),t.hasFooter?n("footer",{staticClass:"h-modal-footer"},[t._t("footer")],2):t._e()]):t._e()])],1)])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{class:t.noticeCls},[t.hasMask?n("div",{staticClass:"h-notify-mask",on:{click:function(e){return t.setvalue(!0)}}}):t._e(),t._v(" "),n("div",{class:{"h-notify-body":!!t.hasMask},on:{click:function(e){return e.target!==e.currentTarget?null:t.setvalue(!0)}}},[n("div",{class:t.containerCls},[n("span",{staticClass:"h-notify-close h-icon-close",on:{click:function(e){return t.setvalue(!1)}}}),t._v(" "),n(t.nowComponent,{tag:"component",class:t.contentCls,attrs:{param:t.propsData,params:t.propsData},on:{event:t.trigger,close:t.close}})],1)])])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.pageCls},[-1!=t.orders.total?n("span",{class:t.prefix+"-total",style:{order:t.orders.total}},[t._v("\n "+t._s(t._f("hlang")("h.pagination.totalBefore"))+"\n "),n("span",{class:t.prefix+"-total-num"},[t._v(t._s(t.totalNow))]),t._v("\n "+t._s(t._f("hlang")("h.pagination.totalAfter"))+"\n ")]):t._e(),t._v(" "),-1!=t.orders.sizes?n("Select",{staticClass:"h-page-select-size",style:{order:t.orders.sizes},attrs:{"no-border":t.small,autosize:!0,"null-option":!1,datas:t.sizesShow},on:{input:t.changesize},model:{value:t.sizeNow,callback:function(e){t.sizeNow=e},expression:"sizeNow"}}):t._e(),t._v(" "),-1!=t.orders.pager&&this.count>0?n("span",{staticClass:"h-page-pager-container",style:{order:t.orders.pager}},[n("span",{class:t.prevCls,on:{click:function(e){return t.prev()}}},[n("i",{staticClass:"h-icon-angle-left"})]),t._v(" "),n("span",{class:t.genPagerCls(1),on:{click:function(e){return t.change(1)}}},[t._v("1")]),t._v(" "),t.pagers.length>0&&10&&t.count>t.pagers[t.pagers.length-1]+1?n("span",{staticClass:"h-page-pager h-page-ellipsis"},[t._v("...")]):t._e(),t._v(" "),this.count>1?n("span",{class:t.genPagerCls(t.count),on:{click:function(e){return t.change(t.count)}}},[t._v(t._s(t.count))]):t._e(),t._v(" "),n("span",{class:t.nextCls,on:{click:function(e){return t.next()}}},[n("i",{staticClass:"h-icon-angle-right"})])],2):t._e(),t._v(" "),-1!=t.orders.jumper&&t.count>0?n("input",{staticClass:"h-page-jumper-input h-input",style:{order:t.orders.jumper},attrs:{type:"text"},domProps:{value:t.curNow},on:{blur:t.jump,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.jump(e)}}}):t._e()],1)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.selectCls},[n("div",{class:t.showCls},[t.multiple?[n("div",{staticClass:"h-select-multiple-tags"},[t._l(t.objects,(function(e){return n("span",{key:e[t.keyName]},[n("span",[t._v(t._s(e[t.titleName]))]),t.disabled?t._e():n("i",{staticClass:"h-icon-close-min",on:{click:function(n){return n.stopPropagation(),t.setvalue(e)}}})])})),t._v(" "),t.filterable?n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchInput,expression:"searchInput"}],staticClass:"h-select-search-input h-input",attrs:{type:"text",disabled:t.disabled,placeholder:t.showPlaceholder},domProps:{value:t.searchInput},on:{keyup:t.handle,blur:t.blurHandle,keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.enterHandle(e)},input:function(e){e.target.composing||(t.searchInput=e.target.value)}}}):t._e()],2),t._v(" "),t.hasValue||t.filterable?t._e():n("div",{staticClass:"h-select-placeholder"},[t._v(t._s(t.showPlaceholder))])]:[t.filterable?[n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchInput,expression:"searchInput"}],staticClass:"h-select-search-input h-select-single-search-input h-input",class:{"h-select-search-input-value":t.hasValue},attrs:{type:"text",disabled:t.disabled,placeholder:t.hasValue?"":t.showPlaceholder},domProps:{value:t.searchInput},on:{keyup:t.handle,blur:t.blurHandle,keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.enterHandle(e)},input:function(e){e.target.composing||(t.searchInput=e.target.value)}}}),t._v(" "),t.hasValue&&""===t.searchInput?n("div",{staticClass:"h-select-filterable-value",on:{click:t.focusSearchInput}},[t._v(t._s(t.singleValue))]):t._e()]:[t.hasValue?n("div",{staticClass:"h-select-value-single"},[t.hasValue?[t.$scopedSlots.show?t._t("show",null,{value:t.objects}):n("div",{staticClass:"h-select-value-single"},[t._v(t._s(t.singleValue))])]:t._e()],2):n("div",{staticClass:"h-select-placeholder"},[t._v(t._s(t.showPlaceholder))])]],t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:t.hasClose,expression:"hasClose"}],staticClass:"h-icon-close text-hover",on:{click:function(e){return e.stopPropagation(),t.clear(e)}}}),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:!t.hasClose,expression:"!hasClose"}],staticClass:"h-icon-down"})],2),t._v(" "),n("div",{class:t.groupCls},[t.isShow?n("div",{staticClass:"h-select-group-container"},[n("div",{staticClass:"h-select-list"},[t._t("top",null,{results:t.filterOptions}),t._v(" "),n("ul",{staticClass:"h-select-ul"},[t._l(t.filterOptions,(function(e,i){return[e.hidden?t._e():n("li",{key:e[t.keyName],class:t.getLiCls(e,i),on:{click:function(n){return t.setvalue(e)}}},[t.optionRender?n("div",{domProps:{innerHTML:t._s(e[t.html])}}):t.$scopedSlots.item?t._t("item",null,{item:e}):[t._v(t._s(e[t.titleName]))],t._v(" "),t.multiple?n("i",{staticClass:"h-icon-check"}):t._e()],2)]})),t._v(" "),0==t.filterOptions.length?n("li",{staticClass:"h-select-ul-empty"},[t._v(t._s(t.showEmptyContent))]):t._e()],2),t._v(" "),t._t("bottom",null,{results:t.filterOptions})],2)]):t._e()])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Tooltip",{ref:"tooltip",attrs:{theme:t.theme,disabled:t.disabled,placement:t.placement,trigger:"click"}},[t._t("default"),t._v(" "),n("div",{staticClass:"h-poptip",attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"h-poptip-content"},[n("i",{staticClass:"yellow-color h-icon-warn"}),n("i",{staticClass:"h-split"}),t._v(t._s(t.content))]),t._v(" "),n("div",{staticClass:"clearfix"},[n("div",{staticClass:"float-right"},[n("button",{staticClass:"h-btn h-btn-text h-btn-xs",attrs:{type:"button"},on:{click:t.close}},[t._v(t._s(t._f("hlang")("h.common.cancel")))]),n("button",{staticClass:"h-btn h-btn-text h-btn-xs h-btn-primary",attrs:{type:"button"},on:{click:t.trigger}},[t._v(t._s(t._f("hlang")("h.common.confirm")))])])])])],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-progress"},[t.$slots.title?n("div",{staticClass:"h-progress-title"},[t._t("title")],2):t._e(),t._v(" "),n("div",{staticClass:"h-progress-inner",style:t.progressInnerStyle},[n("div",{staticClass:"h-progress-bg",class:t.progressBgClass,style:t.progressBgStyle})]),t._v(" "),t.$slots.text?n("div",{staticClass:"h-progress-text"},[t._t("text")],2):t._e()])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-radio",class:{"h-radio-disabled":t.disabled},attrs:{disabled:t.disabled}},[t.isSingle?n("label",{class:{"h-radio-checked":t.value==t.selectStatus,"h-radio-un-checked":t.value!=t.selectStatus,"h-radio-label-disabled":t.disabled},on:{click:function(e){return t.setvalue()}}},[n("span",{staticClass:"radio-icon h-radio-icon",attrs:{checked:t.value==t.selectStatus,disabled:t.disabled}}),n("span",[t._t("default")],2)]):t._l(t.arr,(function(e){return n("label",{key:e[t.key],class:{"h-radio-checked":e[t.key]==t.selectStatus,"h-radio-un-checked":e[t.key]!=t.selectStatus,"h-radio-label-disabled":t.disabled},on:{click:function(n){return t.setvalue(e)}}},[n("span",{staticClass:"radio-icon h-radio-icon",attrs:{checked:e[t.key]==t.selectStatus,disabled:t.disabled}}),t.$scopedSlots.item?t._t("item",null,{item:e}):n("span",{staticClass:"h-radio-text"},[t._v(t._s(e[t.title]))])],2)}))],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"h-rate",attrs:{readonly:t.readonly},on:{mouseleave:function(e){return t.mouseleave()}}},[t._l(5,(function(e){return n("span",{key:e,class:t.starCls(e),on:{click:function(n){return t.setvalue(e)},mouseover:function(n){return t.mouseover(e)}}},[n("i",{class:t.iconClass})])})),t.showText?n("span",{staticClass:"h-rate-value"},[t._v(t._s(t.value))]):t._e()],2)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.sliderCls},[n("div",{staticClass:"h-slider-container"},[n("div",{staticClass:"h-slider-line",on:{mousedown:t.choosePosition}}),t._v(" "),n("div",{staticClass:"h-slider-track",style:t.computedTrackStyle,on:{mousedown:t.choosePosition}}),t._v(" "),t.hasStart?n("div",{staticClass:"h-slider-node h-slider-start-node",style:{left:t.nodePosition.start},on:{click:function(t){t.stopPropagation()},mousedown:function(e){return t.mousedown("start",e)}}}):t._e(),t._v(" "),n("div",{staticClass:"h-slider-node h-slider-end-node",style:{left:t.nodePosition.end},on:{click:function(t){t.stopPropagation()},mousedown:function(e){return t.mousedown("end",e)}}}),t._v(" "),t.showtip?n("span",{staticClass:"h-slider-end-node-value h-tooltip-inner-content"},[t._v(t._s(t.showContent(t.values.end)))]):t._e(),t._v(" "),t.showtip&&t.hasStart?n("span",{staticClass:"h-slider-start-node-value h-tooltip-inner-content"},[t._v(t._s(t.showContent(t.values.start)))]):t._e()])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.loadingCls},[n("div",{class:t.circularCls},[n("svg",{attrs:{viewBox:"25 25 50 50"}},[n("circle",{staticClass:"circle",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t._v(" "),t.text?n("p",{class:t.textCls},[t._v(t._s(t.text))]):t._e()])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.stepsCls},t._l(t.arr,(function(e,i){return n("div",{key:i,class:{"h-steps-process":i==t.stepIndex,"h-steps-actived":i0?n("ul",{staticClass:"h-menu-ul"},t._l(t.data.children,(function(e){return n("hMenuItem",{key:e.key,attrs:{data:e,param:t.param,status:t.status},on:{trigger:t.trigger}})})),1):t._e()],1)},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("th",{class:t.cls,attrs:{rowspan:t.rowspan,colspan:t.colspan},on:{click:function(e){return t.triggerSort()}}},[n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tooltipParam.enable,expression:"tooltipParam.enable"}],attrs:{placement:t.tooltipParam.placement,content:t.tooltipParam.content||t.title}},[n("span",[t._v(t._s(t.title))]),t._v(" "),t.sort?n("span",{staticClass:"h-table-sort-handler"},["asc"==t.sortStatus.type&&t.sortStatus.prop==t.sortUseProp?n("span",{staticClass:"h-table-sort-asc",class:{"h-table-sort-selected sort-selected":"asc"==t.sortStatus.type&&t.sortStatus.prop==t.sortUseProp}},[n("i",{staticClass:"h-icon-top"})]):n("span",{staticClass:"h-table-sort-desc",class:{"h-table-sort-selected sort-selected":"desc"==t.sortStatus.type&&t.sortStatus.prop==t.sortUseProp}},[n("i",{staticClass:"h-icon-down"})])]):t._e()])])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement;return(t._self._c||e)("Checkbox",{attrs:{indeterminate:t.checks.length>0&&t.checks.length0&&t.checks.length==t.checkableDatas.length},nativeOn:{click:function(e){return t.checkAll(e)}}})},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"h-tree-li",class:{"h-tree-li-opened":t.data.status.opened}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.data.status.hide,expression:"!data.status.hide"}],staticClass:"h-tree-show",class:{"h-tree-show-disabled":t.data.status.disabled,"h-tree-show-choose":t.data.status.choose,"h-tree-show-indeterminate":t.data.status.indeterminate,"h-tree-show-selected":t.status.selected==t.data.key},on:{click:t.clickShow}},[t._l(t.level,(function(t){return n("span",{key:t,staticClass:"h-tree-show-space"})})),t._v(" "),n("span",{staticClass:"h-tree-show-expand"},[t.data.status.isWait?n("span",{on:{click:function(e){return e.stopPropagation(),t.toggleTree()}}},[t.data.status.loading?[n("i",{staticClass:"h-icon-loading"})]:[n("i",{staticClass:"h-icon-angle-right"})]],2):t.data.children&&t.data.children.length>0?n("span",{on:{click:function(e){return e.stopPropagation(),t.toggleTree()}}},[n("i",{staticClass:"h-icon-angle-right"})]):t._e()]),t._v(" "),t.multiple&&t.data.status.checkable?n("Checkbox",{attrs:{disabled:t.data.status.disabled,indeterminate:t.data.status.indeterminate},on:{input:function(e){return t.choose(t.data)}},model:{value:t.data.status.choose,callback:function(e){t.$set(t.data.status,"choose",e)},expression:"data.status.choose"}}):t._e(),t._v(" "),n("div",{staticClass:"h-tree-show-desc",class:{selected:t.status.selected==t.data.key},on:{click:t.select}},[t.data.icon?n("span",{staticClass:"h-tree-show-icon",class:t.data.icon}):t._e(),t._v(" "),null!=t.data.title?n("span",[t._v(t._s(t.data.title))]):n("span",[t._v(t._s(t._f("hlang")("h.common.empty")))])]),t._v(" "),n("TreeSlot",{attrs:{data:t.data.value}})],2),t._v(" "),t.data.children&&t.data.children.length>0?n("ul",{staticClass:"h-tree-ul"},t._l(t.data.children,(function(e){return n("hTreeItem",{key:e.key,attrs:{data:e,param:t.param,status:t.status,multiple:t.multiple,"choose-mode":t.chooseMode,toggleOnSelect:t.toggleOnSelect,selectOnClick:t.selectOnClick,level:t.level+1},on:{trigger:t.trigger}})})),1):t._e()])},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0!==t.tdAttrs.colspan&&0!==t.tdAttrs.rowspan?n("td",t._b({class:t.cls},"td",t.tdAttrs,!1),[t.treeOpener?n("span",{staticClass:"h-table-tree-expand",class:{"h-table-tree-opened":t.data._opened}},[t._l(t.level,(function(t){return n("i",{key:t,staticClass:"h-table-tree-expand-space"})})),t._v(" "),t.data.children&&t.data.children.length?n("i",{staticClass:"h-table-tree-icon h-icon-angle-right",on:{click:t.toggleTree}}):n("i",{staticClass:"h-table-tree-empty"})],2):t._e(),t._v(" "),t.prop||t.render?[t._v(t._s(t.show))]:t._e(),t._t("default",null,{data:t.data,index:t.index})],2):t._e()},a=[];i._withStripped=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.inlineCollapsed&&!t.data.children.length,expression:"inlineCollapsed&&!data.children.length"}],staticClass:"h-menu-show",class:{"h-menu-show-disabled":t.data.status.disabled,"h-menu-li-selected":t.data.key&&t.status.selected==t.data.key},attrs:{content:t.data.title,placement:"right"},on:{click:function(e){return t.togglemenu(t.data)}}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.data.icon,expression:"data.icon"}],staticClass:"h-menu-show-icon"},[n("i",{class:t.data.icon})]),t._v(" "),n("span",{staticClass:"h-menu-show-desc"},[t._v(t._s(t.data.title))]),t._v(" "),t.data.count?n("span",{staticClass:"h-menu-show-count"},[n("Badge",{attrs:{count:t.data.count,"max-count":99}})],1):t._e(),t._v(" "),"horizontal"!=t.mode&&t.data.children&&t.data.children.length>0?n("span",{staticClass:"h-menu-show-expand"},[n("i",{staticClass:"h-icon-angle-down"})]):t._e()])},a=[];i._withStripped=!0},function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var i=n(2);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(3)),r={isObject:function(t){return"[object Object]"===Object.prototype.toString.call(t)},isArray:function(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)},isDate:function(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)},isNumber:function(t){return t instanceof Number||"[object Number]"===Object.prototype.toString.call(t)},isString:function(t){return t instanceof String||"[object String]"===Object.prototype.toString.call(t)},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return null==t},isPlainObject:function(t){if(t&&"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object&&!hasOwnProperty.call(t,"constructor")){var e;for(e in t);return void 0===e||hasOwnProperty.call(t,e)}return!1},extend:function(){var t,e,n,i,r,o,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"===(0,a.default)(s)||this.isFunction(s)||(s={}),u===l&&(s=this,--l);lo&&(i=i[o])}else i=t[a];return n.length>0?this.getKeyValue(i,n):i},setKeyValue:function(t,e,n,i){if(!this.isObject(t))return!1;var a=null;if(this.isArray(e)?a=e:this.isString(e)&&(a=e.split("."),i=t),null==a||0==a.length)return!1;var r=null,o=0,s=a.shift(),l=s.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(l){if(s=l[1],o=l[2],r=t[s],this.isArray(r)&&r.length>o){if(a.length>0)return this.setKeyValue(r[o],a,n,i);r[o]=n}}else{if(a.length>0)return this.setKeyValue(t[s],a,n,i);t[s]=n}return i},toArray:function(t,e,n){var i="";if(!this.isObject(t))return[];this.isString(n)&&(i=n);var a=[];for(var r in t){var o=t[r],s={};this.isObject(o)?s=o:s[i]=o,e&&(s[e]=r),a.push(s)}return a},toObject:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={},a=0;a0?t.splice(t.indexOf(n[0]),1):t.push(e)},toSimpleArray:function(t,e){var n=[];if(this.isObject(t))for(var i=0,a=Object.keys(t);it.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1&&this.setPopNodeEvent()}},{key:"initPopper",value:function(){var t=this.reference,e=this.options,n=this.popNode,i=this.findContainer(),a={computeStyle:{gpuAcceleration:!1},arrow:{enabled:!1},inner:{enabled:!1},preventOverflow:{boundariesElement:"window",enabled:!0}};this.options.offset&&(a.offset={enabled:!0,offset:this.options.offset}),this.options.preventOverflow&&"BODY"!=i.tagName&&"HTML"!=i.tagName&&(a.hide={enabled:!1},a.flip={boundariesElement:i,enabled:!0},a.preventOverflow={enabled:!1}),"contextMenu"==this.options.trigger&&(a.flip={enabled:!1});var r={placement:e.placement,modifiers:a};this.popperOptions=r,this.popperInstance=new o.default(t,n,r)}},{key:"disabled",value:function(){this.options.disabled=!0}},{key:"enabled",value:function(){this.options.disabled=!1}},{key:"show",value:function(t){var e=this;return this.hideTimeout&&clearTimeout(this.hideTimeout),this.hideTimeout2&&clearTimeout(this.hideTimeout2),this.options.events&&s.default.isFunction(this.options.events.show)&&this.options.events.show(t),this.isOpen||this.options.disabled?this:(this.isOpen=!0,this.popNode||this.initPopNode(),this.popperInstance||this.initPopper(),this.popperInstance.enableEventListeners(),this.popNode?(this.options.equalWidth&&(this.popNode.style.width="".concat(this.reference.clientWidth,"px")),this.popNode.style.display="",s.default.addClass(this.reference,"h-pop-trigger"),this.showTimeout=setTimeout((function(){e.popNode.setAttribute("aria-hidden","false"),e.popperInstance.update()}),0),this):void 0)}},{key:"update",value:function(){this.popperInstance&&this.popperInstance.update()}},{key:"hide",value:function(){var t=this;if(this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout&&clearTimeout(this.hideTimeout),!1!==this.isOpen&&document.body.contains(this.popNode))return this.popNode&&this.popperInstance?(this.hideTimeout=setTimeout((function(){s.default.removeClass(t.reference,"h-pop-trigger"),t.options.events&&s.default.isFunction(t.options.events.hide)&&t.options.events.hide.call(null),t.popNode&&t.popNode.setAttribute("aria-hidden","true"),t.isOpen=!1,t.hideTimeout2=setTimeout((function(){t.popNode&&(t.popNode.style.display="none",t.popperInstance&&t.popperInstance.disableEventListeners())}),300)}),this.options.delay),this):this}},{key:"destory",value:function(){var t=this;return this.documentHandler&&(document.removeEventListener("click",this.documentHandler),document.removeEventListener("contextmenu",this.documentHandler)),this.popperInstance&&this.popperInstance.destroy(),this.triggerEvents.forEach((function(e){var n=e.event,i=e.func;t.reference.removeEventListener(n,i,"focus"==n||"blur"==n)})),this.triggerEvents=[],this.popNode&&(this.hide(),this.popNode.parentNode.removeChild(this.popNode),this.popNode=null),this}},{key:"findContainer",value:function(){var t=this.options.container;return"string"==typeof t?t=window.document.querySelector(t):this.options.getContainer?t=this.options.getContainer(this.reference):!1===t&&(t=document.body),t}},{key:"setEventListeners",value:function(t,e){var n=this,i=this.reference,a=[],r=[];t.forEach((function(t){switch(t){case"hover":a.push("mouseenter"),r.push("mouseleave");break;case"focus":a.push("focus"),r.push("blur");break;case"click":a.push("click"),n.options.triggerOnce||r.push("click");break;case"contextMenu":a.push("contextmenu"),r.push("click")}})),a.forEach((function(t){var e=function(e){if("contextmenu"==e.type){e.preventDefault(),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty();var a=i.getBoundingClientRect();n.options.offset="".concat(e.clientX-a.x,", -").concat(a.bottom-e.clientY-10),n.popperInstance&&(n.popperInstance.defaultOptions.modifiers.offset={enabled:!0,offset:n.options.offset},n.popperInstance.updateModifiers(),n.popperInstance.update())}"click"==t&&!0===n.isOpen||(e.usedByPop=!0,n.show(e))};n.triggerEvents.push({event:t,func:e}),i.addEventListener(t,e,"focus"==t)})),r.forEach((function(t){var e=function(t){!0!==t.usedByPop&&n.hide()};n.triggerEvents.push({event:t,func:e}),i.addEventListener(t,e,"blur"==t)})),-1==t.indexOf("manual")&&(this.documentHandler=function(t){if(n.popNode&&null!=t.target.parentNode){if(!n.isOpen||i.contains(t.target)||n.popNode.contains(t.target))return!1;var e=t.reference;if(i&&n.popNode.contains(e))return!1;for(var a=t.target;a&&"BODY"!=a.tagName&&"HTML"!=a.tagName&&!a.getAttribute("aria-describedby")&&a.parentNode;)a=a.parentNode;if("BODY"!=a.tagName&&"HTML"!=a.tagName){var r=document.body.querySelector('[aria-describe="'.concat(a.getAttribute("aria-describedby"),'"]'));if(r&&n.popNode.contains(r))return!1}n.hide()}},document.addEventListener("click",this.documentHandler),document.addEventListener("contextmenu",this.documentHandler))}},{key:"setPopNodeEvent",value:function(){var t=this;this.popNode.addEventListener("mouseenter",(function(e){t.show(e)})),this.popNode.addEventListener("mouseout",(function(e){var n=e.relatedreference||e.toElement||e.relatedTarget;t.popNode.contains(n)||n==t.reference||t.reference.contains(n)||t.hide()}))}}]),t}();e.default=u},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(281)).default;e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(!t)return;"function"==typeof e&&(n=e,e=null);e||(e={});e.time=isNaN(e.time)?1e3:e.time,e.ease=e.ease||function(t){return 1-Math.pow(1-t,t/2)};var i=t.parentElement,a=0;function l(t){!(a-=1)&&n&&n(t)}var u=e.validTarget||s,c=e.isScrollable;for(;i;){if(u(i,a)&&(c?c(i,o):o(i))&&(a+=1,r(t,i,e,l)),!(i=i.parentElement))return;"BODY"===i.tagName&&(i=window)}};function i(t,e,n){t===window?t.scrollTo(e,n):(t.scrollLeft=e,t.scrollTop=n)}function a(t){!function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}((function(){var e=t.scrollOption;if(e){var n=function(t,e,n){var i=t.getBoundingClientRect(),a=null,r=null,o=null,s=null,l=null,u=null,c=null,d=n&&null!=n.left?n.left:.5,f=n&&null!=n.top?n.top:.5,h=n&&null!=n.leftOffset?n.leftOffset:0,p=n&&null!=n.topOffset?n.topOffset:0,v=d,m=f;if(e===window)u=Math.min(i.width,window.innerWidth),c=Math.min(i.height,window.innerHeight),r=i.left+window.pageXOffset-window.innerWidth*v+u*v,o=i.top+window.pageYOffset-window.innerHeight*m+c*m,o-=p,s=(r-=h)-window.pageXOffset,l=o-window.pageYOffset;else{u=i.width,c=i.height,a=e.getBoundingClientRect();var y=i.left-(a.left-e.scrollLeft),g=i.top-(a.top-e.scrollTop);r=y+u*v-e.clientWidth*v,o=g+c*m-e.clientHeight*m,r=Math.max(Math.min(r,e.scrollWidth-e.clientWidth),0),o=Math.max(Math.min(o,e.scrollHeight-e.clientHeight),0),o-=p,s=(r-=h)-e.scrollLeft,l=o-e.scrollTop}return{x:r,y:o,differenceX:s,differenceY:l}}(e.target,t,e.align),r=Date.now()-e.startTime,o=Math.min(1/e.time*r,1);if(r>e.time+20)return i(t,n.x,n.y),t.scrollOption=null,e.end("COMPLETE");var s=1-e.ease(o);i(t,n.x-n.differenceX*s,n.y-n.differenceY*s),a(t)}}))}function r(t,e,n,i){var r,o=!e.scrollOption,s=e.scrollOption,l=Date.now();function u(t){e.scrollOption=null,e.parentElement&&e.parentElement.scrollOption&&e.parentElement.scrollOption.end(t),i(t),e.removeEventListener("touchstart",r)}s&&s.end("CANCELED"),e.scrollOption={startTime:s?s.startTime:Date.now(),target:t,time:n.time+(s?l-s.startTime:0),ease:n.ease,align:n.align,end:u},r=u.bind(null,"CANCELED"),e.addEventListener("touchstart",r),o&&a(e)}function o(t){return t===window||(t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth)&&"hidden"!==getComputedStyle(t).overflow}function s(){return!0}},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(306)).default;e.default=a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(311)).default;e.default=a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(338)).default;e.default=a},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return(0,r.default)({className:"h-image-preview-modal",component:{vue:a.default,datas:{isShow:!0,datas:t,index:e}}})};var a=i(n(349)),r=i(n(155))},function(t,e,n){t.exports=n(243)},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(10)),r=i(n(244)),o=i(n(246)),s=i(n(248)),l=i(n(229)),u=i(n(251)),c=i(n(11)),d=i(n(259)),f=i(n(261)),h=i(n(269)),p=i(n(275)),v=i(n(277)),m=i(n(279)),y=i(n(236)),g=i(n(282)),b=i(n(284)),w=i(n(286)),_=i(n(292)),k=i(n(294)),x=i(n(296)),O=i(n(300)),C=i(n(302)),S=i(n(304)),j=i(n(307)),T=i(n(309)),N=i(n(239)),M=i(n(312)),E=i(n(314)),$=i(n(158)),D=i(n(317)),A=i(n(15)),P=i(n(238)),I=i(n(319)),B=i(n(321)),V=i(n(323)),L=i(n(325)),F=i(n(332)),W=i(n(334)),H=i(n(336)),R=i(n(240)),Y=i(n(341)),z=i(n(343)),q=i(n(345)),U=i(n(347)),K=i(n(350)),X=i(n(352)),G=i(n(354)),J=i(n(356)),Q=i(n(358)),Z=i(n(360)),tt=i(n(362)),et=i(n(364)),nt=i(n(366)),it=i(n(368)),at=i(n(370)),rt=i(n(372)),ot=i(n(374)),st=i(n(376)),lt=i(n(378)),ut=i(n(380)),ct=i(n(382)),dt=i(n(385)),ft=i(n(386)),ht=i(n(387)),pt=i(n(388)),vt=i(n(389)),mt=i(n(155)),yt=i(n(391)),gt=i(n(7)),bt=i(n(392)),wt=i(n(393)),_t=i(n(394)),kt=i(n(237)),xt=i(n(395)),Ot=i(n(241)),Ct=i(n(9)),St=i(n(397)),jt=i(n(398)),Tt=i(n(4)),Nt=i(n(8)),Mt=G.default,Et={Affix:r.default,Avatar:o.default,AutoComplete:K.default,BackTop:s.default,Badge:l.default,Button:rt.default,ButtonGroup:ot.default,Breadcrumb:u.default,Category:f.default,CategoryPicker:h.default,Checkbox:c.default,hCircle:d.default,DatePicker:p.default,DateRangePicker:v.default,DateFullRangePicker:m.default,DropdownCustom:y.default,DropdownMenu:g.default,Form:w.default,FormItem:_.default,FormItemList:k.default,ImagePreview:b.default,Menu:x.default,Modal:O.default,ModalComponent:C.default,NumberInput:z.default,Pagination:S.default,Poptip:j.default,Progress:T.default,Radio:N.default,Rate:M.default,Row:X.default,Col:Mt,Cell:G.default,Search:A.default,Select:P.default,Slider:E.default,Steps:D.default,HSwitch:I.default,SwitchList:B.default,Skeleton:V.default,Timeline:nt.default,TimelineItem:it.default,Transfer:at.default,Loading:$.default,TagInput:H.default,Table:L.default,TableItem:F.default,Tabs:W.default,Tooltip:q.default,Tree:R.default,TreePicker:Y.default,Uploader:U.default,TextEllipsis:st.default,Carousel:lt.default,Collapse:ut.default,CollapseItem:ct.default,HHeader:J.default,HFooter:Q.default,Content:Z.default,Sider:tt.default,Layout:et.default},$t={width:dt.default.width,color:dt.default.color,"bg-color":dt.default.bgColor,height:dt.default.height,padding:dt.default.padding,margin:dt.default.margin,font:dt.default.font,autosize:vt.default,tooltip:ft.default,wordcount:ht.default,wordlimit:pt.default},Dt={$Modal:mt.default,$Notice:bt.default,$Message:gt.default,$Confirm:yt.default,$Loading:wt.default,$LoadingBar:_t.default,$ScrollIntoView:kt.default,$Clipboard:xt.default,$ImagePreview:Ot.default,$Dropdown:Ct.default},At={dictMapping:St.default,hlang:jt.default},Pt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.installed||(n.locale&&Nt.default.use(n.locale),n.i18n&&Nt.default.i18n(n.i18n),Object.keys(Et).forEach((function(t){var n=Et[t];e.component(t,n),e.component("h-".concat(t.toLocaleLowerCase()),n),0!==t.indexOf("h")&&e.component("h".concat(t),n)})),Object.keys(At).forEach((function(t){e.filter(t,At[t])})),Object.keys($t).forEach((function(t){e.directive(t,$t[t])})),Object.keys(Dt).forEach((function(t){e.prototype[t]=Dt[t]})))};"undefined"!=typeof window&&window.Vue&&Pt(window.Vue);var It=(0,a.default)(Dt,Tt.default,{dictMapping:St.default},{locale:Nt.default.use});It.install=Pt;var Bt=It;e.default=Bt},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(245)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(159),a=n(17);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/affix/affix.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(247)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(160),a=n(19);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/avatar/avatar.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(249)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(161),a=n(21);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/back-top/backtop.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(162),a=n(23);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/badge/badge.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(252)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(163),a=n(25);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/breadcrumb/breadcrumb.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(164),a=n(27);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/checkbox/checkbox.vue",e.default=s.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={h:{locale:"zh-CN",common:{cancel:"取消",confirm:"确定",clear:"清除",placeholder:"请选择",empty:"空",any:"不限"},confirm:{title:"提示"},checkbox:{limitSize:"您最多可以选择{limitSize}个选项"},select:{nullOptionText:"请选择",emptyContent:"未搜索到相关数据",placeholder:"请选择",searchPlaceHolder:"请输入筛选文本",limitSize:"您最多可以选择{limitSize}个选项"},category:{placeholder:"请选择"},cascader:{placeholder:"请选择"},categoryModal:{limitWords:"您最多可以选择{size}条数据。",emptyContent:"未搜索到相关数据",total:"全部"},categoryPicker:{limitWords:"您最多可以选择{size}条数据。",emptyContent:"未搜索到相关数据",total:"全部",placeholder:"请选择"},autoComplate:{placeholder:"请输入",emptyContent:"未搜索到相关数据"},validation:{base:{required:"不能为空",maxLen:"文字长度不能超过{value}个字",minLen:"文字长度不能少于{value}个字",max:"不能大于{value}",min:"不能小于{value}"},type:{int:"不是正确的整数格式",number:"不是正确的数字格式",email:"不是正确的邮箱格式",url:"不是正确的网址格式",tel:"不是正确的电话号码格式",mobile:"不是正确的手机号码格式",globalmobile:"不是正确的国际号码格式"}},date:{today:"今天",yesterday:"昨天",year:"年",month:"月",week:"周",quarter:"季",day:"日",header:{year:"年",month:"月",day:"日"},show:{week:"{year}年 第{weeknum}周 {daystart} 至 {dayend}",weekInput:"{year}年 第{week}周",quarter:"{year}年 第{quarter}季度"},months:{january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一",december:"十二"},weeks:{monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日"}},datepicker:{placeholder:"请选择日期",startTime:"开始时间",endTime:"结束时间",customize:"自定义",start:"开始",end:"结束"},wordlimit:{warn:"您最多可以输入{0}个字"},wordcount:{warn:"您已超出{0}个字"},treepicker:{selectDesc:"您总共选择{0}项",placeholder:"请选择"},search:{placeholder:"请输入关键词查询",searchText:"搜索"},taginput:{limitWords:"您输入的已经超过限制"},table:{empty:"暂无数据"},uploader:{upload:"上传",reUpload:"重新上传"},pagination:{incorrectFormat:"您输入的值格式不正确",overSize:"您输入的值超过范围",totalBefore:"总",totalAfter:"条",sizeOfPage:"{size}条/页"}}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={h:{locale:"en-US",common:{cancel:"Cancel",confirm:"Confirm",clear:"Clear",nullOptionText:"please choose",empty:"empty",any:"any"},confirm:{title:"Confirm"},checkbox:{limitSize:"You can select up to {limitSize} data."},select:{nullOptionText:"please choose",placeholder:"select",emptyContent:"no results found",searchPlaceHolder:"search",limitSize:"You can select up to {limitSize} data."},category:{placeholder:"please choose"},cascader:{placeholder:"please choose"},categoryModal:{limitWords:"You can select up to {size} data.",emptyContent:"No results found",total:"total"},categoryPicker:{nullOptionText:"please choose",placeholder:"select",total:"total",limitSize:"You can select up to {0} data."},autoComplate:{placeholder:"Search Input",emptyContent:"No results found"},validation:{base:{required:" can not be empty",maxLen:" text length can't exceed {value} bits",minLen:" text length can't be less than {value} bits",max:" no more than {value}",min:" can't be less than {value}"},type:{int:" is not the correct integer format",number:" is not the correct digital format",email:" is not the correct mailbox format",url:" is not the correct URL format",tel:" is not the correct phone number format",mobile:" is not the correct mobile number format",globalmobile:" is not the correct international mobile number format"}},date:{today:"Today",yesterday:"Yesterday",year:"year",month:"month",week:"week",quarter:"quarter",day:"day",header:{year:"",month:"",day:""},show:{week:"{year} {weeknum}th week {daystart} - {dayend}",weekInput:"{year} {week}th week",quarter:"{year} {quarter}th quarter"},months:{january:"Jan",february:"Feb",march:"Mar",april:"Apr",may:"May",june:"Jun",july:"Jul",august:"Aug",september:"Sep",october:"Oct",november:"Nov",december:"Dec"},weeks:{monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"}},datepicker:{placeholder:"select date",startTime:"start",endTime:"end",customize:"customize",start:"start",end:"end"},wordlimit:{warn:"You are limited to enter {0} words"},wordcount:{warn:"You have exceeded {0} words"},treepicker:{selectDesc:"You have selected {0} items",placeholder:"please select"},search:{placeholder:"search...",searchText:"Search"},taginput:{limitWords:"You have exceeded the limit"},table:{empty:"No results found"},uploader:{upload:"Upload",reUpload:"ReUpload"},pagination:{incorrectFormat:"The format of the value you entered is incorrect",overSize:"The value you entered exceeds the range",totalBefore:"Total",totalAfter:"items",sizeOfPage:"{size} items/page"}}};e.default=i},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};(0,a.default)(this,t),this.isDragging=!1,this.options=i,this.element=e,this.element&&this.init(),this.moveFn=function(t){n.move(t)},this.upFn=function(t){n.up(t)},this.clickFn=function(t){n.click(t)}}return(0,r.default)(t,[{key:"init",value:function(){var t=this;this.element.addEventListener("mousedown",(function(e){t.mousedown(e)})),this.options.container&&this.options.container.addEventListener("mousedown",(function(e){t.mousedown(e)}))}},{key:"mousedown",value:function(t){this.isDragging||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},document.body.addEventListener("mousemove",this.moveFn),document.body.addEventListener("mouseup",this.upFn),document.body.addEventListener("click",this.clickFn),this.isDragging=!0,this.options.start&&this.options.start(t))}},{key:"move",value:function(t){this.options.drag&&this.options.drag(t)}},{key:"click",value:function(t){t.stopPropagation(),t.preventDefault()}},{key:"up",value:function(t){var e=this;document.body.removeEventListener("mousemove",this.moveFn),document.body.removeEventListener("mouseup",this.upFn),setTimeout((function(){document.body.removeEventListener("click",e.clickFn)}),200),document.onselectstart=null,document.ondragstart=null,this.isDragging=!1,this.options.end&&this.options.end(t)}},{key:"destroy",value:function(){document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("mouseup",this.upFn),document.removeEventListener("click",this.clickFn),document.onselectstart=null,document.ondragstart=null}}]),t}();e.default=o},function(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(260)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(165),a=n(29);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/circle/circle.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(262)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(166),a=n(31);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/category/category.vue",e.default=s.exports},function(t,e,n){var i=n(231);t.exports=function(t){if(Array.isArray(t))return i(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e,n){var i=n(231);t.exports=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){"use strict";n.r(e);var i=n(220),a=n(33);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/category/categorymodal.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(167),a=n(35);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/search/search.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(270)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(168),a=n(37);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/category-picker/categorypicker.vue",e.default=s.exports},function(t,e){function n(e,i){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,i)}t.exports=n},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;for(var n="undefined"!=typeof window&&"undefined"!=typeof document,i=["Edge","Trident","Firefox"],a=0,r=0;r=0){a=1;break}var o=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),a))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function l(t,e){if(1!==t.nodeType)return[];var n=getComputedStyle(t,null);return e?n[e]:n}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=l(t),n=e.overflow,i=e.overflowX,a=e.overflowY;return/(auto|scroll|overlay)/.test(n+a+i)?t:c(u(t))}var d={},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";if(t=t.toString(),d.hasOwnProperty(t))return d[t];switch(t){case"11":d[t]=-1!==navigator.userAgent.indexOf("Trident");break;case"10":d[t]=-1!==navigator.appVersion.indexOf("MSIE 10");break;case"all":d[t]=-1!==navigator.userAgent.indexOf("Trident")||-1!==navigator.userAgent.indexOf("MSIE")}return d.all=d.all||Object.keys(d).some((function(t){return d[t]})),d[t]};function h(t){if(!t)return document.documentElement;for(var e=f(10)?document.body:null,n=t.offsetParent;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===l(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function p(t){return null!==t.parentNode?p(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,a=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(a,0);var o,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(a))return"BODY"===(s=(o=l).nodeName)||"HTML"!==s&&h(o.firstElementChild)!==o?h(l):l;var u=p(t);return u.host?v(u.host,e):v(t,p(e).host)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var a=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||a;return r[n]}return t[n]}function y(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=m(e,"top"),a=m(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=a*r,t.right+=a*r,t}function g(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}function b(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],f(10)?n["offset"+t]+i["margin"+("Height"===t?"Top":"Left")]+i["margin"+("Height"===t?"Bottom":"Right")]:0)}function w(){var t=document.body,e=document.documentElement,n=f(10)&&getComputedStyle(e);return{height:b("Height",t,e,n),width:b("Width",t,e,n)}}var _=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],i=f(10),a="HTML"===e.nodeName,r=S(t),o=S(e),s=c(t),u=l(e),d=parseFloat(u.borderTopWidth,10),h=parseFloat(u.borderLeftWidth,10);n&&"HTML"===e.nodeName&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var p=C({top:r.top-o.top-d,left:r.left-o.left-h,width:r.width,height:r.height});if(p.marginTop=0,p.marginLeft=0,!i&&a){var v=parseFloat(u.marginTop,10),m=parseFloat(u.marginLeft,10);p.top-=d-v,p.bottom-=d-v,p.left-=h-m,p.right-=h-m,p.marginTop=v,p.marginLeft=m}return(i&&!n?e.contains(s):(e.contains(s)&&"HTML"!==e.nodeName||e===s)&&"BODY"!==s.nodeName)&&(p=y(p,e)),p}function T(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=j(t,n),a=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),o=e?0:m(n),s=e?0:m(n,"left"),l={top:o-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:a,height:r};return C(l)}function N(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===l(t,"position")||N(u(t)))}function M(t){if(!t||!t.parentElement||f())return document.documentElement;for(var e=t.parentElement;e&&"none"===l(e,"transform");)e=e.parentElement;return e||document.documentElement}function E(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},o=a?M(t):v(t,e);if("viewport"===i)r=T(o,a);else{var s=void 0;"scrollParent"===i?"BODY"===(s=c(u(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=j(s,o,a);if("HTML"!==s.nodeName||N(o))r=l;else{var d=w(),f=d.height,h=d.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=h+l.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function $(t){return t.width*t.height}function D(t,e,n,i,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var o=E(n,i,r,a),s={top:{width:o.width,height:e.top-o.top},right:{width:o.right-e.right,height:o.height},bottom:{width:o.width,height:o.bottom-e.bottom},left:{width:e.left-o.left,height:o.height}},l=Object.keys(s).map((function(t){return O({key:t},s[t],{area:$(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),c=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return c+(d?"-"+d:"")}function A(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=i?M(e):v(e,n);return j(n,a,i)}function P(t){var e=getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),i=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function I(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function B(t,e,n){n=n.split("-")[0];var i=P(t),a={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),o=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return a[o]=e[o]+e[l]/2-i[l]/2,a[s]=n===s?e[s]-i[u]:e[I(s)],a}function V(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=V(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=C(e.offsets.popper),e.offsets.reference=C(e.offsets.reference),e=n(e,t))})),e}function F(){if(!this.state.isDestroyed){var t=this.defaultOptions;this.options.modifiers={};var e=this;Object.keys(O({},st.Defaults.modifiers,t.modifiers)).forEach((function(n){e.options.modifiers[n]=O({},st.Defaults.modifiers[n]||{},t.modifiers?t.modifiers[n]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return O({name:t},e.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&s(t.onLoad)&&t.onLoad(e.reference,e.popper,e.options,t,e.state)}))}}function W(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=A(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=D(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=B(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=L(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function H(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function R(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i1&&void 0!==arguments[1]&&arguments[1],n=Z.indexOf(t),i=Z.slice(n+1).concat(Z.slice(0,n));return e?i.reverse():i}var et="flip",nt="clockwise",it="counterclockwise";function at(t,e,n,i){var a=[0,0],r=-1!==["right","left"].indexOf(i),o=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=o.indexOf(V(o,(function(t){return-1!==t.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return(u=u.map((function(t,i){var a=(1===i?!r:r)?"height":"width",o=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,o=!0,t):o?(t[t.length-1]+=e,o=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var a=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+a[1],o=a[2];if(!r)return t;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=n;break;case"%":case"%r":default:s=i}return C(s)[e]/100*r}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}(t,a,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){X(n)&&(a[e]+=n*("-"===t[i-1]?-1:1))}))})),a}var rt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var a=t.offsets,r=a.reference,o=a.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",c={start:x({},l,r[l]),end:x({},l,r[l]+r[u]-o[u])};t.offsets.popper=O({},o,c[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,a=t.offsets,r=a.popper,o=a.reference,s=i.split("-")[0],l=void 0;return l=X(+n)?[+n,0]:at(n,r,o,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var i=E(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);e.boundaries=i;var a=e.priority,r=t.offsets.popper,o={primary:function(t){var n=r[t];return r[t]i[t]&&!e.escapeWithReference&&(a=Math.min(r[n],i[t]-("right"===t?r.width:r.height))),x({},n,a)}};return a.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";r=O({},r,o[e](t))})),t.offsets.popper=r,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,a=t.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(a),s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return n[s]r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!J(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var a=t.placement.split("-")[0],r=t.offsets,o=r.popper,s=r.reference,u=-1!==["left","right"].indexOf(a),c=u?"height":"width",d=u?"Top":"Left",f=d.toLowerCase(),h=u?"left":"top",p=u?"bottom":"right",v=P(i)[c];s[p]-vo[p]&&(t.offsets.popper[f]+=s[f]+v-o[p]),t.offsets.popper=C(t.offsets.popper);var m=s[f]+s[c]/2-v/2,y=l(t.instance.popper),g=parseFloat(y["margin"+d],10),b=parseFloat(y["border"+d+"Width"],10),w=m-t.offsets.popper[f]-g-b;return w=Math.max(Math.min(o[c]-v,w),0),t.arrowElement=i,t.offsets.arrow=(x(n={},f,Math.round(w)),x(n,h,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(H(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=E(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),i=t.placement.split("-")[0],a=I(i),r=t.placement.split("-")[1]||"",o=[];switch(e.behavior){case et:o=[i,a];break;case nt:o=tt(i);break;case it:o=tt(i,!0);break;default:o=e.behavior}return o.forEach((function(s,l){if(i!==s||o.length===l+1)return t;i=t.placement.split("-")[0],a=I(i);var u=t.offsets.popper,c=t.offsets.reference,d=Math.floor,f="left"===i&&d(u.right)>d(c.left)||"right"===i&&d(u.left)d(c.top)||"bottom"===i&&d(u.top)d(n.right),v=d(u.top)d(n.bottom),y="left"===i&&h||"right"===i&&p||"top"===i&&v||"bottom"===i&&m,g=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(g&&"start"===r&&h||"start"===r&&!h&&p||g&&"end"===r&&p||!g&&"start"===r&&v||!g&&"end"===r&&m);(f||y||b)&&(t.flipped=!0,(f||y)&&(i=o[l+1]),b&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=O({},t.offsets.popper,B(t.instance.popper,t.offsets.reference,t.placement)),t=L(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,a=i.popper,r=i.reference,o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return a[o?"left":"top"]=r[n]-(s?a[o?"width":"height"]:0),t.placement=I(e),t.offsets.popper=C(a),t}},hide:{order:800,enabled:!0,fn:function(t){if(!J(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=V(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};_(this,t),this.scheduleUpdate=function(){return ot(i.update)},this.update=o(this.update.bind(this)),this.defaultOptions=a,this.options=O({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.updateModifiers(),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return k(t,[{key:"updateModifiers",value:function(){return F.call(this)}},{key:"update",value:function(){return W.call(this)}},{key:"destroy",value:function(){return Y.call(this)}},{key:"enableEventListeners",value:function(){return U.call(this)}},{key:"disableEventListeners",value:function(){return K.call(this)}}]),t}();st.Utils=("undefined"!=typeof window?window:t).PopperUtils,st.placements=Q,st.Defaults=rt;var lt=st;e.default=lt}).call(this,n(274))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(276)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(169),a=n(39);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/date-picker/datepicker.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(278)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(170),a=n(43);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/date-range-picker/daterangepicker.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(280)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(171),a=n(45);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/date-full-range-picker/datefullrangepicker.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(172),a=n(47);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/dropdown-custom/dropdowncustom.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(283)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(173),a=n(49);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/dropdown-menu/dropdownmenu.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(285)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(174),a=n(51);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/image-preview/imagepreview.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(287)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(175),a=n(53);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/form/form.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(12)),r=i(n(13)),o=i(n(3)),s=i(n(6)),l=i(n(228)),u=i(n(289)),c=i(n(290)),d=i(n(291));function f(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:"other";return!0===e||void 0===e?(0,o.default)({},t,{valid:!0,message:null,type:n}):(0,o.default)({},t,{valid:!1,message:e,type:n})},y={rules:{},combineRules:[]},g=function(){function t(e){(0,a.default)(this,t),l.default.isObject(e)||console.error("[HeyUI Error] Validator: Please provide the correct validation parameters"),this.combineRuleResults={},this.rules={},this.combineRules={},this.initRules(e)}return(0,r.default)(t,[{key:"initRules",value:function(t){var e={};l.default.extend(!0,e,y,t);var n=Object.keys(u.default);n.unshift("required");for(var i=0,a=n;i-1&&i.splice(i.indexOf(a),1);l.default.extend(r,t),e&&e.call(this,t),n&&0==i.length&&n.call(this,r)}});for(var o in r)r[o].loading&&i.push(o);return n&&0==i.length&&n.call(this,r),r}},{key:"validData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.next,i=e.prop,a=void 0===i?"":i,r=e.sourceData,o=e.uuid,s={};if(""!=a&&(s=this.validField(a,r,{next:n,uuid:o})),null==r&&(r=t),l.default.isArray(t))for(var u=0;u-1&&!this.rules[t]&&(e=t.replace(/\[\w+\]/,"[]")),this.rules[e]}},{key:"setConfig",value:function(t,e){var n=t;this.rules[n]=l.default.extend(!0,this.rules[n]||{},e)}},{key:"validFieldBase",value:function(t){var e=t.rule,n=t.value,i=t.parent;if(e&&Object.keys(e).length>0){var a=v(c.default.required,[n]);if(e.required&&!0!==a)return a;if(!0===a){if(e.type&&!0!==(a=v(u.default[e.type],[n])))return a;var r=Object.keys(c.default);r.shift();for(var o=0,s=r;o2&&void 0!==arguments[2]?arguments[2]:{},i=n.next,a=n.uuid;if(l.default.isNull(t))return m(t);var r=l.default.getKeyValue(e,t),o=this.rules[t]||{},s=this.combineRules[t]||[];if(t.indexOf("[")>-1){var u=t.replace(/\[\w+\]/,"[]");o=l.default.extend({},o,this.rules[u]),s=l.default.extend([],s,this.combineRules[u])}var c=e,d="";t.lastIndexOf(".")>-1&&(d=t.substr(0,t.lastIndexOf(".")),c=l.default.getKeyValue(e,d));var f=this.validFieldBase({rule:o,value:r,parent:c});if(!0!==f)return m(t,f,"base");f=this.combineRulesValid(s,r,c,d,a);var h=m(t,void 0,"base");return!0===f&&l.default.isFunction(i)&&l.default.isFunction(o.validAsync)&&(o.validAsync.call(null,r,(function(e){var n=m(t,e,"async");n[t].loading=!1,i(n)}),c,e),h[t].loading=!0),l.default.extend(h,f)}},{key:"combineRulesValid",value:function(t,e,n,i,a){if(!t)return!0;var r,o={},s=0,u=f(t);try{for(u.s();!(r=u.n()).done;){var c=r.value,h=null,p=(c.parentRef&&i?i+".":"")+c.refs[c.refs.length-1],y=this.combineRuleResults[c.id]||{};if(a&&y.uuid==a+i)h=y.result;else{var g,b=[],w=f(c.refs);try{for(w.s();!(g=w.n()).done;){var _=g.value,k=l.default.getKeyValue(n,_),x=(c.parentRef&&i?i+".":"")+_;if(1!=this.validFieldBase({rule:this.rules[x],value:k,parent:n}))break;b.push(k)}}catch(t){w.e(t)}finally{w.f()}if(b.length0)||a.default.t("h.validation.base.required")},maxLen:function(t,e){return null==e||(!0===(null!=t&&String(t).length<=e)||a.default.t("h.validation.base.maxLen",{value:e}))},minLen:function(t,e){return null==e||(!0===(null!=t&&String(t).length>=e)||a.default.t("h.validation.base.minLen",{value:e}))},max:function(t,e){return null==e||(!0===(null!=t&&Number(t)<=e)||a.default.t("h.validation.base.max",{value:e}))},min:function(t,e){return null==e||(!0===(null!=t&&Number(t)>=e)||a.default.t("h.validation.base.min",{value:e}))}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={lessThan:function(t,e){return Number(t)Number(e)},equal:function(t,e){return t==e}};e.default=i},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(293)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(176),a=n(55);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/form-item/formItem.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(295)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(177),a=n(57);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/form-item-list/formitemlist.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(297)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(178),a=n(59);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/menu/menu.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(222),a=n(61);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/menu/menu-item.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(227),a=n(63);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/menu/menu-item-show.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(301)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(179),a=n(65);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/modal/modal.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(303)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(180),a=n(67);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/modal-component/modalcomponent.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(305)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(181),a=n(69);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/pagination/pagination.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(182),a=n(71);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/select/select.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(308)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(183),a=n(73);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/poptip/poptip.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(310)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(184),a=n(75);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/progress/progress.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(185),a=n(77);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/radio/radio.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(313)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(186),a=n(79);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/rate/rate.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(315)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(187),a=n(81);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/slider/slider.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(188),a=n(83);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/loading/loading.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(318)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(189),a=n(85);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/steps/steps.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(320)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(190),a=n(87);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/h-switch/hswitch.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(322)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(191),a=n(89);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/switch-list/switchlist.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(324)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(192),a=n(91);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/skeleton/skeleton.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(326)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(193),a=n(93);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/table/table.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(10)),r=i(n(6)),o=i(n(328)),s=i(n(2));function l(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,u=arguments.length>2?arguments[2]:void 0,c=Math.max,d=Math.min,f=0,h=!1,p=!1,v=!0;if(!a.default.isFunction(t))throw new TypeError("debounce: func is not Function");function m(i){var a=e,o=n;return e=n=void 0,f=i,r=t.apply(o,a)}function y(t){return f=t,o=setTimeout(w,l),h?m(t):r}function g(t){var e=l-(t-s);return p?d(e,i-(t-f)):e}function b(t){var e=t-s;return void 0===s||e>=l||e<0||p&&t-f>=i}function w(){var t=(new Date).getTime();if(b(t))return _(t);o=setTimeout(w,g(t))}function _(t){return o=void 0,v&&e?m(t):(e=n=void 0,r)}function k(){void 0!==o&&clearTimeout(o),f=0,e=s=n=o=void 0}function x(){return void 0===o?r:_((new Date).getTime())}function O(){var t=(new Date).getTime(),i=b(t);if(e=arguments,n=this,s=t,i){if(void 0===o)return y(s);if(p)return o=setTimeout(w,l),m(s)}return void 0===o&&(o=setTimeout(w,l)),r}return a.default.isObject(u)&&(h=!!u.leading,i=(p="maxWait"in u)?c(u.maxWait||0,l):i,v="trailing"in u?!!u.trailing:v),O.cancel=k,O.flush=x,O};e.default=r},function(t,e,n){"use strict";n.r(e);var i=n(224),a=n(99);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/table/table-checkbox.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(333)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(194),a=n(101);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/table/tableitem.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(335)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(195),a=n(103);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/tabs/tabs.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(337)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(196),a=n(105);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/tag-input/taginput.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(197),a=n(107);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/tree/tree.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(225),a=n(109);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/tree/treeitem.vue",e.default=s.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"hTreeSlot",props:{data:Object},render:function(t){var e=function(t){for(var e=t.$parent,n=["Tree","hTree","h-tree"];e&&e.$parent&&-1==n.indexOf(e.$options._componentTag||e.$options.name);)e=e.$parent;return e||console.error("[HeyUI Error] Tree Component: Please put TreeItem component in the Tree Component"),e}(this);return e&&e.$scopedSlots&&e.$scopedSlots.item?t("div",{class:"h-tree-item-slot"},[e.$scopedSlots.item({item:this.data})]):t("span")}};e.default=i},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(342)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(198),a=n(111);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/tree-picker/treepicker.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(344)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(199),a=n(113);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/number-input/numberinput.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(346)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(200),a=n(115);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/tooltip/tooltip.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(348)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(201),a=n(117);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/uploader/uploader.vue",e.default=s.exports},function(t,e,n){"use strict";n.r(e);var i=n(202),a=n(119);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/plugins/image-preview/image-preview-modal.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(351)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(203),a=n(121);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/auto-complete/autocomplete.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(353)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(204),a=n(123);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/row/row.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(355)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(205),a=n(125);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/cell/cell.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(357)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(206),a=n(127);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/h-header/hheader.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(359)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(207),a=n(129);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/h-footer/hfooter.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(361)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(208),a=n(131);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/content/content.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(363)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(209),a=n(133);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/sider/sider.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(365)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(210),a=n(135);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/layout/layout.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(367)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(211),a=n(137);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/timeline/timeline.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(369)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(212),a=n(139);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/timeline-item/timelineitem.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(371)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(213),a=n(141);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/transfer/transfer.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(373)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(214),a=n(143);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/button/button.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(375)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(215),a=n(145);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/button-group/buttongroup.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(377)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(216),a=n(147);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/text-ellipsis/textellipsis.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(379)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(217),a=n(149);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/carousel/carousel.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(381)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(218),a=n(151);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/collapse/collapse.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(383)).default;e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(219),a=n(153);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n(1),s=Object(o.a)(a.default,i.a,i.b,!1,null,null,null);s.options.__file="src/components/collapse-item/collapseitem.vue",e.default=s.exports},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r={beforeEnter:function(t){a.default.addClass(t,"h-collapse-transition"),t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.height="0",t.style.paddingTop=0,t.style.paddingBottom=0},enter:function(t){t.dataset.oldOverflow=t.style.overflow,0!==t.scrollHeight?(t.style.height=t.scrollHeight+"px",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.height="",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},afterEnter:function(t){a.default.removeClass(t,"h-collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow},beforeLeave:function(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.height=t.scrollHeight+"px",t.style.overflow="hidden"},leave:function(t){0!==t.scrollHeight&&(a.default.addClass(t,"h-collapse-transition"),t.style.height=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave:function(t){a.default.removeClass(t,"h-collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom}},o={name:"CollapseTransition",functional:!0,render:function(t,e){var n=e.children;return t("transition",{on:r},n)}};e.default=o},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r={height:{inserted:function(t,e){e.value&&(t.style.height=e.value+(String(e.value).endsWith("%")?"":"px"))},unbind:function(t){t.style.height=null}},width:{inserted:function(t,e){e.value&&(t.style.width=e.value+(String(e.value).endsWith("%")?"":"px"))},unbind:function(t){t.style.width=null}},padding:{inserted:function(t,e){e.value&&(t.style.padding=e.value+(String(e.value).endsWith("%")?"":"px"))},unbind:function(t){t.style.padding=null}},margin:{inserted:function(t,e){e.value&&(t.style.margin=e.value+(String(e.value).endsWith("%")?"":"px"))},unbind:function(t){t.style.margin=null}},font:{inserted:function(t,e){e&&e.value&&(t.style.fontSize="".concat(e.value,"px"))},unbind:function(t){t.style.fontSize=null}},color:{inserted:function(t,e){var n=e.value||e.arg||e.expression;n.startsWith("#")?t.style.color=n:a.default.addClass(t,"".concat(n,"-color"))},unbind:function(t){t.style.color=null}},bgColor:{inserted:function(t,e){var n=e.value||e.arg;n.startsWith("#")?t.style.backgroundColor=n:a.default.addClass(t,"bg-".concat(n,"-color"))},unbind:function(t){t.style.backgroundColor=null}}};e.default=r},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(157)),r=i(n(2)),o=function(t,e){var n={},i=e.data.attrs||{};if(""===i.content)return!1;i.content&&(n.content=i.content),i.className&&(n.className=i.className),i.maxWidth&&(n.maxWidth=i.maxWidth);var a=i["ref-el"];if(!e.context.$el.querySelector)return!1;var r=e.context.$el.querySelector("[tmpl=".concat(a,"]"));return r?(n.content=r,n.html=!0):n.content?(n.content='
'.concat(n.content,"
"),n.html=!0):t.innerText&&(n.content='
'.concat(t.innerText,"
"),n.html=!0),n},s=function(t,e,n){if(!1!==e.value){var i=o(t,n);if(0!=i){var s=n.data.attrs||{};i.container=document.body,i=r.default.initParam(i,s,["placement","theme","delay","trigger"]),t.tooltip=new a.default(t,i)}}},l={inserted:function(t,e,n){s(t,e,n)},update:function(t,e,n){t.tooltip?n.context.$nextTick((function(){if(!1===e.value)return t.tooltip.destory(),void(t.tooltip=null);var i=o(t,n);0==i?t.tooltip.destory():t.tooltip.updateTemplate(i.content,i.html)})):s(t,e,n)},unbind:function(t){t.tooltip&&(t.tooltip.destory(),delete t.tooltip)}};e.default=l},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=i(n(8));function o(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw r}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0?(n.innerText=i,a.default.removeClass(n,"red-color")):(n.innerText=r.default.t("h.wordcount.warn",[Math.abs(o)]),a.default.addClass(n,"red-color"))},u={inserted:function(t,e,n){a.default.isNumber(e.value)&&function(){var i=e.value,r=document.createElement("p");r.innerHTML=" / ".concat(i,""),a.default.addClass(r,"h-wordcount");var s=t.parentNode;s.insertBefore(r,t);var u=s.querySelector(".h-wordcount-remain-size");t.remainDom=u,l(i,t,u),t.addEventListener("input",(function(){l(i,t,u)}));var c,d=o(n.data.directives);try{for(d.s();!(c=d.n()).done;){var f=c.value;if("model"==f.name){n.context.$watch(f.expression,(function(){l(i,t,u)}));break}}}catch(t){d.e(t)}finally{d.f()}}()},unbind:function(t){var e=t.previousSibling;e&&a.default.hasClass(e,"h-wordcount")&&e.parentNode.removeChild(e)}};e.default=u},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=i(n(8)),o=i(n(7));function s(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);ne&&(t.value=t.value.substring(0,e),"0"==t.getAttribute("data-alerted")&&o.default.error(r.default.t("h.wordlimit.warn",[e])),t.dispatchEvent(new Event("input")),t.setAttribute("data-alerted","1"))},c={inserted:function(t,e,n){a.default.isNumber(e.value)&&function(){var i=e.value;t.setAttribute("data-alerted","0"),u(t,i),t.addEventListener("input",(function(){u(t,i)})),t.addEventListener("blur",(function(){t.setAttribute("data-alerted","0")}));var a,r=s(n.data.directives);try{for(r.s();!(a=r.n()).done;){var o=a.value;if("model"==o.name){n.context.$watch(o.expression,(function(){u(t,i)}));break}}}catch(t){r.e(t)}finally{r.f()}}()}};e.default=c},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(390));function r(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw r}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n-1},get:function(t){return a[i.indexOf(t)]},set:function(t,e){-1===i.indexOf(t)&&(i.push(t),a.push(e))},delete:function(t){var e=i.indexOf(t);e>-1&&(i.splice(e,1),a.splice(e,1))}});function o(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!r.has(t)){var e,n=null,i=t.clientWidth,a=null,o=function(){t.clientWidth!==i&&c()},s=function(e){window.removeEventListener("resize",o,!1),t.removeEventListener("input",c,!1),t.removeEventListener("keyup",c,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",c,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),r.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",c,!1),window.addEventListener("resize",o,!1),t.addEventListener("input",c,!1),t.addEventListener("autosize:update",c,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",r.set(t,{destroy:s,update:c}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),c()}function l(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function u(){var e=t.style.height,a=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="auto";var o=t.scrollHeight+n;0!==t.scrollHeight?(t.style.height=o+"px",i=t.clientWidth,a.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)):t.style.height=e}function c(){u();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),i=Math.round(parseFloat(n.height));if(i!==e?"visible"!==n.overflowY&&(l("visible"),u(),i=Math.round(parseFloat(window.getComputedStyle(t,null).height))):"hidden"!==n.overflowY&&(l("hidden"),u(),i=Math.round(parseFloat(window.getComputedStyle(t,null).height))),a!==i){a=i;var r=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}("autosize:resized");try{t.dispatchEvent(r)}catch(t){}}}}function s(t){var e=r.get(t);e&&e.destroy()}function l(t){var e=r.get(t);e&&e.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(t){return t}).destroy=function(t){return t},u.update=function(t){return t}):((u=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return o(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],s),t},u.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t});var c=u;e.default=c},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(14)),r=i(n(2)),o=i(n(8)),s={middle:!1};function l(t,e){return e||(e=o.default.t("h.confirm.title")),function(t,e){return new Promise((function(n,i){var o={type:"h-modal",content:'
  '.concat(t,"
"),buttons:["cancel","ok"],events:{ok:function(t){t.close(),n()},cancel:function(t){t.close(),i(new Error("cancel"))}},title:e,className:"h-modal-comfirm h-modal-type-default",hasMask:!0,closeOnMask:!0,hasCloseIcon:!1,timeout:0};return o=r.default.extend({},s,o,!0),(0,a.default)(o)}))}(t,e)}l.config=function(t){t.middle&&(s.middle=!0)};var u=l;e.default=u},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(14)),r=i(n(2)),o={timeout:4e3},s={info:"info",success:"success",warn:"warn",error:"error"},l={info:"blue",success:"green",warn:"yellow",error:"red"},u=null;function c(t){u||(u=document.createElement("div"),r.default.addClass(u,"".concat("h-notice","-container")),document.body.appendChild(u));var e={type:"h-notice",hasCloseIcon:!0,parent:u};return-1!=Object.keys(s).indexOf(t.type)?(t.title&&(t.style="".concat("h-notice","-has-icon")),t.content='').concat(t.content),delete t.type):t.icon&&(t.title&&(t.style="".concat("h-notice","-has-icon")),t.content='').concat(t.content)),(e=r.default.extend({},o,e,t,!0)).Vue=null,(0,a.default)(e)}function d(t,e){return r.default.isString(t)?c({content:t,timeout:e}):r.default.isObject(t)?(this&&(this.$router&&(t.$router=this.$router),this.$i18n&&(t.$i18n=this.$i18n),this.$store&&(t.$store=this.$store)),c(t)):void console.error("Notice params are incorrect:",t)}function f(t,e,n){return r.default.isString(e)?c({content:e,timeout:n,type:t}):r.default.isObject(e)?(t&&(e.type=t),c(e)):void console.error("Notice params are incorrect:",e)}d.config=function(t){null!=t.timeout&&(o.timeout=t.timeout)},d.error=function(t,e){return f("error",t,e)},d.warn=function(t,e){return f("warn",t,e)},d.success=function(t,e){return f("success",t,e)},d.info=function(t,e){return f("info",t,e)};var h=d;e.default=h},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(2)),r=null;function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(r)r.querySelector(".".concat("h-loading","-text")).innerText=t;else{var e='
\n
\n \n \n \n

').concat(t,"

\n
\n "),n=window.document.createElement("div");n.innerHTML=e,r=n.childNodes[0],document.body.appendChild(r)}a.default.addClass(r,"".concat("h-loading","-loading")),a.default.addClass(r,"".concat("h-loading","-visible"))}function s(t){o(t)}s.close=function(){r&&(a.default.removeClass(r,"".concat("h-loading","-loading")),setTimeout((function(){a.default.removeClass(r,"".concat("h-loading","-visible"))}),500))},s.open=function(t){o(t)};var l=s;e.default=l},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(12)),r=i(n(13)),o=i(n(2)),s=new(function(){function t(){(0,a.default)(this,t),this.dom=null,this.timeout=null,this.inner=null,this.width=0}return(0,r.default)(t,[{key:"initDom",value:function(){this.dom=document.createElement("div"),this.dom.innerHTML='
'),document.body.appendChild(this.dom),this.inner=this.dom.querySelector(".".concat("h-loadingbar","-inner"))}},{key:"start",value:function(){this.dom||this.initDom(),o.default.addClass(this.inner,"loading"),this.loading(5,90)}},{key:"loading",value:function(t,e,n){var i=this;if(this.width>=e)o.default.isFunction(n)&&n.call(this);else{var a=t;this.width/e>.7&&(a=t/10),this.timeout&&clearTimeout(this.timeout),this.width=this.width+a,this.width=Math.min(100,this.width),this.width=Math.max(0,this.width),this.inner.style.width="".concat(this.width,"%"),this.timeout=setTimeout((function(){i.loading(t,e,n)}),200)}}},{key:"success",value:function(){this.end(1)}},{key:"end",value:function(t){var e=this;this.dom||this.initDom(),this.loading(100,100,(function(){t||o.default.addClass(e.inner,"error"),setTimeout((function(){o.default.removeClass(e.inner,"loading"),o.default.removeClass(e.inner,"error"),e.inner.style.width="0",e.width=0}),200)}))}},{key:"fail",value:function(){this.end(0)}}]),t}());function l(){return s}l.start=function(){s.start()},l.success=function(){s.success()},l.percent=function(t){s.percent(t)},l.fail=function(){s.fail()};var u=l;e.default=u},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.text,n=t.showSuccessTip,i=void 0===n?"复制成功":n,o=t.showFailureTip,s=void 0===o?"复制失败":o,l=t.successCallback,u=t.failureCallback,c=document.body,d="rtl"==document.documentElement.getAttribute("dir"),f=document.createElement("textarea");f.style.fontSize="12pt",f.style.border="0",f.style.padding="0",f.style.margin="0",f.style.position="absolute",f.style[d?"right":"left"]="-9999px";var h=window.pageYOffset||document.documentElement.scrollTop;f.style.top="".concat(h,"px"),f.setAttribute("readonly",""),f.value=e,c.appendChild(f),(0,a.default)(f);try{document.execCommand("copy"),i&&r.default.success(i),l&&l.call()}catch(t){s&&r.default.error(s),u&&u.call()}};var a=i(n(396)),r=i(n(7))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),a=document.createRange();a.selectNodeContents(t),i.removeAllRanges(),i.addRange(a),e=i.toString()}return e};e.default=i},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return a.default.dictMapping(t,e,n)};var a=i(n(4))},function(t,e,n){"use strict";var i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(null==n)return a.default.t(t,e);return n};var a=i(n(8))}]).default})); \ No newline at end of file diff --git a/src/static/js/lib/httpVueLoader.js b/src/static/js/lib/httpVueLoader.js new file mode 100644 index 0000000000000000000000000000000000000000..9e21e92c260e02eee3272d64a398a8ee3ed3a3da --- /dev/null +++ b/src/static/js/lib/httpVueLoader.js @@ -0,0 +1,487 @@ +(function umd(root,factory){ + if(typeof module==='object' && typeof exports === 'object' ) + module.exports=factory() + else if(typeof define==='function' && define.amd) + define([],factory) + else + root.httpVueLoader=factory() +})(this,function factory() { + 'use strict'; + + var scopeIndex = 0; + + StyleContext.prototype = { + + withBase: function(callback) { + + var tmpBaseElt; + if ( this.component.baseURI ) { + + // firefox and chrome need the to be set while inserting or modifying + + + +
+ + + + + + diff --git a/src/static/swagger-ui/index.js b/src/static/swagger-ui/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c229ec43e12b73e67be0c4bdda555a8831ad933d --- /dev/null +++ b/src/static/swagger-ui/index.js @@ -0,0 +1,17 @@ +try { + module.exports.SwaggerUIBundle = require("./swagger-ui-bundle.js") + module.exports.SwaggerUIStandalonePreset = require("./swagger-ui-standalone-preset.js") +} catch(e) { + // swallow the error if there's a problem loading the assets. + // allows this module to support providing the assets for browserish contexts, + // without exploding in a Node context. + // + // see https://github.com/swagger-api/swagger-ui/issues/3291#issuecomment-311195388 + // for more information. +} + +// `absolutePath` and `getAbsoluteFSPath` are both here because at one point, +// we documented having one and actually implemented the other. +// They were both retained so we don't break anyone's code. +module.exports.absolutePath = require("./absolute-path.js") +module.exports.getAbsoluteFSPath = require("./absolute-path.js") diff --git a/src/static/swagger-ui/oauth2-redirect.html b/src/static/swagger-ui/oauth2-redirect.html new file mode 100644 index 0000000000000000000000000000000000000000..a013fc82ee5a1405788cb60ec0fe7682f65e7f43 --- /dev/null +++ b/src/static/swagger-ui/oauth2-redirect.html @@ -0,0 +1,68 @@ + + +Swagger UI: OAuth2 Redirect + + + + diff --git a/src/static/swagger-ui/package.json b/src/static/swagger-ui/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d7f78e92e7a523d20289b5579f688f4b9b20445a --- /dev/null +++ b/src/static/swagger-ui/package.json @@ -0,0 +1,18 @@ +{ + "name": "swagger-ui-dist", + "version": "3.27.0", + "main": "index.js", + "repository": "git@github.com:swagger-api/swagger-ui.git", + "contributors": [ + "(in alphabetical order)", + "Anna Bodnia ", + "Buu Nguyen ", + "Josh Ponelat ", + "Kyle Shockey ", + "Robert Barnwell ", + "Sahar Jafari " + ], + "license": "Apache-2.0", + "dependencies": {}, + "devDependencies": {} +} diff --git a/src/static/swagger-ui/swagger-ui-bundle.js b/src/static/swagger-ui/swagger-ui-bundle.js new file mode 100644 index 0000000000000000000000000000000000000000..f735496e67968eefea4c2e6f3ef388ed7bca62db --- /dev/null +++ b/src/static/swagger-ui/swagger-ui-bundle.js @@ -0,0 +1,92 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=485)}([function(e,t,n){"use strict";e.exports=n(106)},function(e,t,n){e.exports=n(799)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:z(e)}function r(e){return u(e)?e:V(e)}function o(e){return s(e)?e:W(e)}function i(e){return a(e)&&!c(e)?e:H(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[h])}function c(e){return u(e)||s(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v={},m={value:!1},y={value:!1};function g(e){return e.value=!1,e}function b(e){e&&(e.value=!0)}function _(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?w(e)+t:t}function C(){return!0}function S(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function A(e,t){return O(e,t,0)}function k(e,t){return O(e,t,t)}function O(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var j,T,P,I="function"==typeof Symbol&&Symbol.iterator,M=I||"@@iterator";function D(e){this.next=e}function N(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function R(){return{value:void 0,done:!0}}function L(e){return!!U(e)}function F(e){return e&&"function"==typeof e.next}function B(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(I&&e[I]||e["@@iterator"]);if("function"==typeof t)return t}function q(e){return e&&"number"==typeof e.length}function z(e){return null==e?Z():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function V(e){return null==e?Z().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():X(e)}function W(e){return null==e?Z():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():Q(e)}function H(e){return(null==e?Z():a(e)?u(e)?e.entrySeq():e:Q(e)).toSetSeq()}function J(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function $(e){this._iterable=e,this.size=e.length||e.size}function Y(e){this._iterator=e,this._iteratorCache=[]}function G(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function Z(){return j||(j=new J([]))}function X(e){var t=Array.isArray(e)?new J(e).fromEntrySeq():F(e)?new Y(e).fromEntrySeq():L(e)?new $(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function Q(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return q(e)?new J(e):F(e)?new Y(e):L(e)?new $(e):void 0}function te(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var u=o[n?i-a:a];if(!1===t(u[1],r?u[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new D((function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:N(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,W(n).map((function(r,o){return e(t,r,o,n)}))):ie(n)?t.call(o,r,V(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?W(e).map(oe).toList():ie(e)?V(e).map(oe).toMap():e}function ie(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ue(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||u(e)!==u(t)||s(e)!==s(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ae(o[1],e)&&(n||ae(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var f=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!ae(t,e.get(r,v)):!ae(e.get(r,v),t))return f=!1,!1}));return f&&e.size===p}function se(e,t){if(!(this instanceof se))return new se(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(T)return T;T=this}}function ce(e,t){if(!e)throw new Error(t)}function le(e,t,n){if(!(this instanceof le))return new le(e,t,n);if(ce(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:N(e,o,n[t?r-o++:o++])}))},t(K,V),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},K.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new D((function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:N(e,a,n[a])}))},K.prototype[d]=!0,t($,W),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=B(this._iterable),r=0;if(F(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=B(this._iterable);if(!F(n))return new D(R);var r=0;return new D((function(){var t=n.next();return t.done?t:N(e,r++,t.value)}))},t(Y,W),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return N(e,o,r[o++])}))},t(se,W),se.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},se.prototype.get=function(e,t){return this.has(e)?this._value:t},se.prototype.includes=function(e){return ae(this._value,e)},se.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:new se(this._value,k(t,n)-A(e,n))},se.prototype.reverse=function(){return this},se.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},se.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},se.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:N(e,i++,a)}))},le.prototype.equals=function(e){return e instanceof le?this._start===e._start&&this._end===e._end&&this._step===e._step:ue(this,e)},t(fe,n),t(pe,fe),t(he,fe),t(de,fe),fe.Keyed=pe,fe.Indexed=he,fe.Set=de;var ve="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function me(e){return e>>>1&1073741824|3221225471&e}function ye(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return me(n)}if("string"===t)return e.length>Se?function(e){var t=Oe[e];return void 0===t&&(t=ge(e),ke===Ae&&(ke=0,Oe={}),ke++,Oe[e]=t),t}(e):ge(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(we&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[Ce]))return t;if(!xe){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ce]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Ee,1073741824&Ee&&(Ee=0),we)be.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(xe)Object.defineProperty(e,Ce,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ce]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ce]=t}}return t}(e);if("function"==typeof e.toString)return ge(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ge(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Te.prototype.toString=function(){return this.__toString("Map {","}")},Te.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Te.prototype.set=function(e,t){return He(this,e,t)},Te.prototype.setIn=function(e,t){return this.updateIn(e,v,(function(){return t}))},Te.prototype.remove=function(e){return He(this,e,v)},Te.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return v}))},Te.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Te.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var i=t===v,a=n.next();if(a.done){var u=i?r:t,s=o(u);return s===u?t:s}ce(i||t&&t.set,"invalid keyPath");var c=a.value,l=i?v:t.get(c,v),f=e(l,n,r,o);return f===l?t:f===v?t.remove(c):(i?We():t).set(c,f)}(this,Yt(e),t,n);return r===v?void 0:r},Te.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):We()},Te.prototype.merge=function(){return Ye(this,void 0,arguments)},Te.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ye(this,t,n)},Te.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,We(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Te.prototype.mergeDeep=function(){return Ye(this,Ge,arguments)},Te.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ye(this,Ze(t),n)},Te.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,We(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Te.prototype.sort=function(e){return xt(Ft(this,e))},Te.prototype.sortBy=function(e,t){return xt(Ft(this,t,e))},Te.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Te.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},Te.prototype.asImmutable=function(){return this.__ensureOwner()},Te.prototype.wasAltered=function(){return this.__altered},Te.prototype.__iterator=function(e,t){return new Ue(this,e,t)},Te.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Te.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ve(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Te.isMap=Pe;var Ie,Me="@@__IMMUTABLE_MAP__@@",De=Te.prototype;function Ne(e,t){this.ownerID=e,this.entries=t}function Re(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Le(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Fe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Be(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ue(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ze(e._root)}function qe(e,t){return N(e,t[0],t[1])}function ze(e,t){return{node:e,index:0,__prev:t}}function Ve(e,t,n,r){var o=Object.create(De);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function We(){return Ie||(Ie=Ve(0))}function He(e,t,n){var r,o;if(e._root){var i=g(m),a=g(y);if(r=Je(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===v?-1:1:0)}else{if(n===v)return e;o=1,r=new Ne(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ve(o,r):We()}function Je(e,t,n,r,o,i,a,u){return e?e.update(t,n,r,o,i,a,u):i===v?e:(b(u),b(a),new Be(t,r,[o,i]))}function Ke(e){return e.constructor===Be||e.constructor===Fe}function $e(e,t,n,r,o){if(e.keyHash===r)return new Fe(t,r,[e.entry,o]);var i,a=31&(0===n?e.keyHash:e.keyHash>>>n),u=31&(0===n?r:r>>>n);return new Re(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var o=r?e:x(e);return o[t]=n,o}De[Me]=!0,De.delete=De.remove,De.removeIn=De.deleteIn,Ne.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i=tt)return function(e,t,n,r){e||(e=new _);for(var o=new Be(e,ye(n),[n,r]),i=0;i>>e)),i=this.bitmap;return 0==(i&o)?r:this.nodes[Qe(i&o-1)].get(e+5,t,n,r)},Re.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ye(r));var u=31&(0===t?n:n>>>t),s=1<=nt)return function(e,t,n,r,o){for(var i=0,a=new Array(32),u=0;0!==n;u++,n>>>=1)a[u]=1&n?t[i++]:void 0;return a[r]=o,new Le(e,i+1,a)}(e,p,c,u,d);if(l&&!d&&2===p.length&&Ke(p[1^f]))return p[1^f];if(l&&d&&1===p.length&&Ke(d))return d;var m=e&&e===this.ownerID,y=l?d?c:c^s:c|s,g=l?d?et(p,f,d,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a>>e),i=this.nodes[o];return i?i.get(e+5,t,n,r):r},Le.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ye(r));var u=31&(0===t?n:n>>>t),s=o===v,c=this.nodes,l=c[u];if(s&&!l)return this;var f=Je(l,e,t+5,n,r,o,i,a);if(f===l)return this;var p=this.count;if(l){if(!f&&--p0&&r<32?ht(0,r,5,null,new st(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function it(e){return!(!e||!e[at])}t(ot,he),ot.of=function(){return this(arguments)},ot.prototype.toString=function(){return this.__toString("List [","]")},ot.prototype.get=function(e,t){if((e=E(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?gt(e,t).set(0,n):gt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=g(y);return t>=_t(e._capacity)?r=vt(r,e.__ownerID,0,t,n,i):o=vt(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):ht(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ot.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ot.prototype.insert=function(e,t){return this.splice(e,0,t)},ot.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):dt()},ot.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){gt(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new st([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-5,n))===a&&i)return this}if(i&&!o)return this;var u=mt(this,e);if(!i)for(var s=0;s>>t&31;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-5,n))===i&&o===this.array.length-1)return this}var a=mt(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var ct,lt,ft={};function pt(e,t){var n=e._origin,r=e._capacity,o=_t(r),i=e._tail;return a(e._root,e._level,0);function a(e,u,s){return 0===u?function(e,a){var u=a===o?i&&i.array:e&&e.array,s=a>n?0:n-a,c=r-a;return c>32&&(c=32),function(){if(s===c)return ft;var e=t?--c:s++;return u&&u[e]}}(e,s):function(e,o,i){var u,s=e&&e.array,c=i>n?0:n-i>>o,l=1+(r-i>>o);return l>32&&(l=32),function(){for(;;){if(u){var e=u();if(e!==ft)return e;u=null}if(c===l)return ft;var n=t?--l:c++;u=a(s&&s[n],o-5,i+(n<>>n&31,s=e&&u0){var c=e&&e.array[u],l=vt(c,t,n-5,r,o,i);return l===c?e:((a=mt(e,t)).array[u]=l,a)}return s&&e.array[u]===o?e:(b(i),a=mt(e,t),void 0===o&&u===a.array.length-1?a.array.pop():a.array[u]=o,a)}function mt(e,t){return t&&e&&t===e.ownerID?e:new st(e?e.array.slice():[],t)}function yt(e,t){if(t>=_t(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function gt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new _,o=e._origin,i=e._capacity,a=o+t,u=void 0===n?i:n<0?i+n:o+n;if(a===o&&u===i)return e;if(a>=u)return e.clear();for(var s=e._level,c=e._root,l=0;a+l<0;)c=new st(c&&c.array.length?[void 0,c]:[],r),l+=1<<(s+=5);l&&(a+=l,o+=l,u+=l,i+=l);for(var f=_t(i),p=_t(u);p>=1<f?new st([],r):h;if(h&&p>f&&a5;m-=5){var y=f>>>m&31;v=v.array[y]=mt(v.array[y],r)}v.array[f>>>5&31]=h}if(u=p)a-=p,u-=p,s=5,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||p>>s&31;if(g!==p>>>s&31)break;g&&(l+=(1<o&&(c=c.removeBefore(r,s,a-l)),c&&pi&&(i=c.size),a(s)||(c=c.map((function(e){return re(e)}))),r.push(c)}return i>e.size&&(e=e.setSize(i)),Xe(e,t,r)}function _t(e){return e<32?0:e-1>>>5<<5}function xt(e){return null==e?Ct():wt(e)?e:Ct().withMutations((function(t){var n=r(e);je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function wt(e){return Pe(e)&&l(e)}function Et(e,t,n,r){var o=Object.create(xt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Ct(){return lt||(lt=Et(We(),dt()))}function St(e,t,n){var r,o,i=e._map,a=e._list,u=i.get(t),s=void 0!==u;if(n===v){if(!s)return e;a.size>=32&&a.size>=2*i.size?(r=(o=a.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return e;r=i,o=a.set(u,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Et(r,o)}function At(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function kt(e){this._iter=e,this.size=e.size}function Ot(e){this._iter=e,this.size=e.size}function jt(e){this._iter=e,this.size=e.size}function Tt(e){var t=Jt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new D((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Pt(e,t,n){var r=Jt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,v);return i===v?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(2,o);return new D((function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return N(r,u,t.call(n,a[1],u,e),o)}))},r}function It(e,t){var n=Jt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Tt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Kt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Mt(e,t,n,r){var o=Jt(e);return r&&(o.has=function(r){var o=e.get(r,v);return o!==v&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,v);return i!==v&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,u=0;return e.__iterate((function(e,i,s){if(t.call(n,e,i,s))return u++,o(e,r?i:u-1,a)}),i),u},o.__iteratorUncached=function(o,i){var a=e.__iterator(2,i),u=0;return new D((function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],l=s[1];if(t.call(n,l,c,e))return N(o,r?c:u++,l,i)}}))},o}function Dt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),S(t,n,o))return e;var i=A(t,o),a=k(n,o);if(i!=i||a!=a)return Dt(e.toSeq().cacheResult(),t,n,r);var u,s=a-i;s==s&&(u=s<0?0:s);var c=Jt(e);return c.size=0===u?u:e.size&&u||void 0,!r&&G(e)&&u>=0&&(c.get=function(t,n){return(t=E(this,t))>=0&&tu)return{value:void 0,done:!0};var e=o.next();return r||1===t?e:N(t,s-1,0===t?void 0:e.value[1],e)}))},c}function Nt(e,t,n,r){var o=Jt(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return e.__iterate((function(e,i,c){if(!u||!(u=t.call(n,e,i,c)))return s++,o(e,r?i:s-1,a)})),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=e.__iterator(2,i),s=!0,c=0;return new D((function(){var e,i,l;do{if((e=u.next()).done)return r||1===o?e:N(o,c++,0===o?void 0:e.value[1],e);var f=e.value;i=f[0],l=f[1],s&&(s=t.call(n,l,i,a))}while(s);return 2===o?e:N(o,i,l,e)}))},o}function Rt(e,t){var n=u(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?X(e):Q(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&u(i)||s(e)&&s(i))return i}var c=new J(o);return n?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function Lt(e,t,n){var r=Jt(e);return r.__iterateUncached=function(r,o){var i=0,u=!1;return function e(s,c){var l=this;s.__iterate((function(o,s){return(!t||c0}function qt(e,t,r){var o=Jt(e);return o.size=new J(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),B(o?e.reverse():e)})),a=0,u=!1;return new D((function(){var n;return u||(n=i.map((function(e){return e.next()})),u=n.some((function(e){return e.done}))),u?{value:void 0,done:!0}:N(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function zt(e,t){return G(e)?t:e.constructor(t)}function Vt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Wt(e){return je(e.size),w(e)}function Ht(e){return u(e)?r:s(e)?o:i}function Jt(e){return Object.create((u(e)?V:s(e)?W:H).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):z.prototype.cacheResult.call(this)}function $t(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):xn(e,t)},mn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;je(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):xn(t,n)},mn.prototype.pop=function(){return this.slice(1)},mn.prototype.unshift=function(){return this.push.apply(this,arguments)},mn.prototype.unshiftAll=function(e){return this.pushAll(e)},mn.prototype.shift=function(){return this.pop.apply(this,arguments)},mn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):wn()},mn.prototype.slice=function(e,t){if(S(e,t,this.size))return this;var n=A(e,this.size);if(k(t,this.size)!==this.size)return he.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):xn(r,o)},mn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},mn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},mn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new D((function(){if(r){var t=r.value;return r=r.next,N(e,n++,t)}return{value:void 0,done:!0}}))},mn.isStack=yn;var gn,bn="@@__IMMUTABLE_STACK__@@",_n=mn.prototype;function xn(e,t,n,r){var o=Object.create(_n);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function wn(){return gn||(gn=xn(0))}function En(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}_n[bn]=!0,_n.withMutations=De.withMutations,_n.asMutable=De.asMutable,_n.asImmutable=De.asImmutable,_n.wasAltered=De.wasAltered,n.Iterator=D,En(n,{toArray:function(){je(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new At(this,!0)},toMap:function(){return Te(this.toKeyedSeq())},toObject:function(){je(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return xt(this.toKeyedSeq())},toOrderedSet:function(){return ln(u(this)?this.valueSeq():this)},toSet:function(){return tn(u(this)?this.valueSeq():this)},toSetSeq:function(){return new Ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return mn(u(this)?this.valueSeq():this)},toList:function(){return ot(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return zt(this,Rt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){je(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return zt(this,Mt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return je(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){je(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return zt(this,Pt(this,e,t))},reduce:function(e,t,n){var r,o;return je(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return zt(this,It(this,!0))},slice:function(e,t){return zt(this,Dt(this,e,t,!0))},some:function(e,t){return!this.every(On(e),t)},sort:function(e){return zt(this,Ft(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return w(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Te().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return ue(this,e)},entrySeq:function(){var e=this;if(e._cache)return new J(e._cache);var t=e.toSeq().map(kn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(On(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(C)},flatMap:function(e,t){return zt(this,function(e,t,n){var r=Ht(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return zt(this,Lt(this,e,!0))},fromEntrySeq:function(){return new jt(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=Yt(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,v):v)===v)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=u(e),o=(l(e)?xt():Te()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=Ht(e);return o.map((function(t){return zt(e,i(t))}))}(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(An).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Bt(this,e)},maxBy:function(e,t){return Bt(this,t,e)},min:function(e){return Bt(this,e?jn(e):In)},minBy:function(e,t){return Bt(this,t?jn(t):In,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return zt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return zt(this,Nt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(On(e),t)},sortBy:function(e,t){return zt(this,Ft(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return zt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return zt(this,function(e,t,n){var r=Jt(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,u){return t.call(n,e,o,u)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(2,o),u=!0;return new D((function(){if(!u)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,s=o[0],c=o[1];return t.call(n,c,s,i)?2===r?e:N(r,s,c,e):(u=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(On(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),n=u(e),r=t?1:0;return function(e,t){return t=ve(t,3432918353),t=ve(t<<15|t>>>-15,461845907),t=ve(t<<13|t>>>-13,5),t=ve((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=me((t=ve(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+Mn(ye(e),ye(t))|0}:function(e,t){r=r+Mn(ye(e),ye(t))|0}:t?function(e){r=31*r+ye(e)|0}:function(e){r=r+ye(e)|0}),r)}(this))}});var Cn=n.prototype;Cn[f]=!0,Cn[M]=Cn.values,Cn.__toJS=Cn.toArray,Cn.__toStringMapper=Tn,Cn.inspect=Cn.toSource=function(){return this.toString()},Cn.chain=Cn.flatMap,Cn.contains=Cn.includes,En(r,{flip:function(){return zt(this,Tt(this))},mapEntries:function(e,t){var n=this,r=0;return zt(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return zt(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Sn=r.prototype;function An(e,t){return t}function kn(e,t){return[t,e]}function On(e){return function(){return!e.apply(this,arguments)}}function jn(e){return function(){return-e.apply(this,arguments)}}function Tn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Pn(){return x(arguments)}function In(e,t){return et?-1:0}function Mn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Sn[p]=!0,Sn[M]=Cn.entries,Sn.__toJS=Cn.toObject,Sn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Tn(e)},En(o,{toKeyedSeq:function(){return new At(this,!1)},filter:function(e,t){return zt(this,Mt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return zt(this,It(this,!1))},slice:function(e,t){return zt(this,Dt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=A(e,e<0?this.count():this.size);var r=this.slice(0,e);return zt(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return zt(this,Lt(this,e,!1))},get:function(e,t){return(e=E(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=E(this,e))>=0&&(void 0!==this.size?this.size===1/0||e=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,c=!0,f=!1;return{s:function(){n=o()(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){f=!0,u=e},f:function(){try{c||null==n.return||n.return()}finally{if(f)throw u}}}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n5e3)return e.textContent;return function(e){for(var n,r,o,i,a,u=e.textContent,s=0,c=u[0],l=1,f=e.innerHTML="",p=0;r=n,n=p<7&&"\\"==n?1:l;){if(l=c,c=u[++s],i=f.length>1,!l||p>8&&"\n"==l||[/\S/.test(l),1,1,!/[$\w]/.test(l),("/"==n||"\n"==n)&&i,'"'==n&&i,"'"==n&&i,u[s-4]+r+n=="--\x3e",r+n=="*/"][p])for(f&&(e.appendChild(a=t.createElement("span")).setAttribute("class",["token-not-formatted","","","token-string",""][p?p<3?2:p>6?4:p>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/.test(f):0]),a.appendChild(t.createTextNode(f))),o=p&&p<7?p:o,f="",p=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/.test(l),/[\])]/.test(l),/[$\w]/.test(l),"/"==l&&o<2&&"<"!=n,'"'==l,"'"==l,l+c+u[s+1]+u[s+2]=="\x3c!--",l+c=="/*",l+c=="//","#"==l][--p];);f+=l}}(e)}function le(e){var t;if([/filename\*=[^']+'\w*'"([^"]+)";?/i,/filename\*=[^']+'\w*'([^;]+);?/i,/filename="([^;]*);?"/i,/filename=([^;]*);?/i].some((function(n){return null!==(t=n.exec(e))})),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function fe(e){return t=e.replace(/\.[^./]*$/,""),k()(S()(t));var t}var pe=function(e,t){if(e>t)return"Value must be less than Maximum"},he=function(e,t){if(et)return"Value must be less than MaxLength"},we=function(e,t){if(e.length2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,i=n.bypassRequiredCheck,a=void 0!==i&&i,u=[],s=e.get("required"),c=Object(q.a)(e,{isOAS3:o}),l=c.schema,f=c.parameterContentMediaType;if(!l)return u;var p=l.get("required"),h=l.get("maximum"),d=l.get("minimum"),v=l.get("type"),m=l.get("format"),y=l.get("maxLength"),b=l.get("minLength"),x=l.get("pattern");if(v&&(s||p||t)){var E="string"===v&&t,C="array"===v&&g()(t)&&t.length,S="array"===v&&w.a.List.isList(t)&&t.count(),A="array"===v&&"string"==typeof t&&t,k="file"===v&&t instanceof F.a.File,O="boolean"===v&&(t||!1===t),j="number"===v&&(t||0===t),T="integer"===v&&(t||0===t),P="object"===v&&"object"===_()(t)&&null!==t,I="object"===v&&"string"==typeof t&&t,M=[E,C,S,A,k,O,j,T,P,I],D=M.some((function(e){return!!e}));if((s||p)&&!D&&!a)return u.push("Required field is not provided"),u;if("object"===v&&"string"==typeof t&&(null===f||"application/json"===f))try{JSON.parse(t)}catch(e){return u.push("Parameter string value must be valid JSON"),u}if(x){var N=Ee(t,x);N&&u.push(N)}if(y||0===y){var R=xe(t,y);R&&u.push(R)}if(b){var L=we(t,b);L&&u.push(L)}if(h||0===h){var B=pe(t,h);B&&u.push(B)}if(d||0===d){var U=he(t,d);U&&u.push(U)}if("string"===v){var z;if(!(z="date-time"===m?be(t):"uuid"===m?_e(t):ge(t)))return u;u.push(z)}else if("boolean"===v){var V=ye(t);if(!V)return u;u.push(V)}else if("number"===v){var W=de(t);if(!W)return u;u.push(W)}else if("integer"===v){var H=ve(t);if(!H)return u;u.push(H)}else if("array"===v){var J;if(!S||!t.count())return u;J=l.getIn(["items","type"]),t.forEach((function(e,t){var n;"number"===J?n=de(e):"integer"===J?n=ve(e):"string"===J&&(n=ge(e)),n&&u.push({index:t,error:n})}))}else if("file"===v){var K=me(t);if(!K)return u;u.push(K)}}return u},Se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(/xml/.test(t)){if(!e.xml||!e.xml.name){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(R.memoizedCreateXMLExample)(e,n)}var o=Object(R.memoizedSampleFromSchema)(e,n);return"object"===_()(o)?p()(o,null,2):o},Ae=function(){var e={},t=F.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)n.hasOwnProperty(r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},ke=function(t){return(t instanceof e?t:new e(t.toString(),"utf-8")).toString("base64")},Oe={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},je=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},Te=function(e,t,n){return!!P()(n,(function(n){return M()(e[n],t[n])}))};function Pe(e){return"string"!=typeof e||""===e?"":Object(E.sanitizeUrl)(e)}function Ie(e){return!(!e||e.indexOf("localhost")>=0||e.indexOf("127.0.0.1")>=0||"none"===e)}function Me(e){if(!w.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=e.find((function(e,t){return t.startsWith("2")&&m()(e.get("content")||{}).length>0})),n=e.get("default")||w.a.OrderedMap(),r=(n.get("content")||w.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var De=function(e){return"string"==typeof e||e instanceof String?e.trim().replace(/\s/g,"%20"):""},Ne=function(e){return U()(De(e).replace(/%20/g,"_"))},Re=function(e){return e.filter((function(e,t){return/^x-/.test(t)}))},Le=function(e){return e.filter((function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==_()(e)||g()(e)||null===e||!t)return e;var r=d()({},e);return m()(r).forEach((function(e){e===t&&n(r[e],e)?delete r[e]:r[e]=Fe(r[e],t,n)})),r}function Be(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===_()(e)&&null!==e)try{return p()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function Ue(e){return"number"==typeof e?e.toString():e}function qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,i=void 0===o||o;if(!w.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var a=e.get("name"),u=e.get("in"),s=[];return e&&e.hashCode&&u&&a&&i&&s.push("".concat(u,".").concat(a,".hash-").concat(e.hashCode())),u&&a&&s.push("".concat(u,".").concat(a)),s.push(a),r?s:s[0]||""}function ze(e,t){return qe(e,{returnAll:!0}).map((function(e){return t[e]})).filter((function(e){return void 0!==e}))[0]}function Ve(){return He(V()(32).toString("base64"))}function We(e){return He(H()("sha256").update(e).digest("base64"))}function He(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var Je=function(e){return!e||!(!$(e)||!e.isEmpty())}}).call(this,n(79).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(54);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(t,n,arguments)||(i=e.apply(null,arguments)),n=arguments,i}}))},function(e,t,n){var r=n(751),o=n(752),i=n(756);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){var r=n(596),o=n(597),i=n(598);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){e.exports=n(566)},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;(s=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){e.exports=n(550)},function(e,t,n){e.exports=n(570)},function(e,t){e.exports=function(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;for(var t=0,n=["File","Blob","FormData"];t5?s-5:0),l=5;l6?u-6:0),c=6;c>",null!=n[r])return e.apply(void 0,[n,r,o,i,a].concat(s));var l=i;return t?new Error("Required "+l+" `"+a+"` was not specified in `"+o+"`."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function u(e,t){return a((function(n,r,o,a,u){var s=n[r];if(!t(s)){var c=i(s);return new Error("Invalid "+a+" `"+u+"` of type `"+c+"` supplied to `"+o+"`, expected `"+e+"`.")}return null}))}function s(e,t,n){return a((function(r,o,a,u,s){for(var c=arguments.length,l=Array(c>5?c-5:0),f=5;f5?a-5:0),s=5;s key("+l[f]+")"].concat(u));if(h instanceof Error)return h}}))}function l(e,t,n,r){return a((function(){for(var o=arguments.length,i=Array(o),a=0;a5?c-5:0),f=5;f4)}function s(e){var t=e.get("swagger");return"string"==typeof t&&t.startsWith("2.0")}function c(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?u(n.specSelectors.specJson())?a.a.createElement(e,o()({},r,n,{Ori:t})):a.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,s=a(e),c=1;c0){var o=n.map((function(e){return console.error(e),e.line=e.fullPath?y(g,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",O()(e,"message",{enumerable:!0,value:e.message}),e}));i.newThrownErrBatch(o)}return r.updateResolved(t)}))}},be=[],_e=V()(A()(C.a.mark((function e(){var t,n,r,o,i,a,u,s,c,l,f,p,h,d,v,m,y;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=be.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,i=o.resolveSubtree,a=o.AST,u=void 0===a?{}:a,s=t.specSelectors,c=t.specActions,i){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return l=u.getLineNumberForPath?u.getLineNumberForPath:function(){},f=s.specStr(),p=t.getConfigs(),h=p.modelPropertyMacro,d=p.parameterMacro,v=p.requestInterceptor,m=p.responseInterceptor,e.prev=11,e.next=14,be.reduce(function(){var e=A()(C.a.mark((function e(t,o){var a,u,c,p,y,g,b;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return a=e.sent,u=a.resultMap,c=a.specWithCurrentSubtrees,e.next=7,i(c,o,{baseDoc:s.url(),modelPropertyMacro:h,parameterMacro:d,requestInterceptor:v,responseInterceptor:m});case 7:return p=e.sent,y=p.errors,g=p.spec,r.allErrors().size&&n.clearBy((function(e){return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!e.get("fullPath").every((function(e,t){return e===o[t]||void 0===o[t]}))})),T()(y)&&y.length>0&&(b=y.map((function(e){return e.line=e.fullPath?l(f,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",O()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(b)),H()(u,o,g),H()(c,o,g),e.abrupt("return",{resultMap:u,specWithCurrentSubtrees:c});case 15:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w.a.resolve({resultMap:(s.specResolvedSubtree([])||Object(N.Map)()).toJS(),specWithCurrentSubtrees:s.specJson().toJS()}));case 14:y=e.sent,delete be.system,be=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:c.updateResolvedSubtree([],y.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),xe=function(e){return function(t){be.map((function(e){return e.join("@@")})).indexOf(e.join("@@"))>-1||(be.push(e),be.system=t,_e())}};function we(e,t,n,r,o){return{type:X,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function Ee(e,t,n,r){return{type:X,payload:{path:e,param:t,value:n,isXml:r}}}var Ce=function(e,t){return{type:le,payload:{path:e,value:t}}},Se=function(){return{type:le,payload:{path:[],value:Object(N.Map)()}}},Ae=function(e,t){return{type:ee,payload:{pathMethod:e,isOAS3:t}}},ke=function(e,t,n,r){return{type:Q,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Oe(e){return{type:ue,payload:{pathMethod:e}}}function je(e,t){return{type:se,payload:{path:e,value:t,key:"consumes_value"}}}function Te(e,t){return{type:se,payload:{path:e,value:t,key:"produces_value"}}}var Pe=function(e,t,n){return{payload:{path:e,method:t,res:n},type:te}},Ie=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ne}},Me=function(e,t,n){return{payload:{path:e,method:t,req:n},type:re}},De=function(e){return{payload:e,type:oe}},Ne=function(e){return function(t){var n=t.fn,r=t.specActions,o=t.specSelectors,i=t.getConfigs,a=t.oas3Selectors,u=e.pathName,s=e.method,c=e.operation,l=i(),f=l.requestInterceptor,p=l.responseInterceptor,h=c.toJS();if(c&&c.get("parameters")&&c.get("parameters").filter((function(e){return e&&!0===e.get("allowEmptyValue")})).forEach((function(t){if(o.parameterInclusionSettingFor([u,s],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(J.D)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}})),e.contextUrl=L()(o.url()).toString(),h&&h.operationId?e.operationId=h.operationId:h&&u&&s&&(e.operationId=n.opId(h,u,s)),o.isOAS3()){var d="".concat(u,":").concat(s);e.server=a.selectedServer(d)||a.selectedServer();var v=a.serverVariables({server:e.server,namespace:d}).toJS(),y=a.serverVariables({server:e.server}).toJS();e.serverVariables=_()(v).length?v:y,e.requestContentType=a.requestContentType(u,s),e.responseContentType=a.responseContentType(u,s)||"*/*";var b=a.requestBodyValue(u,s),x=a.requestBodyInclusionSetting(u,s);Object(J.u)(b)?e.requestBody=JSON.parse(b):b&&b.toJS?e.requestBody=b.filter((function(e,t){return!Object(J.r)(e)||x.get(t)})).toJS():e.requestBody=b}var w=g()({},e);w=n.buildRequest(w),r.setRequest(e.pathName,e.method,w);e.requestInterceptor=function(t){var n=f.apply(this,[t]),o=g()({},n);return r.setMutatedRequest(e.pathName,e.method,o),n},e.responseInterceptor=p;var E=m()();return n.execute(e).then((function(t){t.duration=m()()-E,r.setResponse(e.pathName,e.method,t)})).catch((function(t){console.error(t),r.setResponse(e.pathName,e.method,{error:!0,err:B()(t)})}))}},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=d()(e,["path","method"]);return function(e){var o=e.fn.fetch,i=e.specSelectors,a=e.specActions,u=i.specJsonWithResolvedSubtrees().toJS(),s=i.operationScheme(t,n),c=i.contentTypeValues([t,n]).toJS(),l=c.requestContentType,f=c.responseContentType,p=/xml/i.test(l),h=i.parameterValues([t,n],p).toJS();return a.executeRequest($($({},r),{},{fetch:o,spec:u,pathName:t,method:n,parameters:h,requestContentType:l,scheme:s,responseContentType:f}))}};function Le(e,t){return{type:ie,payload:{path:e,method:t}}}function Fe(e,t){return{type:ae,payload:{path:e,method:t}}}function Be(e,t,n){return{type:fe,payload:{scheme:e,path:t,method:n}}}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r=n(145),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(201)("wks"),o=n(203),i=n(43).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(218)("wks"),o=n(166),i=n(32).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(43),o=n(74),i=n(83),a=n(99),u=n(160),s=function(e,t,n){var c,l,f,p,h=e&s.F,d=e&s.G,v=e&s.S,m=e&s.P,y=e&s.B,g=d?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=d?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=t),n)f=((l=!h&&g&&void 0!==g[c])?g:n)[c],p=y&&l?u(f,r):m&&"function"==typeof f?u(Function.call,f):f,g&&a(g,c,f,e&s.U),b[c]!=f&&i(b,c,p),m&&_[c]!=f&&(_[c]=f)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r=n(35);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){var r=n(56),o=n(765);e.exports=function(e,t){if(null==e)return{};var n,i,a=o(e,t);if(r){var u=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(37),o=n(101),i=n(75),a=/"/g,u=function(e,t,n,r){var o=String(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){e.exports=!n(78)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return i})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return a})),n.d(t,"NEW_SPEC_ERR",(function(){return u})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return s})),n.d(t,"NEW_AUTH_ERR",(function(){return c})),n.d(t,"CLEAR",(function(){return l})),n.d(t,"CLEAR_BY",(function(){return f})),n.d(t,"newThrownErr",(function(){return p})),n.d(t,"newThrownErrBatch",(function(){return h})),n.d(t,"newSpecErr",(function(){return d})),n.d(t,"newSpecErrBatch",(function(){return v})),n.d(t,"newAuthErr",(function(){return m})),n.d(t,"clear",(function(){return y})),n.d(t,"clearBy",(function(){return g}));var r=n(125),o=n.n(r),i="err_new_thrown_err",a="err_new_thrown_err_batch",u="err_new_spec_err",s="err_new_spec_err_batch",c="err_new_auth_err",l="err_clear",f="err_clear_by";function p(e){return{type:i,payload:o()(e)}}function h(e){return{type:a,payload:e}}function d(e){return{type:u,payload:e}}function v(e){return{type:s,payload:e}}function m(e){return{type:c,payload:e}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:f,payload:e}}},function(e,t,n){var r=n(100);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(79),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r=n(38),o=n(352),i=n(222),a=Object.defineProperty;t.f=n(45)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(372),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports={debugTool:null}},function(e,t,n){e.exports=n(568)},function(e,t,n){e.exports=n(762)},function(e,t,n){e.exports=n(764)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return i})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return a})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return u})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return s})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return c})),n.d(t,"setSelectedServer",(function(){return l})),n.d(t,"setRequestBodyValue",(function(){return f})),n.d(t,"setRequestBodyInclusion",(function(){return p})),n.d(t,"setActiveExamplesMember",(function(){return h})),n.d(t,"setRequestContentType",(function(){return d})),n.d(t,"setResponseContentType",(function(){return v})),n.d(t,"setServerVariableValue",(function(){return m}));var r="oas3_set_servers",o="oas3_set_request_body_value",i="oas3_set_request_body_inclusion",a="oas3_set_active_examples_member",u="oas3_set_request_content_type",s="oas3_set_response_content_type",c="oas3_set_server_variable_value";function l(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function f(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}function p(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:i,payload:{value:t,pathMethod:n,name:r}}}function h(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:a,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function d(e){var t=e.value,n=e.pathMethod;return{type:u,payload:{value:t,pathMethod:n}}}function v(e){var t=e.value,n=e.path,r=e.method;return{type:s,payload:{value:t,path:n,method:r}}}function m(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:c,payload:{server:t,namespace:n,key:r,val:o}}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=56)}([function(e,t){e.exports=n(17)},function(e,t){e.exports=n(15)},function(e,t){e.exports=n(28)},function(e,t){e.exports=n(18)},function(e,t){e.exports=n(129)},function(e,t){e.exports=n(62)},function(e,t){e.exports=n(55)},function(e,t){e.exports=n(56)},function(e,t){e.exports=n(3)},function(e,t){e.exports=n(54)},function(e,t){e.exports=n(96)},function(e,t){e.exports=n(927)},function(e,t){e.exports=n(30)},function(e,t){e.exports=n(13)},function(e,t){e.exports=n(194)},function(e,t){e.exports=n(933)},function(e,t){e.exports=n(95)},function(e,t){e.exports=n(14)},function(e,t){e.exports=n(81)},function(e,t){e.exports=n(124)},function(e,t){e.exports=n(123)},function(e,t){e.exports=n(121)},function(e,t){e.exports=n(122)},function(e,t){e.exports=n(195)},function(e,t){e.exports=n(936)},function(e,t){e.exports=n(6)},function(e,t){e.exports=n(7)},function(e,t){e.exports=n(939)},function(e,t){e.exports=n(943)},function(e,t){e.exports=n(944)},function(e,t){e.exports=n(1)},function(e,t){e.exports=n(153)},function(e,t){e.exports=n(946)},function(e,t){e.exports=n(4)},function(e,t){e.exports=n(79)},function(e,t){e.exports=n(422)},function(e,t){e.exports=n(949)},function(e,t){e.exports=n(950)},function(e,t){e.exports=n(52)},function(e,t){e.exports=n(951)},function(e,t){e.exports=n(955)},function(e,t){e.exports=n(8)},function(e,t){e.exports=n(10)},function(e,t){e.exports=n(960)},function(e,t){e.exports=n(961)},function(e,t){e.exports=n(962)},function(e,t){e.exports=n(276)},function(e,t){e.exports=n(72)},function(e,t){e.exports=n(152)},function(e,t){e.exports=n(963)},function(e,t){e.exports=n(971)},function(e,t){e.exports=n(972)},function(e,t){e.exports=n(42)},function(e,t){e.exports=n(269)},function(e,t){e.exports=n(40)},function(e,t){e.exports=n(973)},function(e,t,n){e.exports=n(59)},function(e,t){e.exports=n(974)},function(e,t){e.exports=n(975)},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"path",(function(){return Zn})),n.d(r,"query",(function(){return Xn})),n.d(r,"header",(function(){return er})),n.d(r,"cookie",(function(){return tr}));var o=n(9),i=n.n(o),a=n(10),u=n.n(a),s=n(5),c=n.n(s),l=n(6),f=n.n(l),p=n(7),h=n.n(p),d=n(0),v=n.n(d),m=n(8),y=n.n(m),g=n(15),b=n.n(g),_=n(29),x=n.n(_),w=n(11),E=n.n(w),C=n(20),S=n.n(C),A=n(21),k=n.n(A),O=n(22),j=n.n(O),T=n(4),P=n.n(T),I=n(39),M=n.n(I),D=n(12),N=n.n(D),R=n(1),L=n.n(R),F=n(2),B=n.n(F),U=n(17),q=n.n(U),z=n(18),V=n.n(z),W=n(23),H=n.n(W),J=(n(57),n(32)),K=n.n(J),$=n(31),Y=n.n($),G=n(24),Z=n.n(G),X=n(19),Q=n.n(X),ee=n(34),te=n(30),ne=n.n(te),re=n(25),oe=n.n(re),ie=n(26),ae=n.n(ie),ue=n(40),se=n.n(ue),ce=n(41),le=n.n(ce),fe=n(42),pe=n.n(fe),he=n(33),de=n.n(he),ve=n(43);function me(e){var t=function(){if("undefined"==typeof Reflect||!ne.a)return!1;if(ne.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(ne()(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=de()(e);if(t){var o=de()(this).constructor;n=ne()(r,arguments,o)}else n=r.apply(this,arguments);return pe()(this,n)}}var ye=function(e){var t=function(e,t){return{name:e,value:t}};return Q()(e.prototype.set)||Q()(e.prototype.get)||Q()(e.prototype.getAll)||Q()(e.prototype.has)?e:function(e){le()(r,e);var n=me(r);function r(e){var t;return oe()(this,r),(t=n.call(this,e))._entryList=[],t}return ae()(r,[{key:"append",value:function(e,n,o){return this._entryList.push(t(e,n)),se()(de()(r.prototype),"append",this).call(this,e,n,o)}},{key:"set",value:function(e,n){var r=t(e,n);this._entryList=this._entryList.filter((function(t){return t.name!==e})),this._entryList.push(r)}},{key:"get",value:function(e){var t=this._entryList.find((function(t){return t.name===e}));return void 0===t?null:t}},{key:"getAll",value:function(e){return this._entryList.filter((function(t){return t.name===e})).map((function(e){return e.value}))}},{key:"has",value:function(e){return this._entryList.some((function(t){return t.name===e}))}}]),r}(e)}(n.n(ve).a),ge=(n(58),n(44)),be=n.n(ge),_e=n(45),xe=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},we=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.escape,r=arguments.length>2?arguments[2]:void 0;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&n?r?JSON.parse(e):Object(_e.stringToCharArray)(e).map((function(e){return we(e)||xe(e)&&"unsafe"===n?e:(be()(e)||[]).map((function(e){return"0".concat(e.toString(16).toUpperCase()).slice(-2)})).map((function(e){return"%".concat(e)})).join("")})).join(""):e}function Ce(e){var t=e.value;return L()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Ee(e,{escape:i})};if("simple"===r)return n.map((function(e){return a(e)})).join(",");if("label"===r)return".".concat(n.map((function(e){return a(e)})).join("."));if("matrix"===r)return n.map((function(e){return a(e)})).reduce((function(e,n){return!e||o?"".concat(e||"",";").concat(t,"=").concat(n):"".concat(e,",").concat(n)}),"");if("form"===r){var u=o?"&".concat(t,"="):",";return n.map((function(e){return a(e)})).join(u)}if("spaceDelimited"===r){var s=o?"".concat(t,"="):"";return n.map((function(e){return a(e)})).join(" ".concat(s))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return n.map((function(e){return a(e)})).join("|".concat(c))}}(e):"object"===B()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Ee(e,{escape:i})},u=v()(n);if("simple"===r)return u.reduce((function(e,t){var r=a(n[t]),i=o?"=":",",u=e?"".concat(e,","):"";return"".concat(u).concat(t).concat(i).concat(r)}),"");if("label"===r)return u.reduce((function(e,t){var r=a(n[t]),i=o?"=":".",u=e?"".concat(e,"."):".";return"".concat(u).concat(t).concat(i).concat(r)}),"");if("matrix"===r&&o)return u.reduce((function(e,t){var r=a(n[t]),o=e?"".concat(e,";"):";";return"".concat(o).concat(t,"=").concat(r)}),"");if("matrix"===r)return u.reduce((function(e,r){var o=a(n[r]),i=e?"".concat(e,","):";".concat(t,"=");return"".concat(i).concat(r,",").concat(o)}),"");if("form"===r)return u.reduce((function(e,t){var r=a(n[t]),i=e?"".concat(e).concat(o?"&":","):"",u=o?"=":",";return"".concat(i).concat(t).concat(u).concat(r)}),"")}(e):function(e){var t=e.key,n=e.value,r=e.style,o=e.escape,i=function(e){return Ee(e,{escape:o})};if("simple"===r)return i(n);if("label"===r)return".".concat(i(n));if("matrix"===r)return";".concat(t,"=").concat(i(n));if("form"===r)return i(n);if("deepObject"===r)return i(n)}(e)}function Se(e,t){var n;if(void 0===j.a||null==e[k.a]){if(L()(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ae(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 V()(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ae(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=S()(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==u[1]?u[1]:{},"object"===B()(t)&&(t=(n=t).url),n.headers=n.headers||{},ke.mergeInQueryOrForm(n),n.headers&&v()(n.headers).forEach((function(e){var t=n.headers[e];"string"==typeof t&&(n.headers[e]=t.replace(/\n+/g," "))})),!n.requestInterceptor){e.next=12;break}return e.next=8,n.requestInterceptor(n);case 8:if(e.t0=e.sent,e.t0){e.next=11;break}e.t0=n;case 11:n=e.t0;case 12:return r=n.headers["content-type"]||n.headers["Content-Type"],/multipart\/form-data/i.test(r)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]),e.prev=14,e.next=17,(n.userFetch||fetch)(n.url,n);case 17:return o=e.sent,e.next=20,ke.serializeRes(o,t,n);case 20:if(o=e.sent,!n.responseInterceptor){e.next=28;break}return e.next=24,n.responseInterceptor(o);case 24:if(e.t1=e.sent,e.t1){e.next=27;break}e.t1=o;case 27:o=e.t1;case 28:e.next=38;break;case 30:if(e.prev=30,e.t2=e.catch(14),o){e.next=34;break}throw e.t2;case 34:throw(i=new Error(o.statusText)).statusCode=i.status=o.status,i.responseError=e.t2,i;case 38:if(o.ok){e.next=43;break}throw(a=new Error(o.statusText)).statusCode=a.status=o.status,a.response=o,a;case 43:return e.abrupt("return",o);case 44:case"end":return e.stop()}}),e,null,[[14,30]])})))).apply(this,arguments)}var Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function Pe(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):Y.a.safeLoad(e)}function Ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.loadSpec,o=void 0!==r&&r,i={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:De(e.headers)},a=i.headers["content-type"],u=o||Te(a),s=u?e.text:e.blob||e.buffer;return s.call(e).then((function(e){if(i.text=e,i.data=e,u)try{var t=Pe(e,a);i.body=t,i.obj=t}catch(e){i.parseError=e}return i}))}function Me(e){return e.includes(", ")?e.split(", "):e}function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Q()(e.entries)?V()(e.entries()).reduce((function(e,t){var n=q()(t,2),r=n[0],o=n[1];return e[r]=Me(o),e}),{}):{}}function Ne(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==B()(e)||"string"!=typeof e.uri):"undefined"!=typeof File&&e instanceof File||("undefined"!=typeof Blob&&e instanceof Blob||(void 0!==ee.Buffer&&e instanceof ee.Buffer||null!==e&&"object"===B()(e)&&"function"==typeof e.pipe))}function Re(e,t){return L()(e)&&e.some((function(e){return Ne(e,t)}))}var Le={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Fe={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.collectionFormat,o=t.allowEmptyValue,i=t.serializationOption,a=t.encoding,u="object"!==B()(t)||L()(t)?t:t.value,s=n?function(e){return e.toString()}:function(e){return encodeURIComponent(e)},c=s(e);if(void 0===u&&o)return[[c,""]];if(Ne(u)||Re(u))return[[c,u]];if(i)return Ue(e,u,n,i);if(a){if([B()(a.style),B()(a.explode),B()(a.allowReserved)].some((function(e){return"undefined"!==e})))return Ue(e,u,n,Z()(a,["style","explode","allowReserved"]));if(a.contentType){if("application/json"===a.contentType){var l="string"==typeof u?u:N()(u);return[[c,s(l)]]}return[[c,s(u.toString())]]}return"object"!==B()(u)?[[c,s(u)]]:L()(u)&&u.every((function(e){return"object"!==B()(e)}))?[[c,u.map(s).join(",")]]:[[c,s(N()(u))]]}return"object"!==B()(u)?[[c,s(u)]]:L()(u)?"multi"===r?[[c,u.map(s)]]:[[c,u.map(s).join(Fe[r||"csv"])]]:[[c,""]]}function Ue(e,t,n,r){var o=r.style||"form",i=void 0===r.explode?"form"===o:r.explode,a=!n&&(r&&r.allowReserved?"unsafe":"reserved"),u=function(e){return Ee(e,{escape:a})},s=n?function(e){return e}:function(e){return Ee(e,{escape:a})};return"object"!==B()(t)?[[s(e),u(t)]]:L()(t)?i?[[s(e),t.map(u)]]:[[s(e),t.map(u).join(Le[o])]]:"deepObject"===o?v()(t).map((function(n){return[s("".concat(e,"[").concat(n,"]")),u(t[n])]})):i?v()(t).map((function(e){return[s(e),u(t[e])]})):[[s(e),v()(t).map((function(e){return["".concat(s(e),",").concat(u(t[e]))]})).join(",")]]}function qe(e){return M()(e).reduce((function(e,t){var n,r=q()(t,2),o=Se(Be(r[0],r[1],!0));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=q()(i,2),u=a[0],s=a[1];if(L()(s)){var c,l=Se(s);try{for(l.s();!(c=l.n()).done;){var f=c.value;e.append(u,f)}}catch(e){l.e(e)}finally{l.f()}}else e.append(u,s)}}catch(e){o.e(e)}finally{o.f()}return e}),new ye)}function ze(e){var t=v()(e).reduce((function(t,n){var r,o=Se(Be(n,e[n]));try{for(o.s();!(r=o.n()).done;){var i=r.value,a=q()(i,2),u=a[0],s=a[1];t[u]=s}}catch(e){o.e(e)}finally{o.f()}return t}),{});return K.a.stringify(t,{encode:!1,indices:!1})||""}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,r=e.query,o=e.form,i=function(){for(var e=arguments.length,t=new Array(e),n=0;n0){var o=t(e,n[n.length-1],n);o&&(r=r.concat(o))}if(L()(e)){var i=e.map((function(e,r){return ht(e,t,n.concat(r))}));i&&(r=r.concat(i))}else if(yt(e)){var a=v()(e).map((function(r){return ht(e[r],t,n.concat(r))}));a&&(r=r.concat(a))}return r=vt(r)}function dt(e){return L()(e)?e:[e]}function vt(e){var t;return(t=[]).concat.apply(t,tt()(e.map((function(e){return L()(e)?vt(e):e}))))}function mt(e){return e.filter((function(e){return void 0!==e}))}function yt(e){return e&&"object"===B()(e)}function gt(e){return e&&"function"==typeof e}function bt(e){if(wt(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function _t(e){return bt(e)||wt(e)&&"mutation"===e.type}function xt(e){return _t(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function wt(e){return e&&"object"===B()(e)}function Et(e,t){try{return rt.a.getValueByPointer(e,t)}catch(e){return console.error(e),{}}}var Ct=n(49),St=n.n(Ct),At=n(50),kt=n(37),Ot=n.n(kt);function jt(e,t){function n(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,n=new Array(e),r=0;r-1&&-1===Mt.indexOf(n)||Dt.indexOf(r)>-1||Nt.some((function(e){return r.indexOf(e)>-1}))}function Lt(e,t){var n=e.split("#"),r=q()(n,2),o=r[0],i=r[1],a=E.a.resolve(o||"",t||"");return i?"".concat(a,"#").concat(i):a}var Ft=new RegExp("^([a-z]+://|//)","i"),Bt=jt("JSONRefError",(function(e,t,n){this.originalError=n,Ye()(this,t||{})})),Ut={},qt=new St.a,zt=[function(e){return"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7]},function(e){return"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6]}],Vt={key:"$ref",plugin:function(e,t,n,r){var o=r.getInstance(),i=n.slice(0,-1);if(!Rt(i)&&(a=i,!zt.some((function(e){return e(a)})))){var a,u=r.getContext(n).baseDoc;if("string"!=typeof e)return new Bt("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:u,fullPath:n});var s,c,l,f=$t(e),p=f[0],h=f[1]||"";try{s=u||p?Jt(p,u):null}catch(t){return Kt(t,{pointer:h,$ref:e,basePath:s,fullPath:n})}if(function(e,t,n,r){var o=qt.get(r);o||(o={},qt.set(r,o));var i=function(e){if(0===e.length)return"";return"/".concat(e.map(en).join("/"))}(n),a="".concat(t||"","#").concat(e),u=i.replace(/allOf\/\d+\/?/g,""),s=r.contextTree.get([]).baseDoc;if(t==s&&tn(u,e))return!0;var c="";if(n.some((function(e){return c="".concat(c,"/").concat(en(e)),o[c]&&o[c].some((function(e){return tn(e,a)||tn(a,e)}))})))return!0;o[u]=(o[u]||[]).concat(a)}(h,s,i,r)&&!o.useCircularStructures){var d=Lt(e,s);return e===d?null:st.replace(n,d)}if(null==s?(l=Xt(h),void 0===(c=r.get(l))&&(c=new Bt("Could not resolve reference: ".concat(e),{pointer:h,$ref:e,baseDoc:u,fullPath:n}))):c=null!=(c=Yt(s,h)).__value?c.__value:c.catch((function(t){throw Kt(t,{pointer:h,$ref:e,baseDoc:u,fullPath:n})})),c instanceof Error)return[st.remove(n),c];var m=Lt(e,s),y=st.replace(i,c,{$$ref:m});if(s&&s!==u)return[y,st.context(i,{baseDoc:s})];try{if(!function(e,t){var n=[e];return t.path.reduce((function(e,t){return n.push(e[t]),e[t]}),e),function e(t){return st.isObject(t)&&(n.indexOf(t)>=0||v()(t).some((function(n){return e(t[n])})))}(t.value)}(r.state,y)||o.useCircularStructures)return y}catch(e){return null}}}},Wt=Ye()(Vt,{docCache:Ut,absoluteify:Jt,clearCache:function(e){void 0!==e?delete Ut[e]:v()(Ut).forEach((function(e){delete Ut[e]}))},JSONRefError:Bt,wrapError:Kt,getDoc:Gt,split:$t,extractFromDoc:Yt,fetchJSON:function(e){return Object(At.fetch)(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((function(e){return e.text()})).then((function(e){return Y.a.safeLoad(e)}))},extract:Zt,jsonPointerToArray:Xt,unescapeJsonPointerToken:Qt}),Ht=Wt;function Jt(e,t){if(!Ft.test(e)){if(!t)throw new Bt("Tried to resolve a relative URL, without having a basePath. path: '".concat(e,"' basePath: '").concat(t,"'"));return E.a.resolve(t,e)}return e}function Kt(e,t){var n;return n=e&&e.response&&e.response.body?"".concat(e.response.body.code," ").concat(e.response.body.message):e.message,new Bt("Could not resolve reference: ".concat(n),t,e)}function $t(e){return(e+"").split("#")}function Yt(e,t){var n=Ut[e];if(n&&!st.isPromise(n))try{var r=Zt(t,n);return Ye()(He.a.resolve(r),{__value:r})}catch(e){return He.a.reject(e)}return Gt(e).then((function(e){return Zt(t,e)}))}function Gt(e){var t=Ut[e];return t?st.isPromise(t)?t:He.a.resolve(t):(Ut[e]=Wt.fetchJSON(e).then((function(t){return Ut[e]=t,t})),Ut[e])}function Zt(e,t){var n=Xt(e);if(n.length<1)return t;var r=st.getIn(t,n);if(void 0===r)throw new Bt("Could not resolve pointer: ".concat(e," does not exist in document"),{pointer:e});return r}function Xt(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a ".concat(B()(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(Qt)}function Qt(e){return"string"!=typeof e?e:Ot.a.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function en(e){return Ot.a.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}function tn(e,t){if(!(n=t)||"/"===n||"#"===n)return!0;var n,r=e.charAt(t.length),o=t.slice(-1);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)&&"#"!==o}var nn={key:"allOf",plugin:function(e,t,n,r,o){if(!o.meta||!o.meta.$$ref){var i=n.slice(0,-1);if(!Rt(i)){if(!L()(e)){var a=new TypeError("allOf must be an array");return a.fullPath=n,a}var u=!1,s=o.value;i.forEach((function(e){s&&(s=s[e])})),delete(s=Ye()({},s)).allOf;var c=[];return c.push(r.replace(i,{})),e.forEach((function(e,t){if(!r.isObject(e)){if(u)return null;u=!0;var o=new TypeError("Elements in allOf must be objects");return o.fullPath=n,c.push(o)}c.push(r.mergeDeep(i,e));var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.specmap,o=n.getBaseUrlForNodePath,i=void 0===o?function(e){return r.getContext([].concat(tt()(t),tt()(e))).baseDoc}:o,a=n.targetKeys,u=void 0===a?["$ref","$$ref"]:a,s=[];return Pt()(e).forEach((function(){if(u.indexOf(this.key)>-1){var e=this.path,n=t.concat(this.path),o=Lt(this.node,i(e));s.push(r.replace(n,o))}})),s}(e,n.slice(0,-1),{getBaseUrlForNodePath:function(e){return r.getContext([].concat(tt()(n),[t],tt()(e))).baseDoc},specmap:r});c.push.apply(c,tt()(a))})),c.push(r.mergeDeep(i,s)),s.$$ref||c.push(r.remove([].concat(i,"$$ref"))),c}}}},rn={key:"parameters",plugin:function(e,t,n,r,o){if(L()(e)&&e.length){var i=Ye()([],e),a=n.slice(0,-1),u=Ye()({},st.getIn(r.spec,a));return e.forEach((function(e,t){try{i[t].default=r.parameterMacro(u,e)}catch(e){var o=new Error(e);return o.fullPath=n,o}})),st.replace(n,i)}return st.replace(n,e)}},on={key:"properties",plugin:function(e,t,n,r){var o=Ye()({},e);for(var i in e)try{o[i].default=r.modelPropertyMacro(o[i])}catch(e){var a=new Error(e);return a.fullPath=n,a}return st.replace(n,o)}};function an(e,t){var n=v()(e);if(h.a){var r=h()(e);t&&(r=r.filter((function(t){return f()(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=S()(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o1?n-1:0),o=1;o0}))}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return He.a.race(this.promisedPatches.map((function(e){return e.value})))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;st.normalizeArray(e).forEach((function(e){if(e instanceof Error)n.errors.push(e);else try{if(!st.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),st.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(st.isContextPatch(e))return void n.setContext(e.path,e.value);if(st.isMutation(e))return void n.updateMutations(e)}catch(e){console.error(e),n.errors.push(e)}}))}},{key:"updateMutations",value:function(e){"object"===B()(e.value)&&!L()(e.value)&&this.allowMetaPatches&&(e.value=Ye()({},e.value));var t=st.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then((function(n){var r=Ye()({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)})).catch((function(n){t.removePromisedPatch(e),t.updatePatches(n)}))}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return st.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse(N()(e))}},{key:"dispatch",value:function(){var e=this,t=this,n=this.nextPlugin();if(!n){var r=this.nextPromisedPatch();if(r)return r.then((function(){return e.dispatch()})).catch((function(){return e.dispatch()}));var o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),He.a.resolve(o)}if(t.pluginCount=t.pluginCount||{},t.pluginCount[n]=(t.pluginCount[n]||0)+1,t.pluginCount[n]>100)return He.a.resolve({spec:t.state,errors:t.errors.concat(new Error("We've reached a hard limit of ".concat(100," plugin runs")))});if(n!==this.currentPlugin&&this.promisedPatches.length){var i=this.promisedPatches.map((function(e){return e.value}));return He.a.all(i.map((function(e){return e.then(Qe.a,Qe.a)}))).then((function(){return e.dispatch()}))}return function(){t.currentPlugin=n;var e=t.getCurrentMutations(),r=t.mutations.length-1;try{if(n.isGenerator){var o,i=fn(n(e,t.getLib()));try{for(i.s();!(o=i.n()).done;){a(o.value)}}catch(e){i.e(e)}finally{i.f()}}else{a(n(e,t.getLib()))}}catch(e){console.error(e),a([Ye()(Ke()(e),{plugin:n})])}finally{t.updatePluginHistory(n,{mutationIndex:r})}return t.dispatch()}();function a(e){e&&(e=st.fullyNormalizeArray(e),t.updatePatches(e,n))}}}]),e}();var dn={refs:Ht,allOf:nn,parameters:rn,properties:on},vn=n(38),mn=n.n(vn);function yn(e,t){var n;if(void 0===j.a||null==e[k.a]){if(L()(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gn(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 V()(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=S()(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==B()(e))return null;var i=(e.operationId||"").replace(/\s/g,"");return i.length?_n(e.operationId):En(t,n,{v2OperationIdCompatibilityMode:o})}function En(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.v2OperationIdCompatibilityMode;if(r){var o="".concat(t.toLowerCase(),"_").concat(e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(o=o||"".concat(e.substring(1),"_").concat(t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return"".concat(bn(t)).concat(_n(e))}function Cn(e,t){return"".concat(bn(t),"-").concat(e)}function Sn(e,t){return e&&e.paths?function(e,t){return An(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==B()(o))return!1;var i=o.operationId;return[wn(o,n,r),Cn(n,r),i].some((function(e){return e&&e===t}))})):null}function An(e,t,n){if(!e||"object"!==B()(e)||!e.paths||"object"!==B()(e.paths))return null;var r=e.paths;for(var o in r)for(var i in r[o])if("PARAMETERS"!==i.toUpperCase()){var a=r[o][i];if(a&&"object"===B()(a)){var u={spec:e,pathName:o,method:i.toUpperCase(),operation:a},s=t(u);if(n&&s)return u}}}function kn(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var o in n){var i=n[o];if(mn()(i)){var a=i.parameters,u=function(e){var n=i[e];if(!mn()(n))return"continue";var u=wn(n,o,e);if(u){r[u]?r[u].push(n):r[u]=[n];var s=r[u];if(s.length>1)s.forEach((function(e,t){e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId="".concat(u).concat(t+1)}));else if(void 0!==n.operationId){var c=s[0];c.__originalOperationId=c.__originalOperationId||n.operationId,c.operationId=u}}if("parameters"!==e){var l=[],f={};for(var p in t)"produces"!==p&&"consumes"!==p&&"security"!==p||(f[p]=t[p],l.push(f));if(a&&(f.parameters=a,l.push(f)),l.length){var h,d=yn(l);try{for(d.s();!(h=d.n()).done;){var v=h.value;for(var m in v)if(n[m]){if("parameters"===m){var y,g=yn(v[m]);try{var b=function(){var e=y.value;n[m].some((function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e}))||n[m].push(e)};for(g.s();!(y=g.n()).done;)b()}catch(e){g.e(e)}finally{g.f()}}}else n[m]=v[m]}}catch(e){d.e(e)}finally{d.f()}}}};for(var s in i)u(s)}}return t.$$normalized=!0,e}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requestInterceptor,r=t.responseInterceptor,o=e.withCredentials?"include":"same-origin";return function(t){return e({url:t,loadSpec:!0,requestInterceptor:n,responseInterceptor:r,headers:{Accept:"application/json, application/yaml"},credentials:o}).then((function(e){return e.body}))}}function jn(e){var t=e.fetch,n=e.spec,r=e.url,o=e.mode,i=e.allowMetaPatches,a=void 0===i||i,u=e.pathDiscriminator,s=e.modelPropertyMacro,c=e.parameterMacro,l=e.requestInterceptor,f=e.responseInterceptor,p=e.skipNormalization,h=e.useCircularStructures,d=e.http,v=e.baseDoc;return v=v||r,d=t||d||Oe,n?m(n):On(d,{requestInterceptor:l,responseInterceptor:f})(v).then(m);function m(e){v&&(dn.refs.docCache[v]=e),dn.refs.fetchJSON=On(d,{requestInterceptor:l,responseInterceptor:f});var t,n=[dn.refs];return"function"==typeof c&&n.push(dn.parameters),"function"==typeof s&&n.push(dn.properties),"strict"!==o&&n.push(dn.allOf),(t={spec:e,context:{baseDoc:v},plugins:n,allowMetaPatches:a,pathDiscriminator:u,parameterMacro:c,modelPropertyMacro:s,useCircularStructures:h},new hn(t).dispatch()).then(p?function(){var e=H()(P.a.mark((function e(t){return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():kn)}}var Tn=n(16),Pn=n.n(Tn);function In(e,t){var n=v()(e);if(h.a){var r=h()(e);t&&(r=r.filter((function(t){return f()(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t2&&void 0!==v[2]?v[2]:{},o=r.returnEntireTree,i=r.baseDoc,a=r.requestInterceptor,u=r.responseInterceptor,s=r.parameterMacro,c=r.modelPropertyMacro,l=r.useCircularStructures,f={pathDiscriminator:n,baseDoc:i,requestInterceptor:a,responseInterceptor:u,parameterMacro:s,modelPropertyMacro:c,useCircularStructures:l},p=kn({spec:t}),h=p.spec,e.next=6,jn(Mn(Mn({},f),{},{spec:h,allowMetaPatches:!0,skipNormalization:!0}));case 6:return d=e.sent,!o&&L()(n)&&n.length&&(d.spec=Pn()(d.spec,n)||null),e.abrupt("return",d);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nn(e,t){var n=v()(e);if(h.a){var r=h()(e);t&&(r=r.filter((function(t){return f()(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,o=t.operationId;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute(Rn(Rn({spec:e.spec},Z()(e,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:n,method:r,parameters:t,operationId:o},i))}}}};var Bn=n(52),Un=n.n(Bn),qn=n(53),zn=n.n(qn),Vn=n(54),Wn=n.n(Vn),Hn=n(28),Jn=n.n(Hn),Kn=n(55),$n=n.n(Kn),Yn={body:function(e){var t=e.req,n=e.value;t.body=n},header:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)},query:function(e){var t=e.req,n=e.value,r=e.parameter;t.query=t.query||{},!1===n&&"boolean"===r.type&&(n="false");0===n&&["number","integer"].indexOf(r.type)>-1&&(n="0");if(n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue&&void 0!==n){var o=r.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}},path:function(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.split("{".concat(r.name,"}")).join(encodeURIComponent(n))},formData:function(e){var t=e.req,n=e.value,r=e.parameter;(n||r.allowEmptyValue)&&(t.form=t.form||{},t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}};function Gn(e,t){return t.includes("application/json")?"string"==typeof e?e:N()(e):e.toString()}function Zn(e){var t=e.req,n=e.value,r=e.parameter,o=r.name,i=r.style,a=r.explode,u=r.content;if(u){var s=v()(u)[0];t.url=t.url.split("{".concat(o,"}")).join(Ee(Gn(n,s),{escape:!0}))}else{var c=Ce({key:r.name,value:n,style:i||"simple",explode:a||!1,escape:!0});t.url=t.url.split("{".concat(o,"}")).join(c)}}function Xn(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},r.content){var o=v()(r.content)[0];t.query[r.name]=Gn(n,o)}else if(!1===n&&(n="false"),0===n&&(n="0"),n)t.query[r.name]={value:n,serializationOption:Z()(r,["style","explode","allowReserved"])};else if(r.allowEmptyValue&&void 0!==n){var i=r.name;t.query[i]=t.query[i]||{},t.query[i].allowEmptyValue=!0}}var Qn=["accept","authorization","content-type"];function er(e){var t=e.req,n=e.parameter,r=e.value;if(t.headers=t.headers||{},!(Qn.indexOf(n.name.toLowerCase())>-1))if(n.content){var o=v()(n.content)[0];t.headers[n.name]=Gn(r,o)}else void 0!==r&&(t.headers[n.name]=Ce({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))}function tr(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=B()(r);if(n.content){var i=v()(n.content)[0];t.headers.Cookie="".concat(n.name,"=").concat(Gn(r,i))}else if("undefined"!==o){var a="object"===o&&!L()(r)&&n.explode?"":"".concat(n.name,"=");t.headers.Cookie=a+Ce({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}var nr=function(e,t){var n=e.operation,r=e.requestBody,o=e.securities,i=e.spec,a=e.attachContentTypeForEmptyPayload,u=e.requestContentType;t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,u=b()({},t),s=r.authorized,c=void 0===s?{}:s,l=i.security||a.security||[],f=c&&!!v()(c).length,p=Pn()(a,["components","securitySchemes"])||{};if(u.headers=u.headers||{},u.query=u.query||{},!v()(r).length||!f||!l||L()(i.security)&&!i.security.length)return t;return l.forEach((function(e,t){for(var n in e){var r=c[n],o=p[n];if(r){var i=r.value||r,a=o.type;if(r)if("apiKey"===a)"query"===o.in&&(u.query[o.name]=i),"header"===o.in&&(u.headers[o.name]=i),"cookie"===o.in&&(u.cookies[o.name]=i);else if("http"===a){if(/^basic$/i.test(o.scheme)){var s=i.username||"",l=i.password||"",f=Jn()("".concat(s,":").concat(l));u.headers.Authorization="Basic ".concat(f)}/^bearer$/i.test(o.scheme)&&(u.headers.Authorization="Bearer ".concat(i))}else if("oauth2"===a){var h=r.token||{},d=h[o["x-tokenName"]||"access_token"],v=h.token_type;v&&"bearer"!==v.toLowerCase()||(v="Bearer"),u.headers.Authorization="".concat(v," ").concat(d)}}}})),u}({request:t,securities:o,operation:n,spec:i});var s=n.requestBody||{},c=v()(s.content||{}),l=u&&c.indexOf(u)>-1;if(r||a){if(u&&l)t.headers["Content-Type"]=u;else if(!u){var f=c[0];f&&(t.headers["Content-Type"]=f,u=f)}}else u&&l&&(t.headers["Content-Type"]=u);if(r)if(u){if(c.indexOf(u)>-1)if("application/x-www-form-urlencoded"===u||"multipart/form-data"===u)if("object"===B()(r)){var p=(s.content[u]||{}).encoding||{};t.form={},v()(r).forEach((function(e){t.form[e]={value:r[e],encoding:p[e]||{}}}))}else t.form=r;else t.body=r}else t.body=r;return t};var rr=function(e,t){var n=e.spec,r=e.operation,o=e.securities,i=e.requestContentType,a=e.attachContentTypeForEmptyPayload;if((t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,u=b()({},t),s=r.authorized,c=void 0===s?{}:s,l=r.specSecurity,f=void 0===l?[]:l,p=i.security||f,h=c&&!!v()(c).length,d=a.securityDefinitions;if(u.headers=u.headers||{},u.query=u.query||{},!v()(r).length||!h||!p||L()(i.security)&&!i.security.length)return t;return p.forEach((function(e,t){for(var n in e){var r=c[n];if(r){var o=r.token,i=r.value||r,a=d[n],s=a.type,l=a["x-tokenName"]||"access_token",f=o&&o[l],p=o&&o.token_type;if(r)if("apiKey"===s){var h="query"===a.in?"query":"headers";u[h]=u[h]||{},u[h][a.name]=i}else if("basic"===s)if(i.header)u.headers.authorization=i.header;else{var v=i.username||"",m=i.password||"";i.base64=Jn()("".concat(v,":").concat(m)),u.headers.authorization="Basic ".concat(i.base64)}else"oauth2"===s&&f&&(p=p&&"bearer"!==p.toLowerCase()?p:"Bearer",u.headers.authorization="".concat(p," ").concat(f))}}})),u}({request:t,securities:o,operation:r,spec:n})).body||t.form||a)i?t.headers["Content-Type"]=i:L()(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:L()(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:r.parameters&&r.parameters.filter((function(e){return"file"===e.type})).length?t.headers["Content-Type"]="multipart/form-data":r.parameters&&r.parameters.filter((function(e){return"formData"===e.in})).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(i){var u=r.parameters&&r.parameters.filter((function(e){return"body"===e.in})).length>0,s=r.parameters&&r.parameters.filter((function(e){return"formData"===e.in})).length>0;(u||s)&&(t.headers["Content-Type"]=i)}return t};function or(e,t){var n=v()(e);if(h.a){var r=h()(e);t&&(r=r.filter((function(t){return f()(e,t).enumerable}))),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t1&&console.warn("Parameter '".concat(e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '").concat(e.name,"' and the passed-in parameter values did not define an 'in' value.")),null!==n){if(void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter ".concat(e.name," is not provided"));if(m&&e.schema&&"object"===e.schema.type&&"string"==typeof n)try{n=JSON.parse(n)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}r&&r({req:y,parameter:e,value:n,operation:_,spec:t})}}));var S=ir(ir({},e),{},{operation:_});if((y=m?nr(S,y):rr(S,y)).cookies&&v()(y.cookies).length){var A=v()(y.cookies).reduce((function(e,t){var n=y.cookies[t];return e+(e?"&":"")+$n.a.serialize(t,n)}),"");y.headers.Cookie=A}return y.cookies&&delete y.cookies,Ve(y),y}var lr=function(e){return e?e.replace(/\W/g,""):null};function fr(e){return xn(e.spec)?function(e){var t=e.spec,n=e.pathName,r=e.method,o=e.server,i=e.contextUrl,a=e.serverVariables,u=void 0===a?{}:a,s=Pn()(t,["paths",n,(r||"").toLowerCase(),"servers"])||Pn()(t,["paths",n,"servers"])||Pn()(t,["servers"]),c="",l=null;if(o&&s&&s.length){var f=s.map((function(e){return e.url}));f.indexOf(o)>-1&&(c=o,l=s[f.indexOf(o)])}!c&&s&&s.length&&(c=s[0].url,l=s[0]);if(c.indexOf("{")>-1){(function(e){var t,n=[],r=/{([^}]+)}/g;for(;t=r.exec(e);)n.push(t[1]);return n})(c).forEach((function(e){if(l.variables&&l.variables[e]){var t=l.variables[e],n=u[e]||t.default,r=new RegExp("{".concat(e,"}"),"g");c=c.replace(r,n)}}))}return function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=E.a.parse(t),o=E.a.parse(n),i=lr(r.protocol)||lr(o.protocol)||"",a=r.host||o.host,u=r.pathname||"";e=i&&a?"".concat(i,"://").concat(a+u):u;return"/"===e[e.length-1]?e.slice(0,-1):e}(c,i)}(e):function(e){var t,n=e.spec,r=e.scheme,o=e.contextUrl,i=void 0===o?"":o,a=E.a.parse(i),u=L()(n.schemes)?n.schemes[0]:null,s=r||u||lr(a.protocol)||"http",c=n.host||a.host||"",l=n.basePath||"";t=s&&c?"".concat(s,"://").concat(c+l):l;return"/"===t[t.length-1]?t.slice(0,-1):t}(e)}function pr(e,t){var n=v()(e);if(h.a){var r=h()(e);t&&(r=r.filter((function(t){return f()(e,t).enumerable}))),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof dr))return new dr(n);b()(this,n);var r=this.resolve().then((function(){return t.disableInterfaces||b()(t,dr.makeApisTagOperation(t)),t}));return r.client=this,r}dr.http=Oe,dr.makeHttp=function(e,t,n){return n=n||function(e){return e},t=t||function(e){return e},function(r){return"string"==typeof r&&(r={url:r}),ke.mergeInQueryOrForm(r),r=t(r),n(e(r))}}.bind(null,dr.http),dr.resolve=jn,dr.resolveSubtree=function(e,t){return Dn.apply(this,arguments)},dr.execute=function(e){var t=e.http,n=e.fetch,r=e.spec,o=e.operationId,i=e.pathName,a=e.method,u=e.parameters,s=e.securities,c=Un()(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),l=t||n||Oe;i&&a&&!o&&(o=Cn(i,a));var f=sr.buildRequest(ir({spec:r,operationId:o,parameters:u,securities:s,http:l},c));return f.body&&(zn()(f.body)||Wn()(f.body))&&(f.body=N()(f.body)),l(f)},dr.serializeRes=Ie,dr.serializeHeaders=De,dr.clearCache=function(){dn.refs.clearCache()},dr.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Fn.makeExecute(e);return{apis:Fn.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},dr.buildRequest=cr,dr.helpers={opId:wn},dr.getBaseUrl=fr,dr.prototype={http:Oe,execute:function(e){return this.applyDefaults(),dr.execute(hr({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:"string"==typeof this.url?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},e))},resolve:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return dr.resolve(hr({spec:this.spec,url:this.url,http:this.http,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},t)).then((function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e}))}},dr.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&x()(t,"http")){var n=E.a.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}};t.default=dr}]).default},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(23),o=n(26),i=n(428),a=n(93),u=n(429),s=n(118),c=n(189),l=n(16),f=[],p=0,h=i.getPooled(),d=!1,v=null;function m(){w.ReactReconcileTransaction&&v||r("123")}var y=[{initialize:function(){this.dirtyComponentsLength=f.length},close:function(){this.dirtyComponentsLength!==f.length?(f.splice(0,this.dirtyComponentsLength),x()):f.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function g(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=i.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function b(e,t){return e._mountOrder-t._mountOrder}function _(e){var t=e.dirtyComponentsLength;t!==f.length&&r("124",t,f.length),f.sort(b),p++;for(var n=0;n1)for(var n=1;n0&&"/"!==t[0]}));function oe(e,t,n){return t=t||[],te.apply(void 0,[e].concat(s()(t))).get("parameters",Object(f.List)()).reduce((function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(l.C)(t,{allowHashes:!1}),r)}),Object(f.fromJS)({}))}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(f.List.isList(e))return e.some((function(e){return f.Map.isMap(e)&&e.get("in")===t}))}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(f.List.isList(e))return e.some((function(e){return f.Map.isMap(e)&&e.get("type")===t}))}function ue(e,t){t=t||[];var n=w(e).getIn(["paths"].concat(s()(t)),Object(f.fromJS)({})),r=e.getIn(["meta","paths"].concat(s()(t)),Object(f.fromJS)({})),o=se(e,t),i=n.get("parameters")||new f.List,a=r.get("consumes_value")?r.get("consumes_value"):ae(i,"file")?"multipart/form-data":ae(i,"formData")?"application/x-www-form-urlencoded":void 0;return Object(f.fromJS)({requestContentType:a,responseContentType:o})}function se(e,t){t=t||[];var n=w(e).getIn(["paths"].concat(s()(t)),null);if(null!==n){var r=e.getIn(["meta","paths"].concat(s()(t),["produces_value"]),null),o=n.getIn(["produces",0],null);return r||o||"application/json"}}function ce(e,t){t=t||[];var n=w(e),r=n.getIn(["paths"].concat(s()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],u=r.get("produces",null),c=n.getIn(["paths",i,"produces"],null),l=n.getIn(["produces"],null);return u||c||l}}function le(e,t){t=t||[];var n=w(e),r=n.getIn(["paths"].concat(s()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],u=r.get("consumes",null),c=n.getIn(["paths",i,"consumes"],null),l=n.getIn(["consumes"],null);return u||c||l}}var fe=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),i=o()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||i||""},pe=function(e,t,n){return["http","https"].indexOf(fe(e,t,n))>-1},he=function(e,t){t=t||[];var n=e.getIn(["meta","paths"].concat(s()(t),["parameters"]),Object(f.fromJS)([])),r=!0;return n.forEach((function(e){var t=e.get("errors");t&&t.count()&&(r=!1)})),r};function de(e){return f.Map.isMap(e)?e:new f.Map}},function(e,t,n){"use strict";(function(t){ +/*! + * @description Recursive object extending + * @author Viacheslav Lotsmanov + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Viacheslav Lotsmanov + * + * 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. + */ +function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach((function(e,i){"object"==typeof e&&null!==e?Array.isArray(e)?t[i]=o(e):n(e)?t[i]=r(e):t[i]=a({},e):t[i]=e})),t}function i(e,t){return"__proto__"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,u=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach((function(s){"object"!=typeof s||null===s||Array.isArray(s)||Object.keys(s).forEach((function(c){return t=i(u,c),(e=i(s,c))===u?void 0:"object"!=typeof e||null===e?void(u[c]=e):Array.isArray(e)?void(u[c]=o(e)):n(e)?void(u[c]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(u[c]=a({},e)):void(u[c]=a(t,e))}))})),u}}).call(this,n(79).Buffer)},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",(function(){return d})),n.d(t,"AUTHORIZE",(function(){return v})),n.d(t,"LOGOUT",(function(){return m})),n.d(t,"PRE_AUTHORIZE_OAUTH2",(function(){return y})),n.d(t,"AUTHORIZE_OAUTH2",(function(){return g})),n.d(t,"VALIDATE",(function(){return b})),n.d(t,"CONFIGURE_AUTH",(function(){return _})),n.d(t,"showDefinitions",(function(){return x})),n.d(t,"authorize",(function(){return w})),n.d(t,"logout",(function(){return E})),n.d(t,"preAuthorizeImplicit",(function(){return C})),n.d(t,"authorizeOauth2",(function(){return S})),n.d(t,"authorizePassword",(function(){return A})),n.d(t,"authorizeApplication",(function(){return k})),n.d(t,"authorizeAccessCodeWithFormParams",(function(){return O})),n.d(t,"authorizeAccessCodeWithBasicAuthentication",(function(){return j})),n.d(t,"authorizeRequest",(function(){return T})),n.d(t,"configureAuth",(function(){return P}));var r=n(28),o=n.n(r),i=n(18),a=n.n(i),u=n(30),s=n.n(u),c=n(97),l=n.n(c),f=n(19),p=n.n(f),h=n(5),d="show_popup",v="authorize",m="logout",y="pre_authorize_oauth2",g="authorize_oauth2",b="validate",_="configure_auth";function x(e){return{type:d,payload:e}}function w(e){return{type:v,payload:e}}function E(e){return{type:m,payload:e}}var C=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,i=e.token,a=e.isValid,u=o.schema,c=o.name,l=u.get("flow");delete p.a.swaggerUIRedirectOauth2,"accessCode"===l||a||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),i.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:s()(i)}):n.authorizeOauth2({auth:o,token:i})}};function S(e){return{type:g,payload:e}}var A=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,i=e.username,u=e.password,s=e.passwordType,c=e.clientId,l=e.clientSecret,f={grant_type:"password",scope:e.scopes.join(" "),username:i,password:u},p={};switch(s){case"request-body":!function(e,t,n){t&&a()(e,{client_id:t});n&&a()(e,{client_secret:n})}(f,c,l);break;case"basic":p.Authorization="Basic "+Object(h.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(s," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(h.b)(f),url:r.get("tokenUrl"),name:o,headers:p,query:{},auth:e})}};var k=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,s={Authorization:"Basic "+Object(h.a)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(h.b)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:s})}},O=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,s=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n,code_verifier:s};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t})}},j=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,s={Authorization:"Basic "+Object(h.a)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:s})}},T=function(e){return function(t){var n,r=t.fn,i=t.getConfigs,u=t.authActions,c=t.errActions,f=t.oas3Selectors,p=t.specSelectors,h=t.authSelectors,d=e.body,v=e.query,m=void 0===v?{}:v,y=e.headers,g=void 0===y?{}:y,b=e.name,_=e.url,x=e.auth,w=(h.getConfigs()||{}).additionalQueryStringParams;if(p.isOAS3()){var E=f.selectedServer();n=l()(_,f.serverEffectiveValue({server:E}),!0)}else n=l()(_,p.url(),!0);"object"===o()(w)&&(n.query=a()({},n.query,w));var C=n.toString(),S=a()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},g);r.fetch({url:C,method:"post",headers:S,query:m,body:d,requestInterceptor:i().requestInterceptor,responseInterceptor:i().responseInterceptor}).then((function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:s()(t)}):u.authorizeOauth2({auth:x,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})})).catch((function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})}))}};function P(e){return{type:_,payload:e}}},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(133),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(50),o=n(137);e.exports=n(45)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var r=n(564),o=n(565),i=n(357);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;iu&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;po&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(l=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function N(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||N(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return i||N(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(39))},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){e.exports=n(594)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return i})),n.d(t,"UPDATE_MODE",(function(){return a})),n.d(t,"SHOW",(function(){return u})),n.d(t,"updateLayout",(function(){return s})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return f}));var r=n(5),o="layout_update_layout",i="layout_update_filter",a="layout_update_mode",u="layout_show";function s(e){return{type:o,payload:e}}function c(e){return{type:i,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.x)(e),{type:u,payload:{thing:e,shown:t}}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.x)(e),{type:a,payload:{thing:e,mode:t}}}},function(e,t,n){var r=n(158),o=n(339);e.exports=n(132)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(214);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(108),o=n(600),i=n(601),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(618),o=n(621);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(385),o=n(658),i=n(109);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){"use strict";var r=n(182),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(144);i.inherits=n(48);var a=n(395),u=n(245);i.inherits(f,a);for(var s=o(u.prototype),c=0;c=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){e.exports={}},function(e,t,n){n(557);for(var r=n(32),o=n(77),i=n(104),a=n(36)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s1){for(var d=Array(h),v=0;v1){for(var y=Array(m),g=0;g=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){var r=n(65),o=n(367),i=n(368),a=n(38),u=n(165),s=n(230),c={},l={};(t=e.exports=function(e,t,n,f,p){var h,d,v,m,y=p?function(){return e}:s(e),g=r(n,f,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(h=u(e.length);h>b;b++)if((m=t?g(a(d=e[b])[0],d[1]):g(e[b]))===c||m===l)return m}else for(v=y.call(e);!(d=v.next()).done;)if((m=o(v,g,d.value,t))===c||m===l)return m}).BREAK=c,t.RETURN=l},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=Object(i.B)(t),a=r.type,u=r.example,s=r.properties,c=r.additionalProperties,l=r.items,f=n.includeReadOnly,p=n.includeWriteOnly;if(void 0!==u)return Object(i.e)(u,"$$ref",(function(e){return"string"==typeof e&&e.indexOf("#")>-1}));if(!a)if(s)a="object";else{if(!l)return;a="array"}if("object"===a){var d=Object(i.B)(s),v={};for(var m in d)d[m]&&d[m].deprecated||d[m]&&d[m].readOnly&&!f||d[m]&&d[m].writeOnly&&!p||(v[m]=e(d[m],n));if(!0===c)v.additionalProp1={};else if(c)for(var y=Object(i.B)(c),g=e(y,n),b=1;b<4;b++)v["additionalProp"+b]=g;return v}return"array"===a?o()(l.anyOf)?l.anyOf.map((function(t){return e(t,n)})):o()(l.oneOf)?l.oneOf.map((function(t){return e(t,n)})):[e(l,n)]:t.enum?t.default?t.default:Object(i.x)(t.enum)[0]:"file"!==a?h(t):void 0},v=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},m=function e(t){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=f()({},Object(i.B)(t)),s=u.type,c=u.properties,l=u.additionalProperties,p=u.items,d=u.example,v=a.includeReadOnly,m=a.includeWriteOnly,y=u.default,g={},b={},_=t.xml,x=_.name,w=_.prefix,E=_.namespace,C=u.enum;if(!s)if(c||l)s="object";else{if(!p)return;s="array"}if(n=(w?w+":":"")+(x=x||"notagname"),E){var S=w?"xmlns:"+w:"xmlns";b[S]=E}if("array"===s&&p){if(p.xml=p.xml||_||{},p.xml.name=p.xml.name||_.name,_.wrapped)return g[n]=[],o()(d)?d.forEach((function(t){p.example=t,g[n].push(e(p,a))})):o()(y)?y.forEach((function(t){p.default=t,g[n].push(e(p,a))})):g[n]=[e(p,a)],b&&g[n].push({_attr:b}),g;var A=[];return o()(d)?(d.forEach((function(t){p.example=t,A.push(e(p,a))})),A):o()(y)?(y.forEach((function(t){p.default=t,A.push(e(p,a))})),A):e(p,a)}if("object"===s){var k=Object(i.B)(c);for(var O in g[n]=[],d=d||{},k)if(k.hasOwnProperty(O)&&(!k[O].readOnly||v)&&(!k[O].writeOnly||m))if(k[O].xml=k[O].xml||{},k[O].xml.attribute){var j=o()(k[O].enum)&&k[O].enum[0],T=k[O].example,P=k[O].default;b[k[O].xml.name||O]=void 0!==T&&T||void 0!==d[O]&&d[O]||void 0!==P&&P||j||h(k[O])}else{k[O].xml.name=k[O].xml.name||O,void 0===k[O].example&&void 0!==d[O]&&(k[O].example=d[O]);var I=e(k[O]);o()(I)?g[n]=g[n].concat(I):g[n].push(I)}return!0===l?g[n].push({additionalProp:"Anything can be here"}):l&&g[n].push({additionalProp:h(l)}),b&&g[n].push({_attr:b}),g}return r=void 0!==d?d:void 0!==y?y:o()(C)?C[0]:h(t),g[n]=b?[{_attr:b},r]:r,g};function y(e,t){var n=m(e,t);if(n)return u()(n,{declaration:!0,indent:"\t"})}var g=c()(y),b=c()(d)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_CONFIGS",(function(){return i})),n.d(t,"TOGGLE_CONFIGS",(function(){return a})),n.d(t,"update",(function(){return u})),n.d(t,"toggle",(function(){return s})),n.d(t,"loaded",(function(){return c}));var r=n(3),o=n.n(r),i="configs_update",a="configs_toggle";function u(e,t){return{type:i,payload:o()({},e,t)}}function s(e){return{type:a,payload:e}}var c=function(){return function(){}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),o=n.n(r),i=o.a.Set.of("type","format","items","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf");function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isOAS3;if(!o.a.Map.isMap(e))return{schema:o.a.Map(),parameterContentMediaType:null};if(!n)return"body"===e.get("in")?{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}:{schema:e.filter((function(e,t){return i.includes(t)})),parameterContentMediaType:null};if(e.get("content")){var r=e.get("content",o.a.Map({})).keySeq(),a=r.first();return{schema:e.getIn(["content",a,"schema"],o.a.Map()),parameterContentMediaType:a}}return{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}}},function(e,t,n){e.exports=n(774)},function(e,t,n){"use strict";n.r(t),n.d(t,"createStore",(function(){return S})),n.d(t,"combineReducers",(function(){return k})),n.d(t,"bindActionCreators",(function(){return j})),n.d(t,"applyMiddleware",(function(){return I})),n.d(t,"compose",(function(){return T}));var r=n(465),o="object"==typeof self&&self&&self.Object===Object&&self,i=(r.a||o||Function("return this")()).Symbol,a=Object.prototype,u=a.hasOwnProperty,s=a.toString,c=i?i.toStringTag:void 0;var l=function(e){var t=u.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[c]=n:delete e[c]),o},f=Object.prototype.toString;var p=function(e){return f.call(e)},h=i?i.toStringTag:void 0;var d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?l(e):p(e)};var v=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var m=function(e){return null!=e&&"object"==typeof e},y=Function.prototype,g=Object.prototype,b=y.toString,_=g.hasOwnProperty,x=b.call(Object);var w=function(e){if(!m(e)||"[object Object]"!=d(e))return!1;var t=v(e);if(null===t)return!0;var n=_.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&b.call(n)==x},E=n(333),C="@@redux/INIT";function S(e,t,n){var r;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(S)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function l(){return i}function f(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return c(),u.push(e),function(){if(t){t=!1,c();var n=u.indexOf(e);u.splice(n,1)}}}function p(e){if(!w(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=u,n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var r=!1,o={},u=0;u0?r:n)(e)}},function(e,t){e.exports={}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(38),o=n(353),i=n(219),a=n(217)("IE_PROTO"),u=function(){},s=function(){var e,t=n(221)("iframe"),r=i.length;for(t.style.display="none",n(354).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
    + 上传列表... +
  • + 文件名: + {{f.name}} + {{f.name}} +
    +
    +
    + + +
    +
  • +
+
+ +
+
+ + +
+
+
+ + + \ No newline at end of file diff --git a/src/static/views/Admin.vue b/src/static/views/Admin.vue new file mode 100644 index 0000000000000000000000000000000000000000..d4ca52f77330c30d4c19b7158b3bc87cadb39670 --- /dev/null +++ b/src/static/views/Admin.vue @@ -0,0 +1,148 @@ + + + + \ No newline at end of file diff --git a/src/static/views/Clock.vue b/src/static/views/Clock.vue new file mode 100644 index 0000000000000000000000000000000000000000..bc39c0a592432b392ec55d277acd765c15f701ec --- /dev/null +++ b/src/static/views/Clock.vue @@ -0,0 +1,244 @@ + + \ No newline at end of file diff --git a/src/static/views/Dashboard.vue b/src/static/views/Dashboard.vue new file mode 100644 index 0000000000000000000000000000000000000000..c0a65094ba1e4deb661b239cd93384eb38d6385d --- /dev/null +++ b/src/static/views/Dashboard.vue @@ -0,0 +1,22 @@ + + \ No newline at end of file diff --git a/src/static/views/Login.vue b/src/static/views/Login.vue new file mode 100644 index 0000000000000000000000000000000000000000..67515eb9236364371c6ee4974ee9a0b4e91b27be --- /dev/null +++ b/src/static/views/Login.vue @@ -0,0 +1,84 @@ + + + \ No newline at end of file diff --git a/src/static/views/MyInfo.vue b/src/static/views/MyInfo.vue new file mode 100644 index 0000000000000000000000000000000000000000..09d8725d6b1c405902acfe9b318882143f5a0b86 --- /dev/null +++ b/src/static/views/MyInfo.vue @@ -0,0 +1,69 @@ + + \ No newline at end of file diff --git a/src/static/views/StatusSuspension.vue b/src/static/views/StatusSuspension.vue new file mode 100644 index 0000000000000000000000000000000000000000..1f2d4c8a4f19bbc90e719539b03cb11f1e0fd0a6 --- /dev/null +++ b/src/static/views/StatusSuspension.vue @@ -0,0 +1,136 @@ + + + \ No newline at end of file diff --git a/src/static/views/config/DataCollectorConfig.vue b/src/static/views/config/DataCollectorConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..3707e2c9f926be65e35f2d320325eb1f24ab487b --- /dev/null +++ b/src/static/views/config/DataCollectorConfig.vue @@ -0,0 +1,408 @@ + + \ No newline at end of file diff --git a/src/static/views/config/DecisionConfig.vue b/src/static/views/config/DecisionConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..c3f9ac8f8b17e8f207cff223f35a0a5e4ba4c191 --- /dev/null +++ b/src/static/views/config/DecisionConfig.vue @@ -0,0 +1,477 @@ + + \ No newline at end of file diff --git a/src/static/views/config/FieldConfig.vue b/src/static/views/config/FieldConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..60ce12e6febb2a7cc85da21fba42acc44e4cac93 --- /dev/null +++ b/src/static/views/config/FieldConfig.vue @@ -0,0 +1,380 @@ + + \ No newline at end of file diff --git a/src/static/views/config/GlobalConfig.vue b/src/static/views/config/GlobalConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..258d7ff55cce5ca4492838389d44c5561696e63b --- /dev/null +++ b/src/static/views/config/GlobalConfig.vue @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/src/static/views/config/OpHistory.vue b/src/static/views/config/OpHistory.vue new file mode 100644 index 0000000000000000000000000000000000000000..0322b89582865e9dd4b1c3e32785f870dd8cbda5 --- /dev/null +++ b/src/static/views/config/OpHistory.vue @@ -0,0 +1,100 @@ + + + \ No newline at end of file diff --git a/src/static/views/config/Permission.vue b/src/static/views/config/Permission.vue new file mode 100644 index 0000000000000000000000000000000000000000..41430c85985a5c510e72e5425a511a62c2038f39 --- /dev/null +++ b/src/static/views/config/Permission.vue @@ -0,0 +1,208 @@ + + \ No newline at end of file diff --git a/src/static/views/config/PolicyCenter.vue b/src/static/views/config/PolicyCenter.vue new file mode 100644 index 0000000000000000000000000000000000000000..e34ac16c7553efaad7535b9206f239c7f53679b9 --- /dev/null +++ b/src/static/views/config/PolicyCenter.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file diff --git a/src/static/views/config/UserCenter.vue b/src/static/views/config/UserCenter.vue new file mode 100644 index 0000000000000000000000000000000000000000..267c4ef314ca2ecafc74b4c827edc72dd3917819 --- /dev/null +++ b/src/static/views/config/UserCenter.vue @@ -0,0 +1,33 @@ + + + \ No newline at end of file diff --git a/src/static/views/config/UserConfig.vue b/src/static/views/config/UserConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..8507970cf9038cd6706d3ae36a26a7ac2c45dd22 --- /dev/null +++ b/src/static/views/config/UserConfig.vue @@ -0,0 +1,328 @@ + + + \ No newline at end of file diff --git a/src/static/views/data/CollectResult.vue b/src/static/views/data/CollectResult.vue new file mode 100644 index 0000000000000000000000000000000000000000..42e31081e04dafc00369b22c99e5a42ede75f52f --- /dev/null +++ b/src/static/views/data/CollectResult.vue @@ -0,0 +1,237 @@ + + \ No newline at end of file diff --git a/src/static/views/data/DataAnalyse.vue b/src/static/views/data/DataAnalyse.vue new file mode 100644 index 0000000000000000000000000000000000000000..f9072d051b047e00a3a07a6827c95ef9bbbb7ee3 --- /dev/null +++ b/src/static/views/data/DataAnalyse.vue @@ -0,0 +1,22 @@ + + \ No newline at end of file diff --git a/src/static/views/data/DecideResult.vue b/src/static/views/data/DecideResult.vue new file mode 100644 index 0000000000000000000000000000000000000000..7e9fda566f63b7a0aa4b8922a5589ebaf642bc41 --- /dev/null +++ b/src/static/views/data/DecideResult.vue @@ -0,0 +1,384 @@ + + + \ No newline at end of file diff --git a/src/static/views/data/DecisionData.vue b/src/static/views/data/DecisionData.vue new file mode 100644 index 0000000000000000000000000000000000000000..1f99adb7d88b21057adde3efad49ac4108dca224 --- /dev/null +++ b/src/static/views/data/DecisionData.vue @@ -0,0 +1,56 @@ + + \ No newline at end of file diff --git a/src/static/views/data/DecisionEChart.vue b/src/static/views/data/DecisionEChart.vue new file mode 100644 index 0000000000000000000000000000000000000000..8bad9481da458d78b1caac0875263c5cb7aeac3b --- /dev/null +++ b/src/static/views/data/DecisionEChart.vue @@ -0,0 +1,205 @@ + + \ No newline at end of file diff --git a/src/static/views/data/RuleEChart.vue b/src/static/views/data/RuleEChart.vue new file mode 100644 index 0000000000000000000000000000000000000000..96058109aab08545e60b9c8613d2244a342dffa9 --- /dev/null +++ b/src/static/views/data/RuleEChart.vue @@ -0,0 +1,223 @@ + + \ No newline at end of file diff --git a/start.bat b/start.bat new file mode 100644 index 0000000000000000000000000000000000000000..b05a3d7da167abb580cef403402550ff7aa3df79 --- /dev/null +++ b/start.bat @@ -0,0 +1,15 @@ +@cd %~dp0 + +@if not exist ./lib/ ( + @echo copy dependencies jar + @if exist ./gradle-embed/ ( + @call ./gradle-embed/bin/gradle clean deps + ) else ( + @call gradle clean deps + ) +) + +@echo start ... +set JAVA_OPTS=-Dgroovy.attach.runtime.groovydoc=true %* +cd src/ +../bin/groovy -pa main.groovy \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100755 index 0000000000000000000000000000000000000000..366c4a2eb6de1d29c9da558c2f4f18251f96361c --- /dev/null +++ b/start.sh @@ -0,0 +1,21 @@ +#!/bin/sh +cd `dirname $0` +if [ ! -d "./lib" ]; then + echo copy dependencies jar + if [ -d "./gradle-embed" ]; then + sh ./gradle-embed/bin/gradle clean deps + else + gradle clean deps + fi +fi + +echo start... + +# 不写两行的话, docker里面执行的时候多个空格分割的参数会报错 +JAVA_OPTS="-Dgroovy.attach.runtime.groovydoc=true $@" +export JAVA_OPTS + +cd src +sh ../bin/groovy -pa main.groovy + +# nohup sh start.sh -Xms512m -Xmx512m [-Dprofile=pro] -Dlog.totalSizeCap=50GB > /dev/null 2>&1 & \ No newline at end of file