diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..92f4631fba52b76e8f32e3b49fc4ce99f74183ea --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,42 @@ + +### 版本号:2.2.4 +- 更新日期:2025-10-07 +- 更新内容: +1. 基于EFRAME进行调整更新 +2. 拆分CHANGELOG文件 +3. 增加Prometheus相关代码,支持promQL +4. 更新redis配置文件,更新其他Datasource配置文件 +5. 优化调整magic的配置信息 +6. 对代码的格式、注释、引用等进行标准化改造 +7. magic-editor文字更新,暂时使用编译成果 +8. 基于eframe进行修改配置信息调整,删除view包 +9. 暂不引用eframe的api包,对controller进行拷贝,仅保留登录api文件 +10. config路径移动到scripts下 +11. workflow文件移动到scripts下 +12. 工程路径调整为:java-magic-api +13. 更新README.md文件内容 + + +### 版本号:2.2.3 +- 更新日期:2025-06-26 +- 更新内容: +``` +2.2.3 2025-06-26 ent版本升级,删除gov框架的包 + +2.2.2 2025-06-02 配置SecurityConfig内白名单路径,修改javadoc注释信息 +2.2.1 2025-05-25 配置SecurityConfig内白名单路径,修改javadoc注释信息 +2.2.0 2025-05-24 变量前缀统一调整为platform + +2.1.5 2025-05-21 进行代码资源调整,集成融合java-ent-parent资源 +2.1.4 2025-02-11 增加本地jar包 +2.1.3 2025-02-08 entdb框架已经融合,暂时放开不需要登录方式 +将magic-editor的2.1.1资源拷贝到工程中,进行修改title、ico等 +融合entdb配置SecurityConfig信息,对/llxm/**进行白名单放行,后续需进行安全加固 +后续验证迁移到可使用达梦数据库环境 + +2.1.2 2025-02-07 增加多数据源支撑,增加配置信息加密处理,后续完善entdb框架中的登录信息 + +2.1.1 2025-02-06 基于Magic-api的工程,修改包路径 + +2.1.0 2025-01-12 初始化版本 +``` \ No newline at end of file diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000000000000000000000000000000000000..6b2fce3c7902a9034c756000b5e8ea53e0541675 --- /dev/null +++ b/FAQ.md @@ -0,0 +1,16 @@ +### 分支情况说明 +``` +master:主分支 +develop:开发分支 + +``` + +### 待解决和规划扩展 +``` + +``` + +### 常见问题及处理 +``` + +``` diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..b86a3cdefc0ec7e3bce4e517dcd64464bc914fe9 --- /dev/null +++ b/README.en.md @@ -0,0 +1,69 @@ +# java-magic-api + +[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0) +![java version](https://img.shields.io/badge/JAVA-1.8-green.svg) +![gitee star](https://gitee.com/linlannet/java-magic-api/badge/star.svg) + +## Introduce + +The project based on Magic-api is used for data interface configuration project, which can realize api output by configuring SQL and mybatis, +support configuring promQL to write Prometheus scripts, and realize monitoring stream data and real-time status inquiry machine display. + +## Change Log + +[CHANGELOG](./CHANGELOG.md) + + +## Technical Guidelines +### Software Architecture +``` +Springboot + Framework + Security + Mybatis +``` + +### Installation +1. mvn clean install +2. mvn clean deploy + +### Instructions +1. use by maven +``` + + ${groupId} + ${artifactId} + ${project.version} + test + +``` +2. use direct jar + +## Contribution +1. Fork repository +2. new Feat_1.0.0 branch +3. commit +``` +git config user.name linlaninfo +git config user.email linlannet@163.com +git config --global --list +git config --list +``` +4. new Pull Request +5. create and commit tag +``` +create +git tag -a 1.0.0 -m "initial version" +list +git tag +commit +git push origin --tags +delete +git tag -d 1.0.0 + +install: mvn clean install +deploy: mvn clean deploy + +``` +6. other + +## Licence + +[Apache 2.0 © java-magic-api 2023](./LICENSE) diff --git a/README.md b/README.md index c31a6268495f26a456d677ec1a1dcd9cb67eada4..7ea3e571f7b296a485024334caf084bb6e84b4ae 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,68 @@ -# java-stage-magic-api -基于Magic-api的工程,用于项目,可通过配置SQL、mybatis方式实现api输出 +# java-magic-api +[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0) +![java version](https://img.shields.io/badge/JAVA-1.8-green.svg) +![gitee star](https://gitee.com/linlannet/java-magic-api/badge/star.svg) -## 版本信息 +## 介绍 + +基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + + +## 版本历史 + +[CHANGELOG](./CHANGELOG.md) + +## 技术路径 +### 软件架构 +``` +Springboot + Framework + Security + Mybatis ``` -2.2.3 2025-06-26 ent版本升级,删除gov框架的包 +### 安装教程 +1. mvn clean install +2. mvn clean deploy -2.2.2 2025-06-02 配置SecurityConfig内白名单路径,修改javadoc注释信息 -2.2.1 2025-05-25 配置SecurityConfig内白名单路径,修改javadoc注释信息 -2.2.0 2025-05-24 变量前缀统一调整为platform +### 使用说明 +1. 通过依赖使用 +``` + + ${groupId} + ${artifactId} + ${project.version} + test + +``` +2. 直接拷贝打包后的jar包 -2.1.5 2025-05-21 进行代码资源调整,集成融合java-ent-parent资源 -2.1.4 2025-02-11 增加本地jar包 -2.1.3 2025-02-08 entdb框架已经融合,暂时放开不需要登录方式 -将magic-editor的2.1.1资源拷贝到工程中,进行修改title、ico等 -融合entdb配置SecurityConfig信息,对/llxm/**进行白名单放行,后续需进行安全加固 -后续验证迁移到可使用达梦数据库环境 +## 参与贡献 +1. Fork 本仓库 +2. 新建 Feat_1.0.0 分支 +3. 提交代码 +``` +git config user.name linlaninfo +git config user.email linlannet@163.com +git config --global --list +git config --list +``` +4. 新建 Pull Request +5. 创建和提交tag +``` +创建 +git tag -a 1.0.0 -m "初始化版本" +查看 +git tag +提交 +git push origin --tags +删除 +git tag -d 1.0.0 -2.1.2 2025-02-07 增加多数据源支撑,增加配置信息加密处理,后续完善entdb框架中的登录信息 +本地编译:mvn clean install +发布到github:mvn clean deploy -2.1.1 2025-02-06 基于Magic-api的工程,修改包路径 +``` +6. 其他 -2.1.0 2025-01-12 初始化版本 +## 版权 -``` \ No newline at end of file +[Apache 2.0 © java-magic-api 2023](./LICENSE) diff --git a/pom.xml b/pom.xml index bcdd356129e2aeee3d70f01ca64379c355b6908d..9054cf35a77eb0d727898bbbdce260a5bea6741c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,23 @@ + @@ -10,10 +29,10 @@ 2.7.18 net.linlan.stage - java-stage-magic-api - 2.2.3 - java-stage-magic-api - 基于Magic-api的工程,用于项目,可通过配置SQL、mybatis方式实现api输出 + java-magic-api + 2.2.4 + java-magic-api + 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 UTF-8 @@ -41,14 +60,17 @@ 0.9.1 1.21 4.1.2 + 4.2 + 2.16.0 + 1.6.2 - 2.3.12 - 2.6.6 - 1.8.24 + 2.3.12 + 2.6.7 + 1.1.6 - https://gitee.com/linlannet/java-stage-magic-api.git + https://gitee.com/linlannet/java-magic-api.git Apache-2.0 @@ -56,8 +78,8 @@ - https://gitee.com/linlannet/java-stage-magic-api - scm:git:git://gitee.com/linlannet/java-stage-magic-api.git + https://gitee.com/linlannet/java-magic-api + scm:git:git://gitee.com/linlannet/java-magic-api.git @@ -226,7 +248,11 @@ - + + com.squareup.okhttp3 + okhttp + 4.9.3 + com.github.ulisesbocchio @@ -244,33 +270,32 @@ ${linlan.tools.version} - net.linlan.ent - utils-ent - ${java.ent.version} + net.linlan.eframe + eframe-support + ${linlan.eframe.version} - net.linlan.ent - model-ent-admin - ${java.ent.version} + net.linlan.eframe + eframe-core + ${linlan.eframe.version} - net.linlan.ent - view-ent-comm - ${java.ent.version} + net.linlan.eframe + eframe-model + ${linlan.eframe.version} - net.linlan.ent - view-ent-admin - ${java.ent.version} + net.linlan.eframe + eframe-view + ${linlan.eframe.version} - - - + + + - @@ -410,6 +435,135 @@ true + + + com.mycila + license-maven-plugin + ${license-maven-plugin.version} + + + compile + + remove + format + + + + + true +
${user.dir}/scripts/codestyle/HEADER
+ + Linlan + 2020-2025 + open@linlan.net + + + + **/*.java + + + **/*.ts + **/*.tsx + **/*.js + **/*.jsx + **/*.vue + **/*.css + + + **/*.xml + **/*.properties + **/*.yaml + + + + *.sh + *.yml + *.iml + *.config + **/*.ftlh + .editorconfig + .gitignore + LICENSE + **/*.md + **/*.log + **/codestyle/HEADER + **/.gitkeep + **/spring.factories + **/.mvn/** + **/mvnw + **/ip2region.db + **/resources/template/** + **/node_modules/** + **/.umi-production/** + **/docs/** + **/dictionaries/** + **/static/antd.min.css + **/META-INF/** + + true + + SLASHSTAR_STYLE + JAVADOC_STYLE + JAVADOC_STYLE + +
+
+ + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + + compile + + format + validate + + + + + ${user.dir}/scripts/codestyle/Formatter.xml + ${project.build.sourceEncoding} + + **/static/antd.min.css + + + + + + net.revelc.code + impsort-maven-plugin + ${impsort-maven-plugin.version} + + ${java.version} + java.,javax.,org.,com.,cn.,lombok. + java.,javax.,org.,com.,cn.,lombok. + + false + true + + true + true + true + true + + + + sort-imports + + sort + + + + + + org.codehaus.plexus + plexus-utils + 3.5.1 + + +
diff --git a/.workflow/branch-pipeline.yml b/scripts/.workflow/branch-pipeline.yml similarity index 100% rename from .workflow/branch-pipeline.yml rename to scripts/.workflow/branch-pipeline.yml diff --git a/.workflow/master-pipeline.yml b/scripts/.workflow/master-pipeline.yml similarity index 100% rename from .workflow/master-pipeline.yml rename to scripts/.workflow/master-pipeline.yml diff --git a/.workflow/pr-pipeline.yml b/scripts/.workflow/pr-pipeline.yml similarity index 100% rename from .workflow/pr-pipeline.yml rename to scripts/.workflow/pr-pipeline.yml diff --git a/scripts/codestyle/Formatter.xml b/scripts/codestyle/Formatter.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c5f983d008ef01f24cedc60941e1175c3d23ddc --- /dev/null +++ b/scripts/codestyle/Formatter.xml @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/codestyle/HEADER b/scripts/codestyle/HEADER new file mode 100644 index 0000000000000000000000000000000000000000..90fc13a732415a1de29f96b90bb56ec126d9a7b9 --- /dev/null +++ b/scripts/codestyle/HEADER @@ -0,0 +1,15 @@ +${project.name} - ${project.description} +Copyright © 2020-2025 Linlan (open@linlan.net) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/config/Dockerfile b/scripts/config/Dockerfile similarity index 67% rename from config/Dockerfile rename to scripts/config/Dockerfile index 146e8098cd4aedeb6177761946fb0ebcb2079c51..ed2c20279c2b22b98eab82730dba07ac91cdeec6 100644 --- a/config/Dockerfile +++ b/scripts/config/Dockerfile @@ -9,14 +9,14 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone #设置编码 ENV LANG C.UTF-8 -ADD java-stage-magic-api.jar /data/ +ADD java-magic-api.jar /data/ #没有lib包注释改行 #ADD lib /data/lib WORKDIR /data #测试环境 -#CMD java -jar java-stage-magic-api.jar +#CMD java -jar java-magic-api.jar #生产环境 -#CMD java -server -Xmx4g -Xms4g -XX:+UseG1GC -jar java-stage-magic-api.jar -CMD java -server -Xmx4g -Xms4g -XX:+UseG1GC -Dspring.profiles.active=release -jar java-stage-magic-api.jar +#CMD java -server -Xmx4g -Xms4g -XX:+UseG1GC -jar java-magic-api.jar +CMD java -server -Xmx4g -Xms4g -XX:+UseG1GC -Dspring.profiles.active=release -jar java-magic-api.jar diff --git a/config/stage-shell.sh b/scripts/config/stage-shell.sh similarity index 65% rename from config/stage-shell.sh rename to scripts/config/stage-shell.sh index 60d7ae9b16118afc509336da803dd1b9591975a7..56f6ba221ad7c1d1623090de1fe7d6dd4c38476b 100644 --- a/config/stage-shell.sh +++ b/scripts/config/stage-shell.sh @@ -13,20 +13,20 @@ done # 2、clean old war or jar cd /www/api/gov -rm -dfr /www/api/gov/java-stage-magic-api*.jar -rm -rf /www/api/gov/java-stage-magic-api*.txt +rm -dfr /www/api/gov/java-magic-api*.jar +rm -rf /www/api/gov/java-magic-api*.txt # 3、拷贝现有打包文件,进行部署 #cd到jar包所在目录 #爬取版本号 -var=`curl -u https://repo1.maven.org/maven2/net/linlan/stage/java-stage-magic-api/` +var=`curl -u https://repo1.maven.org/maven2/net/linlan/stage/java-magic-api/` #找出最大版本号 并且赋给变量 edt=`echo "$var" | egrep td|grep href|grep -oE "[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}"|sort -rVu|head -n 1` #拉取jar包 -wget https://repo1.maven.org/maven2/net/linlan/stage/java-stage-magic-api/"$edt"/java-stage-magic-api-"$edt".jar +wget https://repo1.maven.org/maven2/net/linlan/stage/java-magic-api/"$edt"/java-magic-api-"$edt".jar #启动jar包 -nohup java -jar -Xms256m -Xmx256m -XX:PermSize=128M -XX:MaxPermSize=512M java-stage-magic-api-"$edt".jar --server.port=8018 --spring.profiles.active=dev >java-stage-magic-api-log"$(date +%Y-%m-%d)".8018.txt 2>&1 & +nohup java -jar -Xms256m -Xmx256m -XX:PermSize=128M -XX:MaxPermSize=512M java-magic-api-"$edt".jar --server.port=8018 --spring.profiles.active=dev >java-magic-api-log"$(date +%Y-%m-%d)".8018.txt 2>&1 & diff --git a/scripts/db/db-script.sql b/scripts/db/db-script.sql index fca6fb92d73eebaa03e10d6dea22735efb3e4bca..0892e163a07461405fee2b96ac7b3c25ba953a6d 100644 --- a/scripts/db/db-script.sql +++ b/scripts/db/db-script.sql @@ -1,162 +1,19 @@ - -create table `ll_system_1_1_2` ( - `cfg_id` varchar(50) not null, - `cfg_key` varchar(50) not null, - `cfg_value` varchar(4000) not null, - `is_disabled` tinyint(1) default null, - `description` varchar(800) default null, - primary key (`cfg_id`), - key `idx_global_config_whole_key` (`cfg_key`) -) ; - - -insert into `ll_system_1_1_2`(`cfg_id`,`cfg_key`,`cfg_value`,`is_disabled`,`description`) values - ('100006','sys.login.blackiplist','',0,'设置登录ip黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)'); - - -create table `ll_system_3_1_3` ( - `role_id` bigint not null, - `roletype_id` varchar(50) default null, - `app_id` varchar(50) default null, - `user_id` varchar(50) default null, - `name` varchar(100) not null, - `code` varchar(50) not null, - `priority` int not null default '10', - `is_regular` tinyint(1) not null default '0', - `is_super` tinyint(1) not null default '0', - `is_public` tinyint(1) default null, - `create_time` datetime default null, - `status` int default null, - `description` varchar(800) default null, - primary key (`role_id`), - key `idx_admin_role_code` (`code`), - key `idx_admin_role_app_id` (`app_id`) -) ; - - -create table `ll_system_3_2_1` ( - `dept_id` bigint not null, - `organ_id` varchar(50) default null, - `parent_id` bigint default null, - `app_id` varchar(50) default null, - `depttype_id` bigint default null, - `foreign_id` varchar(50) default null, - `create_type` int default '1', - `type` varchar(20) default null, - `name` varchar(200) default null, - `sname` varchar(50) default null, - `area_code` varchar(50) default null, - `organ_leader` varchar(50) default null, - `leader_id` varchar(50) default null, - `leader_mobile` varchar(50) default null, - `is_organ_level` tinyint(1) default '1', - `is_virtual` tinyint(1) default '0', - `is_leaf` tinyint(1) default '0', - `is_disabled` tinyint(1) not null default '0', - `search_code` varchar(800) default null, - `image_path` varchar(255) default null, - `priority` int not null default '10', - `status` int default null, - `creator_id` varchar(50) default null, - `create_time` datetime default null, - `last_time` datetime default null, - `del_flag` int default null, - `description` varchar(800) default null, - `spare1` varchar(255) default null, - `spare2` varchar(255) default null, - primary key (`dept_id`), - key `idx_admin_dept_parent_id` (`parent_id`) -) ; - - -create table `ll_system_3_2_5` ( - `admin_id` bigint not null, - `user_id` varchar(50) default null, - `organ_id` varchar(50) default null, - `dept_id` bigint default null, - `create_type` int default '1', - `name` varchar(200) default null, - `username` varchar(100) default null, - `mobile` varchar(50) default null, - `email` varchar(200) default null, - `password` varchar(200) default null, - `salt` varchar(200) default null, - `image_path` varchar(255) default null, - `admin_type` varchar(20) default null, - `is_super_admin` tinyint(1) not null default '0', - `is_audit_admin` tinyint(1) not null default '0', - `is_self_admin` tinyint(1) not null default '0', - `admin_range` varchar(800) default null, - `admin_perms` varchar(4000) default null, - `last_app_id` varchar(50) default null, - `last_login_time` datetime default null, - `last_login_ip` varchar(50) default '127.0.0.1', - `login_count` int not null default '0', - `status` int not null default '1', - `creator_id` varchar(50) default null, - `create_time` datetime default null, - `last_time` timestamp null default null, - `del_flag` int default '0', - `spare1` varchar(800) default null, - `spare2` varchar(255) default null, - primary key (`admin_id`), - key `idx_admin_user_su_id` (`user_id`) -) ; - - -insert into `ll_system_3_2_5`(`admin_id`,`user_id`,`organ_id`,`dept_id`,`create_type`,`name`,`username`,`mobile`,`email`,`password`,`salt`,`image_path`,`admin_type`,`is_super_admin`,`is_audit_admin`,`is_self_admin`,`admin_range`,`admin_perms`,`last_app_id`,`last_login_time`,`last_login_ip`,`login_count`,`status`,`creator_id`,`create_time`,`last_time`,`del_flag`,`spare1`,`spare2`) values - (1,null,'c4bdcd3051314867b827201c4018083c',103,0,'管理员','datadmin','1588888888','wd@qq.com','$2a$10$7jb720yubvszvui0reqk/.vqgozth.ulu33dhoibe8byohjirdau2',null,'',null,0,0,0,null,null,null,'2025-02-14 14:46:17','127.0.0.1',0,1,'datadmin','2024-11-04 00:19:29','2025-02-14 14:46:17',0,'管理员',null); - - -create table `ll_system_3_2_7` ( - `userrole_id` bigint not null auto_increment, - `role_id` bigint not null, - `admin_id` bigint default null, - primary key (`userrole_id`) -) ; - -create table `ll_system_3_2_8` ( - `log_id` bigint not null, - `admin_id` bigint default null, - `user_id` varchar(50) default null, - `app_id` varchar(50) default null, - `category` int default null, - `title` varchar(200) default null, - `content` varchar(255) default null, - `src_code` int default null, - `log_time` datetime default null, - `log_ip` varchar(50) default null, - `log_url` varchar(255) default null, - `log_browse` varchar(255) default null, - `log_os` varchar(255) default null, - `status` varchar(20) default null, - `description` varchar(800) default null, - primary key (`log_id`), - key `idx_admin_login_log_a_id` (`admin_id`), - key `idx_admin_login_log_l_time` (`log_time`) -) ; - - -insert into `ll_system_3_2_8`(`log_id`,`admin_id`,`user_id`,`app_id`,`category`,`title`,`content`,`src_code`,`log_time`,`log_ip`,`log_url`,`log_browse`,`log_os`,`status`,`description`) values - (5234261636373760,1,'datadmin','pa-stage-ent',1,'登录成功','ip:[127.0.0.1]address:[内网ip]username:[datadmin]status:[success]message:[登录成功]',null,'2025-02-14 14:46:17','127.0.0.1','/stage_magic/login','chrome 13','windows 10','0',null); - - -create table `magic_api_file_v2` ( - `file_path` varchar(512) not null, - `file_content` mediumtext, - primary key (`file_path`) -) engine=innodb default charset=utf8mb4 +CREATE TABLE `MAGIC_API_FILE_V2` ( + `FILE_PATH` VARCHAR(512) NOT NULL, + `FILE_CONTENT` MEDIUMTEXT, + PRIMARY KEY (`FILE_PATH`) +) ; -create table `magic_backup_record_v2` ( - `id` varchar(32) not null comment '原对象id', - `create_date` bigint(13) not null comment '备份时间', - `tag` varchar(32) default null comment '标签', - `type` varchar(32) default null comment '类型', - `name` varchar(64) default null comment '原名称', - `content` blob comment '备份内容', - `create_by` varchar(64) default null comment '操作人', - primary key (`id`,`create_date`) -) engine=innodb default charset=utf8mb4 +CREATE TABLE `MAGIC_BACKUP_RECORD_V2` ( + `ID` VARCHAR(32) NOT NULL COMMENT '原对象ID', + `CREATE_DATE` BIGINT(13) NOT NULL COMMENT '备份时间', + `TAG` VARCHAR(32) DEFAULT NULL COMMENT '标签', + `TYPE` VARCHAR(32) DEFAULT NULL COMMENT '类型', + `NAME` VARCHAR(64) DEFAULT NULL COMMENT '原名称', + `CONTENT` BLOB COMMENT '备份内容', + `CREATE_BY` VARCHAR(64) DEFAULT NULL COMMENT '操作人', + PRIMARY KEY (`ID`,`CREATE_DATE`) +) ; \ No newline at end of file diff --git a/src/main/java/net/linlan/MagicApiApplication.java b/src/main/java/net/linlan/MagicApiApplication.java index 0a342b4dd032c38a6e30334cbc3850b38daf3890..76f62b4197afe9a6b0fa840ef3591f9a63f5620c 100644 --- a/src/main/java/net/linlan/MagicApiApplication.java +++ b/src/main/java/net/linlan/MagicApiApplication.java @@ -1,7 +1,22 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan; -import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; -import net.linlan.config.DynamicDataSourceConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -14,24 +29,24 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; -//import springfox.documentation.swagger2.annotations.EnableSwagger2; +import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; -@Import({DynamicDataSourceConfig.class}) -@EnableAutoConfiguration(exclude = { - DataSourceAutoConfiguration.class -}) +import net.linlan.config.DynamicDataSourceConfig; + +//import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@Import({ DynamicDataSourceConfig.class }) +@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class }) @Configuration -@MapperScan(basePackages={"net.linlan.**.dao"}) -@ComponentScan(basePackages = {"net.linlan"}) +@MapperScan(basePackages = { "net.linlan.**.dao" }) +@ComponentScan(basePackages = { "net.linlan" }) @EnableScheduling @EnableAsync @ServletComponentScan -@EnableEncryptableProperties//@EnableSwagger2 // 配置swagger 文档 -public class MagicApiApplication extends SpringBootServletInitializer -{ - public static void main(String[] args) - { +@EnableEncryptableProperties //@EnableSwagger2 // 配置swagger 文档 +public class MagicApiApplication extends SpringBootServletInitializer { + public static void main(String[] args) { System.setProperty("spring.devtools.restart.enabled", "false"); SpringApplication.run(MagicApiApplication.class, args); System.out.println("------- 接口管理平台启动成功 -------"); @@ -43,4 +58,3 @@ public class MagicApiApplication extends SpringBootServletInitializer } } - diff --git a/src/main/java/net/linlan/config/CaptchaConfig.java b/src/main/java/net/linlan/config/CaptchaConfig.java index ff76bc78941a1e7a3846a20f0b3355dce40caf92..5961d527f50fb281e56d6efc3573cf2b50895fa7 100644 --- a/src/main/java/net/linlan/config/CaptchaConfig.java +++ b/src/main/java/net/linlan/config/CaptchaConfig.java @@ -1,12 +1,29 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import com.google.code.kaptcha.impl.DefaultKaptcha; -import com.google.code.kaptcha.util.Config; +import java.util.Properties; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import java.util.Properties; - +import com.google.code.kaptcha.impl.DefaultKaptcha; +import com.google.code.kaptcha.util.Config; import static com.google.code.kaptcha.Constants.*; /** @@ -15,11 +32,9 @@ import static com.google.code.kaptcha.Constants.*; * @author Linlan */ @Configuration -public class CaptchaConfig -{ +public class CaptchaConfig { @Bean(name = "captchaProducer") - public DefaultKaptcha getKaptchaBean() - { + public DefaultKaptcha getKaptchaBean() { DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); Properties properties = new Properties(); // 是否有边框 默认为true 我们可以自己设置yes,no @@ -39,15 +54,15 @@ public class CaptchaConfig // 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize) properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier"); // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy - properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); + properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, + "com.google.code.kaptcha.impl.ShadowGimpy"); Config config = new Config(properties); defaultKaptcha.setConfig(config); return defaultKaptcha; } @Bean(name = "captchaProducerMath") - public DefaultKaptcha getKaptchaBeanMath() - { + public DefaultKaptcha getKaptchaBeanMath() { DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); Properties properties = new Properties(); // 是否有边框 默认为true 我们可以自己设置yes,no @@ -65,7 +80,8 @@ public class CaptchaConfig // KAPTCHA_SESSION_KEY properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath"); // 验证码文本生成器 - properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "net.linlan.webconfig.KaptchaTextCreator"); + properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, + "net.linlan.webconfig.KaptchaTextCreator"); // 验证码文本字符间距 默认为2 properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3"); // 验证码文本字符长度 默认为5 @@ -77,7 +93,8 @@ public class CaptchaConfig // 干扰实现类 properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise"); // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy - properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); + properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, + "com.google.code.kaptcha.impl.ShadowGimpy"); Config config = new Config(properties); defaultKaptcha.setConfig(config); return defaultKaptcha; diff --git a/src/main/java/net/linlan/config/CorsConfig.java b/src/main/java/net/linlan/config/CorsConfig.java index 3a9ed0f499faf183c1676e67a43caf0c97a6e759..9badacf0b48acc42a4eaf76be7e6d67c93bf21ae 100644 --- a/src/main/java/net/linlan/config/CorsConfig.java +++ b/src/main/java/net/linlan/config/CorsConfig.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; import org.springframework.beans.factory.annotation.Value; @@ -25,24 +42,24 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; public class CorsConfig implements WebMvcConfigurer { @Value("${spring.profiles.active}") - private String activeMode; + private String activeMode; @Value("${platform.prop.allowedOrigins}") private String[] allowedOrigins; /** * 跨域配置 + * @return 跨域配置过滤器 */ @Bean - public CorsFilter corsFilter() - { + public CorsFilter corsFilter() { CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); // 可信域配置 - if (allowedOrigins != null && allowedOrigins.length > 0){ + if (allowedOrigins != null && allowedOrigins.length > 0) { for (String allowedOrigin : allowedOrigins) { config.addAllowedOriginPattern(allowedOrigin); } - }else{ + } else { // 设置访问源地址 config.addAllowedOriginPattern("*"); } @@ -61,17 +78,15 @@ public class CorsConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { - String[] origins = {"*"}; + String[] origins = { "*" }; if (activeMode.contains("prod") -// || activeMode.contains("test") //开发调试下,注释,生产发布开启 - ){ + // || activeMode.contains("test") //开发调试下,注释,生产发布开启 + ) { origins = allowedOrigins; } registry.addMapping("/**") -// .allowedOrigins(origins) - .allowedOriginPatterns(origins) - .allowCredentials(true) - .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") - .maxAge(3600); + // .allowedOrigins(origins) + .allowedOriginPatterns(origins).allowCredentials(true) + .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS").maxAge(3600); } } diff --git a/src/main/java/net/linlan/config/DataSourceNames.java b/src/main/java/net/linlan/config/DataSourceNames.java index fb0604598421b1f963f607888dc023d8b42ca878..6ae0d0d652ac9d554419619e79bfc2a39ad852b8 100644 --- a/src/main/java/net/linlan/config/DataSourceNames.java +++ b/src/main/java/net/linlan/config/DataSourceNames.java @@ -1,6 +1,23 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import net.linlan.plat.comm.datasource.BaseDataSourceNames; +import net.linlan.frame.comm.datasource.BaseDataSourceNames; /** * @@ -19,4 +36,9 @@ import net.linlan.plat.comm.datasource.BaseDataSourceNames; */ public class DataSourceNames implements BaseDataSourceNames { + /** + * 第三个数据源 + */ + public static final String THIRD = "third"; + } diff --git a/src/main/java/net/linlan/config/DynamicDataSource.java b/src/main/java/net/linlan/config/DynamicDataSource.java index 4f361b1a623febfb4e412d6fe99dcb1f605e3b1b..ada3d4f094aca87dfa2bb3ec84ed3cc89097e7f6 100644 --- a/src/main/java/net/linlan/config/DynamicDataSource.java +++ b/src/main/java/net/linlan/config/DynamicDataSource.java @@ -1,13 +1,31 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; +import java.util.HashMap; +import java.util.Map; + +import javax.sql.DataSource; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; -import javax.sql.DataSource; -import java.util.HashMap; -import java.util.Map; - /** * * Filename:DynamicDataSource.java @@ -22,14 +40,16 @@ import java.util.Map; */ public class DynamicDataSource extends AbstractRoutingDataSource { - static Logger logger = LoggerFactory.getLogger(DynamicDataSource.class); + static Logger logger = LoggerFactory + .getLogger(DynamicDataSource.class); /** * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本, * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。 */ private static final ThreadLocal contextHolder = new ThreadLocal<>(); - public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) { + public DynamicDataSource(DataSource defaultTargetDataSource, + Map targetDataSources) { super.setDefaultTargetDataSource(defaultTargetDataSource); super.setTargetDataSources(new HashMap<>(targetDataSources)); super.afterPropertiesSet(); @@ -39,6 +59,7 @@ public class DynamicDataSource extends AbstractRoutingDataSource { protected Object determineCurrentLookupKey() { return getDataSource(); } + /** * 设置数据源的变量 * @param dataSource 数据源 @@ -47,6 +68,7 @@ public class DynamicDataSource extends AbstractRoutingDataSource { logger.info("切换到{}数据源", dataSource); contextHolder.set(dataSource); } + /** * 获得数据源的变量 * @return 数据源连接变量 @@ -54,6 +76,7 @@ public class DynamicDataSource extends AbstractRoutingDataSource { public static String getDataSource() { return contextHolder.get(); } + /** * 清空数据源变量 */ diff --git a/src/main/java/net/linlan/config/DynamicDataSourceConfig.java b/src/main/java/net/linlan/config/DynamicDataSourceConfig.java index 15e8aaddf1bc6bf2c4fc53a94876cee3e69c0a0d..9100f65978ac3e169879e4c5204b2b661de933f7 100644 --- a/src/main/java/net/linlan/config/DynamicDataSourceConfig.java +++ b/src/main/java/net/linlan/config/DynamicDataSourceConfig.java @@ -1,17 +1,36 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; +import java.util.Properties; + +import javax.sql.DataSource; + import org.apache.ibatis.mapping.DatabaseIdProvider; import org.apache.ibatis.mapping.VendorDatabaseIdProvider; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; +import org.ssssssss.magicapi.datasource.model.MagicDynamicDataSource; -import javax.sql.DataSource; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; +import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; /** * @@ -28,27 +47,47 @@ import java.util.Properties; @Configuration public class DynamicDataSourceConfig { - @Bean + @Primary //标记主数据源,当存在多个DataSource Bean时,默认使用该数据源 + @Bean(name = "db1") //创建一个名为"d1"的DataSource Bean + @Qualifier("db1") @ConfigurationProperties("spring.datasource.druid.first") - public DataSource firstDataSource(){ + public DataSource firstDataSource() { return DruidDataSourceBuilder.create().build(); } - @Bean + @Bean(name = "db2") + @Qualifier("db2") @ConfigurationProperties("spring.datasource.druid.second") - public DataSource secondDataSource(){ + public DataSource secondDataSource() { return DruidDataSourceBuilder.create().build(); } + // @Bean + // @ConfigurationProperties("spring.datasource.druid.third") + // public DataSource thirdDataSource(){ + // return DruidDataSourceBuilder.create().build(); + // } + + // @Bean + // @Primary + // public DynamicDataSource dataSource(DataSource firstDataSource, + // DataSource secondDataSource + // ) { + // Map targetDataSources = new HashMap<>(); + // targetDataSources.put(DataSourceNames.FIRST, firstDataSource); + // targetDataSources.put(DataSourceNames.SECOND, secondDataSource); + // targetDataSources.put(DataSourceNames.THIRD, thirdDataSource()); + // return new DynamicDataSource(firstDataSource, targetDataSources); + // } + + // 创建一个MagicDynamicDataSource类型的Bean,用于管理多个数据源并实现动态切换 @Bean - @Primary - public DynamicDataSource dataSource(DataSource firstDataSource, - DataSource secondDataSource - ) { - Map targetDataSources = new HashMap<>(); - targetDataSources.put(DataSourceNames.FIRST, firstDataSource); - targetDataSources.put(DataSourceNames.SECOND, secondDataSource); - return new DynamicDataSource(firstDataSource, targetDataSources); + public MagicDynamicDataSource magicDynamicDataSource() { + MagicDynamicDataSource dynamicDataSource = new MagicDynamicDataSource(); + // 将默认数据源设置为d1,并将d2的DataSource加入到动态数据源管理器中 + dynamicDataSource.setDefault(firstDataSource()); + dynamicDataSource.add("db2", secondDataSource()); + return dynamicDataSource; } /** @@ -58,13 +97,14 @@ public class DynamicDataSourceConfig { * @return 数据库提供者 */ @Bean - public DatabaseIdProvider getDatabaseIdProvider(){ + public DatabaseIdProvider getDatabaseIdProvider() { DatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider(); Properties properties = new Properties(); - properties.setProperty("Oracle","oracle"); - properties.setProperty("MySQL","mysql"); - properties.setProperty("DM8","dm8"); + properties.setProperty("Oracle", "oracle"); + properties.setProperty("MySQL", "mysql"); + properties.setProperty("DM8", "dm8"); databaseIdProvider.setProperties(properties); return databaseIdProvider; } + } diff --git a/src/main/java/net/linlan/config/FastJson2JsonRedisSerializer.java b/src/main/java/net/linlan/config/FastJson2JsonRedisSerializer.java index af8ab8a75a724d3cdbba51128e0915490c42ebe4..64784ddeaaeab70d8c0d5bf7f571dde557e01de3 100644 --- a/src/main/java/net/linlan/config/FastJson2JsonRedisSerializer.java +++ b/src/main/java/net/linlan/config/FastJson2JsonRedisSerializer.java @@ -1,14 +1,31 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; +import java.nio.charset.Charset; + +import org.springframework.data.redis.serializer.RedisSerializer; +import org.springframework.data.redis.serializer.SerializationException; + import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONReader; import com.alibaba.fastjson2.JSONWriter; import com.alibaba.fastjson2.filter.Filter; -import org.springframework.data.redis.serializer.RedisSerializer; -import org.springframework.data.redis.serializer.SerializationException; - -import java.nio.charset.Charset; - import static net.linlan.utils.constant.Constants.JSON_WHITELIST_STR; /** @@ -16,35 +33,29 @@ import static net.linlan.utils.constant.Constants.JSON_WHITELIST_STR; * * @author shuxiaobo */ -public class FastJson2JsonRedisSerializer implements RedisSerializer -{ - public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); +public class FastJson2JsonRedisSerializer implements RedisSerializer { + public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); - static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(JSON_WHITELIST_STR); + static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(JSON_WHITELIST_STR); - private Class clazz; + private Class clazz; - public FastJson2JsonRedisSerializer(Class clazz) - { + public FastJson2JsonRedisSerializer(Class clazz) { super(); this.clazz = clazz; } @Override - public byte[] serialize(T t) throws SerializationException - { - if (t == null) - { + public byte[] serialize(T t) throws SerializationException { + if (t == null) { return new byte[0]; } return JSON.toJSONString(t, JSONWriter.Feature.WriteClassName).getBytes(DEFAULT_CHARSET); } @Override - public T deserialize(byte[] bytes) throws SerializationException - { - if (bytes == null || bytes.length <= 0) - { + public T deserialize(byte[] bytes) throws SerializationException { + if (bytes == null || bytes.length <= 0) { return null; } String str = new String(bytes, DEFAULT_CHARSET); diff --git a/src/main/java/net/linlan/config/FilterConfig.java b/src/main/java/net/linlan/config/FilterConfig.java index fc6aa41a9ab7b6beb9e9f8383ef47451d81a640a..3f2e34f93ac7bcaa7d0acf479d2fcdcdaf0ce02e 100644 --- a/src/main/java/net/linlan/config/FilterConfig.java +++ b/src/main/java/net/linlan/config/FilterConfig.java @@ -1,17 +1,35 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import net.linlan.commons.core.StringUtils; -import net.linlan.stage.handler.RepeatFilter; -import net.linlan.utils.xss.XssFilter; +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.DispatcherType; + import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import javax.servlet.DispatcherType; -import java.util.HashMap; -import java.util.Map; +import net.linlan.commons.core.StringUtils; +import net.linlan.utils.xss.XssFilter; /** * Filter配置 @@ -19,8 +37,7 @@ import java.util.Map; * @author Linlan */ @Configuration -public class FilterConfig -{ +public class FilterConfig { @Value("${platform.xss.excludes}") private String excludes; @@ -30,8 +47,7 @@ public class FilterConfig @SuppressWarnings({ "rawtypes", "unchecked" }) @Bean @ConditionalOnProperty(value = "xss.enabled", havingValue = "true") - public FilterRegistrationBean xssFilterRegistration() - { + public FilterRegistrationBean xssFilterRegistration() { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setDispatcherTypes(DispatcherType.REQUEST); registration.setFilter(new XssFilter()); @@ -44,16 +60,4 @@ public class FilterConfig return registration; } - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Bean - public FilterRegistrationBean repeatFilterRegistration() - { - FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setFilter(new RepeatFilter()); - registration.addUrlPatterns("/api/*"); - registration.setName("repeatFilter"); - registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE); - return registration; - } - } diff --git a/src/main/java/net/linlan/config/HttpClientConfig.java b/src/main/java/net/linlan/config/HttpClientConfig.java index 26477fd44f40c840aa298db0b8796e55952f892e..20984fc2f9143b46c789627d28121d570337eca5 100644 --- a/src/main/java/net/linlan/config/HttpClientConfig.java +++ b/src/main/java/net/linlan/config/HttpClientConfig.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; import org.apache.http.client.config.RequestConfig; @@ -43,7 +60,7 @@ public class HttpClientConfig { * @return 连接池 */ @Bean(name = "httpClientConnectionManager") - public PoolingHttpClientConnectionManager getHttpClientConnectionManager(){ + public PoolingHttpClientConnectionManager getHttpClientConnectionManager() { PoolingHttpClientConnectionManager httpClientConnectionManager = new PoolingHttpClientConnectionManager(); //最大连接数 httpClientConnectionManager.setMaxTotal(maxTotal); @@ -59,7 +76,7 @@ public class HttpClientConfig { * @return 实例化连接池 */ @Bean(name = "httpClientBuilder") - public HttpClientBuilder getHttpClientBuilder(@Qualifier("httpClientConnectionManager")PoolingHttpClientConnectionManager httpClientConnectionManager){ + public HttpClientBuilder getHttpClientBuilder(@Qualifier("httpClientConnectionManager") PoolingHttpClientConnectionManager httpClientConnectionManager) { //HttpClientBuilder中的构造方法被protected修饰,所以这里不能直接使用new来实例化一个HttpClientBuilder,可以使用HttpClientBuilder提供的静态方法create()来获取HttpClientBuilder对象 HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); @@ -75,7 +92,7 @@ public class HttpClientConfig { * @return 注入连接池 */ @Bean - public CloseableHttpClient getCloseableHttpClient(@Qualifier("httpClientBuilder") HttpClientBuilder httpClientBuilder){ + public CloseableHttpClient getCloseableHttpClient(@Qualifier("httpClientBuilder") HttpClientBuilder httpClientBuilder) { return httpClientBuilder.build(); } @@ -87,11 +104,10 @@ public class HttpClientConfig { * @return Builder对象 */ @Bean(name = "builder") - public RequestConfig.Builder getBuilder(){ + public RequestConfig.Builder getBuilder() { RequestConfig.Builder builder = RequestConfig.custom(); return builder.setConnectTimeout(connectTimeout) - .setConnectionRequestTimeout(connectionRequestTimeout) - .setSocketTimeout(socketTimeout); + .setConnectionRequestTimeout(connectionRequestTimeout).setSocketTimeout(socketTimeout); } /** @@ -100,7 +116,7 @@ public class HttpClientConfig { * @return 构建RequestConfig对象 */ @Bean - public RequestConfig getRequestConfig(@Qualifier("builder") RequestConfig.Builder builder){ + public RequestConfig getRequestConfig(@Qualifier("builder") RequestConfig.Builder builder) { return builder.build(); } diff --git a/src/main/java/net/linlan/config/I18nConfig.java b/src/main/java/net/linlan/config/I18nConfig.java index 401bfca2517e2fa4bc83f11eb30212c5a923c4c6..f1957c992564da15a460e543b9f8857cf3067aa7 100644 --- a/src/main/java/net/linlan/config/I18nConfig.java +++ b/src/main/java/net/linlan/config/I18nConfig.java @@ -1,5 +1,24 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; +import java.util.Locale; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.LocaleResolver; @@ -8,19 +27,15 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; import org.springframework.web.servlet.i18n.SessionLocaleResolver; -import java.util.Locale; - /** * 资源文件配置加载 * * @author Linlan */ @Configuration -public class I18nConfig implements WebMvcConfigurer -{ +public class I18nConfig implements WebMvcConfigurer { @Bean - public LocaleResolver localeResolver() - { + public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); // 默认语言 slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); @@ -28,8 +43,7 @@ public class I18nConfig implements WebMvcConfigurer } @Bean - public LocaleChangeInterceptor localeChangeInterceptor() - { + public LocaleChangeInterceptor localeChangeInterceptor() { LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); // 参数名 lci.setParamName("lang"); @@ -37,8 +51,7 @@ public class I18nConfig implements WebMvcConfigurer } @Override - public void addInterceptors(InterceptorRegistry registry) - { + public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(localeChangeInterceptor()); } } diff --git a/src/main/java/net/linlan/config/RedisConfig.java b/src/main/java/net/linlan/config/RedisConfig.java index 2e0e3ed2b3cef838a05f5d2a7852cdcc4391303a..b74a5f438d354447653ac6e5e87caf6419afb053 100644 --- a/src/main/java/net/linlan/config/RedisConfig.java +++ b/src/main/java/net/linlan/config/RedisConfig.java @@ -1,68 +1,281 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.codec.digest.DigestUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.data.redis.RedisProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cache.Cache; +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cache.interceptor.CacheErrorHandler; +import org.springframework.cache.interceptor.KeyGenerator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.cache.RedisCacheManager; import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisOperations; import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.RedisSerializationContext; import org.springframework.data.redis.serializer.RedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; +import org.springframework.util.Assert; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONFactory; + +import lombok.extern.slf4j.Slf4j; +import net.linlan.commons.core.StringUtils; +import static com.alibaba.fastjson2.JSONWriter.Feature.WriteClassName; /** - * - * Filename:RedisConfig.java - * Desc:Redis配置 + * redis配置 * * @author Linlan - * CreateTime:2017-07-70 19:22 - * - * @version 1.0 - * @since 1.0 - * */ +@Slf4j @Configuration -public class RedisConfig { +@EnableCaching +@ConditionalOnClass(RedisOperations.class) +@EnableConfigurationProperties(RedisProperties.class) +public class RedisConfig extends CachingConfigurerSupport { + + @Value("${platform.cache.prefix:eframe}") + private String prefix; + + @Bean + public CacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) { + //序列化 + RedisSerializer redisSerializer = new StringRedisSerializer(String.class, prefix); + FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer<>( + Object.class); + //redis缓存配置 + RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration + .defaultCacheConfig() + // 默认redis cache 缓存时间1天 + .entryTtl(Duration.ofDays(1)) + .serializeKeysWith( + RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)) + .serializeValuesWith(RedisSerializationContext.SerializationPair + .fromSerializer(fastJsonRedisSerializer)); + + RedisCacheManager redisCacheManager = RedisCacheManager.builder(redisConnectionFactory) + .cacheDefaults(redisCacheConfiguration).build(); + return redisCacheManager; + } - /** 对REDISTEMPLATE的键进行标准化处理 - * RedisTemplate配置 - * @param factory 缓存工厂 - * @return redis 模板 + /** + * 设置 redis 数据默认过期时间,默认2小时 + * 设置@cacheable 序列化方式 + * @return redis配置工厂 */ @Bean - public RedisTemplate redisTemplate(RedisConnectionFactory factory) { - StringRedisTemplate template = new StringRedisTemplate(factory); - //定义key序列化方式 - RedisSerializer redisSerializer = new StringRedisSerializer(); - //定义value的序列化方式 - Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); - ObjectMapper om = new ObjectMapper(); - om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); - om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); - jackson2JsonRedisSerializer.setObjectMapper(om); - - template.setKeySerializer(redisSerializer); - template.setValueSerializer(jackson2JsonRedisSerializer); - template.setHashValueSerializer(jackson2JsonRedisSerializer); - template.afterPropertiesSet(); + public RedisCacheConfiguration redisCacheConfiguration() { + FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer<>( + Object.class); + RedisCacheConfiguration configuration = RedisCacheConfiguration.defaultCacheConfig(); + configuration = configuration + .serializeValuesWith( + RedisSerializationContext.SerializationPair.fromSerializer(fastJsonRedisSerializer)) + .entryTtl(Duration.ofDays(7)); + return configuration; + } + + @Bean(name = "redisTemplate") + @ConditionalOnMissingBean(name = "redisTemplate") + public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) { + RedisTemplate template = new RedisTemplate<>(); + //序列化 + FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer<>( + Object.class); + // value值的序列化采用fastJsonRedisSerializer + template.setValueSerializer(fastJsonRedisSerializer); + template.setHashValueSerializer(fastJsonRedisSerializer); + // 全局开启AutoType,这里方便开发,使用全局的方式 + // 设置全局的解析特性 + JSONFactory.getDefaultObjectReaderProvider().addAutoTypeAccept("net.linlan"); + // 建议使用这种方式,小范围指定白名单 + // ParserConfig.getGlobalInstance().addAccept("net.linlan.*.entity"); + // key的序列化采用StringRedisSerializer + template.setKeySerializer(new StringRedisSerializer(String.class, prefix)); + template.setHashKeySerializer(new StringRedisSerializer(String.class, prefix)); + template.setConnectionFactory(redisConnectionFactory); return template; } - /** 解决报错org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' - * @return + /** + * 自定义缓存key生成策略,默认将使用该策略 */ -// @Bean -// public CookieRememberMeManager cookieRememberMeManager() { -// CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager(); -// SimpleCookie simpleCookie = new SimpleCookie("rememberMe"); -// simpleCookie.setMaxAge(259200000); -// cookieRememberMeManager.setCookie(simpleCookie); -// cookieRememberMeManager.setCipherKey(Base64.decode("6ZmI6I2j5Y+R5aSn5ZOlAA==")); -// return cookieRememberMeManager; -// } + @Bean + @Override + public KeyGenerator keyGenerator() { + return (target, method, params) -> { + Map container = new HashMap<>(3); + Class targetClassClass = target.getClass(); + // 类地址 + container.put("class", targetClassClass.toGenericString()); + // 方法名称 + container.put("methodName", method.getName()); + // 包名称 + container.put("package", targetClassClass.getPackage()); + // 参数列表 + for (int i = 0; i < params.length; i++) { + container.put(String.valueOf(i), params[i]); + } + // 转为JSON字符串 + String jsonString = JSON.toJSONString(container); + // 做SHA256 Hash计算,得到一个SHA256摘要作为Key + return DigestUtils.sha256Hex(jsonString); + }; + } + + @Bean + @Override + public CacheErrorHandler errorHandler() { + // 异常处理,当Redis发生异常时,打印日志,但是程序正常走 + log.info("初始化 -> [{}]", "Redis CacheErrorHandler"); + return new CacheErrorHandler() { + @Override + public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { + log.error("Redis occur handleCacheGetError:key -> [{}]", key, e); + } + @Override + public void handleCachePutError(RuntimeException e, Cache cache, Object key, + Object value) { + log.error("Redis occur handleCachePutError:key -> [{}];value -> [{}]", key, value, + e); + } + + @Override + public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { + log.error("Redis occur handleCacheEvictError:key -> [{}]", key, e); + } + + @Override + public void handleCacheClearError(RuntimeException e, Cache cache) { + log.error("Redis occur handleCacheClearError:", e); + } + }; + } + +} + +/** + * Value 序列化 + * + * @param 泛型 + */ +class FastJsonRedisSerializer implements RedisSerializer { + + private final Class clazz; + + FastJsonRedisSerializer(Class clazz) { + super(); + this.clazz = clazz; + } + + @Override + public byte[] serialize(T t) { + if (t == null) { + return new byte[0]; + } + return JSON.toJSONString(t, WriteClassName).getBytes(StandardCharsets.UTF_8); + } + + @Override + public T deserialize(byte[] bytes) { + if (bytes == null || bytes.length <= 0) { + return null; + } + String str = new String(bytes, StandardCharsets.UTF_8); + return JSON.parseObject(str, clazz); + } + +} + +/** + * 重写序列化器 + * @param 泛型 + */ +class StringRedisSerializer implements RedisSerializer { + + private final String prefix; + + private final Charset charset; + + private final Class clazz; + + StringRedisSerializer(Class clazz) { + this(clazz, StandardCharsets.UTF_8, null); + } + + StringRedisSerializer(Class clazz, String prefix) { + this(clazz, StandardCharsets.UTF_8, prefix); + } + + private StringRedisSerializer(Class clazz, Charset charset, String prefix) { + Assert.notNull(charset, "Charset must not be null!"); + this.charset = charset; + this.prefix = StringUtils.isNotBlank(prefix) ? prefix + ":" : ""; + this.clazz = clazz; + } + + @Override + public T deserialize(byte[] bytes) { + String key = (bytes == null ? null : new String(bytes, charset)); + int indexOf = key.indexOf(prefix); + if (indexOf > -1) { + key = key.substring(indexOf); + } + return (T) key; + } + + @Override + public byte[] serialize(T object) { + String string; + if (object instanceof String) { + string = JSON.toJSONString(object); + } else { + string = JSON.toJSONString(object); + } + if (StringUtils.isBlank(string)) { + return null; + } + if (StringUtils.isBlank(prefix)) { + string = string.replace("\"", ""); + } else { + string = string.replace("\"", ""); + if (!string.startsWith(prefix)) { + string = prefix + string; + } + } + return string.getBytes(charset); + } } diff --git a/src/main/java/net/linlan/config/RemoveDruidAdConfig.java b/src/main/java/net/linlan/config/RemoveDruidAdConfig.java index dee5e34fb91ac56ffe7ec526a9af181d5b723cfe..eda05edbba9f1b582b36a75bef71cb82de808ea4 100644 --- a/src/main/java/net/linlan/config/RemoveDruidAdConfig.java +++ b/src/main/java/net/linlan/config/RemoveDruidAdConfig.java @@ -1,8 +1,26 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; -import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; -import com.alibaba.druid.util.Utils; +import java.io.IOException; + +import javax.servlet.*; + import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; @@ -10,9 +28,9 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import javax.servlet.*; -import java.io.IOException; - +import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; +import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; +import com.alibaba.druid.util.Utils; /** * 类名称:RemoveDruidAdConfig @@ -27,7 +45,6 @@ import java.io.IOException; @ConditionalOnProperty(name = "spring.datasource.druid.stat-view-servlet.enabled", havingValue = "true", matchIfMissing = true) public class RemoveDruidAdConfig { - /** * 方法名: removeDruidAdFilterRegistrationBean * 方法描述: 除去页面底部的广告 @@ -52,7 +69,8 @@ public class RemoveDruidAdConfig { } @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, + FilterChain filterChain) throws IOException, ServletException { filterChain.doFilter(servletRequest, servletResponse); // 重置缓冲区,响应头不会被重置 servletResponse.resetBuffer(); @@ -74,4 +92,4 @@ public class RemoveDruidAdConfig { registrationBean.addUrlPatterns(commonJsPattern); return registrationBean; } -} \ No newline at end of file +} diff --git a/src/main/java/net/linlan/config/SecurityConfig.java b/src/main/java/net/linlan/config/SecurityConfig.java index a9c76ffffc85c92dd90fecd225cdefcd6317b34b..d9220247df8c10d1a79b5fdafa7814abe1b52b9c 100644 --- a/src/main/java/net/linlan/config/SecurityConfig.java +++ b/src/main/java/net/linlan/config/SecurityConfig.java @@ -1,9 +1,22 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import net.linlan.config.properties.PermitAllUrlProperties; -import net.linlan.plat.comm.security.filter.JwtAuthenticationTokenFilter; -import net.linlan.plat.comm.security.handle.AuthenticationEntryPointImpl; -import net.linlan.plat.comm.security.handle.LogoutSuccessHandlerImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -21,6 +34,11 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic import org.springframework.security.web.authentication.logout.LogoutFilter; import org.springframework.web.filter.CorsFilter; +import net.linlan.config.properties.PermitAllUrlProperties; +import net.linlan.frame.comm.security.filter.JwtAuthenticationTokenFilter; +import net.linlan.frame.comm.security.handle.AuthenticationEntryPointImpl; +import net.linlan.frame.comm.security.handle.LogoutSuccessHandlerImpl; + /** * spring security配置 * @@ -28,13 +46,12 @@ import org.springframework.web.filter.CorsFilter; */ @EnableMethodSecurity(prePostEnabled = true, securedEnabled = true) @Configuration -public class SecurityConfig -{ +public class SecurityConfig { /** * 自定义用户认证逻辑 */ @Autowired - private UserDetailsService userDetailsService; + private UserDetailsService userDetailsService; /** * 认证失败处理类 @@ -46,7 +63,7 @@ public class SecurityConfig * 退出处理类 */ @Autowired - private LogoutSuccessHandlerImpl logoutSuccessHandler; + private LogoutSuccessHandlerImpl logoutSuccessHandler; /** * token认证过滤器 @@ -58,21 +75,20 @@ public class SecurityConfig * 跨域过滤器 */ @Autowired - private CorsFilter corsFilter; + private CorsFilter corsFilter; /** * 允许匿名访问的地址 */ @Autowired - private PermitAllUrlProperties permitAllUrlProperties; + private PermitAllUrlProperties permitAllUrlProperties; /** * 身份验证实现 * @return 返回身份验证器 */ @Bean - public AuthenticationManager authenticationManager() - { + public AuthenticationManager authenticationManager() { DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider(); daoAuthenticationProvider.setUserDetailsService(userDetailsService); daoAuthenticationProvider.setPasswordEncoder(bCryptPasswordEncoder()); @@ -98,45 +114,53 @@ public class SecurityConfig * @throws Exception 异常错误 */ @Bean - protected SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception - { + protected SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { return httpSecurity - // CSRF禁用,因为不使用session - .csrf(csrf -> csrf.disable()) - // 禁用HTTP响应标头 - .headers((headersCustomizer) -> { - headersCustomizer.cacheControl(cache -> cache.disable()).frameOptions(options -> options.sameOrigin()); - }) - // 认证失败处理类 - .exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler)) - // 基于token,所以不需要session - .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - // 注解标记允许匿名访问的url - // 注解标记允许匿名访问的url - .authorizeHttpRequests((requests) -> { - permitAllUrlProperties.getUrls().forEach(url -> requests.antMatchers(url).permitAll()); - // 对于登录login 注册register 和开放类接口api/open/等 允许匿名访问 - requests - .antMatchers("/getRouters","/getInfo","/login","/thirdOrgan/login","/platLogin", "/api/open/**").permitAll() -// requests.antMatchers("/**").permitAll() - // 静态资源,可匿名访问 - .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() - .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() - // 访问 /magic/web/** 不拦截 - .antMatchers("/rest/web/**").permitAll() - // 访问 /magic-api/** 不拦截 - .antMatchers("/rest-api/**", "/llxm/**").permitAll() - // 除上面外的所有请求全部需要鉴权认证 - .anyRequest().authenticated(); - }) - // 添加Logout filter - .logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler)) - // 添加JWT filter - .addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class) - // 添加CORS filter - .addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class) - .addFilterBefore(corsFilter, LogoutFilter.class) - .build(); + // CSRF禁用,因为不使用session + .csrf(csrf -> csrf.disable()) + // 禁用HTTP响应标头 + .headers((headersCustomizer) -> { + headersCustomizer.cacheControl(cache -> cache.disable()) + .frameOptions(options -> options.sameOrigin()); + }) + // 认证失败处理类 + .exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler)) + // 基于token,所以不需要session + .sessionManagement( + session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + // 注解标记允许匿名访问的url + // 注解标记允许匿名访问的url + .authorizeHttpRequests((requests) -> { + permitAllUrlProperties.getUrls() + .forEach(url -> requests.antMatchers(url).permitAll()); + // 对于登录login 注册register 和开放类接口api/open/等 允许匿名访问 + requests + .antMatchers("/getRouters", "/getInfo", "/login", "/thirdOrgan/login", + "/platLogin", "/api/open/**") + .permitAll() + // requests.antMatchers("/**").permitAll() + // 静态资源,可匿名访问 + .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", + "/**/*.js", "/profile/**") + .permitAll() + .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", + "/*/api-docs", "/druid/**") + .permitAll() + // 访问 /magic/web/** 不拦截 + .antMatchers("/rest/web/**").permitAll() + // 访问 /magic-api/** 不拦截 + .antMatchers("/rest-api/**", "/llxm/**").permitAll() + // 除上面外的所有请求全部需要鉴权认证 + .anyRequest().authenticated(); + }) + // 添加Logout filter + .logout( + logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler)) + // 添加JWT filter + .addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class) + // 添加CORS filter + .addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class) + .addFilterBefore(corsFilter, LogoutFilter.class).build(); } /** @@ -144,8 +168,7 @@ public class SecurityConfig * @return 返回强散列哈希加密实现 */ @Bean - public BCryptPasswordEncoder bCryptPasswordEncoder() - { + public BCryptPasswordEncoder bCryptPasswordEncoder() { return new BCryptPasswordEncoder(); } } diff --git a/src/main/java/net/linlan/config/ThreadPoolConfig.java b/src/main/java/net/linlan/config/ThreadPoolConfig.java index 89da5b4094d039627c963b09fcfb01e98bf8236b..66a09bf013a5c678a76d8524fe2f8f178961c5e5 100644 --- a/src/main/java/net/linlan/config/ThreadPoolConfig.java +++ b/src/main/java/net/linlan/config/ThreadPoolConfig.java @@ -1,14 +1,32 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config; -import net.linlan.commons.core.concurrent.BasicThreadFactory; -import net.linlan.utils.Threads; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.ThreadPoolExecutor; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.ThreadPoolExecutor; +import net.linlan.commons.core.concurrent.BasicThreadFactory; +import net.linlan.utils.Threads; /** * 线程池配置 @@ -16,23 +34,21 @@ import java.util.concurrent.ThreadPoolExecutor; * @author Linlan **/ @Configuration -public class ThreadPoolConfig -{ +public class ThreadPoolConfig { // 核心线程池大小 - private int corePoolSize = 50; + private int corePoolSize = 50; // 最大可创建的线程数 - private int maxPoolSize = 200; + private int maxPoolSize = 200; // 队列最大长度 - private int queueCapacity = 1000; + private int queueCapacity = 1000; // 线程池维护线程所允许的空闲时间 private int keepAliveSeconds = 300; @Bean(name = "threadPoolTaskExecutor") - public ThreadPoolTaskExecutor threadPoolTaskExecutor() - { + public ThreadPoolTaskExecutor threadPoolTaskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setMaxPoolSize(maxPoolSize); executor.setCorePoolSize(corePoolSize); @@ -48,15 +64,12 @@ public class ThreadPoolConfig * @return 执行周期服务 */ @Bean(name = "scheduledExecutorService") - protected ScheduledExecutorService scheduledExecutorService() - { + protected ScheduledExecutorService scheduledExecutorService() { return new ScheduledThreadPoolExecutor(corePoolSize, - new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(), - new ThreadPoolExecutor.CallerRunsPolicy()) - { + new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(), + new ThreadPoolExecutor.CallerRunsPolicy()) { @Override - protected void afterExecute(Runnable r, Throwable t) - { + protected void afterExecute(Runnable r, Throwable t) { super.afterExecute(r, t); Threads.printException(r, t); } diff --git a/src/main/java/net/linlan/config/properties/PermitAllUrlProperties.java b/src/main/java/net/linlan/config/properties/PermitAllUrlProperties.java index b01b77da38d31acb30fabc9a353b470146e76602..e44a77c5597135e0983d991be10a9d1b0e7bf024 100644 --- a/src/main/java/net/linlan/config/properties/PermitAllUrlProperties.java +++ b/src/main/java/net/linlan/config/properties/PermitAllUrlProperties.java @@ -1,8 +1,25 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.config.properties; -import net.linlan.annotation.AuthIgnore; -import lombok.extern.slf4j.Slf4j; -import net.linlan.commons.script.regex.RegexUtils; +import java.util.*; +import java.util.regex.Pattern; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContext; @@ -13,8 +30,10 @@ import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.mvc.method.RequestMappingInfo; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; -import java.util.*; -import java.util.regex.Pattern; +import lombok.extern.slf4j.Slf4j; + +import net.linlan.annotation.AuthIgnore; +import net.linlan.commons.script.regex.RegexUtils; /** * 设置Anonymous注解允许匿名访问的url @@ -25,74 +44,72 @@ import java.util.regex.Pattern; */ @Slf4j @Configuration -public class PermitAllUrlProperties implements InitializingBean, ApplicationContextAware -{ - private static final Pattern PATTERN = Pattern.compile("\\{(.*?)\\}"); +public class PermitAllUrlProperties implements InitializingBean, ApplicationContextAware { + private static final Pattern PATTERN = Pattern.compile("\\{(.*?)\\}"); - private ApplicationContext applicationContext; + private ApplicationContext applicationContext; - private List urls = new ArrayList<>(); + private List urls = new ArrayList<>(); - public String ASTERISK = "*"; + public String ASTERISK = "*"; @Override - public void afterPropertiesSet() - { - RequestMappingHandlerMapping mapping = applicationContext.getBean(RequestMappingHandlerMapping.class); + public void afterPropertiesSet() { + RequestMappingHandlerMapping mapping = applicationContext + .getBean(RequestMappingHandlerMapping.class); Map map = mapping.getHandlerMethods(); map.keySet().forEach(info -> { HandlerMethod handlerMethod = map.get(info); // 获取类上边的注解, 替代path variable 为 * - AuthIgnore controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), AuthIgnore.class); - Optional.ofNullable(controller).ifPresent(api -> - Objects.requireNonNull(info.getPathPatternsCondition()).getPatterns() - .forEach(url -> urls.add(RegexUtils.replaceAll(PATTERN, url.getPatternString(), ASTERISK))) - ); + AuthIgnore controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), + AuthIgnore.class); + Optional.ofNullable(controller) + .ifPresent(api -> Objects.requireNonNull(info.getPathPatternsCondition()) + .getPatterns().forEach(url -> urls + .add(RegexUtils.replaceAll(PATTERN, url.getPatternString(), ASTERISK)))); // 获取方法上边的注解 替代path variable 为 * - AuthIgnore method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), AuthIgnore.class); - Optional.ofNullable(method).ifPresent(apiMethod -> - Objects.requireNonNull(info.getPathPatternsCondition()).getPatterns() - .forEach(url -> urls.add(RegexUtils.replaceAll(PATTERN, url.getPatternString(), ASTERISK))) - ); + AuthIgnore method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), + AuthIgnore.class); + Optional.ofNullable(method) + .ifPresent(apiMethod -> Objects.requireNonNull(info.getPathPatternsCondition()) + .getPatterns().forEach(url -> urls + .add(RegexUtils.replaceAll(PATTERN, url.getPatternString(), ASTERISK)))); }); - + //Lamda表达式和传统代码的验证 -// for (RequestMappingInfo info : map.keySet()) -// { -// HandlerMethod handlerMethod = map.get(info); -// AuthIgnore controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), AuthIgnore.class); -// if (ObjectUtils.isNotEmpty(controller)) -// { -// if (ObjectUtils.isNotEmpty(info)) -// { -// PathPatternsRequestCondition patternsRequestCondition = info.getPathPatternsCondition(); -// if (ObjectUtils.isNotEmpty(patternsRequestCondition)) -// { -// Set urlSet = patternsRequestCondition.getPatterns(); -// if (ObjectUtils.isNotEmpty(urlSet)) -// { -// urlSet.forEach(url -> urls.add(RegexUtils.replaceAll(PATTERN, url.getPatternString(), ASTERISK))); -// } -// } -// } -// } -// } + // for (RequestMappingInfo info : map.keySet()) + // { + // HandlerMethod handlerMethod = map.get(info); + // AuthIgnore controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), AuthIgnore.class); + // if (ObjectUtils.isNotEmpty(controller)) + // { + // if (ObjectUtils.isNotEmpty(info)) + // { + // PathPatternsRequestCondition patternsRequestCondition = info.getPathPatternsCondition(); + // if (ObjectUtils.isNotEmpty(patternsRequestCondition)) + // { + // Set urlSet = patternsRequestCondition.getPatterns(); + // if (ObjectUtils.isNotEmpty(urlSet)) + // { + // urlSet.forEach(url -> urls.add(RegexUtils.replaceAll(PATTERN, url.getPatternString(), ASTERISK))); + // } + // } + // } + // } + // } } @Override - public void setApplicationContext(ApplicationContext context) throws BeansException - { + public void setApplicationContext(ApplicationContext context) throws BeansException { this.applicationContext = context; } - public List getUrls() - { + public List getUrls() { return urls; } - public void setUrls(List urls) - { + public void setUrls(List urls) { this.urls = urls; } } diff --git a/src/main/java/net/linlan/plat/comm/manager/AsyncManager.java b/src/main/java/net/linlan/plat/comm/manager/AsyncManager.java deleted file mode 100644 index 139a24f01b2f08cbd37f7db51b89e2615c1a3502..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/manager/AsyncManager.java +++ /dev/null @@ -1,56 +0,0 @@ -package net.linlan.plat.comm.manager; - -import net.linlan.utils.SpringContextUtils; -import net.linlan.utils.Threads; - -import java.util.TimerTask; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -/** - * 异步任务管理器 - * - * @author shuxiaobo - */ -public class AsyncManager -{ - /** - * 操作延迟10毫秒 - */ - private final int OPERATE_DELAY_TIME = 10; - - /** - * 异步操作任务调度线程池 - */ - private ScheduledExecutorService executor = SpringContextUtils.getBean("scheduledExecutorService"); - - /** - * 单例模式 - */ - private AsyncManager(){} - - private static AsyncManager me = new AsyncManager(); - - public static AsyncManager me() - { - return me; - } - - /** - * 执行任务 - * - * @param task 任务 - */ - public void execute(TimerTask task) - { - executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); - } - - /** - * 停止任务线程池 - */ - public void shutdown() - { - Threads.shutdownAndAwaitTermination(executor); - } -} diff --git a/src/main/java/net/linlan/plat/comm/manager/factory/AsyncFactory.java b/src/main/java/net/linlan/plat/comm/manager/factory/AsyncFactory.java deleted file mode 100644 index bbf166c63ee4e137b0f1adb2d8407581804a281e..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/manager/factory/AsyncFactory.java +++ /dev/null @@ -1,93 +0,0 @@ -package net.linlan.plat.comm.manager.factory; - -import net.linlan.utils.ip.IPAddressUtils; -import net.linlan.utils.ip.IPUtils; -import net.linlan.utils.SpringContextUtils; -import net.linlan.man.admin.entity.AdminLoginLog; -import net.linlan.man.admin.service.AdminLoginLogService; -import net.linlan.commons.core.StringUtils; -import net.linlan.utils.LogUtils; -import net.linlan.utils.ServletUtils; -import net.linlan.utils.constant.Constants; -import eu.bitwalker.useragentutils.UserAgent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.TimerTask; - -/** - * 异步工厂(产生任务用) - * - * @author shuxiaobo - */ -public class AsyncFactory -{ - private static final Logger LOGGER = LoggerFactory.getLogger("admin-user"); - - /** - * 记录登录信息 - * - * @param adminId 用户Lid - * @param username 用户名 - * @param status 状态 - * @param message 消息 - * @param args 列表 - * @return 任务task - */ - public static TimerTask saveAdminLoginLog(final Long adminId, final String username, - final String status, final String message, - final Object... args) - { - final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); - final String ip = IPUtils.getIpAddr(ServletUtils.getRequest()); - final String url = ServletUtils.getRequest().getRequestURI(); - return new TimerTask() - { - @Override - public void run() - { - String address = IPAddressUtils.getRealAddressByIP(ip); - StringBuilder s = new StringBuilder(); - s.append("IP:" + LogUtils.getBlock(ip)); - s.append("ADDRESS:" + LogUtils.getBlock(address)); - s.append("USERNAME:" + LogUtils.getBlock(username)); - s.append("STATUS:" + LogUtils.getBlock(status)); - s.append("MESSAGE:" + LogUtils.getBlock(message)); - // 打印信息到日志 - LOGGER.info(s.toString(), args); - // 获取客户端操作系统 - String os = userAgent.getOperatingSystem().getName(); - // 获取客户端浏览器 - String browser = userAgent.getBrowser().getName(); - // 封装对象 - AdminLoginLog adminLoginLog = new AdminLoginLog(); - adminLoginLog.setAdminId(adminId); - adminLoginLog.setUserId(username); - adminLoginLog.setLogIp(ip); - adminLoginLog.setLogBrowse(browser); - adminLoginLog.setLogOs(os); - adminLoginLog.setTitle(message); - // 日志状态 - if (StringUtils.equalsAny(status, Constants.LOGIN_SUCCESS)) - { - adminLoginLog.setStatus(Constants.SUCCESS); - adminLoginLog.setCategory(1); - }else if (StringUtils.equalsAny(status, Constants.LOGOUT)) - { - adminLoginLog.setStatus(Constants.SUCCESS); - adminLoginLog.setCategory(2); - } - if (Constants.LOGIN_FAIL.equals(status)) - { - adminLoginLog.setStatus(Constants.FAIL); - adminLoginLog.setCategory(1); - } - adminLoginLog.setLogUrl(url); - adminLoginLog.setContent(s.toString()); - // 插入数据 - SpringContextUtils.getBean(AdminLoginLogService.class).save(adminLoginLog); - } - }; - } - -} diff --git a/src/main/java/net/linlan/plat/comm/security/UserDetailsServiceImpl.java b/src/main/java/net/linlan/plat/comm/security/UserDetailsServiceImpl.java deleted file mode 100644 index 8f0901d5d3f20307caf39b3bcfa406d1f1fffd13..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/security/UserDetailsServiceImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package net.linlan.plat.comm.security; - -import net.linlan.commons.core.ObjectUtils; -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.admin.service.AdminUserService; -import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.service.SysPasswordService; -import net.linlan.plat.comm.service.SysPermissionService; -import net.linlan.utils.MessageUtils; -import net.linlan.utils.enums.UserStatus; -import net.linlan.utils.exception.CommonException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; - -/** - * 用户验证处理 - * - * @author Linlan - */ -@Service -public class UserDetailsServiceImpl implements UserDetailsService -{ - private static final Logger log = LoggerFactory.getLogger(UserDetailsServiceImpl.class); - - @Autowired - private AdminUserService adminUserService; - - @Autowired - private SysPasswordService passwordService; - - @Autowired - private SysPermissionService permissionService; - - @Override - public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException - { - AdminUserDto user = adminUserService.selectUserByUsername(username); - if (ObjectUtils.isEmpty(user)) - { - log.info("登录用户:{} 不存在.", username); - throw new CommonException(MessageUtils.message("user.not.exists")); - } - else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) - { - log.info("登录用户:{} 已被删除.", username); - throw new CommonException(MessageUtils.message("user.password.delete")); - } - else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) - { - log.info("登录用户:{} 已被停用.", username); - throw new CommonException(MessageUtils.message("user.blocked")); - } - - passwordService.validate(user); - - return createLoginUser(user); - } - - public UserDetails createLoginUser(AdminUserDto user) - { - return new FrameAdminUser(user.getId(), user.getDeptId(), user.getUsername(), user.getPassword(), user.getLastAppId(), permissionService.getMenuPermission(user)); - } -} diff --git a/src/main/java/net/linlan/plat/comm/security/context/AuthenticationContextHolder.java b/src/main/java/net/linlan/plat/comm/security/context/AuthenticationContextHolder.java deleted file mode 100644 index ae57ffe2bfa4fdcd1bfcf8bba9fa6db40acc67c9..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/security/context/AuthenticationContextHolder.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.linlan.plat.comm.security.context; - -import org.springframework.security.core.Authentication; - -/** - * 身份验证信息 - * - * @author Linlan - */ -public class AuthenticationContextHolder -{ - private static final ThreadLocal contextHolder = new ThreadLocal<>(); - - public static Authentication getContext() - { - return contextHolder.get(); - } - - public static void setContext(Authentication context) - { - contextHolder.set(context); - } - - public static void clearContext() - { - contextHolder.remove(); - } -} diff --git a/src/main/java/net/linlan/plat/comm/security/context/PermissionContextHolder.java b/src/main/java/net/linlan/plat/comm/security/context/PermissionContextHolder.java deleted file mode 100644 index 207fed3f24b28366bc9418eb7863a639ae09134b..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/security/context/PermissionContextHolder.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.linlan.plat.comm.security.context; - -import net.linlan.utils.text.Convert; -import org.springframework.web.context.request.RequestAttributes; -import org.springframework.web.context.request.RequestContextHolder; - -/** - * 权限信息 - * - * @author Linlan - */ -public class PermissionContextHolder -{ - private static final String PERMISSION_CONTEXT_ATTRIBUTES = "PERMISSION_CONTEXT"; - - public static void setContext(String permission) - { - RequestContextHolder.currentRequestAttributes().setAttribute(PERMISSION_CONTEXT_ATTRIBUTES, permission, - RequestAttributes.SCOPE_REQUEST); - } - - public static String getContext() - { - return Convert.toStr(RequestContextHolder.currentRequestAttributes().getAttribute(PERMISSION_CONTEXT_ATTRIBUTES, - RequestAttributes.SCOPE_REQUEST)); - } -} diff --git a/src/main/java/net/linlan/plat/comm/security/filter/JwtAuthenticationTokenFilter.java b/src/main/java/net/linlan/plat/comm/security/filter/JwtAuthenticationTokenFilter.java deleted file mode 100644 index edf662d7e854111bcafb46c3063098ddee955794..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/security/filter/JwtAuthenticationTokenFilter.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.linlan.plat.comm.security.filter; - -import net.linlan.commons.core.ObjectUtils; -import net.linlan.man.web.SecurityUtils; -import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.service.TokenService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; -import org.springframework.stereotype.Component; -import org.springframework.web.filter.OncePerRequestFilter; - -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * token过滤器 验证token有效性 - * - * @author Linlan - */ -@Component -public class JwtAuthenticationTokenFilter extends OncePerRequestFilter -{ - @Autowired - private TokenService tokenService; - - @Override - protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) - throws ServletException, IOException - { - FrameAdminUser loginUser = tokenService.getLoginUser(request); - if (ObjectUtils.isNotEmpty(loginUser) && ObjectUtils.isEmpty(SecurityUtils.getAuthentication())) - { - tokenService.verifyToken(loginUser); - UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginUser, null, loginUser.getAuthorities()); - authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); - SecurityContextHolder.getContext().setAuthentication(authenticationToken); - } - chain.doFilter(request, response); - } -} diff --git a/src/main/java/net/linlan/plat/comm/security/handle/AuthenticationEntryPointImpl.java b/src/main/java/net/linlan/plat/comm/security/handle/AuthenticationEntryPointImpl.java deleted file mode 100644 index 2d7e81e497670c805e6169d888e3891026e69861..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/security/handle/AuthenticationEntryPointImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.linlan.plat.comm.security.handle; - -import com.alibaba.fastjson.JSON; -import net.linlan.commons.core.ResponseResult; -import net.linlan.commons.core.StringUtils; -import net.linlan.utils.ServletUtils; -import net.linlan.utils.http.HttpStatus; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.AuthenticationEntryPoint; -import org.springframework.stereotype.Component; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.Serializable; - -/** - * 认证失败处理类 返回未授权 - * - * @author Linlan - */ -@Component -public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable -{ - private static final long serialVersionUID = -8970718410437077606L; - - @Override - public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) - throws IOException - { - int code = HttpStatus.UNAUTHORIZED; - String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI()); - ServletUtils.renderString(response, JSON.toJSONString(ResponseResult.error(code+"", msg))); - } -} diff --git a/src/main/java/net/linlan/plat/comm/security/handle/LogoutSuccessHandlerImpl.java b/src/main/java/net/linlan/plat/comm/security/handle/LogoutSuccessHandlerImpl.java deleted file mode 100644 index 41d29bc817dd9aad257e7ccffe3f1a7871da996e..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/security/handle/LogoutSuccessHandlerImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package net.linlan.plat.comm.security.handle; - -import com.alibaba.fastjson.JSON; -import net.linlan.commons.core.ObjectUtils; -import net.linlan.commons.core.ResponseResult; -import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.manager.AsyncManager; -import net.linlan.plat.comm.manager.factory.AsyncFactory; -import net.linlan.plat.comm.service.TokenService; -import net.linlan.utils.MessageUtils; -import net.linlan.utils.ServletUtils; -import net.linlan.utils.constant.Constants; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.core.Authentication; -import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * 自定义退出处理类 返回成功 - * - * @author Linlan - */ -@Configuration -public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler -{ - @Autowired - private TokenService tokenService; - - /** - * 退出处理 - * @param request 请求 - * @param response 响应 - * @param authentication 权限验证 - */ - @Override - public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) - throws IOException, ServletException - { - FrameAdminUser loginUser = tokenService.getLoginUser(request); - if (ObjectUtils.isNotEmpty(loginUser)) - { - String username = loginUser.getUsername(); - // 删除用户缓存记录 - tokenService.delLoginUser(loginUser.getToken()); - // 记录用户退出日志 - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(loginUser.getAdminId(), username, Constants.LOGOUT, MessageUtils.message("user.logout.success"), loginUser.getAppId())); - } - ServletUtils.renderString(response, JSON.toJSONString(ResponseResult.ok(MessageUtils.message("user.logout.success")))); - } -} diff --git a/src/main/java/net/linlan/plat/comm/service/AdminLoginService.java b/src/main/java/net/linlan/plat/comm/service/AdminLoginService.java deleted file mode 100644 index 5e8e47655a45884edc7573a686f0189e56d9a468..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/AdminLoginService.java +++ /dev/null @@ -1,312 +0,0 @@ -package net.linlan.plat.comm.service; - -import net.linlan.commons.core.ObjectUtils; -import net.linlan.commons.core.StringUtils; -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.admin.entity.AdminUser; -import net.linlan.man.admin.service.AdminUserService; -import net.linlan.man.admin.service.EntConfigService; -import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.manager.AsyncManager; -import net.linlan.plat.comm.manager.factory.AsyncFactory; -import net.linlan.plat.comm.security.UserDetailsServiceImpl; -import net.linlan.plat.comm.security.context.AuthenticationContextHolder; -import net.linlan.plat.comm.vo.AppLoginInfo; -import net.linlan.sys.web.KernelConstant; -import net.linlan.sys.web.RedisService; -import net.linlan.utils.ip.IPUtils; -import net.linlan.utils.MessageUtils; -import net.linlan.utils.ServletUtils; -import net.linlan.utils.constant.CacheConstants; -import net.linlan.utils.constant.Constants; -import net.linlan.utils.constant.UserConstants; -import net.linlan.utils.enums.UserStatus; -import net.linlan.utils.exception.CommonException; -import net.linlan.utils.exception.user.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; -import java.util.Date; - -/** - * 登录校验方法 - * - * @author Linlan - */ -@Component -public class AdminLoginService -{ - @Autowired - private TokenService tokenService; - - @Resource - private AuthenticationManager authenticationManager; - - @Autowired - private RedisService redisService; - - @Autowired - private AdminUserService adminUserService; - - @Autowired - private EntConfigService entConfigService; - @Autowired - private SysPasswordService passwordService; - @Autowired - private UserDetailsServiceImpl userDetailsServiceImpl; - - /** - * 登录验证 - * - * @param username 用户名 - * @param password 密码 - * @param code 验证码 - * @param uuid 唯一标识 - * @param appId 应用ID - * @return 结果 - */ - public AppLoginInfo login(String username, String password, String code, String uuid, String appId) - { -// 验证码校验 - validateCaptcha(username, code, uuid, appId); - // 登录前置校验 - loginPreCheck(username, password, appId); - // 用户验证 - Authentication authentication = null; - try - { - UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password); - AuthenticationContextHolder.setContext(authenticationToken); - // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername - authentication = authenticationManager.authenticate(authenticationToken); - } - catch (Exception e) - { - if (e instanceof BadCredentialsException) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), appId)); - throw new UserPasswordNotMatchException(); - } - else - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, e.getMessage(), appId)); - throw new CommonException(e.getMessage()); - } - } - finally - { - AuthenticationContextHolder.clearContext(); - } - FrameAdminUser loginUser = (FrameAdminUser) authentication.getPrincipal(); - recordLoginInfo(loginUser.getAdminId()); - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(loginUser.getAdminId(), username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), loginUser.getAppId())); - // 生成token - return tokenService.createToken(loginUser); - } - - - /** - * 服务商登录 - * - * @param username 用户名 - * @param password 密码 - * @param code 验证码 - * @param uuid 唯一标识 - * @param appId 应用ID - * @return 结果 - */ - public AppLoginInfo thirdUserlogin(String username, String password, String code, String uuid, String appId) - { - // 验证码校验 - // 登录前置校验 - loginPreCheck(username, password, appId); - // 用户验证 - Authentication authentication = null; - try - { - UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password); - AuthenticationContextHolder.setContext(authenticationToken); - // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername - authentication = authenticationManager.authenticate(authenticationToken); - } - catch (Exception e) - { - if (e instanceof BadCredentialsException) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), appId)); - throw new UserPasswordNotMatchException(); - } - else - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, e.getMessage(), appId)); - throw new CommonException(e.getMessage()); - } - } - finally - { - AuthenticationContextHolder.clearContext(); - } - FrameAdminUser loginUser = (FrameAdminUser) authentication.getPrincipal(); - recordLoginInfo(loginUser.getAdminId()); - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(loginUser.getAdminId(), username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), loginUser.getAppId())); - // 生成token - return tokenService.createToken(loginUser); - } - - /** - * 第三方验证后,调用登录方法 - * @param username 用户名 - * @param password 密码 - * @param appId 应用ID - * @return 登录对象 - */ - public AppLoginInfo socialLogin(String username, String password, String appId){ - // 用户验证 - Authentication authentication = null; - try - { - // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername - authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(username, password)); - } - catch (Exception e) - { - if (e instanceof BadCredentialsException) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), appId)); - throw new UserPasswordNotMatchException(); - } - else - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, e.getMessage(), appId)); - throw new CommonException(e.getMessage()); - } - } - FrameAdminUser loginUser = (FrameAdminUser) authentication.getPrincipal(); - recordLoginInfo(loginUser.getAdminId()); - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), loginUser.getAppId())); - // 生成token - return tokenService.createToken(loginUser); - } - - /** - * 三方跳转登录认证方法 - * @param username 系统用户名 - * @param encodePwd 系统用户密码 - * @param appId 应用ID - * @return 登录对象 - */ - public AppLoginInfo redirectLogin(String username, String encodePwd, String appId) - { - AdminUserDto user = adminUserService.selectUserByUsername(username); - -// UserDetails userDetails=userDetailsServiceImpl.loadUserByUsername(username); - if (ObjectUtils.isEmpty(user)) - { - throw new CommonException("登录用户:" + username + " 不存在"); - } - else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) - { - throw new CommonException("对不起,您的账号:" + username + " 已被删除"); - } - else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) - { - throw new CommonException("对不起,您的账号:" + username + " 已停用"); - } - // 重写验证方法 - passwordService.socialValidate(user, encodePwd, appId); - UserDetails userDetails = userDetailsServiceImpl.createLoginUser(user); - FrameAdminUser loginUser = (FrameAdminUser) userDetails; - recordLoginInfo(loginUser.getAdminId()); - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), loginUser.getAppId())); - // 生成token - return tokenService.createToken(loginUser); - - } - - - /** - * 校验验证码 - * - * @param username 用户名 - * @param code 验证码 - * @param uuid 唯一标识 - * @param appId 应用ID - */ - public void validateCaptcha(String username, String code, String uuid, String appId) - { - boolean captchaEnabled = entConfigService.selectCaptchaEnabled(); - if (captchaEnabled) - { - String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, ""); - String captcha = redisService.get(verifyKey); - if (captcha == null) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), appId)); - throw new CaptchaExpireException(); - } - redisService.delete(verifyKey); - if (!code.equalsIgnoreCase(captcha)) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), appId)); - throw new CaptchaException(); - } - } - } - - /** - * 登录前置校验 - * @param username 用户名 - * @param password 用户密码 - * @param appId 应用ID - */ - public void loginPreCheck(String username, String password, String appId) - { - // 用户名或密码为空 错误 - if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("not.null"), appId)); - throw new UserNotExistsException(); - } - // 密码如果不在指定范围内 错误 - if (password.length() < UserConstants.PASSWORD_MIN_LENGTH - || password.length() > UserConstants.PASSWORD_MAX_LENGTH) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), appId)); - throw new UserPasswordNotMatchException(); - } - // 用户名不在指定范围内 错误 - if (username.length() < UserConstants.USERNAME_MIN_LENGTH - || username.length() > UserConstants.USERNAME_MAX_LENGTH) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), appId)); - throw new UserPasswordNotMatchException(); - } - // IP黑名单校验 - String blackStr = entConfigService.selectConfigByKey("sys.login.blackIPList"); - if (IPUtils.isMatchedIp(blackStr, IPUtils.getIpAddr(ServletUtils.getRequest()))) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("login.blocked"), appId)); - throw new BlackListException(); - } - } - - /** - * 记录登录信息 - * - * @param adminId 用户LID - */ - public void recordLoginInfo(Long adminId) - { - AdminUser adminUser = new AdminUser(); - adminUser.setId(adminId); - adminUser.setLastLoginIp(IPUtils.getIpAddr(ServletUtils.getRequest())); - adminUser.setLastLoginTime(new Date()); - adminUserService.update(adminUser); - } -} diff --git a/src/main/java/net/linlan/plat/comm/service/AuthService.java b/src/main/java/net/linlan/plat/comm/service/AuthService.java deleted file mode 100644 index 5b5593fd60d66973f09111e272d9ac02e3cf6072..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/AuthService.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.linlan.plat.comm.service; - -import net.linlan.frame.FramePubUser; -import net.linlan.frame.FrameToken; - -/** - * - * Filename:AuthService.java - * Desc: Auth授权相关接口 - * - * @author Linlan - * CreateTime:2017/8/14 18:41 - * - * @version 1.0 - * @since 1.0 - * - */ -public interface AuthService { - - /** 通过token取出FrameToken对象 - * @param token input token - * @return token对象 - */ - FrameToken getByToken(String token); - - /** 通过用户ID获取工作人员基本对象,对象包含市民的16个字段和工作权限12个字段 - * @param memberId 会员ID - * @return {@link FramePubUser} - */ - FramePubUser getWorkerByMemberId(Long memberId); - -} diff --git a/src/main/java/net/linlan/plat/comm/service/PermissionService.java b/src/main/java/net/linlan/plat/comm/service/PermissionService.java deleted file mode 100644 index ed6e74be74d3586ef44639a5687b4fddcf9487c6..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/PermissionService.java +++ /dev/null @@ -1,94 +0,0 @@ -package net.linlan.plat.comm.service; - -import net.linlan.commons.core.ObjectUtils; -import net.linlan.commons.core.StringUtils; -import net.linlan.man.web.SecurityUtils; -import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.security.context.PermissionContextHolder; -import net.linlan.utils.constant.Constants; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import java.util.Set; - -/** - * JavaEnt首创 自定义权限实现,ss取自SpringSecurity首字母 - * - * @author Linlan - */ -@Service("ss") -public class PermissionService -{ - /** - * 验证用户是否具备某权限 - * - * @param permission 权限字符串 - * @return 用户是否具备某权限 - */ - public boolean hasPerms(String permission) - { - if (StringUtils.isEmpty(permission)) - { - return false; - } - FrameAdminUser loginUser = SecurityUtils.getLoginUser(); - if (ObjectUtils.isEmpty(loginUser) || CollectionUtils.isEmpty(loginUser.getPerms())) - { - return false; - } - PermissionContextHolder.setContext(permission); - return hasPermissions(loginUser.getPerms(), permission); - } - - /** - * 验证用户是否不具备某权限,与 hasPermi逻辑相反 - * - * @param permission 权限字符串 - * @return 用户是否不具备某权限 - */ - public boolean lacksPerms(String permission) - { - return hasPerms(permission) != true; - } - - /** - * 验证用户是否具有以下任意一个权限 - * - * @param permissions 以 PERMISSION_DELIMETER 为分隔符的权限列表 - * @return 用户是否具有以下任意一个权限 - */ - public boolean hasAnyPerms(String permissions) - { - if (StringUtils.isEmpty(permissions)) - { - return false; - } - FrameAdminUser loginUser = SecurityUtils.getLoginUser(); - if (ObjectUtils.isEmpty(loginUser) || CollectionUtils.isEmpty(loginUser.getPerms())) - { - return false; - } - PermissionContextHolder.setContext(permissions); - Set authorities = loginUser.getPerms(); - for (String permission : permissions.split(Constants.PERMISSION_DELIMETER)) - { - if (permission != null && hasPermissions(authorities, permission)) - { - return true; - } - } - return false; - } - - /** - * 判断是否包含权限 - * - * @param permissions 权限列表 - * @param permission 权限字符串 - * @return 用户是否具备某权限 - */ - private boolean hasPermissions(Set permissions, String permission) - { - return permissions.contains(Constants.ALL_PERMISSION) || permissions.contains(StringUtils.trim(permission)); - } -} diff --git a/src/main/java/net/linlan/plat/comm/service/SysPasswordService.java b/src/main/java/net/linlan/plat/comm/service/SysPasswordService.java deleted file mode 100644 index 882b7e594048c30e890bdf71dde2bb13c928b85a..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/SysPasswordService.java +++ /dev/null @@ -1,122 +0,0 @@ -package net.linlan.plat.comm.service; - -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.web.SecurityUtils; -import net.linlan.plat.comm.manager.AsyncManager; -import net.linlan.plat.comm.manager.factory.AsyncFactory; -import net.linlan.plat.comm.security.context.AuthenticationContextHolder; -import net.linlan.sys.web.KernelConstant; -import net.linlan.sys.web.RedisService; -import net.linlan.utils.MessageUtils; -import net.linlan.utils.constant.CacheConstants; -import net.linlan.utils.constant.Constants; -import net.linlan.utils.exception.user.UserPasswordNotMatchException; -import net.linlan.utils.exception.user.UserPasswordRetryLimitExceedException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.security.core.Authentication; -import org.springframework.stereotype.Component; - -/** - * 登录密码方法 - * - * @author Linlan - */ -@Component -public class SysPasswordService -{ - @Autowired - private RedisService redisService; - - @Value("${platform.user.password.maxRetryCount}") - private int maxRetryCount; - - @Value("${platform.user.password.lockTime}") - private int lockTime; - - /** - * 登录账户密码错误次数缓存键名 - * - * @param username 用户名 - * @return 缓存键key - */ - private String getCacheKey(String username) - { - return CacheConstants.PWD_ERR_CNT_KEY + username; - } - - public void validate(AdminUserDto user) - { - Authentication usernamePasswordAuthenticationToken = AuthenticationContextHolder.getContext(); - String username = usernamePasswordAuthenticationToken.getName(); - String password = usernamePasswordAuthenticationToken.getCredentials().toString(); - - Integer retryCount = redisService.get(getCacheKey(username), Integer.class); - - if (retryCount == null) - { - retryCount = 0; - } - - if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) - { - throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime); - } - - if (!matches(user, password)) - { - retryCount = retryCount + 1; - redisService.set(getCacheKey(username), retryCount, lockTime * 60); - throw new UserPasswordNotMatchException(); - } - else - { - clearLoginRecordCache(username); - } - } - - public void socialValidate(AdminUserDto user, String encodePwd, String appId) - { - String username = user.getUsername(); - String password = user.getPassword(); - - Integer retryCount = redisService.get(getCacheKey(username), Integer.class); - - if (retryCount == null) - { - retryCount = 0; - } - - if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, - MessageUtils.message("user.password.retry.limit.exceed", maxRetryCount, lockTime), appId)); - throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime); - } - - if(!password.equals(encodePwd)){ - retryCount = retryCount + 1; - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, - MessageUtils.message("user.password.retry.limit.count", retryCount), appId)); - redisService.set(getCacheKey(username), retryCount, lockTime*60); - throw new UserPasswordNotMatchException(); - } - else - { - clearLoginRecordCache(username); - } - } - - public boolean matches(AdminUserDto user, String rawPassword) - { - return SecurityUtils.matchesPassword(rawPassword, user.getPassword()); - } - - public void clearLoginRecordCache(String loginName) - { - if (redisService.hasKey(getCacheKey(loginName))) - { - redisService.delete(getCacheKey(loginName)); - } - } -} diff --git a/src/main/java/net/linlan/plat/comm/service/SysPermissionService.java b/src/main/java/net/linlan/plat/comm/service/SysPermissionService.java deleted file mode 100644 index af5eefa26d1b352b63526fe6035c7d631669c4af..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/SysPermissionService.java +++ /dev/null @@ -1,89 +0,0 @@ -package net.linlan.plat.comm.service; - -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.admin.service.AdminMenuEntService; -import net.linlan.man.admin.service.AdminRoleEntService; -import net.linlan.sys.role.entity.SysRole; -import net.linlan.sys.web.KernelConstant; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * 用户权限处理 - * - * @author Linlan - */ -@Component -public class SysPermissionService -{ - @Autowired - private AdminRoleEntService sysRoleService; - - @Autowired - private AdminMenuEntService sysMenuService; - - /** - * 获取角色数据权限 - * - * @param user 用户信息 - * @return 角色权限信息 - */ - public Set getRolePermission(AdminUserDto user) - { - Set roles = new HashSet(); - // 管理员拥有所有权限 - if (user.isAdmin()) - { - roles.add("admin"); - } - else - { - roles.addAll(sysRoleService.selectRoleCodeByAdminId(user.getId())); - } - return roles; - } - - /** - * 获取菜单数据权限 - * - * @param user 用户信息 - * @return 菜单权限信息 - */ - public Set getMenuPermission(AdminUserDto user) - { - Set perms = new HashSet(); - // 管理员拥有所有权限 - if (user.isAdmin()) - { - perms.add("*:*:*"); - } - else - { - List roles = user.getRoles(); - if (!CollectionUtils.isEmpty(roles)) - { - // 多角色设置permissions属性,以便数据权限匹配权限 - for (SysRole role : roles) - { - //status 0正常1停用2已删除 - if (role.getStatus() != null && role.getStatus() == KernelConstant.DEFAULT_INT) - { - Set rolePerms = sysMenuService.selectMenuPermsByRoleId(role.getId()); - perms.addAll(rolePerms); - } - } - - } - else - { - perms.addAll(sysMenuService.selectMenuPermsByAdminId(user.getId())); - } - } - return perms; - } -} diff --git a/src/main/java/net/linlan/plat/comm/service/TokenService.java b/src/main/java/net/linlan/plat/comm/service/TokenService.java deleted file mode 100644 index a41761af2f1814432c3162ffa9bf49252f33ec66..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/TokenService.java +++ /dev/null @@ -1,338 +0,0 @@ -package net.linlan.plat.comm.service; - -import eu.bitwalker.useragentutils.UserAgent; -import io.jsonwebtoken.Claims; -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; -import net.linlan.commons.core.ObjectUtils; -import net.linlan.commons.core.StringUtils; -import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.vo.AppLoginInfo; -import net.linlan.sys.web.RedisService; -import net.linlan.utils.ip.IPUtils; -import net.linlan.utils.ServletUtils; -import net.linlan.utils.TokenGenerator; -import net.linlan.utils.constant.CacheConstants; -import net.linlan.utils.constant.Constants; -import net.linlan.utils.crypt.RSAUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import javax.servlet.http.HttpServletRequest; -import java.net.URLDecoder; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.Map; - -/** - * token验证处理 - * - * @author Linlan - */ -@Component -public class TokenService -{ - private static final Logger log = LoggerFactory.getLogger(TokenService.class); - - // 令牌自定义标识 - @Value("${platform.token.header}") - private String header; - - // 令牌秘钥 - @Value("${platform.token.secret}") - private String secret; - - // 令牌有效期(默认30分钟) - @Value("${platform.token.expireTime}") - private int expireTime; - - protected static final long MILLIS_SECOND = 1000; - - protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND; - - private static final Long MILLIS_MINUTE_TEN = 20 * 60 * 1000L; - - public static final String PERMISSION_MODEL = "permissionKey"; - - private static String tokenPrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJ7wK+gjsZ2uLMiC0R2F/RbRS8QDiYvdhW/jNoykgMD7LHsSFlNA71ER+B4a00jv+a8K53EUWee4KKt3nWm/Qmlwn0bs5lwwU+iamj6UGQ8ze85Tj47YrfF+D+eo1KvoaEtBdL9meCxK3DIC4OtBIzOrCPWQ4fql+4kW4X7zcLr7AgMBAAECgYB5O07yWc+QK5vjMc1aDKrY7boyAFS5R7YReylPq+a9zJjIIyq+RCiHGQK9y85fsxQrjVCuM0zEb/ctmyaJ06ZOWSW/JtrAesbUorWXPU1E+fv9mVUJEOJ/RbfqMRckTXiXA9FZAvr2QDO1D0b/Z1JIr8KfLTgz68ePiWwrzyE4GQJBAO0bqmdS91oaNyjGb5echfR15r4+yGO+p7Qy+EvDdvElaWBtfUyJdee8cOuzAzbMNs5b5yMeoYh3//0/fpHpnh8CQQCrmg+XJZcRNsrfllrzzGYOwGHhFZ/JnWKf+KQJcACHCuVMP127tDEw5CCtK/T26B7UiXWxJRl1s8eyHFlhJg+lAkBH5xXb03sTJdQIV3TLwzmUEpTwqFVYeh6dNL+7KgFNy4yTI2DV7vGEXs7Xiye0XGVaWuBS9B0EJ2/HupOFaBT9AkAnM97z7MaCTD40rijBIaT/Ibw6q7IBYU8ytJ7k+Q1lzHtt29wSEaxbOwKsDSq9bXH9pBmbCpqyZQvuCMPyibtxAkEAiyB6RX+hnssmswi5doHupanKzlGED9IYL75bhQluMzGqQHdQYBd/eNRDzeZe1I4+556wNhhFp5Co/px3/N/5SQ=="; - - - @Autowired - private RedisService redisService; - - /** - * 获取用户身份信息 - * @param request 请求 - * @return 用户信息 - */ - public FrameAdminUser getLoginUser(HttpServletRequest request) - { - // 获取请求携带的令牌 - String token = getToken(request); - if (ObjectUtils.isNotEmpty(token)) - { - try - { - Claims claims = parseToken(token); - // 解析对应的权限以及用户信息 - String uuid = (String) claims.get(Constants.LOGIN_USER_KEY); - String userKey = getTokenKey(uuid); - FrameAdminUser user = redisService.get(userKey, FrameAdminUser.class); - return user; - } - catch (Exception e) - { - log.error("获取用户信息异常'{}'", e.getMessage()); - } - } - return null; - } - - /** - * 获取用户身份信息 - * @param token 访问令牌 - * @return 用户信息 - */ - public FrameAdminUser getLoginUserByToken(String token) { - if (StringUtils.isNotEmpty(token)) { - try { - Claims claims = parseToken(token); - // 解析对应的权限以及用户信息 - String uuid = (String) claims.get(Constants.LOGIN_USER_KEY); - String userKey = getTokenKey(uuid); - FrameAdminUser user = redisService.get(userKey, FrameAdminUser.class); - return user; - } catch (Exception e) { - } - } - return null; - } - - /** - * 根据用户id获取用户身份信息 - * 由于多端登录,根据token获取的用户信息不一样,所以增加一个根据用户id获取用户信息的缓存key,以后多端需要获取用户最新信息就用这个方法吧 - * @param userId 用户ID - * @return 用户信息 - */ - public FrameAdminUser getLoginUserByUserId(Long userId) { - if (userId != null) { - try { - String userKey = getAdminIdKey(userId); - return redisService.get(userKey, FrameAdminUser.class); - } catch (Exception e) { - } - } - return null; - } - - /** - * 设置用户身份信息 - * @param loginUser 当前用户 - */ - public void setLoginUser(FrameAdminUser loginUser) - { - if (ObjectUtils.isNotEmpty(loginUser) && ObjectUtils.isNotEmpty(loginUser.getToken())) - { - refreshToken(loginUser); - } - } - - /** - * 删除用户身份信息 - * @param token 访问令牌 - */ - public void delLoginUser(String token) - { - if (ObjectUtils.isNotEmpty(token)) - { - String userKey = getTokenKey(token); - redisService.delete(userKey); - } - } - - /** - * 创建令牌 - * - * @param loginUser 用户信息 - * @return 当前登录对象 - */ - public AppLoginInfo createToken(FrameAdminUser loginUser) - { - String token = TokenGenerator.generateValue(); - loginUser.setToken(token); - setUserAgent(loginUser); - refreshToken(loginUser); - - Map claims = new HashMap<>(); - claims.put(Constants.LOGIN_USER_KEY, token); - String newtoken = createToken(claims); - AppLoginInfo appLoginInfo = new AppLoginInfo(); - appLoginInfo.setAdminId(loginUser.getAdminId()); - appLoginInfo.setToken(newtoken); - return appLoginInfo; - } - - /** - * 验证令牌有效期,相差不足20分钟,自动刷新缓存 - * - * @param loginUser 当前用户 - */ - public void verifyToken(FrameAdminUser loginUser) - { - long expireTime = loginUser.getExpireTime(); - long currentTime = System.currentTimeMillis(); - if (expireTime - currentTime <= MILLIS_MINUTE_TEN) - { - refreshToken(loginUser); - } - } - - /** - * 刷新令牌有效期 - * - * @param loginUser 登录信息 - */ - public void refreshToken(FrameAdminUser loginUser) - { - loginUser.setLoginTime(System.currentTimeMillis()); - loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); - // 根据uuid将loginUser缓存 - String userKey = getTokenKey(loginUser.getToken()); - redisService.set(userKey, loginUser, expireTime * 60); - } - - /** - * 设置用户代理信息 - * - * @param loginUser 登录信息 - */ - public void setUserAgent(FrameAdminUser loginUser) - { - UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); - String ip = IPUtils.getIpAddr(ServletUtils.getRequest()); - loginUser.setLoginIp(ip); - loginUser.setLoginBrowse(userAgent.getBrowser().getName()); - loginUser.setLoginOs(userAgent.getOperatingSystem().getName()); - } - - /** - * 从数据声明生成令牌 - * - * @param claims 数据声明 - * @return 令牌 - */ - private String createToken(Map claims) - { - String token = Jwts.builder() - .setClaims(claims) - .signWith(SignatureAlgorithm.HS512, secret).compact(); - return token; - } - - /** - * 从令牌中获取数据声明 - * - * @param token 令牌 - * @return 数据声明 - */ - private Claims parseToken(String token) - { - return Jwts.parser() - .setSigningKey(secret) - .parseClaimsJws(token) - .getBody(); - } - - /** - * 从令牌中获取用户名 - * - * @param token 令牌 - * @return 用户名 - */ - public String getUsernameFromToken(String token) - { - Claims claims = parseToken(token); - return claims.getSubject(); - } - - /** - * 获取请求token - * - * @param request - * @return token - */ - private String getToken(HttpServletRequest request) - { - String token = request.getHeader(header); - - //permissionKey 导出 序列化token + 1,时间戳 的加密字符串 字符串格式必须遵循 XXX,时间戳 不然无法解密 - String permissionKey = request.getParameter(PERMISSION_MODEL); - - if(StringUtils.isNotBlank(permissionKey)){ - try { - String[] split = permissionKey.split(","); - - token = split[0]; - String time = split[1]; - - if(split.length==1){ - return null; - } - - //decode一次,前端可能Encode过了 - time = URLDecoder.decode(time, StandardCharsets.UTF_8.name()); - time = time.replaceAll(" ","+"); - //end - //permissionKey= permissionKey.replace(" ","+"); - time = RSAUtil.decrypt(time, RSAUtil.getPrivateKey(tokenPrivateKey)); - //只有token的不让过 - time = time.split(",")[1]; - //end - //校验时效性,十分钟内有效 - long currTime = System.currentTimeMillis(); - if(currTime-Long.valueOf(time) > 10*60*1000){ - return null; - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - - if (ObjectUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX)) - { - token = token.replace(Constants.TOKEN_PREFIX, ""); - } - return token; - } - - /** 获取Redis的TOKEN键值 - * @param uuid 用户ID - * @return Redis的TOKEN键值 - */ - private String getTokenKey(String uuid) - { - return CacheConstants.LOGIN_TOKEN_KEY + uuid; - } - - - /** 获取用户AdminId - * @param adminId 管理员ID - * @return 获取用户AdminId - */ - private String getAdminIdKey(Long adminId) { - return CacheConstants.LOGIN_ADMIN_ID_KEY + adminId; - } - - /** 获取用户UserId - * @param userId 管理员ID - * @return 用户ID - */ - private String getUserIdKey(String userId) { - return CacheConstants.LOGIN_USER_ID_KEY + userId; - } - -} diff --git a/src/main/java/net/linlan/plat/comm/service/impl/AuthServiceImpl.java b/src/main/java/net/linlan/plat/comm/service/impl/AuthServiceImpl.java deleted file mode 100644 index 88cf2021bea418d40bdd0cee9351825554be283f..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/service/impl/AuthServiceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.linlan.plat.comm.service.impl; - -import net.linlan.frame.FramePubUser; -import net.linlan.frame.FrameToken; -import net.linlan.plat.comm.service.AuthService; -import net.linlan.sys.web.RedisService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; - -/** - * - * Filename:AuthServiceImpl.java - * Desc: 授权服务实现类 - * - * @author Linlan - * CreateTime:2017/8/14 18:41 - * - * @version 1.0 - * @since 1.0 - * - */ -@Service("authService") -public class AuthServiceImpl implements AuthService { - - public static final String ERROR_COUNT = "errorCount"; - public static final String FIELD_SBASE_USER ="baseUser"; - public static final String RETURN_PARAMS = "data"; - - public static final String LOGIN_ERROR_COUNT = "loginErrorCount"; - - public static final String CHECK_QRCODE_KEY="OPEN_LOGIN_QRCODE_CHECK"; - - @Resource - public RedisService redisService; - - - /** 通过token取出FrameToken对象 - * @param token input token - * @return token对象 - */ - @Override - public FrameToken getByToken(String token) { - return null; - } - - @Override - public FramePubUser getWorkerByMemberId(Long memberId) { - return null; - } - -} diff --git a/src/main/java/net/linlan/plat/comm/utils/AuthReqUtils.java b/src/main/java/net/linlan/plat/comm/utils/AuthReqUtils.java deleted file mode 100644 index 5235a86bca8f25fd5488b5b90e151cc6a33675c6..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/utils/AuthReqUtils.java +++ /dev/null @@ -1,270 +0,0 @@ -package net.linlan.plat.comm.utils; - -import net.linlan.commons.core.StringUtils; -import net.linlan.utils.crypt.RSAUtil; -import net.linlan.utils.http.HttpContextUtils; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import java.net.URLDecoder; -import java.nio.charset.StandardCharsets; - -public class AuthReqUtils { - /** - * 用户敏感信息对象,对用户敏感信息进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String REDIS_BASE_USER_KEY = "_redis:base_user:"; - /** - * 会员应用用户对象,对会员信息进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String REDIS_FRAME_USER_KEY = "_redis:frame_user:"; - /** - * 公开市民用户,用市民对象进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String REDIS_PUB_CITIZEN_KEY = "_redis:pub_citizen:"; - /** - * 平台用户的ID,对平台信息(前台工程访问信息)进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String REDIS_ACCOUNT_KEY = "_redis:member_account:"; - /** - * 站点的ID,对站点信息进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String REDIS_SITE_KEY = "_redis:front_site:"; - /** - * 验证码,临时redis缓存路径,缓存3分钟 - */ - public static final String REDIS_VERIFY_KEY = "_redis:verify_code:"; - /** - * 外部平台的账户对象,缓存1天 - */ - public static final String REDIS_BACK_OUT_ACCOUNT ="_redis:out_account:"; - /** - * 单点登录SSO用户信息,缓存30分钟 - */ - public static final String REDIS_SSO_USER_KEY = "_redis:sso_user:"; - - /** - * 后台使用的会员ID的key,放入request内 - */ - public static final String REQUEST_BACK_MEMBER_ID = "_member_id"; - /** - * 用户会员对象,用于REQUEST内进行会员用户基本信息传递使用 - */ - public static final String REQUEST_BACK_MEMBER_USER = "_member_user"; - /** - * 权限Key - */ - public static final String REQUEST_BACK_PERMISSION_MODEL = "_permissionKey"; - - /** - * 后台使用的平台ID的key,放入request内,前台会在header内放入此信息 - */ - public static final String REQUEST_FRONT_ACCOUNT_ID = "member-account-id"; - - /** - * AES加密参数 - */ - public static final String REQUEST_FRONT_AES_KEY = "aes-key"; - /** - * AES加密IV参数 - */ - public static final String REQUEST_FRONT_AES_IV = "aes-iv"; - /** - * AES加密IV键值参数 - */ - public static final String REQUEST_FRONT_AES_IV_KEY = "aes-iv-key"; - - /** - * 存放在request内的用户认证令牌标识 - */ - public static final String TOKEN_KEY = "token"; - /** - * 存放前台进入的平台source来源,如smy,wechat,alipay - */ - public static final String SOURCE_KEY = "source"; - - /** - * 文章资讯栏目缓存前缀,详情直接加id,列表则列表查询条件动态拼接 - */ - public static final String REDIS_CHANNEL_KEY = "_redis:channel:"; - /** - * 文章资讯缓存前缀,详情直接加id,列表则列表查询条件动态拼接 - */ - public static final String REDIS_CONTENT_KEY = "_redis:content:"; - /** - * 组织机构缓存前缀,详情直接加id,列表则列表查询条件动态拼接 - */ - public static final String REDIS_ORGAN_KEY = "_redis:organ:"; - /** - * 人员缓存前缀,详情直接加id,列表则列表查询条件动态拼接 - */ - public static final String REDIS_USER_KEY = "_redis:user:"; - /** - * 指标缓存前缀,详情直接加id,列表则列表查询条件动态拼接 - */ - public static final String REDIS_QUOTA_KEY = "_redis:quota:"; - /** - * 平台用户的ID,对平台信息(前台工程访问信息)进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String PLAT_ACCOUNT_KEY = "ll-plat-id:"; - - /** - * PlatCode的简称,pcode,平台代码,如果传入平台代码则采取平台处理模式 - */ - public static final String PCODE_KEY = "pcode"; - /** - * 站点的ID,对站点信息进行缓存处理使用的KEY,缓存10分钟 - */ - public static final String SITE_KEY = "_ll_site:"; - - - private static String tokenPrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJ7wK+gjsZ2uLMiC0R2F/RbRS8QDiYvdhW/jNoykgMD7LHsSFlNA71ER+B4a00jv+a8K53EUWee4KKt3nWm/Qmlwn0bs5lwwU+iamj6UGQ8ze85Tj47YrfF+D+eo1KvoaEtBdL9meCxK3DIC4OtBIzOrCPWQ4fql+4kW4X7zcLr7AgMBAAECgYB5O07yWc+QK5vjMc1aDKrY7boyAFS5R7YReylPq+a9zJjIIyq+RCiHGQK9y85fsxQrjVCuM0zEb/ctmyaJ06ZOWSW/JtrAesbUorWXPU1E+fv9mVUJEOJ/RbfqMRckTXiXA9FZAvr2QDO1D0b/Z1JIr8KfLTgz68ePiWwrzyE4GQJBAO0bqmdS91oaNyjGb5echfR15r4+yGO+p7Qy+EvDdvElaWBtfUyJdee8cOuzAzbMNs5b5yMeoYh3//0/fpHpnh8CQQCrmg+XJZcRNsrfllrzzGYOwGHhFZ/JnWKf+KQJcACHCuVMP127tDEw5CCtK/T26B7UiXWxJRl1s8eyHFlhJg+lAkBH5xXb03sTJdQIV3TLwzmUEpTwqFVYeh6dNL+7KgFNy4yTI2DV7vGEXs7Xiye0XGVaWuBS9B0EJ2/HupOFaBT9AkAnM97z7MaCTD40rijBIaT/Ibw6q7IBYU8ytJ7k+Q1lzHtt29wSEaxbOwKsDSq9bXH9pBmbCpqyZQvuCMPyibtxAkEAiyB6RX+hnssmswi5doHupanKzlGED9IYL75bhQluMzGqQHdQYBd/eNRDzeZe1I4+556wNhhFp5Co/px3/N/5SQ=="; - - /** 从request内获取token内容,首先从header内解析,如果没有再从parameter内解析 - * @param request 请求 - * @return 获取请求里面的TOKEN - */ - public static String getToken(HttpServletRequest request) { - //从header中获取token - String token = request.getHeader(TOKEN_KEY); - //如果header中不存在token,则从参数中获取token, 存在风险,注释从参数获取token方法 -// if(StringUtils.isBlank(token)){ -// token = request.getParameter(TOKEN_KEY); -// } - //导出时需要token,参数校验格式:token+时间戳 逗号,隔开;校验时效性2分钟 - String permissionKey = request.getParameter(REQUEST_BACK_PERMISSION_MODEL); - - if(StringUtils.isNotBlank(permissionKey)){ - try { - //add by shuxiaobo decode一次,前端可能Encode过了 - permissionKey = URLDecoder.decode(permissionKey, StandardCharsets.UTF_8.name()); - permissionKey = permissionKey.replaceAll(" ","+"); - //end - //permissionKey= permissionKey.replace(" ","+"); - String permissionKeyStr = RSAUtil.decrypt(permissionKey, RSAUtil.getPrivateKey(tokenPrivateKey)); - String[] split = permissionKeyStr.split(","); - //add by shuxiaobo on 2022年6月10日22点08分,只有token的不让过 - if(split.length==1){ - return null; - } - //end - token = split[0]; - String time = split[1]; - //校验时效性,两分钟内有效 - long currTime = System.currentTimeMillis(); - if(currTime-Long.valueOf(time) > 2*60*1000){ - return null; - } - } catch (Exception e) { - e.printStackTrace(); - } - } - if (StringUtils.isBlank(token)){ - return null; - } else { - return token; - } - } - - public static Long getMemberId(HttpServletRequest request) { - Long memberId = (Long) request.getAttribute(REQUEST_BACK_MEMBER_ID); - if (memberId != null){ - return memberId; - } - return null; - } - - public static void setMemberId(HttpServletRequest request, Long memberId) { - request.setAttribute(REQUEST_BACK_MEMBER_ID, memberId); - } - - /** - * 获取session - * @return session对象 - */ - public static HttpSession getSession(){ - //获取request - HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); - return request.getSession(); - } - - /** 从request内获取key内容,首先从header内解析,如果没有再从parameter内解析 - * @param request 请求 - * @param key 键 - * @return 通过key获取value - */ - public static String getByKey(HttpServletRequest request, String key) { - //从header中获取具体key值,可以为token,platId等 - String inputValue = request.getHeader(key); - //如果header中不存在,则从参数中获取具体key值,可以为token,platId等 - if(StringUtils.isBlank(inputValue)){ - inputValue = request.getParameter(key); - } - //如果值为空,则反馈null - if (StringUtils.isBlank(inputValue)){ - return null; - } else { - return inputValue; - } - } - - public static void setByKey(HttpServletRequest request, String key, String value) { - request.setAttribute(key, value); - } - - - /** 针对2分钟内访问邮箱的模式处理,从URL路径中提前permissionKey,获取token,验证时间戳 - * 区分之前的getToken方法,不从Header里面取,名称修改为:getTokenFromEncryptUrl - * @param permissionKey 权限字符串 - * @return token加密URL - */ - public static String getTokenFromEncryptUrl(String permissionKey) { - //导出时需要token,参数校验格式:token+时间戳 逗号,隔开;校验时效性2分钟 - String token=""; - if(StringUtils.isNotBlank(permissionKey)){ - try { - //permissionKey= permissionKey.replace(" ","+"); - String permissionKeyStr = RSAUtil.decrypt(permissionKey, RSAUtil.getPrivateKey(tokenPrivateKey)); - String[] split = permissionKeyStr.split(","); - token = split[0]; - String time = split[1]; - //校验时效性,两分钟内有效 - long currTime = System.currentTimeMillis(); - if(currTime-Long.valueOf(time) > 120*1000){ - return ""; - }else{ - return token; - } - } catch (Exception e) { - e.printStackTrace(); - } - } - return token; - } - - public Boolean checkTokenExpire(String token){ - if(StringUtils.isEmpty(token)){ - return false; - } - - return true; - } - - - /** 通过request获取header内的token字符串 - * @param prefix 账户Id前缀 - * @return token字符串 - */ - public static String getAccountIdToken(String prefix){ - //从request中获取token, token为用户的clientSecret - HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); - String accountId = AuthReqUtils.getByKey(request, REQUEST_FRONT_ACCOUNT_ID); - if (StringUtils.isNotBlank(accountId) && StringUtils.isNotBlank(prefix)) { - if (accountId.contains(prefix)){ - return AuthReqUtils.getToken(request); - } - } - return null; - } - -} diff --git a/src/main/java/net/linlan/plat/comm/vo/AppLoginInfo.java b/src/main/java/net/linlan/plat/comm/vo/AppLoginInfo.java deleted file mode 100644 index 171a980860b45f7966f9adadbde2cfdfa8d2fc5a..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/comm/vo/AppLoginInfo.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.linlan.plat.comm.vo; - -import lombok.Data; - -import java.util.Date; - -/** - * - * AppLoginInfo视图域: 管理登录令牌表显示Vo类 - *
- * @author Linlan - * CreateTime 2024-09-01 19:01:51
- * @version 1.0
- * @since 1.0
- * - */ -@Data -public class AppLoginInfo { - /** - * 用户LID - */ - private Long adminId; - /** - * 令牌TOKEN - */ - private String token; - /** - * 更新时间 - */ - private Date updateTime; - /** - * 过期时间 - */ - private Date expireTime; - - /** - * 无参构造方法 - */ - public AppLoginInfo() { - } - -} diff --git a/src/main/java/net/linlan/plat/view/admin/manager/AdminMenuManager.java b/src/main/java/net/linlan/plat/view/admin/manager/AdminMenuManager.java deleted file mode 100644 index 300d1c481c77326823e0c0b4f8d0ed30563f33b0..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/manager/AdminMenuManager.java +++ /dev/null @@ -1,317 +0,0 @@ -package net.linlan.plat.view.admin.manager; - -import net.linlan.commons.core.ObjectUtils; -import net.linlan.man.admin.dto.AdminMenuEntDto; -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.admin.service.AdminMenuEntService; -import net.linlan.man.admin.service.AdminUserService; -import net.linlan.frame.FrameAdminUser; -import net.linlan.man.web.model.TreeSelect; -import net.linlan.plat.view.admin.vo.AdminBaseMenuInfo; -import net.linlan.plat.view.admin.vo.AppPageIndexInfo; -import net.linlan.sys.role.entity.SysMenu; -import net.linlan.sys.role.service.SysMenuService; -import net.linlan.utils.constant.UserConstants; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 登录校验方法 - * - * @author Linlan - */ -@Component -public class AdminMenuManager -{ - @Autowired - private AdminMenuEntService adminMenuEntService; - @Autowired - private SysMenuService sysMenuService; - @Autowired - private AdminUserService adminUserService; -// /** -// * 构建前端路由所需要的菜单 -// * -// * @param menus 菜单列表 -// * @return 路由列表 -// */ -// public List buildMenus(List menus) -// { -// List routers = new LinkedList(); -// for (AdminMenuEntDto menu : menus) -// { -// RouterVo router = new RouterVo(); -// router.setHidden("1".equals(menu.getVisible())); -// router.setName(menu.getRouteName()); -// router.setPath(StringUtils.isEmpty(menu.getPath()) ? "" : menu.getPath()); -// router.setComponent(menu.getComponent()); -// router.setQuery(menu.getQuery()); -// router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); -// List cMenus = menu.getChildren(); -// if (ObjectUtils.isNotEmpty(cMenus) && UserConstants.TYPE_DIR.equals(menu.getMenuType())) -// { -// router.setAlwaysShow(true); -// router.setRedirect("noRedirect"); -// router.setChildren(buildMenus(cMenus)); -// } -// else if (isMenuFrame(menu)) -// { -// router.setMeta(null); -// List childrenList = new ArrayList(); -// RouterVo children = new RouterVo(); -// children.setPath(StringUtils.isEmpty(menu.getPath()) ? "" : menu.getPath()); -// children.setComponent(menu.getComponent()); -// children.setName(menu.getRouteName()); -// children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); -// children.setQuery(menu.getQuery()); -// childrenList.add(children); -// router.setChildren(childrenList); -// } -// else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) -// { -// router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon())); -// router.setPath("/"); -// List childrenList = new ArrayList(); -// RouterVo children = new RouterVo(); -// String path = innerLinkReplaceEach(menu.getPath()); -// children.setPath(path); -// children.setComponent(UserConstants.INNER_LINK); -// children.setName(menu.getRouteName()); -// children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath())); -// childrenList.add(children); -// router.setChildren(childrenList); -// } -// routers.add(router); -// } -// return routers; -// } - - /** - * 构建前端所需要树结构 - * - * @param menus 菜单列表 - * @return 树结构列表 - */ - public List buildMenuTree(List menus) - { - List returnList = new ArrayList(); - List tempList = menus.stream().map(AdminMenuEntDto::getMenuId).collect(Collectors.toList()); - for (Iterator iterator = menus.iterator(); iterator.hasNext();) - { - AdminMenuEntDto menu = (AdminMenuEntDto) iterator.next(); - // 如果是顶级节点, 遍历该父节点的所有子节点 - if (!tempList.contains(menu.getParentId())) - { - adminMenuEntService.fetchList(menus, menu); - returnList.add(menu); - } - } - if (returnList.isEmpty()) - { - returnList = menus; - } - return returnList; - } - - /** - * 构建前端所需要下拉树结构 - * - * @param menus 菜单列表 - * @return 下拉树结构列表 - */ - public List buildMenuTreeSelect(List menus) - { - List menuTrees = buildMenuTree(menus); - return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); - } - - - /** - * 校验菜单名称是否唯一 - * - * @param menu 菜单信息 - * @return 结果 - */ - public boolean checkMenuNameUnique(AdminMenuEntDto menu) - { - Long menuId = ObjectUtils.isEmpty(menu.getMenuId()) ? -1L : menu.getMenuId(); - SysMenu info = sysMenuService.checkNameUnique(menu.getMenuName(), menu.getParentId()); - if (ObjectUtils.isNotEmpty(info) && info.getId().longValue() != menuId.longValue()) - { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - -// /** -// * 获取路由名称 -// * -// * @param menu 菜单信息 -// * @return 路由名称 -// */ -// public String getRouteName(AdminMenuEntDto menu) -// { -// // 非外链并且是一级目录(类型为目录) -// if (isMenuFrame(menu)) -// { -// return StringUtils.EMPTY; -// } -// return getRouteName(menu.getRouteName(), menu.getPath()); -// } - -// /** -// * 获取路由名称,如没有配置路由名称则取路由地址 -// * -// * @param name 路由名称 -// * @param path 路由地址 -// * @return 路由名称(驼峰格式) -// */ -// public String getRouteName(String name, String path) -// { -// String routerName = ObjectUtils.isNotEmpty(name) ? name : path; -// return StringUtils.capitalize(routerName); -// } - -// /** -// * 获取路由地址 -// * -// * @param menu 菜单信息 -// * @return 路由地址 -// */ -// public String getRouterPath(AdminMenuEntDto menu) -// { -// String routerPath = menu.getPath(); -// // 内链打开外网方式 -// if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) -// { -// routerPath = innerLinkReplaceEach(routerPath); -// } -// // 非外链并且是一级目录(类型为目录) -// if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) -// && UserConstants.NO_FRAME.equals(menu.getIsFrame())) -// { -// routerPath = "/" + menu.getPath(); -// } -// // 非外链并且是一级目录(类型为菜单) -// else if (isMenuFrame(menu)) -// { -// routerPath = "/"; -// } -// return routerPath; -// } - -// /** -// * 获取组件信息 -// * -// * @param menu 菜单信息 -// * @return 组件信息 -// */ -// public String getComponent(AdminMenuEntDto menu) -// { -// String component = UserConstants.LAYOUT; -// if (ObjectUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) -// { -// component = menu.getComponent(); -// } -// else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) -// { -// component = UserConstants.INNER_LINK; -// } -// else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) -// { -// component = UserConstants.PARENT_VIEW; -// } -// return component; -// } - -// /** -// * 是否为菜单内部跳转 -// * -// * @param menu 菜单信息 -// * @return 结果 -// */ -// public boolean isMenuFrame(AdminMenuEntDto menu) -// { -// return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) -// && menu.getIsFrame().equals(UserConstants.NO_FRAME); -// } -// -// /** -// * 是否为内链组件 -// * -// * @param menu 菜单信息 -// * @return 结果 -// */ -// public boolean isInnerLink(AdminMenuEntDto menu) -// { -// return menu.getIsFrame().equals(UserConstants.NO_FRAME) && StringUtils.startsWith(menu.getPath(), HttpContextUtils.HTTP, HttpContextUtils.HTTPS); -// } -// -// /** -// * 是否为parent_view组件 -// * -// * @param menu 菜单信息 -// * @return 结果 -// */ -// public boolean isParentView(AdminMenuEntDto menu) -// { -// return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()); -// } -// -// /** -// * 内链域名特殊字符替换 -// * -// * @return 替换后的内链域名 -// */ -// public String innerLinkReplaceEach(String path) -// { -// return StringUtils.replaceEach(path, new String[] { HttpContextUtils.HTTP, HttpContextUtils.HTTPS, HttpContextUtils.WWW, ".", ":" }, -// new String[] { "", "", "", "/", "/" }); -// } - - public AppPageIndexInfo getAppPageIndexInfo(FrameAdminUser loginUser) { - Long adminId = loginUser.getAdminId(); - List menus = adminMenuEntService.selectMenuTreeByAdminId(adminId); - List menuList = buildMenusForAdmin(menus); - AdminUserDto user = adminUserService.selectUserByUsername(loginUser.getUsername()); - AppPageIndexInfo entity = new AppPageIndexInfo(); - entity.setAccountId("NULL"); - entity.setAreaId(0L); - entity.setPositionId(ObjectUtils.isNotEmpty(user.getPositionIds()) ? user.getPositionIds()[0] : ""); - entity.setGroupId(ObjectUtils.isNotEmpty(user.getRoleIds()) ? user.getRoleIds()[0] : 0L); - entity.setTplSolution("default"); - entity.setMenuList(menuList); - return entity; - } - - private List buildMenusForAdmin(List menus) { - if (menus == null) { - return null; - } - List menuInfos = new LinkedList<>(); - for (AdminMenuEntDto menuEntDto : menus){ - AdminBaseMenuInfo menuInfo = new AdminBaseMenuInfo(); - menuInfo.setId(menuEntDto.getMenuId()); - menuInfo.setParentId(menuEntDto.getParentId()); - menuInfo.setName(menuEntDto.getMenuName()); - menuInfo.setEname(menuEntDto.getPath()); - menuInfo.setType("ADMIN"); - menuInfo.setPerms(menuEntDto.getPerms()); - menuInfo.setUrlType(menuEntDto.getMenuType()); - menuInfo.setUrl(menuEntDto.getRouteName()); - menuInfo.setMenuSeq(menuEntDto.getComponent()); - menuInfo.setIcon(menuEntDto.getIcon()); - menuInfo.setImagePath(menuEntDto.getImagePath()); - menuInfo.setCss(menuEntDto.getQuery()); - menuInfo.setDescription(menuEntDto.getDescription()); - menuInfos.add(menuInfo); - } - return menuInfos; - } -} diff --git a/src/main/java/net/linlan/plat/view/admin/vo/AdminBaseMenuInfo.java b/src/main/java/net/linlan/plat/view/admin/vo/AdminBaseMenuInfo.java deleted file mode 100644 index f9d86b4bd23cdbd9925f6db724f2016c964fa658..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/vo/AdminBaseMenuInfo.java +++ /dev/null @@ -1,80 +0,0 @@ -package net.linlan.plat.view.admin.vo; - -import lombok.Data; - -/** - * - * Filename:AdminMenuBaseInfo.java - * Desc: 菜单信息 - * - * @author Linlan - * CreateTime:5/10/19 9:38 PM - * - * @version 1.0 - * @since 1.0 - * - */ -@Data -public class AdminBaseMenuInfo { - /** - * 功能菜单ID - */ - private Long id; - /** - * 父功能菜单ID - */ - private Long parentId; - /** - * 功能名称 - */ - private String name; - /** - * 功能名称英文 - */ - private String ename; - /** - * 功能类型,0CATAGORY目录1MENU菜单2BUTTON按钮 - */ - private String type; - /** - * 权限字符串 - */ - private String perms; - /** - * 菜单层次 - */ - private Integer menuLevel; - /** - * 调用入口类型 // urlType 为 5时,当前组能看到的栏目ID - */ - private String urlType; - /** - * 功能地址 - */ - private String url; - /** - * 菜单组件 - */ - private String menuSeq; - /** - * 菜单图标 - */ - private String icon; - /** - * 图片路径 - */ - private String imagePath; - /** - * 菜单样式 目前是判断是否为新菜单,css名称 - */ - private String css; - /** - * 新增 菜单 描述字段 - */ - private String description; - /** - * 新增 菜单获取待办数量api配置 - */ - private String todoTotalApi; - -} diff --git a/src/main/java/net/linlan/plat/view/admin/vo/AdminUserRoleVo.java b/src/main/java/net/linlan/plat/view/admin/vo/AdminUserRoleVo.java deleted file mode 100644 index 6f3eb61c82d39bbc2278348913e7c3af684a30c5..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/vo/AdminUserRoleVo.java +++ /dev/null @@ -1,104 +0,0 @@ -package net.linlan.plat.view.admin.vo; - -import com.google.common.base.Function; -import lombok.Data; -import net.linlan.man.admin.dto.AdminUserRoleDto; -import net.linlan.man.admin.entity.AdminUserRole; -import org.springframework.lang.Nullable; - -/** - * - * AdminUserRole视图域:用户角色关联显示Vo类 - *
- * @author Linlan - * CreateTime 2024-10-02 23:27:08
- * @version 1.0
- * @since 1.0
- * - */ -@Data -public class AdminUserRoleVo { - /** - * 用户角色ID - */ - private Long id; - /** - * 部门ID - */ - private Long deptId; - /** - * 部门名称 - */ - private String deptName; - /** - * 机构ID - */ - private String organId; - /** - * 机构名称 - */ - private String organName; - /** - * 角色ID - */ - private Long roleId; - /** - * 角色名称 - */ - private String roleName; - /** - * 公共管理用户ID - */ - private Long adminId; - - /** - * 无参构造方法 - */ - public AdminUserRoleVo() {} - - /** - * 数据赋值TO方法,将AdminUserRole的input对象赋值给AdminUserRoleVo - */ - public static final Function TO = new Function() { - @Nullable - @Override - public AdminUserRoleVo apply(@Nullable AdminUserRole input) { - return new AdminUserRoleVo(input); - } - }; - - /** - * @param input 数据库查询出的entity对象,对VO对象进行赋值,默认的字段为全部字段,可结合实际调整 - */ - public AdminUserRoleVo(AdminUserRole input) { - this.id = input.getId(); - this.roleId = input.getRoleId(); - this.adminId = input.getAdminId(); - } - - /** - * 数据赋值DTO方法,将AdminUserRoleDto的input对象赋值给AdminUserRoleVo - */ - public static final Function DTO = new Function() { - @Nullable - @Override - public AdminUserRoleVo apply(@Nullable AdminUserRoleDto input) { - return new AdminUserRoleVo(input); - } - }; - - /** - * @param input 数据库查询出的Dto对象,对VO对象进行赋值,默认的字段为全部字段,可结合实际调整 - */ - public AdminUserRoleVo(AdminUserRoleDto input) { - this.id = input.getId(); - this.roleId = input.getRoleId(); - this.adminId = input.getAdminId(); - this.deptId = input.getDeptId(); - this.organId = input.getOrganId(); - this.deptName = input.getDeptName(); - this.organName = input.getOrganName(); - this.roleName = input.getRoleName(); - } - -} diff --git a/src/main/java/net/linlan/plat/view/admin/vo/AdminUserVo.java b/src/main/java/net/linlan/plat/view/admin/vo/AdminUserVo.java deleted file mode 100644 index aba75303722cd29c25520d6d5fbed945cd95a54a..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/vo/AdminUserVo.java +++ /dev/null @@ -1,262 +0,0 @@ -package net.linlan.plat.view.admin.vo; - -import com.google.common.base.Function; -import lombok.Data; -import net.linlan.commons.core.ObjectUtils; -import net.linlan.commons.core.StringUtils; -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.admin.entity.AdminDept; -import net.linlan.man.admin.entity.AdminUser; -import net.linlan.annotation.Excel; -import net.linlan.annotation.Excel.ColumnType; -import net.linlan.annotation.Excel.Type; -import net.linlan.annotation.Excels; -import net.linlan.sys.role.entity.SysRole; -import net.linlan.utils.entity.BaseEntity; -import org.springframework.lang.Nullable; - -import java.util.Date; -import java.util.List; - - -/** - * - * AdminUser视图域:管理用户显示Vo类 - *
- * @author Linlan - * CreateTime 2024-10-02 23:27:08
- * @version 1.0
- * @since 1.0
- * - */ -@Data -public class AdminUserVo extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 用户LID */ - @Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号") - private Long id; - - /** 用户UUID */ - private String userId; - - /** 部门ID */ - @Excel(name = "部门编号", type = Type.IMPORT) - private Long deptId; - /** 部门名称 */ - private String deptName; - - /** 机构ID */ - private String organId; - /** 机构名称 */ - private String organName; - - /** 人员姓名 */ - @Excel(name = "人员姓名") - private String name; - - /** 用户账号 */ - @Excel(name = "登录名称") - private String username; - - /** 用户昵称 */ - @Excel(name = "用户名称") - private String nickName; - - /** 用户邮箱 */ - @Excel(name = "用户邮箱") - private String email; - - /** 手机号码 */ - @Excel(name = "手机号码", cellType = ColumnType.TEXT) - private String mobile; - - /** 用户头像 */ - private String imagePath; - - /** 密码 */ - private String password; - - /** - * 是否超级管理员 - */ - private Boolean isSuperAdmin; - - /** - * 是否审计只读管理员 - */ - private Boolean isAuditAdmin; - - /** - * 是否只管理自己的数据 - */ - private Boolean isSelfAdmin; - - /** 帐号状态(0未生效 1正常) */ - @Excel(name = "帐号状态", readConverterExp = "0=未生效,1=正常") - private Integer status; - - /** 删除标志(0代表存在 2代表删除) */ - private Integer delFlag; - - /** 最后登录IP */ - @Excel(name = "最后登录IP", type = Type.EXPORT) - private String lastLoginIp; - - /** 最后登录时间 */ - @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) - private Date lastLoginTime; - /** - * 备注,办公地址 - */ - private String description; - - /** 部门对象 */ - @Excels({ - @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), - @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) - }) - private AdminDept dept; - - /** 角色对象 */ - private List roles; - - /** 角色组 */ - private Long[] roleIds; - - /** 岗位组 */ - private String[] positionIds; - - /** 角色ID */ - private Long roleId; - /** 角色集合 */ - private List userRoleList; - /** 创建时间 */ - private Date createTime; - - /** - * 验证码 - */ - private String code; - /** - * uuid标识 - */ - private String uuid; - - public AdminUserVo() {} - - public AdminUserVo(Long id) - { - this.id = id; - this.isSuperAdmin = false; - } - - public boolean isAdmin() - { - return isAdmin(this.id) || isSuperAdmin; - } - - public static boolean isAdmin(Long adminId) - { - return adminId != null && 1L == adminId; - } - - /** - * 数据赋值TO方法,将AdminUser的input对象赋值给AdminUserVo - */ - public static final Function TO = new Function() { - @Nullable - @Override - public AdminUserVo apply(@Nullable AdminUser input) { - return new AdminUserVo(input); - } - }; - - /** - * @param input 数据库查询出的entity对象,对VO对象进行赋值,默认的字段为全部字段,可结合实际调整 - */ - public AdminUserVo(AdminUser input) { - this.id = input.getId(); - this.userId = input.getUserId(); - this.organId = input.getOrganId(); - this.deptId = input.getDeptId(); - this.name = input.getName(); - this.nickName = input.getName(); - this.username = input.getUsername(); - this.mobile = input.getMobile(); - this.email = input.getEmail(); - this.password = input.getPassword(); - this.imagePath = input.getImagePath(); - this.isSuperAdmin = input.getIsSuperAdmin(); - this.isAuditAdmin = input.getIsAuditAdmin(); - this.isSelfAdmin = input.getIsSelfAdmin(); - this.lastLoginTime = input.getLastLoginTime(); - this.lastLoginIp = input.getLastLoginIp(); - this.status = input.getStatus(); - this.delFlag = input.getDelFlag(); - this.description = input.getSpare1(); - this.createTime = input.getCreateTime(); - } - - /** - * 数据赋值DTO方法,将AdminUserDto的input对象赋值给AdminUserRuoyiDto - */ - public static final Function DTO = new Function() { - @Nullable - @Override - public AdminUserVo apply(@Nullable AdminUserDto input) { - return new AdminUserVo(input); - } - }; - - /** - * @param input 数据库查询出的Dto对象,对VO对象进行赋值,默认的字段为全部字段,可结合实际调整 - */ - public AdminUserVo(AdminUserDto input) { - this.id = input.getId(); - this.userId = input.getUserId(); - this.organId = input.getOrganId(); - this.deptId = input.getDeptId(); - this.name = input.getName(); - this.nickName = input.getName(); - this.username = input.getUsername(); - this.mobile = input.getMobile(); - this.email = input.getEmail(); - this.password = input.getPassword(); - this.imagePath = input.getImagePath(); - this.isSuperAdmin = input.getIsSuperAdmin(); - this.isAuditAdmin = input.getIsAuditAdmin(); - this.isSelfAdmin = input.getIsSelfAdmin(); - this.lastLoginTime = input.getLastLoginTime(); - this.lastLoginIp = input.getLastLoginIp(); - this.status = input.getStatus(); - this.delFlag = input.getDelFlag(); - this.description = input.getSpare1(); - this.createTime = input.getCreateTime(); - this.deptName = input.getDeptName(); - this.organName = input.getOrganName(); - - } - - public static AdminUser transTo(AdminUserVo input) { - AdminUser result = new AdminUser(); - if (ObjectUtils.isNotEmpty(input.getId())){ - result.setId(input.getId()); - } - result.setDeptId(input.getDeptId()); - result.setName(input.getName()); - result.setUsername(input.getUsername()); - if(StringUtils.isBlank(input.getName())){ - result.setName(input.getNickName()); - } - result.setEmail(input.getEmail()); - result.setMobile(input.getMobile()); - result.setImagePath(input.getImagePath()); - result.setStatus(input.getStatus()); - result.setDelFlag(input.getDelFlag()); - result.setSpare1(input.getDescription()); - return result; - } - -} diff --git a/src/main/java/net/linlan/plat/view/admin/vo/AppInitialVo.java b/src/main/java/net/linlan/plat/view/admin/vo/AppInitialVo.java deleted file mode 100644 index a470536994ca8d016b0a3fbf4bcd5db0ef0db495..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/vo/AppInitialVo.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.linlan.plat.view.admin.vo; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import lombok.Data; - -/** - * - * SasOrganPreset视图域:应用初始化导出导入包装Vo类 - * @author Linlan - * CreateTime 2023-09-19 10:47:26
- *
- * @version 1.0
- * @since 1.0
- * - */ -@Data -public class AppInitialVo { - /** - * 应用ID,导入和导出的APPID - */ - private String id; - /** - * 菜单JSON对象 - */ - private JSONArray menuJsons; - /** - * 初始化JSON对象 - */ - private JSONObject initJson; - /** - * 初始化用户名 - */ - private String username; - /** - * 初始化密码 - */ - private String password; - /** - * 导入的文件路径 - */ - private String initPath; -} diff --git a/src/main/java/net/linlan/plat/view/admin/vo/AppPageIndexInfo.java b/src/main/java/net/linlan/plat/view/admin/vo/AppPageIndexInfo.java deleted file mode 100644 index 6100740019885318a75911a7afd9b4a93bc1b10d..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/vo/AppPageIndexInfo.java +++ /dev/null @@ -1,48 +0,0 @@ -package net.linlan.plat.view.admin.vo; - -import lombok.Data; - -import java.util.List; - -/** - * - * AppPageIndexInfo视图域:APP端用户首页页面Vo实体类 - * @author Linlan - * CreateTime 2020-06-17 11:12:25
- *
- * @version 1.0
- * @since 1.0
- * - */ -@Data -public class AppPageIndexInfo { - /** - * 当前端ID - */ - private String accountId; - /** - * 当前地域ID - */ - private Long areaId; - - /** - * 当前角色或分组ID - */ - private Long groupId; - - /** - * 当前岗位ID - */ - private String positionId; - - /** - * 当前页面模板方案 - */ - private String tplSolution; - - /** - * 用户菜单信息列表 - */ - private List menuList; - -} diff --git a/src/main/java/net/linlan/plat/view/admin/vo/AppUserInfo.java b/src/main/java/net/linlan/plat/view/admin/vo/AppUserInfo.java deleted file mode 100644 index d69e63ec2620c1cde12c4466f206066b64e94383..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/plat/view/admin/vo/AppUserInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.linlan.plat.view.admin.vo; - - -import lombok.Data; - -import java.util.Set; - -/** - * - * Filename AppUserInfo, 登录返回信息Vo类
- * Description 适用管理模式用户
- *
- * @author Linlan - * CreateTime 2024-09-07 17:24:27
- *
- * @version 1.0
- * @since 1.0
- * - */ -@Data -public class AppUserInfo { - - /** - * 当前用户 - */ - private AdminUserVo user; - - /** - * 角色集合 - */ - private Set roles; - - /** - * 权限集合 - */ - private Set permissions; - -} diff --git a/src/main/java/net/linlan/stage/api/ApiStatusMonitorController.java b/src/main/java/net/linlan/stage/api/ApiStatusMonitorController.java index a1aa5b679f57347c2cc0a8a86f607a9bb79dae54..2efa09413eb2b3e9fd5882e050fb725d69b08d52 100644 --- a/src/main/java/net/linlan/stage/api/ApiStatusMonitorController.java +++ b/src/main/java/net/linlan/stage/api/ApiStatusMonitorController.java @@ -1,20 +1,38 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.stage.api; -import net.linlan.annotation.AuthIgnore; -import net.linlan.sys.web.KernelAdminUtils; -import net.linlan.utils.http.HttpContextUtils; -import net.linlan.commons.core.ResponseResult; -import net.linlan.commons.script.json.StringMap; -import net.linlan.utils.constant.Constants; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - +import net.linlan.annotation.AuthIgnore; +import net.linlan.commons.core.ResponseResult; +import net.linlan.commons.script.json.StringMap; +import net.linlan.sys.web.KernelAdminUtils; +import net.linlan.utils.constant.Constants; +import net.linlan.utils.http.HttpContextUtils; /** * Filename:ApiStatusMonitorController.java @@ -27,8 +45,7 @@ import java.util.Map; */ @RestController @RequestMapping("api/stage") -public class ApiStatusMonitorController -{ +public class ApiStatusMonitorController { @Value("${spring.profiles.active}") private String activeMode; @@ -38,17 +55,14 @@ public class ApiStatusMonitorController */ @AuthIgnore @GetMapping("getStatus") - public ResponseResult> getStatus(@RequestParam Map params) - { + public ResponseResult> getStatus(@RequestParam Map params) { HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); String url = request.getRequestURL().toString(); url = KernelAdminUtils.getDomainMore(url); Map map = new StringMap().put(Constants.FIELD_VERSION, "2.0.X") - .put("activeMode", activeMode) - .put("url", url) - .put(Constants.REQUEST_PARAMS, params) - .put("timestamp", System.currentTimeMillis()).map(); + .put("activeMode", activeMode).put("url", url).put(Constants.REQUEST_PARAMS, params) + .put("timestamp", System.currentTimeMillis()).map(); return ResponseResult.ok(map); } -} \ No newline at end of file +} diff --git a/src/main/java/net/linlan/stage/api/SysLoginController.java b/src/main/java/net/linlan/stage/api/SysLoginController.java index a8adce595e1ca7b7154c37c3ac03dde1464f570a..8fe0d6aebf321bd436fba8433f18001df90c81f9 100644 --- a/src/main/java/net/linlan/stage/api/SysLoginController.java +++ b/src/main/java/net/linlan/stage/api/SysLoginController.java @@ -1,35 +1,66 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.stage.api; import java.util.Set; -import net.linlan.man.admin.dto.AdminUserDto; -import net.linlan.man.admin.service.AdminUserService; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.web.bind.annotation.*; + +import com.github.pagehelper.Page; + import net.linlan.annotation.Encrypt; +import net.linlan.annotation.LimitScope; +import net.linlan.commons.core.ResponseResult; +import net.linlan.commons.core.StringUtils; +import net.linlan.commons.core.annotation.PlatLog; import net.linlan.frame.FrameAdminUser; -import net.linlan.plat.comm.manager.AsyncManager; -import net.linlan.plat.comm.manager.factory.AsyncFactory; -import net.linlan.plat.comm.service.AdminLoginService; -import net.linlan.plat.comm.service.TokenService; -import net.linlan.plat.view.admin.manager.AdminMenuManager; -import net.linlan.plat.comm.service.SysPermissionService; -import net.linlan.plat.comm.vo.AppLoginInfo; -import net.linlan.plat.view.admin.vo.AppPageIndexInfo; -import net.linlan.plat.view.admin.vo.AppUserInfo; -import net.linlan.sys.web.RedisService; +import net.linlan.frame.admin.dto.AdminUserDto; +import net.linlan.frame.admin.dto.WebLayoutDto; +import net.linlan.frame.admin.service.AdminUserService; +import net.linlan.frame.comm.manager.AsyncManager; +import net.linlan.frame.comm.manager.factory.AsyncFactory; +import net.linlan.frame.comm.service.AdminLoginService; +import net.linlan.frame.comm.service.SysPermissionService; +import net.linlan.frame.comm.service.TokenService; +import net.linlan.frame.comm.service.WebLayoutService; +import net.linlan.frame.comm.vo.AppLoginInfo; +import net.linlan.frame.mbiz.constant.HttpStatusEnum; +import net.linlan.frame.view.admin.manager.AdminMenuManager; +import net.linlan.frame.view.admin.vo.AdminUserVo; +import net.linlan.frame.view.admin.vo.AppPageIndexInfo; +import net.linlan.frame.view.admin.vo.AppUserInfo; +import net.linlan.frame.web.model.LoginBody; +import net.linlan.sys.base.dto.BaseAppDto; +import net.linlan.sys.base.param.BaseAppParam; +import net.linlan.sys.base.service.BaseAppService; +import net.linlan.sys.core.entity.CoreAccount; +import net.linlan.sys.core.service.CoreAccountService; import net.linlan.sys.web.KernelConstant; -import net.linlan.commons.core.StringUtils; +import net.linlan.sys.web.RedisService; import net.linlan.utils.MessageUtils; import net.linlan.utils.constant.CacheConstants; import net.linlan.utils.constant.Constants; import net.linlan.utils.exception.user.CaptchaException; import net.linlan.utils.exception.user.CaptchaExpireException; -import net.linlan.plat.view.admin.vo.AdminUserVo; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import net.linlan.commons.core.ResponseResult; -import net.linlan.man.web.model.LoginBody; - -import static net.linlan.man.web.SecurityUtils.getLoginUser; +import static net.linlan.frame.web.SecurityUtils.getLoginUser; /** * 登录验证 @@ -37,20 +68,25 @@ import static net.linlan.man.web.SecurityUtils.getLoginUser; * @author Linlan */ @RestController -public class SysLoginController -{ - @Autowired - private AdminLoginService sysLoginService; - @Autowired - private AdminMenuManager adminMenuManager; - @Autowired - private SysPermissionService permissionService; - @Autowired - private AdminUserService adminUserService; - @Autowired - private TokenService tokenService; - @Autowired - private RedisService redisService; +public class SysLoginController { + @Resource + private AdminLoginService sysLoginService; + @Resource + private AdminMenuManager adminMenuManager; + @Resource + private SysPermissionService sysPermissionService; + @Resource + private AdminUserService adminUserService; + @Resource + private TokenService tokenService; + @Resource + private RedisService redisService; + @Resource + private BaseAppService baseAppService; + @Resource + private CoreAccountService coreAccountService; + @Resource + private WebLayoutService platAdminEntService; /** * 登录方法 @@ -58,13 +94,14 @@ public class SysLoginController * @param loginBody 登录信息 * @return 结果 */ + @PlatLog(value = "登录方法", category = 10) @PostMapping("/login") @Encrypt - public ResponseResult login(@RequestBody LoginBody loginBody) - { + public ResponseResult login(@RequestBody LoginBody loginBody) { // 生成令牌 - AppLoginInfo appLoginInfo = sysLoginService.login(loginBody.getUsername(), loginBody.getPassword(), - loginBody.getCode(), loginBody.getUuid(), loginBody.getAppId()); + AppLoginInfo appLoginInfo = sysLoginService.login(loginBody.getUsername(), + loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), + loginBody.getAppId()); return ResponseResult.ok(appLoginInfo); } @@ -73,23 +110,22 @@ public class SysLoginController * * @return 用户信息 */ + @PlatLog(value = "获取应用用户信息") @GetMapping("appUserInfo") @Encrypt - public ResponseResult appUserInfo() - { + public ResponseResult appUserInfo() { FrameAdminUser loginUser = getLoginUser(); - AdminUserDto user = adminUserService.selectUserByUsername(loginUser.getUsername()); + AdminUserDto user = adminUserService.getByUsername(loginUser.getUsername()); // 角色集合 - Set roles = permissionService.getRolePermission(user); + Set roles = sysPermissionService.getRolePermission(user); // 权限集合 - Set permissions = permissionService.getMenuPermission(user); + Set permissions = sysPermissionService.getMenuPermission(user); AppUserInfo appUserInfo = new AppUserInfo(); appUserInfo.setUser((AdminUserVo) AdminUserVo.DTO.apply(user)); appUserInfo.setRoles(roles); appUserInfo.setPermissions(permissions); - if (!loginUser.getPerms().equals(permissions)) - { + if (!loginUser.getPerms().equals(permissions)) { loginUser.setPerms(permissions); tokenService.refreshToken(loginUser); } @@ -101,15 +137,47 @@ public class SysLoginController * * @return 路由信息 */ + @PlatLog(value = "获取应用首页信息") @GetMapping("appIndexInfo") @Encrypt - public ResponseResult appIndexInfo() - { + public ResponseResult appIndexInfo() { FrameAdminUser loginUser = getLoginUser(); AppPageIndexInfo appPageIndexInfo = adminMenuManager.getAppPageIndexInfo(loginUser); return ResponseResult.ok(appPageIndexInfo); } + /** + * 内部应用,第三方应用登录方法,返回字段少的平台用户对象 + * @param request 请求 + * @return {@link WebLayoutDto} + */ + @PlatLog(srcCode = 1, value = "内部应用,第三方应用登录方法,返回字段少的平台用户对象.") + @PostMapping("/platLogin") + @Encrypt + public ResponseResult platLogin(HttpServletRequest request) { + String accountId = request.getHeader(Constants.ACCOUNT_KEY); + CoreAccount coreAccount = redisService.get(CacheConstants.PLAT_ACCOUNT_KEY + accountId, + CoreAccount.class); + if (coreAccount == null) { + //用户信息未在Session中 + coreAccount = coreAccountService.findById(accountId); + if (coreAccount == null) { + BaseAppParam param = new BaseAppParam(); + Page baseApps = baseAppService.getPageDto(param); + if (baseApps != null && baseApps.size() > 0) { + return ResponseResult.error(HttpStatusEnum.TOKEN_ERROR.getCode(), + HttpStatusEnum.TOKEN_ERROR.getMsg()); + } else { + return ResponseResult.error("1202", "未初始化数据。"); + } + } + redisService.set(CacheConstants.PLAT_ACCOUNT_KEY + accountId, coreAccount, + KernelConstant.TEN_MINUTE_EXPIRE); + } + + WebLayoutDto platConfInfoDto = platAdminEntService.getPlatConfInfoDto(coreAccount); + return ResponseResult.ok().setResultData(platConfInfoDto); + } /** * 登录方法 @@ -117,39 +185,45 @@ public class SysLoginController * @param loginBody 登录信息 * @return 结果 */ + @PlatLog(value = "登录方法", category = 10, srcCode = 11) @PostMapping("/thirdOrgan/login") @Encrypt - public ResponseResult thirdOrganLogin(@RequestBody LoginBody loginBody) - { + public ResponseResult thirdOrganLogin(@RequestBody LoginBody loginBody) { // 生成令牌 AppLoginInfo appLoginInfo = sysLoginService.thirdUserlogin(loginBody.getUsername(), - loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getAppId()); + loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), + loginBody.getAppId()); return ResponseResult.ok(appLoginInfo); } /** * 校验验证码 - * @param code 验证码 - * @param uuid 临时UUID + * @param code 验证码 + * @param uuid 登录sessionId * @return 验证结果 */ + @PlatLog(value = "校验验证码", category = 10) @GetMapping("captcha/verify") @Encrypt - public ResponseResult validateCaptcha(String code, String uuid) - { + @LimitScope(name = "sysLoginCaptcha", key = "sysLoginCaptcha", interval = 10, count = 5) + public ResponseResult validateCaptcha(String code, String uuid) { FrameAdminUser loginUser = getLoginUser(); String username = loginUser.getUsername(); String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, ""); String captcha = redisService.get(verifyKey); - if (captcha == null) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), loginUser.getAppId())); + if (captcha == null) { + AsyncManager.me() + .execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, + Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), + loginUser.getAppId())); throw new CaptchaExpireException(); } - if (!code.equalsIgnoreCase(captcha)) - { - AsyncManager.me().execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), loginUser.getAppId())); + if (!code.equalsIgnoreCase(captcha)) { + AsyncManager.me() + .execute(AsyncFactory.saveAdminLoginLog(KernelConstant.DEFAULT_BIGINT, username, + Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), + loginUser.getAppId())); throw new CaptchaException(); } diff --git a/src/main/java/net/linlan/stage/handler/RepeatFilter.java b/src/main/java/net/linlan/stage/handler/RepeatFilter.java deleted file mode 100644 index 6d72bd91ada404951f5b4c0dd333220658922a74..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/stage/handler/RepeatFilter.java +++ /dev/null @@ -1,48 +0,0 @@ -package net.linlan.stage.handler; - -import net.linlan.commons.core.StringUtils; -import org.springframework.http.MediaType; - -import javax.servlet.*; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; - -/** - * Repeatable 过滤器 - * - * @author Linlan - */ -public class RepeatFilter implements Filter -{ - @Override - public void init(FilterConfig filterConfig) throws ServletException - { - - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException - { - ServletRequest requestWrapper = null; - if (request instanceof HttpServletRequest - && StringUtils.startsWithIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE)) - { - requestWrapper = new RepeatRequestWrapper((HttpServletRequest) request, response); - } - if (null == requestWrapper) - { - chain.doFilter(request, response); - } - else - { - chain.doFilter(requestWrapper, response); - } - } - - @Override - public void destroy() - { - - } -} diff --git a/src/main/java/net/linlan/stage/handler/RepeatRequestWrapper.java b/src/main/java/net/linlan/stage/handler/RepeatRequestWrapper.java deleted file mode 100644 index 5bfc2920e28630abe34f8b9c44d9d1c41434e99b..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/stage/handler/RepeatRequestWrapper.java +++ /dev/null @@ -1,77 +0,0 @@ -package net.linlan.stage.handler; - -import net.linlan.commons.core.abs.CharsetConstants; -import net.linlan.utils.http.HttpHelper; - -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * 构建可重复读取inputStream的request - * - * @author Linlan - */ -public class RepeatRequestWrapper extends HttpServletRequestWrapper -{ - private final byte[] body; - - public RepeatRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException - { - super(request); - request.setCharacterEncoding(CharsetConstants.UTF_8); - response.setCharacterEncoding(CharsetConstants.UTF_8); - - body = HttpHelper.getBodyString(request).getBytes(CharsetConstants.UTF_8); - } - - @Override - public BufferedReader getReader() throws IOException - { - return new BufferedReader(new InputStreamReader(getInputStream())); - } - - @Override - public ServletInputStream getInputStream() throws IOException - { - final ByteArrayInputStream bais = new ByteArrayInputStream(body); - return new ServletInputStream() - { - @Override - public int read() throws IOException - { - return bais.read(); - } - - @Override - public int available() throws IOException - { - return body.length; - } - - @Override - public boolean isFinished() - { - return false; - } - - @Override - public boolean isReady() - { - return false; - } - - @Override - public void setReadListener(ReadListener readListener) - { - - } - }; - } -} diff --git a/src/main/java/net/linlan/stage/handler/RepeatSubmitInterceptor.java b/src/main/java/net/linlan/stage/handler/RepeatSubmitInterceptor.java deleted file mode 100644 index e30da9887d310f44762071bec5af4fb82f2affee..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/stage/handler/RepeatSubmitInterceptor.java +++ /dev/null @@ -1,137 +0,0 @@ -package net.linlan.stage.handler; - -import com.alibaba.fastjson.JSON; -import net.linlan.commons.core.ResponseResult; -import net.linlan.commons.core.StringUtils; -import net.linlan.annotation.RepeatSubmit; -import net.linlan.sys.web.RedisService; -import net.linlan.utils.ServletUtils; -import net.linlan.utils.constant.CacheConstants; -import net.linlan.utils.http.HttpHelper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.web.method.HandlerMethod; -import org.springframework.web.servlet.HandlerInterceptor; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; - -/** - * 防止重复提交拦截器 - * - * @author Linlan - */ -@Component -public class RepeatSubmitInterceptor implements HandlerInterceptor -{ - public final String REPEAT_PARAMS = "repeatParams"; - - public final String REPEAT_TIME = "repeatTime"; - - // 令牌自定义标识 - @Value("${platform.token.header}") - private String header; - - @Autowired - private RedisService redisService; - - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception - { - if (handler instanceof HandlerMethod) { - HandlerMethod handlerMethod = (HandlerMethod) handler; - Method method = handlerMethod.getMethod(); - RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class); - if (annotation != null) { - if (this.isRepeatSubmit(request, annotation)) { - ResponseResult ajaxResult = ResponseResult.error(annotation.message()); - ServletUtils.renderString(response, JSON.toJSONString(ajaxResult)); - return false; - } - } - } - return true; - } - - /** - * 验证是否重复提交由子类实现具体的防重复提交的规则 - * - * @param request 请求信息 - * @param annotation 防重复注解参数 - * @return 结果true/false - */ - public boolean isRepeatSubmit(HttpServletRequest request, RepeatSubmit annotation) { - String nowParams = ""; - if (request instanceof RepeatRequestWrapper) - { - RepeatRequestWrapper repeatedlyRequest = (RepeatRequestWrapper) request; - nowParams = HttpHelper.getBodyString(repeatedlyRequest); - } - - // body参数为空,获取Parameter的数据 - if (StringUtils.isEmpty(nowParams)) - { - nowParams = JSON.toJSONString(request.getParameterMap()); - } - Map nowDataMap = new HashMap(); - nowDataMap.put(REPEAT_PARAMS, nowParams); - nowDataMap.put(REPEAT_TIME, System.currentTimeMillis()); - - // 请求地址(作为存放cache的key值) - String url = request.getRequestURI(); - - // 唯一值(没有消息头则使用请求地址) - String submitKey = StringUtils.trimToEmpty(request.getHeader(header)); - - // 唯一标识(指定key + url + 消息头) - String cacheRepeatKey = CacheConstants.REPEAT_SUBMIT_KEY + url + submitKey; - - Object sessionObj = redisService.get(cacheRepeatKey); - if (sessionObj != null) - { - Map sessionMap = (Map) sessionObj; - if (sessionMap.containsKey(url)) - { - Map preDataMap = (Map) sessionMap.get(url); - if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap, annotation.interval())) - { - return true; - } - } - } - Map cacheMap = new HashMap(); - cacheMap.put(url, nowDataMap); - redisService.setMap(cacheRepeatKey, cacheMap, Long.valueOf(annotation.interval()/1000)); - return false; - - } - - /** - * 判断参数是否相同 - */ - private boolean compareParams(Map nowMap, Map preMap) - { - String nowParams = (String) nowMap.get(REPEAT_PARAMS); - String preParams = (String) preMap.get(REPEAT_PARAMS); - return nowParams.equals(preParams); - } - - /** - * 判断两次间隔时间 - */ - private boolean compareTime(Map nowMap, Map preMap, int interval) - { - long time1 = (Long) nowMap.get(REPEAT_TIME); - long time2 = (Long) preMap.get(REPEAT_TIME); - if ((time1 - time2) < interval) - { - return true; - } - return false; - } - -} diff --git a/src/main/java/net/linlan/stage/security/JasyptPropertyValueConfig.java b/src/main/java/net/linlan/stage/security/JasyptPropertyValueConfig.java index 4cb54b66e230affc837bed46799366daa584e5ac..00a310a1193e0d1f37c73195c1bb776ad9cbea9f 100644 --- a/src/main/java/net/linlan/stage/security/JasyptPropertyValueConfig.java +++ b/src/main/java/net/linlan/stage/security/JasyptPropertyValueConfig.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.stage.security; import org.springframework.beans.factory.config.PropertyOverrideConfigurer; diff --git a/src/main/java/net/linlan/stage/security/JasyptPropertyValueHandler.java b/src/main/java/net/linlan/stage/security/JasyptPropertyValueHandler.java index 5d62d61d405f6a74f309ee48eb7c2b87a33c7cae..055633793379ea38ae2942f99b7fd6dc49301bc3 100644 --- a/src/main/java/net/linlan/stage/security/JasyptPropertyValueHandler.java +++ b/src/main/java/net/linlan/stage/security/JasyptPropertyValueHandler.java @@ -1,6 +1,28 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.stage.security; -import net.linlan.commons.core.StringUtils; +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.stream.StreamSupport; + import org.jasypt.util.text.BasicTextEncryptor; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; @@ -14,22 +36,19 @@ import org.springframework.core.env.PropertySource; import org.springframework.core.env.SimpleCommandLinePropertySource; import org.springframework.web.context.support.StandardServletEnvironment; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.stream.StreamSupport; +import net.linlan.commons.core.StringUtils; -public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer implements EnvironmentAware { +public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer + implements EnvironmentAware { private static BasicTextEncryptor textEncryptor = null; - private final String KEY_SEED = "jasypt.encryptor.password"; - private final String PREFIX = "ENC("; - private final String SUFFIX = ")"; - private final byte[] tmp_lock = new byte[1]; - private boolean isInit; - private String seed; - private Environment environment; + private final String KEY_SEED = "jasypt.encryptor.password"; + private final String PREFIX = "ENC("; + private final String SUFFIX = ")"; + private final byte[] tmp_lock = new byte[1]; + private boolean isInit; + private String seed; + private Environment environment; public JasyptPropertyValueHandler() { @@ -42,27 +61,29 @@ public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer imple @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { - MutablePropertySources propertySources = ((StandardServletEnvironment) environment).getPropertySources(); + MutablePropertySources propertySources = ((StandardServletEnvironment) environment) + .getPropertySources(); convertPropertySources(propertySources); super.postProcessBeanFactory(beanFactory); } - public void convertPropertySources(MutablePropertySources propSources) { initSeed(); // 命令行参数SimpleCommandLinePropertySource // yml配置文件参数OriginTrackedMapPropertySource StreamSupport.stream(propSources.spliterator(), false) - .filter(ps -> (ps instanceof OriginTrackedMapPropertySource) || (ps instanceof SimpleCommandLinePropertySource)) - .forEach(ps -> { - if (ps instanceof OriginTrackedMapPropertySource) { - handleConfigFile(ps); - } else if (ps instanceof SimpleCommandLinePropertySource) { - handleCommandLine(ps); - } - propSources.replace(ps.getName(), ps); - }); + .filter(ps -> (ps instanceof OriginTrackedMapPropertySource) + || (ps instanceof SimpleCommandLinePropertySource)) + .forEach(ps -> { + if (ps instanceof OriginTrackedMapPropertySource) { + handleConfigFile(ps); + } else if (ps instanceof SimpleCommandLinePropertySource) { + handleCommandLine(ps); + } + propSources.replace(ps.getName(), ps); + }); } + //处理spring boot的默认配置文件,例如application.yml或者application.properties中加载所有内容 private void handleConfigFile(PropertySource ps) { Map result = (Map) ps.getSource(); @@ -83,6 +104,7 @@ public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer imple } } } + //处理命令行中的替换spring boot的参数,例如--spring.datasource.password的参数形式 private void handleCommandLine(PropertySource ps) { try { @@ -90,7 +112,8 @@ public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer imple Field valueField = commandLineArgs.getClass().getDeclaredField("optionArgs"); valueField.setAccessible(true); boolean hasEncrypt = false; - Map> result = (Map>) valueField.get(commandLineArgs); + Map> result = (Map>) valueField + .get(commandLineArgs); for (String key : result.keySet()) { List values = result.get(key); if (values.size() == 1) { @@ -107,7 +130,6 @@ public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer imple valueField.set(commandLineArgs, result); } - } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalAccessException e) { @@ -116,7 +138,6 @@ public class JasyptPropertyValueHandler extends PropertyOverrideConfigurer imple } - private boolean checkNeedProcessOverride(String key, String value) { if (KEY_SEED.equals(key)) { return false; diff --git a/src/main/java/net/linlan/stage/security/JasyptUtils.java b/src/main/java/net/linlan/stage/security/JasyptUtils.java index fed012b160fedbd9cc149c0a3aa1d94606cda178..ea80850a98a23de326d1d69e11647b2ee50ee863 100644 --- a/src/main/java/net/linlan/stage/security/JasyptUtils.java +++ b/src/main/java/net/linlan/stage/security/JasyptUtils.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.stage.security; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; @@ -68,10 +85,6 @@ public class JasyptUtils { * @param args 参数 */ public static void main(String[] args) { - // 首先进行密码加密 -// System.out.println(encryptPwd("Linlan2023!GovStage@Dev", "jdbc:oracle:thin:@124.225.223.110:1521:orcl")); - // 然后进行密码解密 -// System.out.println(decyptPwd("Linlan2023!GovStage@Dev", "SWpjtikNOJJTUMeaxK9I2qs8RaKzLU0Dy1Pe+YF9rr+d3WP6jcpTQVgQoPuxYDzNr6k5ETr+3mo=")); } diff --git a/src/main/java/net/linlan/third/magic/configuration/MagicAPIConfiguration.java b/src/main/java/net/linlan/third/magic/configuration/MagicAPIConfiguration.java index 1a8ba77a7101ca12ba8715f7d64a7bb81e61fc7f..3d96b82b68f2f79f2ae587d6337e568b10fdf236 100644 --- a/src/main/java/net/linlan/third/magic/configuration/MagicAPIConfiguration.java +++ b/src/main/java/net/linlan/third/magic/configuration/MagicAPIConfiguration.java @@ -1,14 +1,33 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.configuration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.ssssssss.magicapi.modules.db.provider.PageProvider; + import net.linlan.third.magic.interceptor.CustomRequestInterceptor; import net.linlan.third.magic.interceptor.CustomUIAuthorizationInterceptor; import net.linlan.third.magic.provider.*; import net.linlan.third.magic.scripts.CustomFunction; import net.linlan.third.magic.scripts.CustomFunctionExtension; import net.linlan.third.magic.scripts.CustomModule; -import net.linlan.third.magic.provider.*; -import org.springframework.context.annotation.Configuration; -import org.ssssssss.magicapi.modules.db.provider.PageProvider; +import net.linlan.third.prometheus.PrometheusModule; /** * magic-api 配置类 @@ -18,19 +37,27 @@ import org.ssssssss.magicapi.modules.db.provider.PageProvider; @Configuration public class MagicAPIConfiguration { -// /** -// * 配置多数据源 -// * -// * @see org.ssssssss.magicapi.datasource.model.MagicDynamicDataSource -// */ -// @Bean -// public MagicDynamicDataSource magicDynamicDataSource(DataSource dataSource) { -// MagicDynamicDataSource dynamicDataSource = new MagicDynamicDataSource(); -// dynamicDataSource.setDefault(dataSource); // 设置默认数据源 -// dynamicDataSource.add("slave", dataSource); -// return dynamicDataSource; -// } + // /** + // * 配置多数据源 + // * + // * @see org.ssssssss.magicapi.datasource.model.MagicDynamicDataSource + // */ + // @Bean + // public MagicDynamicDataSource magicDynamicDataSource(DataSource dataSource) { + // MagicDynamicDataSource dynamicDataSource = new MagicDynamicDataSource(); + // dynamicDataSource.setDefault(dataSource); // 设置默认数据源 + // dynamicDataSource.add("slave", dataSource); + // return dynamicDataSource; + // } + /** + * Prom模块 + * @return Prometheus配置模块 + */ + @Bean + public PrometheusModule prometheusModule() { + return new PrometheusModule(); + } /** * 配置自定义JSON结果 diff --git a/src/main/java/net/linlan/third/magic/interceptor/CustomRequestInterceptor.java b/src/main/java/net/linlan/third/magic/interceptor/CustomRequestInterceptor.java index 2731a49ff16645c2ad122bb0c056a5bfdc9421c8..94262df3d47a10e56af6e61b76f89dfc7e53f251 100644 --- a/src/main/java/net/linlan/third/magic/interceptor/CustomRequestInterceptor.java +++ b/src/main/java/net/linlan/third/magic/interceptor/CustomRequestInterceptor.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.interceptor; import org.apache.commons.lang3.StringUtils; @@ -18,43 +35,47 @@ import org.ssssssss.script.MagicScriptContext; */ public class CustomRequestInterceptor implements RequestInterceptor { - private static final Logger logger = LoggerFactory.getLogger(CustomRequestInterceptor.class); + private static final Logger logger = LoggerFactory.getLogger(CustomRequestInterceptor.class); - /** - * 接口请求之前 - * @param info 接口信息 - * @param context 脚本变量信息 - */ - @Override - public Object preHandle(ApiInfo info, MagicScriptContext context, MagicHttpServletRequest request, MagicHttpServletResponse response) throws Exception { - Object user = null; // = XXXUtils.getUser(request); - logger.info("{} 请求接口:{}", user, info.getName()); - // 接口选项配置了需要登录 - if ("true".equals(info.getOptionValue(Options.REQUIRE_LOGIN))) { - if (user == null) { - return new JsonBean<>(401, "用户未登录"); - } - } - String role = info.getOptionValue(Options.ROLE); - if (StringUtils.isNotBlank(role)/* && user.hasRole(role)*/) { - return new JsonBean<>(403, "用户权限不足"); - } - String permission = info.getOptionValue(Options.PERMISSION); - if (StringUtils.isNotBlank(permission)/* && user.hasPermission(permission)*/) { - return new JsonBean<>(403, "用户权限不足"); - } - return null; - } + /** + * 接口请求之前 + * @param info 接口信息 + * @param context 脚本变量信息 + */ + @Override + public Object preHandle(ApiInfo info, MagicScriptContext context, + MagicHttpServletRequest request, + MagicHttpServletResponse response) throws Exception { + Object user = null; // = XXXUtils.getUser(request); + logger.info("{} 请求接口:{}", user, info.getName()); + // 接口选项配置了需要登录 + if ("true".equals(info.getOptionValue(Options.REQUIRE_LOGIN))) { + if (user == null) { + return new JsonBean<>(401, "用户未登录"); + } + } + String role = info.getOptionValue(Options.ROLE); + if (StringUtils.isNotBlank(role)/* && user.hasRole(role)*/) { + return new JsonBean<>(403, "用户权限不足"); + } + String permission = info.getOptionValue(Options.PERMISSION); + if (StringUtils.isNotBlank(permission)/* && user.hasPermission(permission)*/) { + return new JsonBean<>(403, "用户权限不足"); + } + return null; + } - /** - * 接口执行之后 - * @param info 接口信息 - * @param context 变量信息 - * @param value 即将要返回到页面的值 - */ - @Override - public Object postHandle(ApiInfo info, MagicScriptContext context, Object value, MagicHttpServletRequest request, MagicHttpServletResponse response) throws Exception { - logger.info("{} 执行完毕,返回结果:{}", info.getName(), value); - return null; - } + /** + * 接口执行之后 + * @param info 接口信息 + * @param context 变量信息 + * @param value 即将要返回到页面的值 + */ + @Override + public Object postHandle(ApiInfo info, MagicScriptContext context, Object value, + MagicHttpServletRequest request, + MagicHttpServletResponse response) throws Exception { + logger.info("{} 执行完毕,返回结果:{}", info.getName(), value); + return null; + } } diff --git a/src/main/java/net/linlan/third/magic/interceptor/CustomSqlInterceptor.java b/src/main/java/net/linlan/third/magic/interceptor/CustomSqlInterceptor.java index 43d913f6f45f4db49e900034a285e1004c6adf77..e4b92f44239a5c4fac46bc0b53eb39af7f871bfc 100644 --- a/src/main/java/net/linlan/third/magic/interceptor/CustomSqlInterceptor.java +++ b/src/main/java/net/linlan/third/magic/interceptor/CustomSqlInterceptor.java @@ -1,13 +1,28 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.interceptor; +import java.util.Arrays; import org.ssssssss.magicapi.core.context.RequestEntity; import org.ssssssss.magicapi.modules.db.BoundSql; import org.ssssssss.magicapi.modules.db.inteceptor.SQLInterceptor; -import java.util.Arrays; - - /** * 自定义SQL拦截器 * https://ssssssss.org/magic-api/pages/senior/sql-interceptor/ @@ -15,15 +30,15 @@ import java.util.Arrays; */ public class CustomSqlInterceptor implements SQLInterceptor { - /** - * 执行SQL之前 - */ - @Override - public void preHandle(BoundSql boundSql, RequestEntity requestEntity) { - // 改写SQL - boundSql.setSql(boundSql.getSql()); - // 改写参数 - boundSql.setParameters(Arrays.asList(boundSql.getParameters())); - } + /** + * 执行SQL之前 + */ + @Override + public void preHandle(BoundSql boundSql, RequestEntity requestEntity) { + // 改写SQL + boundSql.setSql(boundSql.getSql()); + // 改写参数 + boundSql.setParameters(Arrays.asList(boundSql.getParameters())); + } } diff --git a/src/main/java/net/linlan/third/magic/interceptor/CustomUIAuthorizationInterceptor.java b/src/main/java/net/linlan/third/magic/interceptor/CustomUIAuthorizationInterceptor.java index eb60861b77e0f07a73102f8be9cc575b8d3c7cba..2c4c59b6160f262856700bc1981c7364e961e0b0 100644 --- a/src/main/java/net/linlan/third/magic/interceptor/CustomUIAuthorizationInterceptor.java +++ b/src/main/java/net/linlan/third/magic/interceptor/CustomUIAuthorizationInterceptor.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.interceptor; import org.ssssssss.magicapi.core.context.MagicUser; @@ -6,7 +23,6 @@ import org.ssssssss.magicapi.core.interceptor.Authorization; import org.ssssssss.magicapi.core.interceptor.AuthorizationInterceptor; import org.ssssssss.magicapi.core.servlet.MagicHttpServletRequest; - /** * 自定义UI界面鉴权 * https://ssssssss.org/magic-api/pages/security/operation/ @@ -14,50 +30,51 @@ import org.ssssssss.magicapi.core.servlet.MagicHttpServletRequest; */ public class CustomUIAuthorizationInterceptor implements AuthorizationInterceptor { - /** - * 配置UI是否需要登录 - */ - @Override - public boolean requireLogin() { - return true; - } + /** + * 配置UI是否需要登录 + */ + @Override + public boolean requireLogin() { + return true; + } - /** - * 自定义登录方法 - * @param username 用户名 - * @param password 密码 - * @return 对象MagicUser - */ - @Override - public MagicUser login(String username, String password) throws MagicLoginException { - if (!"123456".equals(password) && !"admin".equals(username)) { - throw new MagicLoginException("密码不正确"); - } - return new MagicUser("1", username, "token..123456"); - } + /** + * 自定义登录方法 + * @param username 用户名 + * @param password 密码 + * @return 对象MagicUser + */ + @Override + public MagicUser login(String username, String password) throws MagicLoginException { + if (!"123456".equals(password) && !"admin".equals(username)) { + throw new MagicLoginException("密码不正确"); + } + return new MagicUser("1", username, "token..123456"); + } - /** - * 根据Token获取用户信息 - */ - @Override - public MagicUser getUserByToken(String token) throws MagicLoginException { - if ("token..123456".equals(token)) { - return new MagicUser("1", "admin", "token..123456"); - } - throw new MagicLoginException("token无效"); - } + /** + * 根据Token获取用户信息 + */ + @Override + public MagicUser getUserByToken(String token) throws MagicLoginException { + if ("token..123456".equals(token)) { + return new MagicUser("1", "admin", "token..123456"); + } + throw new MagicLoginException("token无效"); + } - /** - * 是否允许访问 - * @param magicUser 用户信息 - * @return true/false - */ - @Override - public boolean allowVisit(MagicUser magicUser, MagicHttpServletRequest request, Authorization authorization) { - if(authorization == Authorization.DELETE || authorization == Authorization.UPLOAD){ - // 禁止上传和删除 - return false; - } - return true; - } + /** + * 是否允许访问 + * @param magicUser 用户信息 + * @return true/false + */ + @Override + public boolean allowVisit(MagicUser magicUser, MagicHttpServletRequest request, + Authorization authorization) { + if (authorization == Authorization.DELETE || authorization == Authorization.UPLOAD) { + // 禁止上传和删除 + return false; + } + return true; + } } diff --git a/src/main/java/net/linlan/third/magic/interceptor/SimpleAuthorizationInterceptor.java b/src/main/java/net/linlan/third/magic/interceptor/SimpleAuthorizationInterceptor.java index 846a57bc6766df11c3f437601c130cc7eb494e5e..86d505281054b130525ca616ca9ce1af1cd4feb8 100644 --- a/src/main/java/net/linlan/third/magic/interceptor/SimpleAuthorizationInterceptor.java +++ b/src/main/java/net/linlan/third/magic/interceptor/SimpleAuthorizationInterceptor.java @@ -1,5 +1,27 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.interceptor; +import java.io.UnsupportedEncodingException; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -12,11 +34,6 @@ import org.ssssssss.magicapi.core.interceptor.Authorization; import org.ssssssss.magicapi.core.interceptor.AuthorizationInterceptor; import org.ssssssss.magicapi.core.servlet.MagicHttpServletRequest; -import java.io.UnsupportedEncodingException; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - /** * 自定义多用户名密码登录,以及权限控制 * 使用方式在项目工程中@import 或者 @Bean注解使spring管理。 @@ -38,7 +55,7 @@ public class SimpleAuthorizationInterceptor implements AuthorizationInterceptor * 加密因子 */ @Value("${magic-api.ext.auth.encryIndex:1}") - private int encryIndex; + private int encryIndex; /** * 用户信息 */ @@ -48,7 +65,6 @@ public class SimpleAuthorizationInterceptor implements AuthorizationInterceptor */ private Map denyOptions; - public SimpleAuthorizationInterceptor() { log.info("已启用多用户登录扩展,如需关闭请magic-api.ext.auth.enable=false"); } @@ -68,8 +84,10 @@ public class SimpleAuthorizationInterceptor implements AuthorizationInterceptor public MagicUser getUserByToken(String token) throws MagicLoginException { try { String[] userInfo = getUserInfoByToken(token); - MagicUser magicUser = new MagicUser(userInfo[0], userInfo[0], getToken(userInfo[0], userInfo[1])); - if (users.containsKey(magicUser.getUsername()) && users.get(magicUser.getUsername()).equals(userInfo[1])) { + MagicUser magicUser = new MagicUser(userInfo[0], userInfo[0], + getToken(userInfo[0], userInfo[1])); + if (users.containsKey(magicUser.getUsername()) + && users.get(magicUser.getUsername()).equals(userInfo[1])) { return magicUser; } } catch (Exception e) { @@ -91,8 +109,9 @@ public class SimpleAuthorizationInterceptor implements AuthorizationInterceptor * 验证是否有权限访问功能 */ @Override - public boolean allowVisit(MagicUser magicUser, MagicHttpServletRequest request, Authorization authorization) { - if(denyOptions==null){ + public boolean allowVisit(MagicUser magicUser, MagicHttpServletRequest request, + Authorization authorization) { + if (denyOptions == null) { return true; } String[] denyOption = denyOptions.get(magicUser.getUsername()).split(","); @@ -110,7 +129,7 @@ public class SimpleAuthorizationInterceptor implements AuthorizationInterceptor token = new String(b); log.debug("本次登录token:[{}]", token); } catch (UnsupportedEncodingException e) { - log.info("生成token失败,可能字符集不合法。[{}={}]",username,password); + log.info("生成token失败,可能字符集不合法。[{}={}]", username, password); throw new MagicLoginException("用户名或密码配置不合法"); } return token; diff --git a/src/main/java/net/linlan/third/magic/provider/CustomJsonValueProvider.java b/src/main/java/net/linlan/third/magic/provider/CustomJsonValueProvider.java index 2198b251243fcaac10e57936353f29886f3ef5ca..3981ea89dab19b000271b7ba1a98e47e04c7982d 100644 --- a/src/main/java/net/linlan/third/magic/provider/CustomJsonValueProvider.java +++ b/src/main/java/net/linlan/third/magic/provider/CustomJsonValueProvider.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.provider; import org.ssssssss.magicapi.core.config.JsonCodeConstants; @@ -13,26 +30,25 @@ import org.ssssssss.magicapi.core.model.JsonBean; */ public class CustomJsonValueProvider implements ResultProvider { - - /** - * 构建请求结果 - * @param requestEntity 请求相关信息 - * @param code 状态码 - * @param message 状态说明 - * @param data 数据内容,可以通过data的类型判断是否是分页结果进行区分普通结果集和分页结果集 - * @return 对象 - */ - @Override - public Object buildResult(RequestEntity requestEntity, int code, String message, Object data) { - // 分页结果 -// if (data instanceof PageResult) { -// PageResult pageResult = (PageResult) data; -// long total = pageResult.getTotal(); -// return new PageJsonBean(total, pageResult.getList()); -// } - if (code == JsonCodeConstants.SUCCESS.getCode()) { - return new JsonBean<>(200, message, data); - } - return new JsonBean<>(code, message, data); - } + /** + * 构建请求结果 + * @param requestEntity 请求相关信息 + * @param code 状态码 + * @param message 状态说明 + * @param data 数据内容,可以通过data的类型判断是否是分页结果进行区分普通结果集和分页结果集 + * @return 对象 + */ + @Override + public Object buildResult(RequestEntity requestEntity, int code, String message, Object data) { + // 分页结果 + // if (data instanceof PageResult) { + // PageResult pageResult = (PageResult) data; + // long total = pageResult.getTotal(); + // return new PageJsonBean(total, pageResult.getList()); + // } + if (code == JsonCodeConstants.SUCCESS.getCode()) { + return new JsonBean<>(200, message, data); + } + return new JsonBean<>(code, message, data); + } } diff --git a/src/main/java/net/linlan/third/magic/provider/CustomLanguageProvider.java b/src/main/java/net/linlan/third/magic/provider/CustomLanguageProvider.java index 9e7ae0cee803899df2e136bdff73d3b36ca66efb..8f4d41ee96045e938460305a33a149206b2d14c8 100644 --- a/src/main/java/net/linlan/third/magic/provider/CustomLanguageProvider.java +++ b/src/main/java/net/linlan/third/magic/provider/CustomLanguageProvider.java @@ -1,9 +1,26 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.provider; -import org.ssssssss.magicapi.jsr223.LanguageProvider; - import java.util.Map; +import org.ssssssss.magicapi.jsr223.LanguageProvider; + /** * 自定义脚本语言 * https://ssssssss.org/magic-api/pages/senior/script/ @@ -11,26 +28,27 @@ import java.util.Map; */ public class CustomLanguageProvider implements LanguageProvider { - @Override - public boolean support(String languageName) { - return "custom".equalsIgnoreCase(languageName); - } + @Override + public boolean support(String languageName) { + return "custom".equalsIgnoreCase(languageName); + } - /** - * 执行脚本 - * @param languageName 语言类型 - * @param script 脚本内容 - * @param context 当前环境中的变量信息 - * - * var name = "test variable" - * var func = ```custom - * // 任意代码 - * ```; - * return func(); - * //返回结果:hello test variable - */ - @Override - public Object execute(String languageName, String script, Map context) throws Exception { - return "hello " + context.get("name"); - } + /** + * 执行脚本 + * @param languageName 语言类型 + * @param script 脚本内容 + * @param context 当前环境中的变量信息 + * + * var name = "test variable" + * var func = ```custom + * // 任意代码 + * ```; + * return func(); + * //返回结果:hello test variable + */ + @Override + public Object execute(String languageName, String script, + Map context) throws Exception { + return "hello " + context.get("name"); + } } diff --git a/src/main/java/net/linlan/third/magic/provider/CustomMapperProvider.java b/src/main/java/net/linlan/third/magic/provider/CustomMapperProvider.java index 1eaa35b9af23e248362791447034b7856f72a06c..129d77bd94b289388130c2d61a6629c780bfd9ea 100644 --- a/src/main/java/net/linlan/third/magic/provider/CustomMapperProvider.java +++ b/src/main/java/net/linlan/third/magic/provider/CustomMapperProvider.java @@ -1,6 +1,22 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.provider; - import org.ssssssss.magicapi.modules.db.provider.ColumnMapperProvider; /** @@ -10,21 +26,21 @@ import org.ssssssss.magicapi.modules.db.provider.ColumnMapperProvider; */ public class CustomMapperProvider implements ColumnMapperProvider { - @Override - public String name() { - return "custom"; - } + @Override + public String name() { + return "custom"; + } - @Override - public String mapping(String columnName) { - // 自定义逻辑 - // 列名转小写。 - return columnName.toLowerCase(); - } + @Override + public String mapping(String columnName) { + // 自定义逻辑 + // 列名转小写。 + return columnName.toLowerCase(); + } - @Override - public String unmapping(String name) { - // 自定义逻辑实现将转换后的列名还原为转换前的列名 - return name; - } + @Override + public String unmapping(String name) { + // 自定义逻辑实现将转换后的列名还原为转换前的列名 + return name; + } } diff --git a/src/main/java/net/linlan/third/magic/provider/CustomPageProvider.java b/src/main/java/net/linlan/third/magic/provider/CustomPageProvider.java index 7ee1723e084e436b941cc6dc7841dbe2b15d8929..7e43aa2e1019d16e2de204c0659517e61e05c999 100644 --- a/src/main/java/net/linlan/third/magic/provider/CustomPageProvider.java +++ b/src/main/java/net/linlan/third/magic/provider/CustomPageProvider.java @@ -1,12 +1,29 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.provider; +import java.util.Objects; + import org.apache.commons.lang3.math.NumberUtils; import org.ssssssss.magicapi.modules.db.model.Page; import org.ssssssss.magicapi.modules.db.provider.PageProvider; import org.ssssssss.script.runtime.RuntimeContext; -import java.util.Objects; - /** * 自定义获取分页参数 * https://ssssssss.org/magic-api/pages/quick/page/ @@ -15,11 +32,11 @@ import java.util.Objects; */ public class CustomPageProvider implements PageProvider { - @Override - public Page getPage(RuntimeContext context) { - // 从Request中提取page以及pageSize - long page = NumberUtils.toLong(Objects.toString(context.eval("page"), ""), 1); - long pageSize = NumberUtils.toLong(Objects.toString(context.eval("size"), ""), 10); - return new Page(pageSize, (page - 1) * pageSize); - } + @Override + public Page getPage(RuntimeContext context) { + // 从Request中提取page以及pageSize + long page = NumberUtils.toLong(Objects.toString(context.eval("page"), ""), 1); + long pageSize = NumberUtils.toLong(Objects.toString(context.eval("size"), ""), 10); + return new Page(pageSize, (page - 1) * pageSize); + } } diff --git a/src/main/java/net/linlan/third/magic/provider/CustomSqlCache.java b/src/main/java/net/linlan/third/magic/provider/CustomSqlCache.java index 53ea0f354d98e97ac6bce2cfd9be7b11ebeab1c3..3e63045cb67de1caa0bfc57427fa678d9aa10348 100644 --- a/src/main/java/net/linlan/third/magic/provider/CustomSqlCache.java +++ b/src/main/java/net/linlan/third/magic/provider/CustomSqlCache.java @@ -1,146 +1,163 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.provider; - -import org.ssssssss.magicapi.modules.db.cache.SqlCache; - import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.locks.ReentrantReadWriteLock; +import org.ssssssss.magicapi.modules.db.cache.SqlCache; + /** * 自定义SQL缓存 * https://ssssssss.org/guide/custom/cache.html * @see org.ssssssss.magicapi.modules.db.cache.SqlCache * @see org.ssssssss.magicapi.modules.db.cache.DefaultSqlCache */ -public class CustomSqlCache extends LinkedHashMap> implements SqlCache { - - private final String separator = ":"; - - private final int capacity; - - private final long expire; - - private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); - - public CustomSqlCache() { - this(10000, 30 * 60L); - } - - public CustomSqlCache(int capacity, long expire) { - super((int) Math.ceil(capacity / 0.75) + 1, 0.75f, true); - // 容量 - this.capacity = capacity; - // 固定过期时间 - this.expire = expire; - } - - @Override - public void put(String name, String key, Object value) { - // 封装成过期时间节点 - put(name, key, value, this.expire); - } - - @Override - public void put(String name, String key, Object value, long ttl) { - long expireTime = ttl > 0 ? (System.currentTimeMillis() + ttl) : - (this.expire > -1 ? System.currentTimeMillis() + this.expire : Long.MAX_VALUE); - lock.writeLock().lock(); - try { - // 封装成过期时间节点 - put(name + separator + key, new CustomSqlCache.ExpireNode<>(expireTime, value)); - } finally { - lock.writeLock().unlock(); - } - } - - @Override - public Object get(String name, String key) { - key = name + separator + key; - lock.readLock().lock(); - CustomSqlCache.ExpireNode expireNode; - try { - expireNode = super.get(key); - } finally { - lock.readLock().unlock(); - } - if (expireNode == null) { - return null; - } - // 惰性删除过期的 -// if (this.expire > -1L && expireNode.expire < System.currentTimeMillis()) { - if (expireNode.expire < System.currentTimeMillis()) { - try { - lock.writeLock().lock(); - super.remove(key); - } finally { - lock.writeLock().unlock(); - } - return null; - } - return expireNode.value; - } - - @Override - public void delete(String name) { - try { - lock.writeLock().lock(); - Iterator>> iterator = super.entrySet().iterator(); - String prefix = name + separator; - // 清除所有key前缀为name + separator的缓存 - while (iterator.hasNext()) { - Map.Entry> entry = iterator.next(); - if (entry.getKey().startsWith(prefix)) { - iterator.remove(); - } - } - } finally { - lock.writeLock().unlock(); - } - } - - - @Override - protected boolean removeEldestEntry(Map.Entry> eldest) { - if (this.expire > -1L && size() > capacity) { - clean(); - } - // lru淘汰 - return size() > this.capacity; - } - - /** - * 清理已过期的数据 - */ - private void clean() { - try { - lock.writeLock().lock(); - Iterator>> iterator = super.entrySet().iterator(); - long now = System.currentTimeMillis(); - while (iterator.hasNext()) { - Map.Entry> next = iterator.next(); - // 判断是否过期 - if (next.getValue().expire < now) { - iterator.remove(); - } - } - } finally { - lock.writeLock().unlock(); - } - } - - - /** - * 过期时间节点 - */ - static class ExpireNode { - long expire; - V value; - - ExpireNode(long expire, V value) { - this.expire = expire; - this.value = value; - } - } +public class CustomSqlCache extends LinkedHashMap> + implements SqlCache { + + private final String separator = ":"; + + private final int capacity; + + private final long expire; + + private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); + + public CustomSqlCache() { + this(10000, 30 * 60L); + } + + public CustomSqlCache(int capacity, long expire) { + super((int) Math.ceil(capacity / 0.75) + 1, 0.75f, true); + // 容量 + this.capacity = capacity; + // 固定过期时间 + this.expire = expire; + } + + @Override + public void put(String name, String key, Object value) { + // 封装成过期时间节点 + put(name, key, value, this.expire); + } + + @Override + public void put(String name, String key, Object value, long ttl) { + long expireTime = ttl > 0 ? (System.currentTimeMillis() + ttl) + : (this.expire > -1 ? System.currentTimeMillis() + this.expire : Long.MAX_VALUE); + lock.writeLock().lock(); + try { + // 封装成过期时间节点 + put(name + separator + key, new CustomSqlCache.ExpireNode<>(expireTime, value)); + } finally { + lock.writeLock().unlock(); + } + } + + @Override + public Object get(String name, String key) { + key = name + separator + key; + lock.readLock().lock(); + CustomSqlCache.ExpireNode expireNode; + try { + expireNode = super.get(key); + } finally { + lock.readLock().unlock(); + } + if (expireNode == null) { + return null; + } + // 惰性删除过期的 + // if (this.expire > -1L && expireNode.expire < System.currentTimeMillis()) { + if (expireNode.expire < System.currentTimeMillis()) { + try { + lock.writeLock().lock(); + super.remove(key); + } finally { + lock.writeLock().unlock(); + } + return null; + } + return expireNode.value; + } + + @Override + public void delete(String name) { + try { + lock.writeLock().lock(); + Iterator>> iterator = super.entrySet() + .iterator(); + String prefix = name + separator; + // 清除所有key前缀为name + separator的缓存 + while (iterator.hasNext()) { + Map.Entry> entry = iterator.next(); + if (entry.getKey().startsWith(prefix)) { + iterator.remove(); + } + } + } finally { + lock.writeLock().unlock(); + } + } + + @Override + protected boolean removeEldestEntry(Map.Entry> eldest) { + if (this.expire > -1L && size() > capacity) { + clean(); + } + // lru淘汰 + return size() > this.capacity; + } + + /** + * 清理已过期的数据 + */ + private void clean() { + try { + lock.writeLock().lock(); + Iterator>> iterator = super.entrySet() + .iterator(); + long now = System.currentTimeMillis(); + while (iterator.hasNext()) { + Map.Entry> next = iterator.next(); + // 判断是否过期 + if (next.getValue().expire < now) { + iterator.remove(); + } + } + } finally { + lock.writeLock().unlock(); + } + } + + /** + * 过期时间节点 + */ + static class ExpireNode { + long expire; + V value; + + ExpireNode(long expire, V value) { + this.expire = expire; + this.value = value; + } + } } diff --git a/src/main/java/net/linlan/third/magic/scripts/CustomFunction.java b/src/main/java/net/linlan/third/magic/scripts/CustomFunction.java index 747161bb4477721cd8a9de0473b39356d8252bc7..8298c60872590ecb47e14edc1bf9167afd926f89 100644 --- a/src/main/java/net/linlan/third/magic/scripts/CustomFunction.java +++ b/src/main/java/net/linlan/third/magic/scripts/CustomFunction.java @@ -1,44 +1,64 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.scripts; +import java.util.Date; + import org.ssssssss.magicapi.core.config.MagicFunction; import org.ssssssss.script.annotation.Comment; import org.ssssssss.script.annotation.Function; import org.ssssssss.script.functions.DateExtension; -import java.util.Date; - /** * 自定义函数 * https://ssssssss.org/magic-api/pages/senior/function/ */ public class CustomFunction implements MagicFunction { - // 脚本中直接使用 now(); - @Function - @Comment("取当前时间") - public Date now() { - return new Date(); - } - - // 脚本中使用 date_format(now()) - @Function - @Comment("日期格式化") - public String date_format(@Comment(name = "target", value = "目标日期") Date target) { - return target == null ? null : DateExtension.format(target, "yyyy-MM-dd HH:mm:ss"); - } - - // 脚本中使用 date_format(now(),'yyyy-MM-dd') - @Function - @Comment("日期格式化") - public String date_format(@Comment(name = "target", value = "目标日期") Date target, @Comment(name = "pattern", value = "格式") String pattern) { - return target == null ? null : DateExtension.format(target, pattern); - } - - // 脚本中直接使用ifnull() 调用 - @Function - @Comment("判断值是否为空") - public Object ifnull(@Comment(name = "target", value = "目标值") Object target, @Comment(name = "trueValue", value = "为空的值") Object trueValue, @Comment(name = "falseValue", value = "不为空的值") Object falseValue) { - return target == null ? trueValue : falseValue; - } + // 脚本中直接使用 now(); + @Function + @Comment("取当前时间") + public Date now() { + return new Date(); + } + + // 脚本中使用 date_format(now()) + @Function + @Comment("日期格式化") + public String date_format(@Comment(name = "target", value = "目标日期") Date target) { + return target == null ? null : DateExtension.format(target, "yyyy-MM-dd HH:mm:ss"); + } + + // 脚本中使用 date_format(now(),'yyyy-MM-dd') + @Function + @Comment("日期格式化") + public String date_format(@Comment(name = "target", value = "目标日期") Date target, + @Comment(name = "pattern", value = "格式") String pattern) { + return target == null ? null : DateExtension.format(target, pattern); + } + + // 脚本中直接使用ifnull() 调用 + @Function + @Comment("判断值是否为空") + public Object ifnull(@Comment(name = "target", value = "目标值") Object target, + @Comment(name = "trueValue", value = "为空的值") Object trueValue, + @Comment(name = "falseValue", value = "不为空的值") Object falseValue) { + return target == null ? trueValue : falseValue; + } } diff --git a/src/main/java/net/linlan/third/magic/scripts/CustomFunctionExtension.java b/src/main/java/net/linlan/third/magic/scripts/CustomFunctionExtension.java index 900de0b0ec8795fd2bfb1d759394a47f76c07b16..fcbf97d0b21f2ade8750622e0c02c3610b4822f4 100644 --- a/src/main/java/net/linlan/third/magic/scripts/CustomFunctionExtension.java +++ b/src/main/java/net/linlan/third/magic/scripts/CustomFunctionExtension.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.scripts; import org.apache.commons.lang3.math.NumberUtils; @@ -10,13 +27,13 @@ import org.ssssssss.script.functions.ExtensionMethod; * @see ExtensionMethod */ public class CustomFunctionExtension implements ExtensionMethod { - /** - * 扩展String方法 - */ - @Override - public Class support() { - return String.class; - } + /** + * 扩展String方法 + */ + @Override + public Class support() { + return String.class; + } /** * 方法参数至少有一个,且第一个参数必须为support方法返回的类型 @@ -27,9 +44,9 @@ public class CustomFunctionExtension implements ExtensionMethod { * //以下两种方式都支持 * @return '1234'.toInt(); */ - @Comment("将字符串转为Integer(方法名的提示)") - public Integer toInt(String str){ // 第一个参数无需使用@Comment注解 - return NumberUtils.toInt(str); - } + @Comment("将字符串转为Integer(方法名的提示)") + public Integer toInt(String str) { // 第一个参数无需使用@Comment注解 + return NumberUtils.toInt(str); + } } diff --git a/src/main/java/net/linlan/third/magic/scripts/CustomModule.java b/src/main/java/net/linlan/third/magic/scripts/CustomModule.java index b7c3e7f8733ef94f20c2a8ad4566a1b12289b381..93ca10ce7bcabf109ed8f7907ec15c208431f3ad 100644 --- a/src/main/java/net/linlan/third/magic/scripts/CustomModule.java +++ b/src/main/java/net/linlan/third/magic/scripts/CustomModule.java @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package net.linlan.third.magic.scripts; import org.ssssssss.magicapi.core.annotation.MagicModule; @@ -20,8 +37,8 @@ import org.ssssssss.script.annotation.Comment; @MagicModule("custom") public class CustomModule { - @Comment("方法名的注释(用于提示)") - public void println(@Comment(name = "value", value = "参数名的提示(用于提示)")String value) { - System.out.println(value); - } + @Comment("方法名的注释(用于提示)") + public void println(@Comment(name = "value", value = "参数名的提示(用于提示)") String value) { + System.out.println(value); + } } diff --git a/src/main/java/net/linlan/third/prometheus/PrometheusAuthExample.java b/src/main/java/net/linlan/third/prometheus/PrometheusAuthExample.java new file mode 100644 index 0000000000000000000000000000000000000000..44809fa4664ef1af41fb308a5669326bf91675a1 --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/PrometheusAuthExample.java @@ -0,0 +1,46 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus; + +import java.io.IOException; + +public class PrometheusAuthExample { + public static void main(String[] args) { + // 创建客户端 + PrometheusQueryClient client = new PrometheusQueryClient("admin", "3RBpuv0EBcli", + "http://10.90.14.39:8950/"); + + try { + // 即时查询 + net.linlan.third.prometheus.QueryResult result1 = client.queryReturnQueryResult("up", + null, true); + System.out.println("即时授权查询结果: " + result1.getData().toString()); + // 范围查询 + long now = System.currentTimeMillis() / 1000; + long oneHourAgo = now - 3600; + net.linlan.third.prometheus.QueryResult rangeResult = client + .queryRange("node_memory_Active_bytes", oneHourAgo, now, 6000L, null, true); + System.out.println("范围查询结果: " + rangeResult.getData().toString()); + + } catch (IOException e) { + System.err.println("查询失败: " + e.getMessage()); + e.printStackTrace(); + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/linlan/third/prometheus/PrometheusExample.java b/src/main/java/net/linlan/third/prometheus/PrometheusExample.java new file mode 100644 index 0000000000000000000000000000000000000000..479e0ab88cba15be0b4e093dd88d29b32785ec3a --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/PrometheusExample.java @@ -0,0 +1,79 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class PrometheusExample { + public static void main(String[] args) { + // 创建客户端 + PrometheusQueryClient client = new PrometheusQueryClient("http://10.8.128.97:9090/"); + + try { + // 示例1: 简单的CPU使用率查询 + String promQL1 = "100 - (avg by(instance) (irate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)"; + Map result1 = client.query(promQL1); + System.out.println("CPU使用率查询结果: " + result1); + + // 示例2: 使用参数的查询 + String promQL2 = "rate(http_requests_total{job=\"${job}\"}[${duration}])"; + Map params = new HashMap<>(); + params.put("job", "api-server"); + params.put("duration", "5m"); + + Map result2 = client.query(promQL2, params); + System.out.println("HTTP请求率查询结果: " + result2); + + // 示例3: 处理查询结果 + processQueryResult(result2); + + } catch (IOException e) { + System.err.println("查询失败: " + e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 处理查询结果 + */ + private static void processQueryResult(Map result) { + if (!"success".equals(result.get("status"))) { + System.err.println("查询失败: " + result.get("error")); + return; + } + + Map data = (Map) result.get("data"); + String resultType = (String) data.get("resultType"); + System.out.println("结果类型: " + resultType); + + // 处理瞬时向量结果 + if ("vector".equals(resultType)) { + java.util.List> results = (java.util.List>) data + .get("result"); + for (Map item : results) { + Map metric = (Map) item.get("metric"); + java.util.List value = (java.util.List) item.get("value"); + + System.out.println("指标: " + metric); + System.out.println("值: " + value.get(1) + " (时间戳: " + value.get(0) + ")"); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/linlan/third/prometheus/PrometheusModule.java b/src/main/java/net/linlan/third/prometheus/PrometheusModule.java new file mode 100644 index 0000000000000000000000000000000000000000..f259950274f4b94f9a13850f9b914f2810941fb7 --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/PrometheusModule.java @@ -0,0 +1,123 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus; + +import java.util.Map; + +import javax.annotation.Resource; + +import org.ssssssss.magicapi.core.annotation.MagicModule; +import org.ssssssss.script.annotation.Comment; + +import net.linlan.third.prometheus.re.DashboardResult; + +@MagicModule("ps") +public class PrometheusModule { + + @Resource + private PrometheusService prometheusService; + + /** 执行PromQL查询 + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param params 扩展参数 + * @return 查询结果对象 + */ + @Comment("执行PromQL查询") + public DashboardResult query(@Comment(name = "prometheusUrl", value = "访问URL") String prometheusUrl, + @Comment(name = "promQL", value = "promQL语句") String promQL, + @Comment(name = "params", value = "扩展参数") Map params) { + return prometheusService.executeQuery(prometheusUrl, promQL, params, null, null); + } + + /** 执行PromQL查询 + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param params 扩展参数 + * @param columnList 列KV标记 + * @return 查询结果对象 + */ + @Comment("传入列KV标记执行PromQL查询") + public DashboardResult queryWithConfig(@Comment(name = "prometheusUrl", value = "访问URL") String prometheusUrl, + @Comment(name = "promQL", value = "promQL语句") String promQL, + @Comment(name = "params", value = "扩展参数") Map params, + @Comment(name = "columnList", value = "列KV标记") Map columnList) { + return prometheusService.executeQuery(prometheusUrl, promQL, params, null, columnList); + } + + /** 执行PromQL查询 + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param params 扩展参数 + * @param authFlag 认证标记:flag,source + * @return 查询结果对象 + */ + @Comment("授权执行PromQL查询") + public DashboardResult queryAuth(@Comment(name = "prometheusUrl", value = "访问URL") String prometheusUrl, + @Comment(name = "promQL", value = "promQL语句") String promQL, + @Comment(name = "params", value = "扩展参数") Map params, + @Comment(name = "authFlag", value = "认证标记:flag,source") Map authFlag) { + return prometheusService.executeQuery(prometheusUrl, promQL, params, authFlag, null); + } + + /** 执行PromQL查询 + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param params 扩展参数 + * @param authFlag 认证标记:flag,source + * @param columnList 列KV标记 + * @return 查询结果对象 + */ + @Comment("传入列KV标记授权执行PromQL查询") + public DashboardResult queryAuthWithConfig(@Comment(name = "prometheusUrl", value = "访问URL") String prometheusUrl, + @Comment(name = "promQL", value = "promQL语句") String promQL, + @Comment(name = "params", value = "扩展参数") Map params, + @Comment(name = "authFlag", value = "认证标记:flag,source") Map authFlag, + @Comment(name = "columnList", value = "列KV标记") Map columnList) { + return prometheusService.executeQuery(prometheusUrl, promQL, params, authFlag, columnList); + } + + /** + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param start 开始时间 + * @param end 结束时间 + * @param step 步进间隔 + * @param params 扩展参数 + * @param authFlag 认证标记:flag,source + * @param columnList 列KV标记 + * @return 查询结果对象 + */ + @Comment("执行PromQL范围查询") + public DashboardResult queryRange(@Comment(name = "prometheusUrl", value = "访问URL") String prometheusUrl, + @Comment(name = "promQL", value = "promQL语句") String promQL, + @Comment(name = "start", value = "开始时间") Long start, + @Comment(name = "end", value = "结束时间") Long end, + @Comment(name = "step", value = "步进间隔") Long step, + @Comment(name = "params", value = "扩展参数") Map params, + @Comment(name = "authFlag", value = "认证标记:flag,source") Map authFlag, + @Comment(name = "columnList", value = "列KV标记") Map columnList) { + return prometheusService.executeQueryRange(prometheusUrl, promQL, start, end, step, params, + authFlag, columnList); + } + + @Comment("PromQL模块输出") + public void println(@Comment(name = "value", value = "打印的输入参数") String value) { + System.out.println(value); + } +} diff --git a/src/main/java/net/linlan/third/prometheus/PrometheusQueryClient.java b/src/main/java/net/linlan/third/prometheus/PrometheusQueryClient.java new file mode 100644 index 0000000000000000000000000000000000000000..8cc07567532af09e9c68833cce090625e42924ac --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/PrometheusQueryClient.java @@ -0,0 +1,233 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus; + +import java.io.IOException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * 简单的Prometheus查询客户端 + */ +public class PrometheusQueryClient { + /** + * 服务器路径 + */ + private final String baseUrl; + /** + * 授权请求 + */ + private final String authHeader; + private static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); + private final OkHttpClient httpClient; + private final ObjectMapper objectMapper; + + public PrometheusQueryClient(String baseUrl) { + this.baseUrl = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/"; + this.authHeader = null; + this.httpClient = new OkHttpClient.Builder().connectTimeout(10, TimeUnit.SECONDS) + .readTimeout(30, TimeUnit.SECONDS).build(); + this.objectMapper = new ObjectMapper(); + } + + public PrometheusQueryClient(String username, String password, String baseUrl) { + String auth = username + ":" + password; + this.authHeader = "Basic " + java.util.Base64.getEncoder().encodeToString(auth.getBytes()); + this.baseUrl = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/"; + this.httpClient = new OkHttpClient.Builder().connectTimeout(10, TimeUnit.SECONDS) + .readTimeout(30, TimeUnit.SECONDS).build(); + this.objectMapper = new ObjectMapper(); + } + + /** + * 执行PromQL查询 + * @param promQL PromQL查询语句 + * @return 查询结果 + * @throws IOException 当请求失败时抛出 + */ + public Map query(String promQL) throws IOException { + return query(promQL, new HashMap<>()); + } + + /** + * 执行PromQL查询 + * @param promQL PromQL查询语句 + * @param params 查询参数 + * @return 查询结果 + * @throws IOException 当请求失败时抛出 + */ + public Map query(String promQL, Map params) throws IOException { + // 解析参数 + String resolvedPromQL = resolveParameters(promQL, params); + + // 编码查询 + String encodedPromQL = URLEncoder.encode(resolvedPromQL, StandardCharsets.UTF_8.toString()); + + // 构建URL + String url = baseUrl + "api/v1/query?query=" + encodedPromQL; + + // 创建请求 + Request request = new Request.Builder().url(url).get().build(); + + // 执行请求 + try (Response response = httpClient.newCall(request).execute()) { + if (!response.isSuccessful()) { + throw new IOException("Unexpected code " + response); + } + + // 解析响应 + String responseBody = response.body().string(); + return objectMapper.readValue(responseBody, Map.class); + } + } + + /** + * 执行PromQL查询 + * @param promQL PromQL查询语句 + * @param params 查询参数 + * @param needLogin 是否登录 + * @return 查询结果 + * @throws IOException 当请求失败时抛出 + */ + public net.linlan.third.prometheus.QueryResult queryReturnQueryResult(String promQL, + Map params, + boolean needLogin) throws IOException { + // 解析参数 + String resolvedPromQL = resolveParameters(promQL, params); + + // 编码查询 + String encodedPromQL = URLEncoder.encode(resolvedPromQL, StandardCharsets.UTF_8.toString()); + // 构建URL + String url = baseUrl + "api/v1/query?query=" + encodedPromQL; + Request request; + //需要授权登录 + if (needLogin) { + // 创建请求 + request = new Request.Builder().url(url).header("Authorization", authHeader) + .header("Accept", "application/json").get().build(); + } else { + // 创建请求 + request = new Request.Builder().url(url).get().build(); + } + + // 执行请求 + try (Response response = httpClient.newCall(request).execute()) { + if (!response.isSuccessful()) { + throw new IOException("Unexpected code " + response); + } + + // 解析响应 + String responseBody = response.body().string(); + return objectMapper.readValue(responseBody, + net.linlan.third.prometheus.QueryResult.class); + } + } + + /** + * 解析参数 + */ + private String resolveParameters(String promQL, Map params) { + if (params == null || params.isEmpty()) { + return promQL; + } + + String result = promQL; + for (Map.Entry entry : params.entrySet()) { + String key = "${" + entry.getKey() + "}"; + String value = entry.getValue().toString(); + result = result.replace(key, value); + } + return result; + } + + public net.linlan.third.prometheus.QueryResult queryRange(String promQL, Long start, Long end, + Long step, Map params, + boolean needLogin) throws IOException { + // 解析参数 + String resolvedPromQL = resolveParameters(promQL, params); + + // 编码查询 + String encodedPromQL = URLEncoder.encode(resolvedPromQL, StandardCharsets.UTF_8.toString()); + + // 构建URL + String url = baseUrl + "/api/v1/query_range?query=" + encodedPromQL + "&start=" + start + + "&end=" + end + "&step=" + step; + + Request request; + //需要授权登录 + if (needLogin) { + // 创建请求 + request = new Request.Builder().url(url).header("Authorization", authHeader) + .header("Accept", "application/json").get().build(); + } else { + // 创建请求 + request = new Request.Builder().url(url).get().build(); + } + + // 执行请求 + try (Response response = httpClient.newCall(request).execute()) { + if (!response.isSuccessful()) { + throw new IOException("Unexpected code " + response); + } + + // 解析响应 + String responseBody = response.body().string(); + return objectMapper.readValue(responseBody, + net.linlan.third.prometheus.QueryResult.class); + } + } + + /** + * 处理查询结果 + */ + private static Object processQueryResult(Map result) { + if (!"success".equals(result.get("status"))) { + System.err.println("查询失败: " + result.get("error")); + return null; + } + + Map data = (Map) result.get("data"); + String resultType = (String) data.get("resultType"); + System.out.println("结果类型: " + resultType); + + // 处理瞬时向量结果 + if ("vector".equals(resultType)) { + java.util.List> results = (java.util.List>) data + .get("result"); + for (Map item : results) { + Map metric = (Map) item.get("metric"); + java.util.List value = (java.util.List) item.get("value"); + + System.out.println("指标: " + metric); + System.out.println("值: " + value.get(1) + " (时间戳: " + value.get(0) + ")"); + } + } + return null; + } + +} diff --git a/src/main/java/net/linlan/third/prometheus/PrometheusService.java b/src/main/java/net/linlan/third/prometheus/PrometheusService.java new file mode 100644 index 0000000000000000000000000000000000000000..c5ed0f83925a99040d275cee734c5da3aefa0f4a --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/PrometheusService.java @@ -0,0 +1,167 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus; + +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.http.client.ClientHttpResponse; +import org.springframework.stereotype.Component; +import org.springframework.web.client.DefaultResponseErrorHandler; +import org.springframework.web.client.RestTemplate; + +import net.linlan.third.prometheus.config.PrometheusInfo; +import net.linlan.third.prometheus.config.PrometheusSourceConfig; +import net.linlan.third.prometheus.re.ColumnConfig; +import net.linlan.third.prometheus.re.DashboardResult; + +@Component +public class PrometheusService { + + @Resource + private PrometheusSourceConfig prometheusSourceConfig; + + private final RestTemplate restTemplate; + + public PrometheusService() { + this.restTemplate = new RestTemplate(); + this.restTemplate.setErrorHandler(new DefaultResponseErrorHandler() { + @Override + public boolean hasError(ClientHttpResponse response) { + // Prometheus可能返回200但包含错误信息,需要特殊处理 + return false; + } + }); + } + + /** + * 执行PromQL查询 + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param params 扩展参数 + * @param authFlag 认证标记 + * @param columnList 列配置 + * @return 查询结果对象 + */ + public DashboardResult executeQuery(String prometheusUrl, String promQL, + Map params, Map authFlag, + Map columnList) { + //分析后台地址是否需要登录 + boolean needLogin = false; + if (ObjectUtils.isNotEmpty(authFlag)) { + needLogin = Boolean.parseBoolean((String) authFlag.get("flag")); + } + // 创建客户端 + PrometheusQueryClient client; + if (needLogin) { + String source = (String) authFlag.get("source"); + PrometheusInfo prometheusInfo = prometheusSourceConfig.getPrometheusSource(source); + client = new PrometheusQueryClient(prometheusInfo.getUsername(), + prometheusInfo.getPassword(), prometheusUrl); + } else { + client = new PrometheusQueryClient(prometheusUrl); + } + DashboardResult dashboardResult = new DashboardResult(); + try { + net.linlan.third.prometheus.QueryResult result = client.queryReturnQueryResult(promQL, + params, needLogin); + // System.out.println("Query查询结果: " + result); + if (ObjectUtils.isNotEmpty(columnList)) { + // 转换 + List columnConfigs = convertMapToList(columnList); + dashboardResult.setColumnConfig(columnConfigs); + } + if (ObjectUtils.isNotEmpty(result)) { + //拼接输出数据 + dashboardResult.setData(result.getData()); + } + } catch (IOException e) { + // System.err.println("Query查询失败: " + e.getMessage()); + e.printStackTrace(); + } + return dashboardResult; + } + + /** + * 执行范围查询 + * @param prometheusUrl 访问URL + * @param promQL promQL语句 + * @param start 开始时间 + * @param end 结束时间 + * @param step 步进间隔 + * @param params 扩展参数 + * @param authFlag 认证标记 + * @param columnList 列配置 + * @return 查询结果对象 + */ + public DashboardResult executeQueryRange(String prometheusUrl, String promQL, Long start, + Long end, Long step, Map params, + Map authFlag, + Map columnList) { + //分析后台地址是否需要登录 + boolean needLogin = false; + if (ObjectUtils.isNotEmpty(authFlag)) { + needLogin = Boolean.parseBoolean((String) authFlag.get("flag")); + } + // 创建客户端 + PrometheusQueryClient client; + if (needLogin) { + String source = (String) authFlag.get("source"); + PrometheusInfo prometheusInfo = prometheusSourceConfig.getPrometheusSource(source); + client = new PrometheusQueryClient(prometheusInfo.getUsername(), + prometheusInfo.getPassword(), prometheusUrl); + } else { + client = new PrometheusQueryClient(prometheusUrl); + } + DashboardResult dashboardResult = new DashboardResult(); + try { + net.linlan.third.prometheus.QueryResult result = client.queryRange(promQL, start, end, + step, params, needLogin); + // System.out.println("QueryRange查询结果: " + result); + if (ObjectUtils.isNotEmpty(columnList)) { + // 转换 + List columnConfigs = convertMapToList(columnList); + dashboardResult.setColumnConfig(columnConfigs); + } + if (ObjectUtils.isNotEmpty(result)) { + //拼接输出数据 + dashboardResult.setData(result.getData()); + } + + } catch (IOException e) { + // System.err.println("QueryRange查询失败: " + e.getMessage()); + e.printStackTrace(); + } + return dashboardResult; + } + + public static List convertMapToList(Map columnList) { + return columnList.entrySet().stream().map(entry -> { + ColumnConfig config = new ColumnConfig(); + config.setKey(entry.getKey()); + config.setValue(entry.getValue() != null ? entry.getValue().toString() : null); + return config; + }).collect(Collectors.toList()); + } + +} diff --git a/src/main/java/net/linlan/third/prometheus/QueryResult.java b/src/main/java/net/linlan/third/prometheus/QueryResult.java new file mode 100644 index 0000000000000000000000000000000000000000..33d896d03fe9f2634ce515ce3aeff6e7a02fadb0 --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/QueryResult.java @@ -0,0 +1,125 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus; + +import java.util.List; +import java.util.Map; + +public class QueryResult { + /** + * 状态 + */ + private String status; + /** + * 数据 + */ + private Data data; + + /** + * 提示信息 + */ + private List infos; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Data getData() { + return data; + } + + public void setData(Data data) { + this.data = data; + } + + public List getInfos() { + return infos; + } + + public void setInfos(List infos) { + this.infos = infos; + } + + public static class Data { + /** + * 返回类型,如"vector" | "matrix" | "scalar" | "string" + */ + private String resultType; + /** + * 返回数据 + */ + private List result; + + public String getResultType() { + return resultType; + } + + public void setResultType(String resultType) { + this.resultType = resultType; + } + + public List getResult() { + return result; + } + + public void setResult(List result) { + this.result = result; + } + + } + + public static class Result { + private Map metric; + /** + * 对于瞬时向量,value是 [时间戳, 值] + */ + private List value; + /** + * 对于区间向量,values是多个 [时间戳, 值] + */ + private List> values; + + public Map getMetric() { + return metric; + } + + public void setMetric(Map metric) { + this.metric = metric; + } + + public List getValue() { + return value; + } + + public void setValue(List value) { + this.value = value; + } + + public List> getValues() { + return values; + } + + public void setValues(List> values) { + this.values = values; + } + } +} diff --git a/src/main/java/net/linlan/third/prometheus/config/PrometheusInfo.java b/src/main/java/net/linlan/third/prometheus/config/PrometheusInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..4d96f23fce0217edfa7042bbcfc9ffdc29fef63c --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/config/PrometheusInfo.java @@ -0,0 +1,39 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +import lombok.Data; + +@Data +@Component +@ConfigurationProperties(prefix = "platform.prometheus") +public class PrometheusInfo { + + /** + * 用户名 + */ + public String username; + + /** + * 密码 + */ + public String password; +} diff --git a/src/main/java/net/linlan/third/prometheus/config/PrometheusSourceConfig.java b/src/main/java/net/linlan/third/prometheus/config/PrometheusSourceConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..ebc4841ed9f05f7678a26d3093a5b27d612da016 --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/config/PrometheusSourceConfig.java @@ -0,0 +1,121 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus.config; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.PostConstruct; + +import org.springframework.context.EnvironmentAware; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; + +/** + * Prometheus的配置信息 + */ +@Component +public class PrometheusSourceConfig implements EnvironmentAware { + + private Environment environment; + private final String FIRST = "platform.prometheus.first"; + private final String SECOND = "platform.prometheus.second"; + private final String THIRD = "platform.prometheus.third"; + + private Map prometheusSources = new HashMap<>(); + + @Override + public void setEnvironment(Environment environment) { + this.environment = environment; + } + + @PostConstruct + public void init() { + // 初始化第一个Prometheus源 + PrometheusInfo first = new PrometheusInfo(); + first.username = environment.getProperty(FIRST + ".username"); + first.password = environment.getProperty(FIRST + ".password"); + prometheusSources.put("first", first); + + // 初始化第二个Prometheus源 + PrometheusInfo second = new PrometheusInfo(); + second.username = environment.getProperty(SECOND + ".username"); + second.password = environment.getProperty(SECOND + ".password"); + prometheusSources.put("second", second); + + // 初始化第三个Prometheus源 + PrometheusInfo third = new PrometheusInfo(); + third.username = environment.getProperty(THIRD + ".username"); + third.password = environment.getProperty(THIRD + ".password"); + prometheusSources.put("third", third); + } + + /** + * 获取所有Prometheus源配置 + * @return Prometheus源配置 + */ + public Map getPrometheusSources() { + return prometheusSources; + } + + /** + * 根据名称获取特定的Prometheus源配置 + * @return Prometheus单个源配置 + */ + public PrometheusInfo getPrometheusSource(String name) { + return prometheusSources.get(name); + } + + /** + * 获取第一个Prometheus源配置 + * @return Prometheus第一个源配置 + */ + public PrometheusInfo getFirst() { + return prometheusSources.get("first"); + } + + /** + * 获取第二个Prometheus源配置 + * @return Prometheus第二个源配置 + */ + public PrometheusInfo getSecond() { + return prometheusSources.get("second"); + } + + /** + * 获取第三个Prometheus源配置 + * @return Prometheus第三个源配置 + */ + public PrometheusInfo getThird() { + return prometheusSources.get("third"); + } + + /** + * 检查配置是否完整 + * @return Prometheus配置是否有效 + */ + public boolean isConfigValid() { + for (Map.Entry entry : prometheusSources.entrySet()) { + PrometheusInfo info = entry.getValue(); + if (info.username == null || info.password == null) { + return false; + } + } + return true; + } +} diff --git a/src/main/java/net/linlan/third/prometheus/re/ColumnConfig.java b/src/main/java/net/linlan/third/prometheus/re/ColumnConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..097aa8f9d8efde51c1ae3b8bcfe8a03c74a2258c --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/re/ColumnConfig.java @@ -0,0 +1,33 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus.re; + +import lombok.Data; + +@Data +public class ColumnConfig { + /** + * 列代码、列信息 + */ + private String key; + /** + * 列名称 + */ + private String value; + +} diff --git a/src/main/java/net/linlan/third/prometheus/re/DashboardResult.java b/src/main/java/net/linlan/third/prometheus/re/DashboardResult.java new file mode 100644 index 0000000000000000000000000000000000000000..966fe696bdd5cf7bfb855bbbbeac65706b9d6d84 --- /dev/null +++ b/src/main/java/net/linlan/third/prometheus/re/DashboardResult.java @@ -0,0 +1,38 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package net.linlan.third.prometheus.re; + +import java.util.List; + +import lombok.Data; + +import net.linlan.third.prometheus.QueryResult; + +@Data +public class DashboardResult { + + /** + * 列信息结果数组 + */ + private List columnConfig; + /** + * 结果数据 + */ + private QueryResult.Data data; + +} diff --git a/src/main/java/net/linlan/utils/SpringContextUtils.java b/src/main/java/net/linlan/utils/SpringContextUtils.java deleted file mode 100644 index 724b3d65b34db4a1d1adc55c08e515f4dee65409..0000000000000000000000000000000000000000 --- a/src/main/java/net/linlan/utils/SpringContextUtils.java +++ /dev/null @@ -1,155 +0,0 @@ -package net.linlan.utils; - -import net.linlan.commons.core.ObjectUtils; -import org.springframework.aop.framework.AopContext; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.NoSuchBeanDefinitionException; -import org.springframework.beans.factory.config.BeanFactoryPostProcessor; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -/** - * Spring Context 工具类, 在非spring管理环境中获取bean - * - * @author Linlan - * CreateTime 2017-08-29 23:45:51 - */ -@Component -public class SpringContextUtils implements BeanFactoryPostProcessor, ApplicationContextAware -{ - - /** - * Spring应用上下文环境 - */ - private static ConfigurableListableBeanFactory beanFactory; - /** - * Spring应用上下文 - */ - public static ApplicationContext applicationContext; - - @Override - public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException - { - SpringContextUtils.beanFactory = beanFactory; - } - - @Override - public void setApplicationContext(ApplicationContext applicationContext) - throws BeansException { - SpringContextUtils.applicationContext = applicationContext; - } - - - /** - * 获取对象 - * - * @param name Bean对象的名称 - * @param 泛型 - * @return Object 一个以所给名字注册的bean的实例 - * @throws BeansException 异常 - */ - public static T getBean(String name) throws BeansException - { - return (T) beanFactory.getBean(name); - } - - - /** 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型. - * @param name Bean对象的名称 - * @param requiredType 对象类型 - * @param 泛型 - * @return 返回对象 - */ - public static T getBean(String name, Class requiredType) { - return (T) beanFactory.getBean(name, requiredType); - } - - /** - * 获取类型为requiredType的对象 - * - * @param clazz Java对象 - * @param 泛型 - * @return 返回对象 - * @throws BeansException 异常 - * - */ - public static T getBean(Class clazz) throws BeansException - { - T result = (T) beanFactory.getBean(clazz); - return result; - } - - public static boolean containsBean(String name) - { - return beanFactory.containsBean(name); - } - - public static boolean isSingleton(String name) { - return beanFactory.isSingleton(name); - } - - public static Class getType(String name) { - return beanFactory.getType(name); - } - - /** - * 如果给定的bean名字在bean定义中有别名,则返回这些别名 - * - * @param name bean定义的别名 - * @return 返回对象 - * @throws NoSuchBeanDefinitionException 异常 - * - */ - public static String[] getAliases(String name) throws NoSuchBeanDefinitionException - { - return beanFactory.getAliases(name); - } - - /** - * 获取aop代理对象 - * - * @param invoker aop代理对象 - * @param 泛型 - * @return 对象 - */ - public static T getAopProxy(T invoker) - { - return (T) AopContext.currentProxy(); - } - - /** - * 获取当前的环境配置,无配置返回null - * - * @return 当前的环境配置 - */ - public static String[] getActiveProfiles() - { - return applicationContext.getEnvironment().getActiveProfiles(); - } - - /** - * 获取当前的环境配置,当有多个环境配置时,只获取第一个 - * - * @return 当前的环境配置 - */ - public static String getActiveProfile() - { - final String[] activeProfiles = getActiveProfiles(); - return ObjectUtils.isNotEmpty(activeProfiles) ? activeProfiles[0] : null; - } - - /** - * 获取配置文件中的值 - * - * @param key 配置文件的key - * @return 当前的配置文件的值 - * - */ - public static String getRequiredProperty(String key) - { - return applicationContext.getEnvironment().getRequiredProperty(key); - } - -} \ No newline at end of file diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 5d4bce95379b7c64238e9b8a5de0ba7dfed742d6..6dc5606ca9c7ed4d82774c3961befad48264b7d1 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -2,7 +2,7 @@ server: port: 8088 servlet: - context-path: /stage_magic #后台路由入口 + context-path: /magic-api #后台路由入口 # 配置静态资源启用 gzip 压缩 compression: enabled: true @@ -32,11 +32,6 @@ spring: url: jdbc:mysql://localhost:3306/unidb_4.0?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=false username: lldba password: DB_Lldba_2023! - fourth: #数据源4 - driverClassName: org.apache.hive.jdbc.HiveDriver - url: jdbc:hive2://127.0.0.1:31979/a_test_if - username: frt_test - password: frt_test initial-size: 10 max-active: 100 @@ -96,7 +91,16 @@ platform: fileServer: false prop: allowedOrigins: "*" - + prometheus: + first: #查询源1 + username: ENC(nV/aqcWcXPccxHmTuIC0EQ==) + password: ENC(Opp3c3Fpb9ytfgZwRldJYJmDK5vXOZV5w2pTrmg6WyA=) + second: #查询源2 + username: 'admin' + password: 'admin' + third: #查询源2 + username: 'admin' + password: 'admin' magic-api: web: /rest/web # 前端地址路径 resource: diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 92e1fb6e9e62a7e6885c315d97a231d8d24c1dc0..8f074401bc4b459b3f31d896d67bbf923bbfe690 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -2,7 +2,7 @@ server: port: 8088 servlet: - context-path: /stage_magic #后台路由入口 + context-path: /magic-api #后台路由入口 # 配置静态资源启用 gzip 压缩 compression: enabled: true @@ -19,24 +19,20 @@ spring: druid: first: #数据源1-产品数据源-entdb_4.0 driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/unidb_4.0?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=false - username: lldba - password: DB_Lldba_2023! + url: ENC(xcscz9XUj1HOvlMtAnDA/SIi5l1QkVPc5LK3tVpx9WZw/tBkybvVFPfmKMUHc89GCjuZh8+PmeolX0UoZzYRrN7O19zoFNuePfbA1s4v+T4KPzobkNiMcOi8273yoUnF7Qple+KfLAJVLl7w4i0kpqxD1Ns6biWdoMhrVyG4u6+asdSdDgC9/mP+Qpem0b0h69oz3+AqiyBh2LkH+iAfzU02O88gdicliLvD13uJynq9+2JACMytRA==) + username: ENC(jx3H9PNZoUv6S5P2GAcLsA==) + password: ENC(Pr9GBEoOJcCY3K8joiHea+tDdcqnCt34) second: #数据源2 driverClassName: dm.jdbc.driver.DmDriver - url: jdbc:mysql://localhost:3306/unidb_4.0?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=false - username: lldba - password: DB_Lldba_2023! + url: ENC(xcscz9XUj1HOvlMtAnDA/SIi5l1QkVPc5LK3tVpx9WZw/tBkybvVFPfmKMUHc89GCjuZh8+PmeolX0UoZzYRrN7O19zoFNuePfbA1s4v+T4KPzobkNiMcOi8273yoUnF7Qple+KfLAJVLl7w4i0kpqxD1Ns6biWdoMhrVyG4u6+asdSdDgC9/mP+Qpem0b0h69oz3+AqiyBh2LkH+iAfzU02O88gdicliLvD13uJynq9+2JACMytRA==) + username: ENC(jx3H9PNZoUv6S5P2GAcLsA==) + password: ENC(Pr9GBEoOJcCY3K8joiHea+tDdcqnCt34) third: #数据源3 driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/unidb_4.0?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=false - username: lldba - password: DB_Lldba_2023! - fourth: #数据源4 - driverClassName: org.apache.hive.jdbc.HiveDriver - url: jdbc:hive2://127.0.0.1:31979/a_test_if - username: frt_test - password: frt_test + url: ENC(xcscz9XUj1HOvlMtAnDA/SIi5l1QkVPc5LK3tVpx9WZw/tBkybvVFPfmKMUHc89GCjuZh8+PmeolX0UoZzYRrN7O19zoFNuePfbA1s4v+T4KPzobkNiMcOi8273yoUnF7Qple+KfLAJVLl7w4i0kpqxD1Ns6biWdoMhrVyG4u6+asdSdDgC9/mP+Qpem0b0h69oz3+AqiyBh2LkH+iAfzU02O88gdicliLvD13uJynq9+2JACMytRA==) + username: ENC(jx3H9PNZoUv6S5P2GAcLsA==) + password: ENC(Pr9GBEoOJcCY3K8joiHea+tDdcqnCt34) + initial-size: 10 max-active: 100 @@ -66,13 +62,13 @@ spring: # redis 配置 redis: # 地址 - host: 127.0.0.1 + host: ENC(xeXTDzB67i7eWVGdd15oJbqBxDjNF+kH) # 端口,默认为6379 port: 6379 # 数据库索引 database: 1 # 密码 - password: + password: ENC(zJFQiBQckuwzKKBnRobFeXk1PbmbrfoR) # 连接超时时间 timeout: 10s lettuce: @@ -95,7 +91,16 @@ platform: fileServer: false prop: allowedOrigins: "*" - + prometheus: + first: #查询源1 + username: ENC(nV/aqcWcXPccxHmTuIC0EQ==) + password: ENC(Opp3c3Fpb9ytfgZwRldJYJmDK5vXOZV5w2pTrmg6WyA=) + second: #查询源2 + username: 'admin' + password: 'admin' + third: #查询源2 + username: 'admin' + password: 'admin' magic-api: web: /magic/web diff --git a/src/main/resources/favicon.ico b/src/main/resources/favicon.ico index 7107edb5f249cc0fa303a459c4a5ae2d0427178f..8da34f7e6164d02cf4fb395d03773119d38d1ae2 100644 Binary files a/src/main/resources/favicon.ico and b/src/main/resources/favicon.ico differ diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index 93de0055b88777639f269935b652207b53c9078a..856608e1b9d16570bdf9a4bcb641d4cb25e87b34 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -1,3 +1,21 @@ +# +# java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 +# Copyright © 2020-2025 Linlan (open@linlan.net) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + #错误消息 not.null=* 必须填写 user.jcaptcha.error=验证码错误 diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 4a236fcfd01e73c6ffa1149e3f9b30f64677f00c..aeeb2e67575f7362cefcc91576f41db1c7bc948c 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,4 +1,23 @@ + diff --git a/src/main/resources/magic-editor/assets/app.a9d6cb03.js b/src/main/resources/magic-editor/assets/app.a9d6cb03.js index a356312b34118b65427f7194873caf30ef0863bd..d72bb3bb492b6cfef9978208357d33187fab6100 100644 --- a/src/main/resources/magic-editor/assets/app.a9d6cb03.js +++ b/src/main/resources/magic-editor/assets/app.a9d6cb03.js @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ var Bn=Object.defineProperty;var Hn=(e,t,a)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var _t=(e,t,a)=>(Hn(e,typeof t!="symbol"?t+"":t,a),a);import{r as y,o as v,c as V,u as h,a as U,w,b as R,t as F,d as _,e as Ra,p as Ye,g as bt,f as pt,h as jn,i as We,n as be,j as k,k as gt,v as Mt,l as X,m as Ve,q as ye,F as te,s as fe,x as ve,y as pe,z as Et,A as et,B as _e,C as le,T as cn,D as Be,E as Vn,G as Gn,H as zn,I as oe,J as Yn,K as un,L as ee,M as mt,N as qn,O as Ue,P as Aa,Q as Ca,R as Kn,S as Wn,V as Xn}from"./vue.6f28a6f0.js";import{a as Jn}from"./axios.23e7b955.js";import{l as ja,e as $e,a as W,R as st,W as Qn,b as Zn,c as ei,m as ti,C as Va,K as ct,d as ht,M as ai,f as ni,g as na,T as ii,t as si}from"./vendor.3be44c84.js";const oi={__name:"App",setup(e){let t={};try{parent&&parent.MAGIC_EDITOR_CONFIG&&(t={...parent.MAGIC_EDITOR_CONFIG})}catch{}window.MAGIC_EDITOR_CONFIG&&(t={...t,...window.MAGIC_EDITOR_CONFIG}),t.baseURL="./",t.serverURL="./",t.inJar=!0;const a=s=>{var o=window.location.search.substr(1).match(new RegExp("(^|&)"+s+"=([^&]*)(&|$)","i"));return o&&unescape(o[2])},n=a("headerName"),i=a("headerValue");return n&&i&&(t.request=t.request||{},t.request.beforeSend=s=>(s.headers[n]=i,s)),(s,o)=>{const r=y("magic-editor");return v(),V(r,{config:h(t)},null,8,["config"])}}};const ri="magic-editor",li="2.1.1",ci={dev:"vite",build:"vite build"},ui={axios:"^0.24.0","monaco-editor":"0.29.1",qs:"^6.10.1",vue:"^3.2.31"},di={"@vitejs/plugin-vue":"^2.2.4",vite:"^2.8.6","vite-plugin-svg-icons":"^1.1.0"};var pi={name:ri,version:li,scripts:ci,dependencies:ui,devDependencies:di};const ia="magic-";class _i{constructor(){}set(t,a){(Array.isArray(a)||typeof a=="object")&&(a=JSON.stringify(a)),localStorage.setItem(`${ia}${t}`,a)}remove(t){localStorage.removeItem(`${ia}${t}`)}get(t){return localStorage.getItem(`${ia}${t}`)}}var De=new _i,Ia={name:"English",message:{run:"Run",save:"Save",search:"Search",upload:"Upload",export:"Export",push:"Push",skin:"Skin",reload:"reload all resources",copy:"Copy",searchText:"Enter keywords to search",required:"Required",defaultValue:"Default Value",description:"Description",parameterType:"Parameter Type",view:"View",addRow:"Add Row",removeRow:"Remove Row",all:"All",clear:"Clear",empty:"{0} is empty.",type:"Type",date:"Date",name:"Name",group:"{0} Group",i18n:"Language",tips:"Tips",ok:"OK",refresh:"Refresh",loading:"Loading...",nodata:"no data.",cancel:"Cancel",update:"Update",create:"Create",username:"Username",password:"Password",createDataSource:"Create {0}",chooseFile:"Please Choose File",expand:"Expand",collapse:"Collapse",selectAll:"Select All",deselectAll:"Deselect All",hide:"Hide",login:"Login",ignore:"Ignore",document:"Document",joinGroup:"Join QQ Group",untitled:"Untitled",log:"Log",enable:"Enable",variable:"Variable Info",switchLocale:"Switch Language To {0}, It work at after refreshing the page, Do you want to Refresh the page ?",loadClass:"Load Classes...",loadClassError:"Failed Load Classes",switchSkin:"Switch Skin To\u300C{0}\u300D",loadClassFinish:"Class Loaded",tryAutoLogin:"Try Auto Login",autoLoginSuccess:"Auto Login Success",getCurrentLoginUser:"Load Current Logined User",getResource:"Load {0} Resources",getResourceFinish:"{0} Resources Loaded",connectDebugServer:"Debug Server Connecting...",debugServerClose:"Debug Server Disconnected",connectDebugServerSuccess:"Connect Debug Server Success",reloadResourceSuccess:"Resource Reload Success",getDetail:"Load {0} Detail",getDetailSuccess:"Load {0} Detail Success",lockSuccess:"Lock {0} Success",lockFailed:"Failed to Lock {0}",unlockSuccess:"UnLock {0} Success",unlockFailed:"Failed to UnLock {0}",updateTips:"Update {0}",saveSuccess:"Save {0} Success",saveFailed:"Failed to Save {0}",newVersionRelease:"New Version {0} available",versionLastest:"Current Version is Lastese",versionUpdate:"New Version {0} available
Do you want Upgrade?",changelog:"CHANGELOG",versionConflict:"Version does not matched frontend: {0}, backend: {1}, Please Check!",versionCheck:"Version Check",loadConfigError:"Failed to load configuration",logout:"Logout",logoutSuccess:"Logout Success",logoutConfirm:"Are you sure Logout {0} ?",deleteConfirm:"Do you want Delete {0}",deleteSuccess:"Delete {0} Success",deleteFailed:"Failed to Delete {0}",deleteTips:"Delete {0}",remote:"Remote",secret:"Secret",exported:"The selected resource has been exported",exportNoneSelect:"Please select and then export",pushNoneSelect:"Please select and then push",responseBody:"Body",responseHeader:"Header",responseStructure:"Structure",root:"Root",pushWarning:"When the full mode is pushed, the local data shall prevail and the full coverage update will be carried out. Do you want to continue?",uploadWarning:"When uploading in full mode, the overwrite update operation is performed based on the uploaded data, and other interfaces may be deleted.
In the case of partial export, it is recommended to use incremental update. Do you want to continue?",noValidate:"No Validate",validatePattern:"Regex attern",validateExpression:"Expression"},plugin:{loading:"Load plugin \u300C{0}\u300D",loaded:"Plugin\u300C{0}\u300D Loaded",loadFailed:"Failed to load plugin\u300C{0}\u300D"},resource:{createGroup:"Create Group",updateGroup:"Update Group",copyGroup:"Copy Group",deleteGroupConfirm:"Do you want Delete {0} Group\u300C{1}\u300D?",deleteGroupSuccess:"Delete {0} Group\u300C{1}\u300DSuccess",deleteGroupFailed:"Failed to Delete {0} Group \u300C{1}\u300D",groupExport:"Group\u300C{0}\u300D's {1} Exported",moveGroup:"Move Group",moveRootGroupConfirm:"Do you want move Group \u300C{0}\u300Dinto root?",moveRootSuccess:"Move {0} Group \u300C{1}\u300Dinto root Success",moveRootFailed:"Failed to Move {0} Group\u300C{1}\u300D into root",moveGroupSuccess:"Move {0} Group \u300C{1}\u300D Success",moveGroupFailed:"Failed to Move {0} Group \u300C{1}\u300D",moveFileSuccess:"Move {0} Success",moveResourceFailed:"Failed to Move {0}",saveGroupSuccess:"Save {0} Group {1}\u300D Success",saveGroupFailed:"Failed to Save {0} Group \u300C{1}\u300D",copyPathSuccess:"Copy {0} Path {1}\u300D Success",copyPathFailed:"Failed to Copy {0} Path \u300C{1}\u300D",copyRelativePathSuccess:"Copy {0} Relative Path \u300C{1}\u300D Success",copyRelativePathFailed:"Failed to Copy {0} Relative Path \u300C{1}\u300D",contextmenu:{copy:"Copy {0}",copyWithPath:"Copy Absolute Path",copyRelativePath:"Copy Relative Path",lock:"Lock",unlock:"UnLock",delete:"Delete",newFile:"New {0}",deleteGroup:"Delete Group",exportGroup:"Export Group",moveToRoot:"Move To Root"},header:{expand:"Expand All",collapse:"Collapse All",asc:"Ascending",desc:"Descending",position:"Select Opened File"},form:{groupName:"Group Name",groupPath:"Group Path",placeholder:{name:"Please Enter {0} Group Name",path:"Please Enter {0} Group Path"}}},editor:{tab:{close:"Close",closeOther:"Close Other Tabs",closeLeft:"Close Tabs to the Left",closeRight:"Close Tabs to the Right",closeAll:"Close All Tabs"},tooltip:{complection:"Trigger Suggest",resume:"Resume Breakpoint",stepInto:"Step Into",format:"Reformat Code",recent:"Recent Opened Files"},triggerSuggest:"Trigger Suggest"},api:{title:"Api Info",name:"Api",form:{method:"Method",name:"Name",path:"Path",placeholder:{name:"Please Enter Api Name",path:"Please Enter Api Path"}},navbars:{parameter:"Parameters",header:"Headers",path:"PathVariables",body:"Body",option:"Options",description:"Descriptions",groupOption:"Group Options"},validateType:"Validate Type",expression:"Expression or Regex Pattern",validate:"Validate Description",field:"Field",test:{requestBodyError:"RequestBody Has Error, please check!",missPath:"Please enter PathVariable",requestError:"Failed to send Request\u300C{0}\u300D",success:"\u300C{0}\u300DRequest finish, Status:{1} Size:{2} Time\uFF1A{3} ms",begin:"Start Request For\u300C{0}\u300D"},structure:{content:"{0} Structure has changed, Do you wang to change\uFF1F",ok:"Change"}},datasource:{title:"DataSource",name:"DataSource",copySuccess:"Copy {0} Success",copyFailed:"Failed to Copy {0}",test:"Test",connected:"Connected",connectFailed:`Failed to Connect, Reason:\r {0}`,primary:"Primary",form:{placeholder:{name:"DataSource Name, Only Display Use",key:"DataSource Key, Required",url:"Please Enter jdbcURL\uFF0Ceg: jdbc:mysql://localhost/dbname",username:"Please Enter Database username, Optional",password:"Please Enter Database password, Optional",driver:"DriverClass, Optional",type:"Pool Type, Optional",maxRows:"Max Return Rows"},driver:"Driver",type:"Type",other:"Others"}},fn:{title:"Function Info",name:"Function",number:"Nunmber",string:"String",collection:"Collection",returnValue:"Return Types",parameter:"Function Parameters",description:"Function Description",form:{name:"Name",path:"Path",placeholder:{name:"Please Enter Function Name",path:"Please Enter Function Path"}}},toolbars:{debug:"Debug",log:"Run Log",history:"History",event:"Event",global:"Global Parameters",response:"Response",viewHistory:"History:{0}"},event:{message:"Message"},history:{name:"History",operator:"Operators"},upload:{full:"Full Upload",increment:"Increment Upload",success:"{0} Success",failed:"Failed to {0}"},push:{full:"Full Push",increment:"Increment Push",success:"{0} Success",failed:"Failed to {0}"},backup:{full:"Full Backup",backupSuccess:"Full Backup Success",rollback:"Rollback",current:"Current",difference:"Difference",rollbackSuccess:"Rollback {0} Success",rollbackFailed:"Failed to Rollback {0}",rollbackConfirm:"this operation will overview current resources, Do you want to continue?"},online:{login:"User Login",loginTips:"User {0} Login, IP: {1}",logout:"User Logout",logoutTips:"User {0} Logout, IP: {1}",onlines:"Online: {0}"},log:{hide:"Click to hide multiline log",show:"{0} lines of log are hidden, Click to show",scrollEnd:"Scroll to End"},code:{error:"Error({0})",invalid:"Error,HttpStatus({0})",httpError:"Error","-2":"Current is Readonly, Cannot be Operated","-10":"Unauthorized Operation",1001:"Group Not Found",1002:"Not Support the Group Type",1003:"Remote Cannot be empty",1004:"secretKey Cannot be empty",1005:"The name will repeat after moving. Please modify the name and try again.",1006:"Source object and grouping cannot be consistent",1007:"Resoirce Not Found",1008:"The current resource has been locked. Please operate after unlocking",1009:"This path has been used. Please try another path",1010:"There are conflicts in resource [{0}], please check",1011:"The path will conflict after moving. Please try another path",1012:"Request Method Cannot be empty",1013:"Reqeust Path Cannot be empty",1014:"Function Path Cannot be empty",1015:"The configured file path does not exist, please check",1016:"The Api [{0} ({1})] conflicts with the application and cannot be registered",1017:"Script Cannot be empty",1018:"Name Cannot be empty",1019:"Path Cannot be empty",1020:"jdbcURL Cannot be empty",1021:"key Cannot be empty",1022:"The data source key has been used. Please replace it and try again",1023:"Please Choose Group",1024:"Cron Expression Cannot be empty",1025:"The name cannot contain special characters. Only Chinese, numbers, letters and +-.() and . cannot be start",1026:"The data source key cannot contain special characters, only Chinese, numbers, letters, _",1027:"Failed to save. The group name under the same group cannot be duplicate and cannot contain special characters.",1028:"Parameter validation failed",1029:"Header validation failed",1030:"PathVariable validation failed",1031:"RequestBody validation failed",1032:"Please Upload File",1033:"Failed to validate Signature. Please check whether the secret key is correct",1034:"Backup is not enabled and cannot be operated",1035:"Api Not Found"}},hi=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"})),Pt={name:"\u7B80\u4F53\u4E2D\u6587",message:{run:"\u8FD0\u884C",save:"\u4FDD\u5B58",search:"\u641C\u7D22",upload:"\u4E0A\u4F20",export:"\u5BFC\u51FA",push:"\u63A8\u9001",skin:"\u76AE\u80A4",reload:"\u91CD\u65B0\u52A0\u8F7D\u6240\u6709\u6570\u636E",copy:"\u590D\u5236",searchText:"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",required:"\u5FC5\u586B",defaultValue:"\u9ED8\u8BA4\u503C",description:"\u63CF\u8FF0",parameterType:"\u53C2\u6570\u7C7B\u578B",view:"\u89C6\u56FE",addRow:"\u589E\u52A0\u4E00\u884C",removeRow:"\u5220\u9664\u4E00\u884C",all:"\u5168\u90E8",clear:"\u6E05\u7A7A",empty:"\u6682\u65E0{0}",type:"\u7C7B\u578B",date:"\u65F6\u95F4",name:"\u540D\u79F0",group:"{0}\u5206\u7EC4",i18n:"\u8BED\u8A00",tips:"\u63D0\u793A",ok:"\u786E\u5B9A",refresh:"\u5237\u65B0",loading:"\u52A0\u8F7D\u4E2D",nodata:"\u65E0\u6570\u636E",cancel:"\u53D6\u6D88",update:"\u4FEE\u6539",create:"\u521B\u5EFA",username:"\u7528\u6237\u540D",password:"\u5BC6\u7801",createDataSource:"\u521B\u5EFA{0}",chooseFile:"\u8BF7\u9009\u62E9\u6587\u4EF6",expand:"\u5C55\u5F00",collapse:"\u6536\u7F29",selectAll:"\u5168\u9009",deselectAll:"\u53D6\u6D88\u5168\u9009",hide:"\u9690\u85CF",login:"\u767B\u5F55",ignore:"\u4E0D\u518D\u63D0\u9192",document:"\u5E2E\u52A9\u6587\u6863",joinGroup:"\u52A0\u5165QQ\u7FA4",untitled:"\u672A\u5B9A\u4E49\u540D\u79F0",log:"\u65E5\u5FD7",enable:"\u542F\u7528",variable:"\u53D8\u91CF\u4FE1\u606F",switchLocale:"\u5DF2\u5207\u6362\u81F3{0}\uFF0C\u5237\u65B0\u9875\u9762\u540E\u751F\u6548\uFF0C\u662F\u5426\u5237\u65B0\uFF1F",loadClass:"\u52A0\u8F7Dclasses\u4FE1\u606F...",loadClassError:"\u52A0\u8F7Dclasses\u4FE1\u606F\u5931\u8D25",switchSkin:"\u5207\u6362\u76AE\u80A4\u81F3\u300C{0}\u300D",loadClassFinish:"classes\u4FE1\u606F\u52A0\u8F7D\u5B8C\u6BD5",tryAutoLogin:"\u5C1D\u8BD5\u81EA\u52A8\u767B\u5F55",autoLoginSuccess:"\u81EA\u52A8\u767B\u5F55\u6210\u529F",getCurrentLoginUser:"\u83B7\u53D6\u5F53\u524D\u767B\u5F55\u7528\u6237\u4FE1\u606F",getResource:"\u83B7\u53D6{0}\u8D44\u6E90",getResourceFinish:"\u83B7\u53D6{0}\u8D44\u6E90\u5B8C\u6BD5",connectDebugServer:"\u8FDE\u63A5\u8C03\u8BD5\u670D\u52A1\u5668...",debugServerClose:"\u8C03\u8BD5\u670D\u52A1\u5668\u5DF2\u65AD\u5F00",connectDebugServerSuccess:"\u8FDE\u63A5\u8C03\u8BD5\u670D\u52A1\u5668\u6210\u529F",reloadResourceSuccess:"\u91CD\u65B0\u52A0\u8F7D\u8D44\u6E90\u6210\u529F",getDetail:"\u83B7\u53D6{0}",getDetailSuccess:"\u83B7\u53D6{0}\u8BE6\u60C5\u6210\u529F",lockSuccess:"\u6210\u529F\u9501\u5B9A{0}",lockFailed:"\u9501\u5B9A{0}\u5931\u8D25",unlockSuccess:"\u6210\u529F\u89E3\u9501{0}",unlockFailed:"\u89E3\u9501{0}\u5931\u8D25",updateTips:"\u4FEE\u6539{0}",saveSuccess:"\u4FDD\u5B58{0}\u6210\u529F",saveFailed:"\u4FDD\u5B58{0}\u5931\u8D25",newVersionRelease:"\u7248\u672C\u68C0\u6D4B\u5B8C\u6BD5\uFF0C\u6700\u65B0\u7248\u672C\u4E3A\uFF1A{0},\u5EFA\u8BAE\u66F4\u65B0\uFF01\uFF01",versionLastest:"\u7248\u672C\u68C0\u6D4B\u5B8C\u6BD5\uFF0C\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248",versionUpdate:"\u68C0\u6D4B\u5230\u5DF2\u6709\u65B0\u7248\u672C{0}\uFF0C\u662F\u5426\u66F4\u65B0\uFF1F",changelog:"\u66F4\u65B0\u65E5\u5FD7",versionConflict:"\u68C0\u6D4B\u5230\u524D\u540E\u7AEF\u7248\u672C\u4E0D\u4E00\u81F4\uFF08\u524D\u7AEF\uFF1A{0} \u540E\u7AEF\uFF1A{1}\uFF09\uFF0C\u8BF7\u68C0\u67E5",versionCheck:"\u7248\u672C\u68C0\u6D4B",loadConfigError:"\u52A0\u8F7D\u914D\u7F6E\u5931\u8D25",logout:"\u6CE8\u9500\u767B\u5F55",logoutSuccess:"\u6CE8\u9500\u767B\u5F55\u6210\u529F",logoutConfirm:"\u662F\u5426\u8981\u6CE8\u9500\u767B\u5F55\u300C{0}\u300D",deleteConfirm:"\u662F\u5426\u8981\u5220\u9664{0}",deleteSuccess:"\u5220\u9664{0}\u6210\u529F",deleteFailed:"\u5220\u9664{0}\u5931\u8D25",deleteTips:"\u5220\u9664{0}",remote:"\u8FDC\u7A0B\u5730\u5740",secret:"\u79D8\u94A5",exported:"\u6570\u636E\u5DF2\u5BFC\u51FA\u5B8C\u6BD5",exportNoneSelect:"\u8BF7\u9009\u62E9\u4E4B\u518D\u5728\u8FDB\u884C\u5BFC\u51FA\uFF01",pushNoneSelect:"\u8BF7\u9009\u62E9\u4E4B\u540E\u518D\u8FDB\u884C\u63A8\u9001\uFF01",responseBody:"Body",responseHeader:"\u54CD\u5E94Header",responseStructure:"\u54CD\u5E94\u7ED3\u6784",root:"\u6839\u8282\u70B9",pushWarning:"\u5168\u91CF\u6A21\u5F0F\u63A8\u9001\u65F6\uFF0C\u4EE5\u672C\u5730\u6570\u636E\u4E3A\u51C6\u5168\u91CF\u8986\u76D6\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",uploadWarning:"\u5168\u91CF\u6A21\u5F0F\u4E0A\u4F20\u65F6\uFF0C\u4EE5\u4E0A\u4F20\u7684\u6570\u636E\u4E3A\u51C6\u8FDB\u884C\u8986\u76D6\u66F4\u65B0\u64CD\u4F5C\uFF0C\u53EF\u80FD\u4F1A\u5220\u9664\u5176\u4ED6\u63A5\u53E3
\u5728\u975E\u5168\u91CF\u5BFC\u51FA\u65F6\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u589E\u91CF\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",noValidate:"\u4E0D\u9A8C\u8BC1",validatePattern:"\u6B63\u5219\u9A8C\u8BC1",validateExpression:"\u8868\u8FBE\u5F0F\u9A8C\u8BC1"},plugin:{loading:"\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D",loaded:"\u5DF2\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D",loadFailed:"\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D\u5931\u8D25"},resource:{createGroup:"\u521B\u5EFA\u5206\u7EC4",updateGroup:"\u4FEE\u6539\u5206\u7EC4",copyGroup:"\u590D\u5236\u5206\u7EC4",deleteGroupConfirm:"\u662F\u5426\u8981\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\uFF1F",deleteGroupSuccess:"\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",deleteGroupFailed:"\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",groupExport:"\u5206\u7EC4\u300C{0}\u300D\u76F8\u5173{1}\u5DF2\u5BFC\u51FA",moveGroup:"\u79FB\u52A8\u5206\u7EC4",moveRootGroupConfirm:"\u662F\u5426\u8981\u5C06\u5206\u7EC4\u300C{0}\u300D\u79FB\u52A8\u81F3\u6839\u8282\u70B9",moveRootSuccess:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u81F3\u6839\u8282\u70B9\u6210\u529F",moveRootFailed:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u81F3\u6839\u8282\u70B9\u5931\u8D25",moveGroupSuccess:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",moveGroupFailed:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",moveFileSuccess:"\u79FB\u52A8\u8D44\u6E90\u300C{0}\u300D\u6210\u529F",moveResourceFailed:"\u79FB\u52A8\u8D44\u6E90\u300C{0}\u300D\u5931\u8D25",saveGroupSuccess:"\u4FDD\u5B58{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",saveGroupFailed:"\u4FDD\u5B58{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",copyPathSuccess:"{0}\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u6210\u529F",copyPathFailed:"{0}\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236",copyRelativePathSuccess:"{0}\u76F8\u5BF9\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u6210\u529F",copyRelativePathFailed:"{0}\u76F8\u5BF9\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236",contextmenu:{copy:"\u590D\u5236{0}",copyWithPath:"\u590D\u5236\u8DEF\u5F84",copyRelativePath:"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84",lock:"\u9501\u5B9A",unlock:"\u89E3\u9501",delete:"\u5220\u9664",newFile:"\u65B0\u5EFA{0}",deleteGroup:"\u5220\u9664\u5206\u7EC4",exportGroup:"\u5BFC\u51FA\u5206\u7EC4",moveToRoot:"\u79FB\u52A8\u81F3\u6839\u8282\u70B9"},header:{expand:"\u5168\u90E8\u5C55\u5F00",collapse:"\u5168\u90E8\u6298\u53E0",asc:"\u6309\u5B57\u6BCD\u5347\u5E8F",desc:"\u6309\u5B57\u6BCD\u964D\u5E8F",position:"\u5B9A\u4F4D\u5F53\u524D\u6587\u4EF6"},form:{groupName:"\u5206\u7EC4\u540D\u79F0",groupPath:"\u5206\u7EC4\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165{0}\u5206\u7EC4\u540D\u79F0",path:"\u8BF7\u8F93\u5165{0}\u5206\u7EC4\u8DEF\u5F84"}}},editor:{tab:{close:"\u5173\u95ED",closeOther:"\u5173\u95ED\u5176\u5B83",closeLeft:"\u5173\u95ED\u5DE6\u4FA7",closeRight:"\u5173\u95ED\u53F3\u4FA7",closeAll:"\u5168\u90E8\u5173\u95ED"},tooltip:{complection:"\u4EE3\u7801\u63D0\u793A",resume:"\u6062\u590D\u65AD\u70B9",stepInto:"\u6B65\u8FDB",format:"\u4EE3\u7801\u683C\u5F0F\u5316",recent:"\u6700\u8FD1\u6253\u5F00"},triggerSuggest:"\u89E6\u53D1\u4EE3\u7801\u63D0\u793A"},api:{title:"\u63A5\u53E3\u4FE1\u606F",name:"\u63A5\u53E3",form:{method:"\u8BF7\u6C42\u65B9\u6CD5",name:"\u63A5\u53E3\u540D\u79F0",path:"\u63A5\u53E3\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165\u63A5\u53E3\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u63A5\u53E3\u8DEF\u5F84"}},navbars:{parameter:"\u8BF7\u6C42\u53C2\u6570",header:"\u8BF7\u6C42Header",path:"\u8DEF\u5F84\u53D8\u91CF",body:"\u8BF7\u6C42Body",option:"\u63A5\u53E3\u9009\u9879",description:"\u63A5\u53E3\u63CF\u8FF0",groupOption:"\u5206\u7EC4\u9009\u9879"},validateType:"\u9A8C\u8BC1\u65B9\u5F0F",expression:"\u8868\u8FBE\u5F0F\u6216\u6B63\u5219\u8868\u8FBE\u5F0F",validate:"\u9A8C\u8BC1\u8BF4\u660E",field:"\u5B57\u6BB5",test:{requestBodyError:"RequestBody \u53C2\u6570\u6709\u8BEF\uFF0C\u8BF7\u68C0\u67E5\uFF01",missPath:"\u8BF7\u586B\u5199\u8DEF\u5F84\u53D8\u91CF\u540E\u5728\u6D4B\u8BD5\uFF01",requestError:"\u8BF7\u6C42\u300C{0}\u300D\u51FA\u9519",success:"\u300C{0}\u300D\u6D4B\u8BD5\u5B8C\u6BD5\uFF0C\u72B6\u6001\uFF1A{1} \u5927\u5C0F\uFF1A{2} \u8017\u65F6\uFF1A{3} ms",begin:"\u5F00\u59CB\u6D4B\u8BD5\u300C{0}\u300D"},structure:{content:"\u5F53\u524D {0} \u7ED3\u6784\u53D1\u751F\u53D8\u5316\uFF0C\u662F\u5426\u66F4\u65B0\uFF1F",ok:"\u66F4\u65B0"}},datasource:{title:"DataSource",name:"\u6570\u636E\u6E90",copySuccess:"\u590D\u5236{0}\u6210\u529F",copyFailed:"\u590D\u5236{0}\u5931\u8D25",test:"\u6D4B\u8BD5\u8FDE\u63A5",connected:"\u8FDE\u63A5\u6210\u529F",connectFailed:`\u8FDE\u63A5\u5931\u8D25\uFF0C\u9519\u8BEF\u539F\u56E0\uFF1A\r {0}`,primary:"\u4E3B\u6570\u636E\u6E90",form:{placeholder:{name:"\u6570\u636E\u6E90\u540D\u79F0\uFF0C\u4EC5\u505A\u663E\u793A\u4F7F\u7528",key:"\u6570\u636E\u6E90Key\uFF0C\u540E\u7EED\u4EE3\u7801\u4E2D\u4F7F\u7528",url:"\u8BF7\u8F93\u5165jdbcURL\uFF0C\u5982\uFF1Ajdbc:mysql://localhost/dbname",username:"\u8BF7\u8F93\u5165\u6570\u636E\u5E93\u7528\u6237\u540D",password:"\u8BF7\u8F93\u5165\u6570\u636E\u5E93\u5BC6\u7801",driver:"\u9A71\u52A8\u7C7B\uFF0C\u53EF\u9009\uFF0C\u5185\u90E8\u81EA\u52A8\u8BC6\u522B\uFF0C\u4E5F\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6307\u5B9A",type:"\u8FDE\u63A5\u6C60\u7C7B\u578B\uFF0C\u53EF\u9009\uFF0C\u4E5F\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6307\u5B9A",maxRows:"\u6700\u591A\u8FD4\u56DE\u6761\u6570\uFF0C-1\u4E3A\u4E0D\u9650\u5236"},driver:"\u9A71\u52A8\u7C7B",type:"\u7C7B\u578B",other:"\u5176\u5B83\u914D\u7F6E"}},task:{title:"\u5B9A\u65F6\u4EFB\u52A1\u4FE1\u606F",name:"\u5B9A\u65F6\u4EFB\u52A1",form:{name:"\u4EFB\u52A1\u540D\u79F0",path:"\u4EFB\u52A1\u8DEF\u5F84",placeholder:{cron:"\u8BF7\u8F93\u5165Cron\u8868\u8FBE\u5F0F",name:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u8DEF\u5F84",description:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0"}}},fn:{title:"\u51FD\u6570\u4FE1\u606F",name:"\u51FD\u6570",number:"\u6570\u503C",string:"\u5B57\u7B26\u4E32",collection:"\u96C6\u5408",fnName:"\u51FD\u6570\u540D\u79F0",returnValue:"\u8FD4\u56DE\u503C",parameter:"\u51FD\u6570\u53C2\u6570",description:"\u51FD\u6570\u63CF\u8FF0",form:{name:"\u51FD\u6570\u540D\u79F0",path:"\u51FD\u6570\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165\u51FD\u6570\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u51FD\u6570\u8DEF\u5F84"}}},toolbars:{debug:"\u8C03\u8BD5\u4FE1\u606F",log:"\u8FD0\u884C\u65E5\u5FD7",history:"\u5386\u53F2\u8BB0\u5F55",event:"\u4E8B\u4EF6",global:"\u5168\u5C40\u53C2\u6570",response:"\u6267\u884C\u7ED3\u679C",viewHistory:"\u5386\u53F2\u8BB0\u5F55\uFF1A{0}"},event:{message:"\u4E8B\u4EF6\u5185\u5BB9"},history:{name:"\u5386\u53F2\u8BB0\u5F55",operator:"\u64CD\u4F5C\u4EBA"},upload:{full:"\u5168\u91CF\u4E0A\u4F20",increment:"\u589E\u91CF\u4E0A\u4F20",success:"{0}\u6210\u529F",failed:"{0}\u5931\u8D25"},push:{full:"\u5168\u91CF\u63A8\u9001",increment:"\u589E\u91CF\u63A8\u9001",success:"{0} Success",failed:"Failed to {0}"},backup:{full:"\u5168\u91CF\u5907\u4EFD",backupSuccess:"\u5168\u91CF\u5907\u4EFD\u5B8C\u6BD5",rollback:"\u8FD8\u539F",current:"\u5F53\u524D\u7248\u672C",difference:"\u5BF9\u6BD4\u4E0D\u540C",rollbackSuccess:"\u6062\u590D{0}\u6210\u529F",rollbackFailed:"\u6062\u590D{0}\u5931\u8D25",rollbackConfirm:"\u8BE5\u64CD\u4F5C\u4F1A\u8986\u76D6\u66F4\u65B0\u5F53\u524D\u8D44\u6E90\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F"},online:{login:"\u7528\u6237\u4E0A\u7EBF",loginTips:"\u7528\u6237\u300C{0}\u300D\u5DF2\u4E0A\u7EBF\uFF0CIP\uFF1A{1}",logout:"\u7528\u6237\u4E0B\u7EBF",logoutTips:"\u7528\u6237\u300C{0}\u300D\u5DF2\u4E0B\u7EBF\uFF0CIP\uFF1A{1}",onlines:"\u5F53\u524D\u5728\u7EBF\uFF1A{0}\u4EBA"},log:{hide:"\u70B9\u51FB\u9690\u85CF\u591A\u884C\u65E5\u5FD7",show:"\u6709 {0} \u884C\u65E5\u5FD7\u88AB\u9690\u85CF\uFF0C\u70B9\u51FB\u663E\u793A",scrollEnd:"\u6EDA\u52A8\u81F3\u7ED3\u5C3E"},code:{error:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u5F02\u5E38\u4EE3\u7801({0})",invalid:"\u8BF7\u6C42\u51FA\u9519\uFF0CHttpStatus({0})",httpError:"\u8BF7\u6C42\u51FA\u9519","-2":"\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u65E0\u6CD5\u64CD\u4F5C","-10":"\u65E0\u6743\u9650\u64CD\u4F5C\u3002",1001:"\u627E\u4E0D\u5230\u5206\u7EC4\u4FE1\u606F",1002:"\u4E0D\u652F\u6301\u8BE5\u5206\u7EC4\u7C7B\u578B",1003:"\u76EE\u6807\u7F51\u5740\u4E0D\u80FD\u4E3A\u7A7A",1004:"secretKey\u4E0D\u80FD\u4E3A\u7A7A",1005:"\u79FB\u52A8\u540E\u540D\u79F0\u4F1A\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540D\u79F0\u540E\u5728\u8BD5\u3002",1006:"\u6E90\u5BF9\u8C61\u548C\u5206\u7EC4\u4E0D\u80FD\u4E00\u81F4",1007:"\u627E\u4E0D\u5230\u5BF9\u5E94\u6587\u4EF6\u6216\u5206\u7EC4",1008:"\u5F53\u524D\u8D44\u6E90\u5DF2\u88AB\u9501\u5B9A\uFF0C\u8BF7\u89E3\u9501\u540E\u5728\u64CD\u4F5C\u3002",1009:"\u8BE5\u8DEF\u5F84\u5DF2\u88AB\u4F7F\u7528,\u8BF7\u6362\u4E00\u4E2A\u8DEF\u5F84\u5728\u8BD5",1010:"\u8D44\u6E90\u4E2D[{0}]\u6709\u51B2\u7A81\uFF0C\u8BF7\u68C0\u67E5",1011:"\u79FB\u52A8\u540E\u8DEF\u5F84\u4F1A\u51B2\u7A81,\u8BF7\u6362\u4E00\u4E2A\u8DEF\u5F84\u5728\u8BD5",1012:"\u8BF7\u6C42\u65B9\u6CD5\u4E0D\u80FD\u4E3A\u7A7A",1013:"\u8BF7\u6C42\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",1014:"\u51FD\u6570\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",1015:"\u914D\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5",1016:"\u63A5\u53E3[{0}({1})]\u4E0E\u5E94\u7528\u51B2\u7A81\uFF0C\u65E0\u6CD5\u6CE8\u518C",1017:"\u811A\u672C\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",1018:"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",1019:"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",1020:"jdbcURL\u4E0D\u80FD\u4E3A\u7A7A",1021:"key\u4E0D\u80FD\u4E3A\u7A7A",1022:"\u6570\u636E\u6E90key\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u66F4\u6362\u540E\u5728\u8BD5",1023:"\u8BF7\u9009\u62E9\u5206\u7EC4",1024:"cron\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A",1025:"\u540D\u79F0\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\uFF0C\u53EA\u5141\u8BB8\u4E2D\u6587\u3001\u6570\u5B57\u3001\u5B57\u6BCD\u4EE5\u53CA+_-.()\u7684\u7EC4\u5408\u4E14\u4E0D\u80FD.\u5F00\u5934",1026:"\u6570\u636E\u6E90Key\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\uFF0C\u53EA\u5141\u8BB8\u4E2D\u6587\u3001\u6570\u5B57\u3001\u5B57\u6BCD\u4EE5\u53CA_\u7EC4\u5408",1027:"\u4FDD\u5B58\u5931\u8D25,\u540C\u4E00\u7EC4\u4E0B\u5206\u7EC4\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u4E14\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\u3002",1028:"\u53C2\u6570\u9A8C\u8BC1\u5931\u8D25",1029:"header\u9A8C\u8BC1\u5931\u8D25",1030:"\u8DEF\u5F84\u53D8\u91CF\u9A8C\u8BC1\u5931\u8D25",1031:"body\u9A8C\u8BC1\u5931\u8D25",1032:"\u8BF7\u4E0A\u4F20\u6587\u4EF6",1033:"\u7B7E\u540D\u9A8C\u8BC1\u5931\u8D25,\u8BF7\u68C0\u67E5\u79D8\u94A5\u662F\u5426\u6B63\u786E",1034:"\u672A\u542F\u7528\u5907\u4EFD\uFF0C\u65E0\u6CD5\u64CD\u4F5C",1035:"\u627E\u4E0D\u5230\u63A5\u53E3"}},fi=Object.freeze(Object.defineProperty({__proto__:null,default:Pt},Symbol.toStringTag,{value:"Module"}));const gi=De.get("locale");let qt=Pt;gi==="en"&&(qt=Ia);function c(e,...t){try{const a=e.split(".").reduce((n,i)=>n[i],qt);return a&&t.length>0?a.replace(/\{(\d+)\}/g,(n,i)=>t[i]):a||e}catch{return e}}function mi(e,t){let a=Pt;e==="en"&&(a=Ia);const n=(i,s)=>{Object.entries(s).forEach(([o,r])=>{typeof r=="string"?i[o]=r:(i[o]||(i[o]={}),n(i[o],r))})};n(a,t)}function vi(e,t){if(Pt===qt)return t;const a=Pt.code[`${e}`],n=qt.code[`${e}`];if(a&&n){const i=a.replace(/([()\[\]\.])/g,"\\$1").replace(/{\d+}/g,"(.*?)");if(i){const s=[],o=new RegExp(i,"g");let r;for(;(r=o.exec(t))!=null;)s.push(r);return c(`code.${e}`,s.splice(0,1))}}return t}let dn=pi.version,bi="V"+dn.replace(/\./g,"_");const D={BASE_URL:"",WEBSOCKET_SERVER:"",SERVER_URL:"",AUTO_SAVE:!0,user:null,DECORATION_TIMEOUT:1e4,CHECK_UPDATE:!0,BLOCK_CLOSE:!0,MAGIC_API_VERSION_TEXT:dn,MAGIC_API_VERSION:bi,API_DEFAULT_METHOD:"GET",CLIENT_ID:"none",HEADER_REQUEST_CLIENT_ID:"Magic-Request-Client-Id",HEADER_REQUEST_SCRIPT_ID:"Magic-Request-Script-Id",HEADER_REQUEST_BREAKPOINTS:"Magic-Request-Breakpoints",HEADER_RESPONSE_MAGIC_CONTENT_TYPE:"ma-content-type",HEADER_APPLICATION_STREAM:"application/octet-stream",HEADER_CONTENT_DISPOSITION:"ma-content-disposition",HEADER_MAGIC_TOKEN:"magic-token",HEADER_MAGIC_TOKEN_VALUE:"unauthorization",IGNORE_VERSION:"ignore-version",RECENT_OPENED_TAB:"recent_opened_tab",RECENT_OPENED:"recent_opened",RESPONSE_CODE_DEBUG:1e3,RESPONSE_CODE_SCRIPT_ERROR:-1e3,RESPONSE_NO_PERMISSION:-10,DEFAULT_EXPAND:!0,LOGINED:!1,LOG_MAX_ROWS:1/0,LOCKED:"1",UNLOCK:"0",STORE:{theme:"theme",token:"token"},PLUGINS:[],GLOBAL:{parameters:[],headers:[]},THEME:"default",JDBC_DRIVERS:["com.mysql.jdbc.Driver","com.mysql.cj.jdbc.Driver","oracle.jdbc.driver.OracleDriver","org.postgresql.Driver","com.microsoft.sqlserver.jdbc.SQLServerDriver","com.ibm.db2.jcc.DB2Driver"],DATASOURCE_TYPES:["com.zaxxer.hikari.HikariDataSource","com.alibaba.druid.pool.DruidDataSource","org.apache.tomcat.jdbc.pool.DataSource","org.apache.commons.dbcp2.BasicDataSource"],OPTIONS:[],EDITOR_FONT_FAMILY:'JetBrainsMono, Consolas, "Courier New",monospace, \u5FAE\u8F6F\u96C5\u9ED1',EDITOR_FONT_SIZE:14,FONT_LIGATURES:!0,VALIDATE_TYPES:[{value:"pass",text:c("message.noValidate")},{value:"expression",text:c("message.validateExpression")},{value:"pattern",text:c("message.validatePattern")}],DEFAULT_VALIDATE_TYPE:"pass",REQUEST_PARAMETER_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"},{value:"MultipartFile",text:"MultipartFile"},{value:"MultipartFiles",text:"MultipartFiles"}],GLOBAL_PARAMETER_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"}],DEFAULT_REQUEST_PARAMETER_TYPE:"String",REQUEST_SIMPLE_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"}],DEFAULT_REQUEST_SIMPLE_TYPE:"String",REQUEST_METHODS:[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"},{value:"HEAD",text:"HEAD"},{value:"PATCH",text:"PATCH"}],DEFAULT_REQUEST_METHOD:"GET",FUNCTION_RETURN_TYPES:[{value:"java.lang.Number",text:c("fn.number")},{value:"java.lang.String",text:c("fn.string")},{value:"java.util.Collection",text:c("fn.collection")},{value:"java.util.Map",text:"Map"},{value:"java.lang.Object",text:"Object"}],BODY_DATA_TYPES:[{value:"String",text:"String"},{value:"Integer",text:"Integer"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"},{value:"Boolean",text:"Boolean"},{value:"Date",text:"Date"},{value:"Object",text:"Object"},{value:"Array",text:"Array"},{value:"Any",text:"Any"}],DEFAULT_FUNCTION_RETURN_TYPE:"java.lang.Object",config:{}},Ei={style:{"white-space":"pre-wrap"}},pn={__name:"magic-alert",props:{title:{type:String,default:c("message.tips")},ok:{type:String,default:c("message.ok")},message:{type:String,required:!0},onClose:{type:Function,default:()=>{}}},setup(e){const t=U(!0);return(a,n)=>{const i=y("magic-button"),s=y("magic-button-group"),o=y("magic-dialog");return v(),V(o,{value:t.value,"onUpdate:value":n[1]||(n[1]=r=>t.value=r),title:e.title,ref:"dialog",onClose:n[2]||(n[2]=r=>e.onClose())},{default:w(()=>[R("pre",Ei,F(e.message),1),_(s,{align:"center",style:{padding:"5px 0"}},{default:w(()=>[_(i,{value:e.ok,type:"active",onOnClick:n[0]||(n[0]=r=>a.$refs.dialog.close())},null,8,["value"])]),_:1})]),_:1},8,["value","title"])}}};var yi=Object.freeze(Object.defineProperty({__proto__:null,default:pn},Symbol.toStringTag,{value:"Module"}));const Ti=["innerHTML"],_n={__name:"magic-confirm",props:{title:{type:String,default:c("message.tips")},ok:{type:String,default:c("message.ok")},cancel:{type:String,default:c("message.cancel")},message:{type:String,required:!0},success:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}}},setup(e){const t=U(!0);return(a,n)=>{const i=y("magic-button"),s=y("magic-button-group"),o=y("magic-dialog");return v(),V(o,{value:t.value,"onUpdate:value":n[2]||(n[2]=r=>t.value=r),title:e.title,ref:"dialog",onClose:n[3]||(n[3]=r=>e.onClose())},{default:w(()=>[R("pre",{innerHTML:e.message,style:{"white-space":"pre-wrap"}},null,8,Ti),_(s,{align:"right",style:{padding:"5px 0"}},{default:w(()=>[_(i,{value:e.ok,type:"active",onOnClick:n[0]||(n[0]=()=>{e.success(),a.$refs.dialog.close()})},null,8,["value"]),_(i,{value:e.cancel,onOnClick:n[1]||(n[1]=r=>a.$refs.dialog.close())},null,8,["value"])]),_:1})]),_:1},8,["value","title"])}}};var Si=Object.freeze(Object.defineProperty({__proto__:null,default:_n},Symbol.toStringTag,{value:"Module"}));let hn=null;const Ga=(e,t)=>{const a=document.createElement("div");document.querySelector(".magic-editor .magic-mounts").appendChild(a);const n=Ra(e,{...t,onClose:()=>a.remove()});hn(n),n.mount(a)},me={alert:(e,t,a)=>Ga(pn,{message:e,title:t,ok:a}),confirm:(e,t,a)=>Ga(_n,{title:e,message:t,success:a})},fn=(e,t)=>{hn=t,Object.keys(me).forEach(a=>e.config.globalProperties[`$${a}`]=me[a])};var xi=Object.freeze(Object.defineProperty({__proto__:null,install:fn,default:me},Symbol.toStringTag,{value:"Module"}));function Re(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}Re.prototype.clone_empty=function(){var e=new Re(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e};Re.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]};Re.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1};Re.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};Re.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};Re.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};Re.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,e.__items[0]===" "&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1};Re.prototype.is_empty=function(){return this.__items.length===0};Re.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};Re.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf(` diff --git a/src/main/resources/magic-editor/assets/axios.23e7b955.js b/src/main/resources/magic-editor/assets/axios.23e7b955.js index 2b449338a64a07de8b78e96fa7375fa56238a2ef..4d5eff3f57a694ada1c6c5fa79e038e0a10501d2 100644 --- a/src/main/resources/magic-editor/assets/axios.23e7b955.js +++ b/src/main/resources/magic-editor/assets/axios.23e7b955.js @@ -1,2 +1,19 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ function gr(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}),e}var H={exports:{}},se=function(e,t){return function(){for(var n=new Array(arguments.length),s=0;s=0)return;a==="set-cookie"?t[a]=(t[a]?t[a]:[]).concat([n]):t[a]=t[a]?t[a]+", "+n:n}}),t},G=p,Ke=G.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),a;function n(s){var o=s;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return a=n(window.location.href),function(o){var u=G.isString(o)?n(o):o;return u.protocol===a.protocol&&u.host===a.host}}():function(){return function(){return!0}}();function z(r){this.message=r}z.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};z.prototype.__CANCEL__=!0;var T=z,g=p,Ge=Me,Ye=ke,Qe=ue,Ze=Ve,er=Xe,rr=Ke,_=le,tr=j,nr=T,Y=function(e){return new Promise(function(a,n){var s=e.data,o=e.headers,u=e.responseType,f;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}g.isFormData(s)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(l+":"+d)}var R=Ze(e.baseURL,e.url);i.open(e.method.toUpperCase(),Qe(R,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function W(){if(!!i){var m="getAllResponseHeaders"in i?er(i.getAllResponseHeaders()):null,w=!u||u==="text"||u==="json"?i.responseText:i.response,b={data:w,status:i.status,statusText:i.statusText,headers:m,config:e,request:i};Ge(function(L){a(L),v()},function(L){n(L),v()},b),i=null}}if("onloadend"in i?i.onloadend=W:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(W)},i.onabort=function(){!i||(n(_("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(_("Network Error",e,null,i)),i=null},i.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||tr.transitional;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(_(w,e,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",i)),i=null},g.isStandardBrowserEnv()){var X=(e.withCredentials||rr(R))&&e.xsrfCookieName?Ye.read(e.xsrfCookieName):void 0;X&&(o[e.xsrfHeaderName]=X)}"setRequestHeader"in i&&g.forEach(o,function(w,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete o[b]:i.setRequestHeader(b,w)}),g.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),u&&u!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(m){!i||(n(!m||m&&m.type?new nr("canceled"):m),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),s||(s=null),i.send(s)})},c=p,Q=_e,ar=fe,sr={"Content-Type":"application/x-www-form-urlencoded"};function Z(r,e){!c.isUndefined(r)&&c.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function ir(){var r;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(r=Y),r}function or(r,e,t){if(c.isString(r))try{return(e||JSON.parse)(r),c.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(t||JSON.stringify)(r)}var U={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ir(),transformRequest:[function(e,t){return Q(t,"Accept"),Q(t,"Content-Type"),c.isFormData(e)||c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)?e:c.isArrayBufferView(e)?e.buffer:c.isURLSearchParams(e)?(Z(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):c.isObject(e)||t&&t["Content-Type"]==="application/json"?(Z(t,"application/json"),or(e)):e}],transformResponse:[function(e){var t=this.transitional||U.transitional,a=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!a&&this.responseType==="json";if(s||n&&c.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ar(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};c.forEach(["delete","get","head"],function(e){U.headers[e]={}});c.forEach(["post","put","patch"],function(e){U.headers[e]=c.merge(sr)});var j=U,ur=p,fr=j,lr=function(e,t,a){var n=this||fr;return ur.forEach(a,function(o){e=o.call(n,e,t)}),e},ce=function(e){return!!(e&&e.__CANCEL__)},ee=p,q=lr,cr=ce,dr=j,hr=T;function F(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new hr("canceled")}var pr=function(e){F(e),e.headers=e.headers||{},e.data=q.call(e,e.data,e.headers,e.transformRequest),e.headers=ee.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ee.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||dr.adapter;return t(e).then(function(n){return F(e),n.data=q.call(e,n.data,n.headers,e.transformResponse),n},function(n){return cr(n)||(F(e),n&&n.response&&(n.response.data=q.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})},h=p,de=function(e,t){t=t||{};var a={};function n(i,l){return h.isPlainObject(i)&&h.isPlainObject(l)?h.merge(i,l):h.isPlainObject(l)?h.merge({},l):h.isArray(l)?l.slice():l}function s(i){if(h.isUndefined(t[i])){if(!h.isUndefined(e[i]))return n(void 0,e[i])}else return n(e[i],t[i])}function o(i){if(!h.isUndefined(t[i]))return n(void 0,t[i])}function u(i){if(h.isUndefined(t[i])){if(!h.isUndefined(e[i]))return n(void 0,e[i])}else return n(void 0,t[i])}function f(i){if(i in t)return n(e[i],t[i]);if(i in e)return n(void 0,e[i])}var v={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return h.forEach(Object.keys(e).concat(Object.keys(t)),function(l){var d=v[l]||s,R=d(l);h.isUndefined(R)&&d!==f||(a[l]=R)}),a},he={version:"0.24.0"},mr=he.version,V={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){V[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});var re={};V.transitional=function(e,t,a){function n(s,o){return"[Axios v"+mr+"] Transitional option '"+s+"'"+o+(a?". "+a:"")}return function(s,o,u){if(e===!1)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!re[o]&&(re[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,u):!0}};function vr(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var a=Object.keys(r),n=a.length;n-- >0;){var s=a[n],o=e[s];if(o){var u=r[s],f=u===void 0||o(u,s,r);if(f!==!0)throw new TypeError("option "+s+" must be "+f);continue}if(t!==!0)throw Error("Unknown option "+s)}}var yr={assertOptions:vr,validators:V},pe=p,br=ue,te=Le,ne=pr,B=de,me=yr,O=me.validators;function x(r){this.defaults=r,this.interceptors={request:new te,response:new te}}x.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=B(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;t!==void 0&&me.assertOptions(t,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(n=n&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});var s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});var o;if(!n){var u=[ne,void 0];for(Array.prototype.unshift.apply(u,a),u=u.concat(s),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var f=e;a.length;){var v=a.shift(),i=a.shift();try{f=v(f)}catch(l){i(l);break}}try{o=ne(f)}catch(l){return Promise.reject(l)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};x.prototype.getUri=function(e){return e=B(this.defaults,e),br(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};pe.forEach(["delete","get","head","options"],function(e){x.prototype[e]=function(t,a){return this.request(B(a||{},{method:e,url:t,data:(a||{}).data}))}});pe.forEach(["post","put","patch"],function(e){x.prototype[e]=function(t,a,n){return this.request(B(n||{},{method:e,url:t,data:a}))}});var Er=x,wr=T;function C(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(a){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n. + */ (function(){"use strict";class Xt{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Jt=new Xt;function Ot(e){Kt(e)||Jt.onUnexpectedError(e)}function ye(e){if(e instanceof Error){let{name:t,message:n}=e;const s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s}}return e}const Qe="Canceled";function Kt(e){return e instanceof Error&&e.name===Qe&&e.message===Qe}function en(e){const t=this;let n=!1,s;return function(){return n||(n=!0,s=e.apply(t,arguments)),s}}var Ae;(function(e){function t(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function s(){return n}e.empty=s;function*r(d){yield d}e.single=r;function i(d){return d||n}e.from=i;function l(d){return!d||d[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(d){return d[Symbol.iterator]().next().value}e.first=u;function a(d,h){for(const g of d)if(h(g))return!0;return!1}e.some=a;function o(d,h){for(const g of d)if(h(g))return g}e.find=o;function*f(d,h){for(const g of d)h(g)&&(yield g)}e.filter=f;function*c(d,h){let g=0;for(const _ of d)yield h(_,g++)}e.map=c;function*m(...d){for(const h of d)for(const g of h)yield g}e.concat=m;function*L(d){for(const h of d)for(const g of h)yield g}e.concatNested=L;function b(d,h,g){let _=g;for(const A of d)_=h(_,A);return _}e.reduce=b;function*w(d,h,g=d.length){for(h<0&&(h+=d.length),g<0?g+=d.length:g>d.length&&(g=d.length);h_===A){const _=d[Symbol.iterator](),A=h[Symbol.iterator]();for(;;){const S=_.next(),N=A.next();if(S.done!==N.done)return!1;if(S.done)return!0;if(!g(S.value,N.value))return!1}}e.equals=P})(Ae||(Ae={}));function es(e){return e}function ts(e,t){}class tn extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`),this.errors=t}}function Ze(e){if(Ae.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new tn(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function nn(...e){return Xe(()=>Ze(e))}function Xe(e){return{dispose:en(()=>{e()})}}class le{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Ze(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?le.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}le.DISABLE_DISPOSED_WARNING=!1;class Je{constructor(){this._store=new le,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Je.None=Object.freeze({dispose(){}});var we;const he="en";let Ce=!1,ve=!1,Me=!1,me,Pe=he,sn,Z;const T=typeof self=="object"?self:typeof global=="object"?global:{};let k;typeof T.vscode!="undefined"&&typeof T.vscode.process!="undefined"?k=T.vscode.process:typeof process!="undefined"&&(k=process);const rn=typeof((we=k==null?void 0:k.versions)===null||we===void 0?void 0:we.electron)=="string"&&k.type==="renderer";if(typeof navigator=="object"&&!rn)Z=navigator.userAgent,Ce=Z.indexOf("Windows")>=0,ve=Z.indexOf("Macintosh")>=0,(Z.indexOf("Macintosh")>=0||Z.indexOf("iPad")>=0||Z.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Me=Z.indexOf("Linux")>=0,me=navigator.language,Pe=me;else if(typeof k=="object"){Ce=k.platform==="win32",ve=k.platform==="darwin",Me=k.platform==="linux",Me&&!!k.env.SNAP&&k.env.SNAP_REVISION,me=he,Pe=he;const e=k.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];me=t.locale,Pe=n||he,sn=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const ue=Ce,ln=ve,Oe=function(){if(T.setImmediate)return T.setImmediate.bind(T);if(typeof T.postMessage=="function"&&!T.importScripts){let n=[];T.addEventListener("message",r=>{if(r.data&&r.data.vscodeSetImmediateId)for(let i=0,l=n.length;i{const i=++s;n.push({id:i,callback:r}),T.postMessage({vscodeSetImmediateId:i},"*")}}if(typeof(k==null?void 0:k.nextTick)=="function")return k.nextTick.bind(k);const t=Promise.resolve();return n=>t.then(n)}();function un(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function pe(e){const t=[];for(const n of un(e))typeof e[n]=="function"&&t.push(n);return t}function Ke(e,t){const n=r=>function(){const i=Array.prototype.slice.call(arguments,0);return t(r,i)};let s={};for(const r of e)s[r]=n(r);return s}const an="$initialize";class on{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let s=String(++this._lastSentReq);return new Promise((r,i)=>{this._pendingReplies[s]={resolve:r,reject:i},this._send({vsWorker:this._workerId,req:s,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let i=t;if(!this._pendingReplies[i.seq]){console.warn("Got reply to unknown seq");return}let l=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){let u=i.err;i.err.$isError&&(u=new Error,u.name=i.err.name,u.message=i.err.message,u.stack=i.err.stack),l.reject(u);return}l.resolve(i.res);return}let n=t,s=n.req;this._handler.handleMessage(n.method,n.args).then(i=>{this._send({vsWorker:this._workerId,seq:s,res:i,err:void 0})},i=>{i.detail instanceof Error&&(i.detail=ye(i.detail)),this._send({vsWorker:this._workerId,seq:s,res:void 0,err:ye(i)})})}_send(t){let n=[];if(t.req){const s=t;for(let r=0;r{t(s,r)},handleMessage:(s,r)=>this._handleMessage(s,r)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===an)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(s){return Promise.reject(s)}}initialize(t,n,s,r){this._protocol.setWorkerId(t);const l=Ke(r,(u,a)=>this._protocol.sendMessage(u,a));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(pe(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,a)=>{self.require([s],o=>{if(this._requestHandler=o.create(l),!this._requestHandler){a(new Error("No RequestHandler!"));return}u(pe(this._requestHandler))},a)}))}}class ${constructor(t,n,s,r){this.originalStart=t,this.originalLength=n,this.modifiedStart=s,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function fn(e){return e.split(/\r\n|\r|\n/)}function hn(e){for(let t=0,n=e.length;t=0;n--){const s=e.charCodeAt(n);if(s!==32&&s!==9)return n}return-1}function et(e,t){return(t<<5)-t+e|0}function dn(e,t){t=et(149417,t);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new $(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class z{constructor(t,n,s=null){this.ContinueProcessingPredicate=s,this._originalSequence=t,this._modifiedSequence=n;const[r,i,l]=z._getElements(t),[u,a,o]=z._getElements(n);this._hasStrings=l&&o,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=u,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(z._isStringArray(n)){const s=new Int32Array(n.length);for(let r=0,i=n.length;r=t&&r>=s&&this.ElementsAreEqual(n,r);)n--,r--;if(t>n||s>r){let c;return s<=r?(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new $(t,0,s,r-s+1)]):t<=n?(K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[new $(t,n-t+1,s,0)]):(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const l=[0],u=[0],a=this.ComputeRecursionPoint(t,n,s,r,l,u,i),o=l[0],f=u[0];if(a!==null)return a;if(!i[0]){const c=this.ComputeDiffRecursive(t,o,s,f,i);let m=[];return i[0]?m=[new $(o+1,n-(o+1)+1,f+1,r-(f+1)+1)]:m=this.ComputeDiffRecursive(o+1,n,f+1,r,i),this.ConcatenateChanges(c,m)}return[new $(t,n-t+1,s,r-s+1)]}WALKTRACE(t,n,s,r,i,l,u,a,o,f,c,m,L,b,w,M,P,d){let h=null,g=null,_=new nt,A=n,S=s,N=L[0]-M[0]-r,p=-1073741824,I=this.m_forwardHistory.length-1;do{const R=N+t;R===A||R=0&&(o=this.m_forwardHistory[I],t=o[0],A=1,S=o.length-1)}while(--I>=-1);if(h=_.getReverseChanges(),d[0]){let R=L[0]+1,C=M[0]+1;if(h!==null&&h.length>0){const Q=h[h.length-1];R=Math.max(R,Q.getOriginalEnd()),C=Math.max(C,Q.getModifiedEnd())}g=[new $(R,m-R+1,C,w-C+1)]}else{_=new nt,A=l,S=u,N=L[0]-M[0]-a,p=1073741824,I=P?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=N+i;R===A||R=f[R+1]?(c=f[R+1]-1,b=c-N-a,c>p&&_.MarkNextChange(),p=c+1,_.AddOriginalElement(c+1,b+1),N=R+1-i):(c=f[R-1],b=c-N-a,c>p&&_.MarkNextChange(),p=c,_.AddModifiedElement(c+1,b+1),N=R-1-i),I>=0&&(f=this.m_reverseHistory[I],i=f[0],A=1,S=f.length-1)}while(--I>=-1);g=_.getChanges()}return this.ConcatenateChanges(h,g)}ComputeRecursionPoint(t,n,s,r,i,l,u){let a=0,o=0,f=0,c=0,m=0,L=0;t--,s--,i[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const b=n-t+(r-s),w=b+1,M=new Int32Array(w),P=new Int32Array(w),d=r-s,h=n-t,g=t-s,_=n-r,S=(h-d)%2===0;M[d]=t,P[h]=n,u[0]=!1;for(let N=1;N<=b/2+1;N++){let p=0,I=0;f=this.ClipDiagonalBound(d-N,N,d,w),c=this.ClipDiagonalBound(d+N,N,d,w);for(let C=f;C<=c;C+=2){C===f||Cp+I&&(p=a,I=o),!S&&Math.abs(C-h)<=N-1&&a>=P[C])return i[0]=a,l[0]=o,Q<=P[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}const R=(p-t+(I-s)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,R))return u[0]=!0,i[0]=p,l[0]=I,R>0&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):(t++,s++,[new $(t,n-t+1,s,r-s+1)]);m=this.ClipDiagonalBound(h-N,N,h,w),L=this.ClipDiagonalBound(h+N,N,h,w);for(let C=m;C<=L;C+=2){C===m||C=P[C+1]?a=P[C+1]-1:a=P[C-1],o=a-(C-h)-_;const Q=a;for(;a>t&&o>s&&this.ElementsAreEqual(a,o);)a--,o--;if(P[C]=a,S&&Math.abs(C-d)<=N&&a<=M[C])return i[0]=a,l[0]=o,Q>=M[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}if(N<=1447){let C=new Int32Array(c-f+2);C[0]=d-f+1,ee.Copy2(M,f,C,1,c-f+1),this.m_forwardHistory.push(C),C=new Int32Array(L-m+2),C[0]=h-m+1,ee.Copy2(P,m,C,1,L-m+1),this.m_reverseHistory.push(C)}}return this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u)}PrettifyChanges(t){for(let n=0;n0,u=s.modifiedLength>0;for(;s.originalStart+s.originalLength=0;n--){const s=t[n];let r=0,i=0;if(n>0){const c=t[n-1];r=c.originalStart+c.originalLength,i=c.modifiedStart+c.modifiedLength}const l=s.originalLength>0,u=s.modifiedLength>0;let a=0,o=this._boundaryScore(s.originalStart,s.originalLength,s.modifiedStart,s.modifiedLength);for(let c=1;;c++){const m=s.originalStart-c,L=s.modifiedStart-c;if(mo&&(o=w,a=c)}s.originalStart-=a,s.modifiedStart-=a;const f=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],f)){t[n-1]=f[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,s=t.length;n0&&L>a&&(a=L,o=c,f=m)}return a>0?[o,f]:null}_contiguousSequenceScore(t,n,s){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._OriginalIsBoundary(s-1)||this._OriginalIsBoundary(s))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._ModifiedIsBoundary(s-1)||this._ModifiedIsBoundary(s))return!0}return!1}_boundaryScore(t,n,s,r){const i=this._OriginalRegionIsBoundary(t,n)?1:0,l=this._ModifiedRegionIsBoundary(s,r)?1:0;return i+l}ConcatenateChanges(t,n){let s=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],s)){const r=new Array(t.length+n.length-1);return ee.Copy(t,0,r,0,t.length-1),r[t.length-1]=s[0],ee.Copy(n,1,r,t.length,n.length-1),r}else{const r=new Array(t.length+n.length);return ee.Copy(t,0,r,0,t.length),ee.Copy(n,0,r,t.length,n.length),r}}ChangesOverlap(t,n,s){if(K.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),K.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const r=t.originalStart;let i=t.originalLength;const l=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),s[0]=new $(r,i,l,u),!0}else return s[0]=null,!1}ClipDiagonalBound(t,n,s,r){if(t>=0&&t=Ln&&e<=Sn||e>=Nn&&e<=bn}function de(e,t,n,s){let r="",i=0,l=-1,u=0,a=0;for(let o=0;o<=e.length;++o){if(o2){const f=r.lastIndexOf(n);f===-1?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf(n)),l=o,u=0;continue}else if(r.length!==0){r="",i=0,l=o,u=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",i=2)}else r.length>0?r+=`${n}${e.slice(l+1,o)}`:r=e.slice(l+1,o),i=o-l-1;l=o,u=0}else a===G&&u!==-1?++u:u=-1}return r}function rt(e,t){if(t===null||typeof t!="object")throw new st("pathObject","Object",t);const n=t.dir||t.root,s=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${s}`:`${n}${e}${s}`:s}const H={resolve(...e){let t="",n="",s=!1;for(let r=e.length-1;r>=-1;r--){let i;if(r>=0){if(i=e[r],D(i,"path"),i.length===0)continue}else t.length===0?i=Re():(i=_n[`=${t}`]||Re(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===q)&&(i=`${t}\\`));const l=i.length;let u=0,a="",o=!1;const f=i.charCodeAt(0);if(l===1)v(f)&&(u=1,o=!0);else if(v(f))if(o=!0,v(i.charCodeAt(1))){let c=2,m=c;for(;c2&&v(i.charCodeAt(2))&&(o=!0,u=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(s){if(t.length>0)break}else if(n=`${i.slice(u)}\\${n}`,s=o,o&&t.length>0)break}return n=de(n,!s,"\\",v),s?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){D(e,"path");const t=e.length;if(t===0)return".";let n=0,s,r=!1;const i=e.charCodeAt(0);if(t===1)return Ue(i)?"\\":e;if(v(i))if(r=!0,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))&&(r=!0,n=3));let l=n0&&v(e.charCodeAt(t-1))&&(l+="\\"),s===void 0?r?`\\${l}`:l:r?`${s}\\${l}`:`${s}${l}`},isAbsolute(e){D(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return v(n)||t>2&&y(n)&&e.charCodeAt(1)===j&&v(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let s=!0,r=0;if(typeof n=="string"&&v(n.charCodeAt(0))){++r;const i=n.length;i>1&&v(n.charCodeAt(1))&&(++r,i>2&&(v(n.charCodeAt(2))?++r:s=!1))}if(s){for(;r=2&&(t=`\\${t.slice(r)}`)}return H.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t)return"";const n=H.resolve(e),s=H.resolve(t);if(n===s||(e=n.toLowerCase(),t=s.toLowerCase(),e===t))return"";let r=0;for(;rr&&e.charCodeAt(i-1)===q;)i--;const l=i-r;let u=0;for(;uu&&t.charCodeAt(a-1)===q;)a--;const o=a-u,f=lf){if(t.charCodeAt(u+m)===q)return s.slice(u+m+1);if(m===2)return s.slice(u+m)}l>f&&(e.charCodeAt(r+m)===q?c=m:m===2&&(c=3)),c===-1&&(c=0)}let L="";for(m=r+c+1;m<=i;++m)(m===i||e.charCodeAt(m)===q)&&(L+=L.length===0?"..":"\\..");return u+=c,L.length>0?`${L}${s.slice(u,a)}`:(s.charCodeAt(u)===q&&++u,s.slice(u,a))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=H.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===q){if(t.charCodeAt(1)===q){const n=t.charCodeAt(2);if(n!==An&&n!==G)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===j&&t.charCodeAt(2)===q)return`\\\\?\\${t}`;return e},dirname(e){D(e,"path");const t=e.length;if(t===0)return".";let n=-1,s=0;const r=e.charCodeAt(0);if(t===1)return v(r)?e:".";if(v(r)){if(n=s=1,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))?3:2,s=n);let i=-1,l=!0;for(let u=t-1;u>=s;--u)if(v(e.charCodeAt(u))){if(!l){i=u;break}}else l=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===j&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=n;--i){const a=e.charCodeAt(i);if(v(a)){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(v(e.charCodeAt(i))){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=0,n=-1,s=0,r=-1,i=!0,l=0;e.length>=2&&e.charCodeAt(1)===j&&y(e.charCodeAt(0))&&(t=s=2);for(let u=e.length-1;u>=t;--u){const a=e.charCodeAt(u);if(v(a)){if(!i){s=u+1;break}continue}r===-1&&(i=!1,r=u+1),a===G?n===-1?n=u:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===s+1?"":e.slice(n,r)},format:rt.bind(null,"\\"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let s=0,r=e.charCodeAt(0);if(n===1)return v(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(v(r)){if(s=1,v(e.charCodeAt(1))){let c=2,m=c;for(;c0&&(t.root=e.slice(0,s));let i=-1,l=s,u=-1,a=!0,o=e.length-1,f=0;for(;o>=s;--o){if(r=e.charCodeAt(o),v(r)){if(!a){l=o+1;break}continue}u===-1&&(a=!1,u=o+1),r===G?i===-1?i=o:f!==1&&(f=1):i!==-1&&(f=-1)}return u!==-1&&(i===-1||f===0||f===1&&i===u-1&&i===l+1?t.base=t.name=e.slice(l,u):(t.name=e.slice(l,i),t.base=e.slice(l,u),t.ext=e.slice(i,u))),l>0&&l!==s?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},W={resolve(...e){let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Re();D(r,"path"),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===F)}return t=de(t,!n,"/",Ue),n?`/${t}`:t.length>0?t:"."},normalize(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F,n=e.charCodeAt(e.length-1)===F;return e=de(e,!t,"/",Ue),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return D(e,"path"),e.length>0&&e.charCodeAt(0)===F},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=s:t+=`/${s}`)}return t===void 0?".":W.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t||(e=W.resolve(e),t=W.resolve(t),e===t))return"";const n=1,s=e.length,r=s-n,i=1,l=t.length-i,u=ru){if(t.charCodeAt(i+o)===F)return t.slice(i+o+1);if(o===0)return t.slice(i+o)}else r>u&&(e.charCodeAt(n+o)===F?a=o:o===0&&(a=0));let f="";for(o=n+a+1;o<=s;++o)(o===s||e.charCodeAt(o)===F)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(i+a)}`},toNamespacedPath(e){return e},dirname(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F;let n=-1,s=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===F){if(!s){n=r;break}}else s=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=0;--i){const a=e.charCodeAt(i);if(a===F){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===F){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=-1,n=0,s=-1,r=!0,i=0;for(let l=e.length-1;l>=0;--l){const u=e.charCodeAt(l);if(u===F){if(!r){n=l+1;break}continue}s===-1&&(r=!1,s=l+1),u===G?t===-1?t=l:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||s===-1||i===0||i===1&&t===s-1&&t===n+1?"":e.slice(t,s)},format:rt.bind(null,"/"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===F;let s;n?(t.root="/",s=1):s=0;let r=-1,i=0,l=-1,u=!0,a=e.length-1,o=0;for(;a>=s;--a){const f=e.charCodeAt(a);if(f===F){if(!u){i=a+1;break}continue}l===-1&&(u=!1,l=a+1),f===G?r===-1?r=a:o!==1&&(o=1):r!==-1&&(o=-1)}if(l!==-1){const f=i===0&&n?1:i;r===-1||o===0||o===1&&r===l-1&&r===i+1?t.base=t.name=e.slice(f,l):(t.name=e.slice(f,r),t.base=e.slice(f,l),t.ext=e.slice(r,l))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};W.win32=H.win32=H,W.posix=H.posix=W,X==="win32"?H.normalize:W.normalize,X==="win32"?H.resolve:W.resolve,X==="win32"?H.relative:W.relative,X==="win32"?H.dirname:W.dirname,X==="win32"?H.basename:W.basename,X==="win32"?H.extname:W.extname,X==="win32"?H.sep:W.sep;const wn=/^\w[\w\d+.-]*$/,Cn=/^\//,vn=/^\/\//;function it(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!wn.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Cn.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(vn.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Mn(e,t){return!e&&!t?"file":e}function Pn(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Y&&(t=Y+t):t=Y;break}return t}const x="",Y="/",pn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class J{constructor(t,n,s,r,i,l=!1){typeof t=="object"?(this.scheme=t.scheme||x,this.authority=t.authority||x,this.path=t.path||x,this.query=t.query||x,this.fragment=t.fragment||x):(this.scheme=Mn(t,l),this.authority=n||x,this.path=Pn(this.scheme,s||x),this.query=r||x,this.fragment=i||x,it(this,l))}static isUri(t){return t instanceof J?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return xe(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:s,path:r,query:i,fragment:l}=t;return n===void 0?n=this.scheme:n===null&&(n=x),s===void 0?s=this.authority:s===null&&(s=x),r===void 0?r=this.path:r===null&&(r=x),i===void 0?i=this.query:i===null&&(i=x),l===void 0?l=this.fragment:l===null&&(l=x),n===this.scheme&&s===this.authority&&r===this.path&&i===this.query&&l===this.fragment?this:new ne(n,s,r,i,l)}static parse(t,n=!1){const s=pn.exec(t);return s?new ne(s[2]||x,ge(s[4]||x),ge(s[5]||x),ge(s[7]||x),ge(s[9]||x),n):new ne(x,x,x,x,x)}static file(t){let n=x;if(ue&&(t=t.replace(/\\/g,Y)),t[0]===Y&&t[1]===Y){const s=t.indexOf(Y,2);s===-1?(n=t.substring(2),t=Y):(n=t.substring(2,s),t=t.substring(s)||Y)}return new ne("file",n,t,x,x)}static from(t){const n=new ne(t.scheme,t.authority,t.path,t.query,t.fragment);return it(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let s;return ue&&t.scheme==="file"?s=J.file(H.join(xe(t,!0),...n)).path:s=W.join(t.path,...n),t.with({path:s})}toString(t=!1){return Ee(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof J)return t;{const n=new ne(t);return n._formatted=t.external,n._fsPath=t._sep===lt?t.fsPath:null,n}}else return t}}const lt=ue?1:void 0;class ne extends J{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=xe(this,!1)),this._fsPath}toString(t=!1){return t?Ee(this,!0):(this._formatted||(this._formatted=Ee(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=lt),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const ut={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function at(e,t){let n,s=-1;for(let r=0;r=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||t&&i===47)s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n!==void 0&&(n+=e.charAt(r));else{n===void 0&&(n=e.substr(0,r));const l=ut[i];l!==void 0?(s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n+=l):s===-1&&(s=r)}}return s!==-1&&(n+=encodeURIComponent(e.substring(s))),n!==void 0?n:e}function Rn(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,ue&&(n=n.replace(/\//g,"\\")),n}function Ee(e,t){const n=t?Rn:at;let s="",{scheme:r,authority:i,path:l,query:u,fragment:a}=e;if(r&&(s+=r,s+=":"),(i||r==="file")&&(s+=Y,s+=Y),i){let o=i.indexOf("@");if(o!==-1){const f=i.substr(0,o);i=i.substr(o+1),o=f.indexOf(":"),o===-1?s+=n(f,!1):(s+=n(f.substr(0,o),!1),s+=":",s+=n(f.substr(o+1),!1)),s+="@"}i=i.toLowerCase(),o=i.indexOf(":"),o===-1?s+=n(i,!1):(s+=n(i.substr(0,o),!1),s+=i.substr(o))}if(l){if(l.length>=3&&l.charCodeAt(0)===47&&l.charCodeAt(2)===58){const o=l.charCodeAt(1);o>=65&&o<=90&&(l=`/${String.fromCharCode(o+32)}:${l.substr(3)}`)}else if(l.length>=2&&l.charCodeAt(1)===58){const o=l.charCodeAt(0);o>=65&&o<=90&&(l=`${String.fromCharCode(o+32)}:${l.substr(2)}`)}s+=n(l,!0)}return u&&(s+="?",s+=n(u,!1)),a&&(s+="#",s+=t?a:at(a,!1)),s}function ot(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ot(e.substr(3)):e}}const ct=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ge(e){return e.match(ct)?e.replace(ct,t=>ot(t)):e}class B{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new B(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return B.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return B.isBefore(this,t)}static isBefore(t,n){return t.lineNumbers||t===s&&n>r?(this.startLineNumber=s,this.startColumn=r,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=s,this.endColumn=r)}isEmpty(){return E.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return E.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return E.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return E.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return E.plusRange(this,t)}static plusRange(t,n){let s,r,i,l;return n.startLineNumbert.endLineNumber?(i=n.endLineNumber,l=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,l=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,l=t.endColumn),new E(s,r,i,l)}intersectRanges(t){return E.intersectRanges(this,t)}static intersectRanges(t,n){let s=t.startLineNumber,r=t.startColumn,i=t.endLineNumber,l=t.endColumn,u=n.startLineNumber,a=n.startColumn,o=n.endLineNumber,f=n.endColumn;return so?(i=o,l=f):i===o&&(l=Math.min(l,f)),s>i||s===i&&r>l?null:new E(s,r,i,l)}equalsRange(t){return E.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return E.getEndPosition(this)}static getEndPosition(t){return new B(t.endLineNumber,t.endColumn)}getStartPosition(){return E.getStartPosition(this)}static getStartPosition(t){return new B(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new E(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new E(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return E.collapseToStart(this)}static collapseToStart(t){return new E(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new E(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new E(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const Un=3;function ft(e,t,n,s){return new z(e,t,n).ComputeDiff(s)}class ht{constructor(t){const n=[],s=[];for(let r=0,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const L=s.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),b=r.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let w=ft(L,b,i,!0).changes;u&&(w=En(w)),m=[];for(let M=0,P=w.length;M1&&w>1;){const M=m.charCodeAt(b-2),P=L.charCodeAt(w-2);if(M!==P)break;b--,w--}(b>1||w>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,b,l+1,1,w)}{let b=ke(m,1),w=ke(L,1);const M=m.length+1,P=L.length+1;for(;b!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function se(e){return e<0?0:e>4294967295?4294967295:e|0}class kn{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class Fn{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=se(t);const s=this.values,r=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(s.length+i),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t),t+i),this.values.set(n,t),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=se(t),n=se(n),this.values[t]===n?!1:(this.values[t]=n,t-1=s.length)return!1;let i=s.length-t;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(s.length-n),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=se(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let s=n;s<=t;s++)this.prefixSum[s]=this.prefixSum[s-1]+this.values[s];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,s=this.values.length-1,r=0,i=0,l=0;for(;n<=s;)if(r=n+(s-n)/2|0,i=this.prefixSum[r],l=i-this.values[r],t=i)n=r+1;else break;return new kn(r,t-l)}}class Tn{constructor(t,n,s,r){this._uri=t,this._lines=n,this._eol=s,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const s of n)this._acceptDeleteRange(s.range),this._acceptInsertText(new B(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,s=new Uint32Array(n);for(let r=0;r/?";function Hn(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of In)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const qn=Hn();function Wn(e){let t=qn;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const Bn={maxLen:1e3,windowSize:15,timeBudget:150};function gt(e,t,n,s,r=Bn){if(n.length>r.maxLen){let o=e-r.maxLen/2;return o<0?o=0:s+=o,n=n.substring(o,e+r.maxLen/2),gt(e,t,n,s,r)}const i=Date.now(),l=e-1-s;let u=-1,a=null;for(let o=1;!(Date.now()-i>=r.timeBudget);o++){const f=l-r.windowSize*o;t.lastIndex=Math.max(0,f);const c=Yn(t,n,l,u);if(!c&&a||(a=c,f<=0))break;u=f}if(a){let o={word:a[0],startColumn:s+1+a.index,endColumn:s+1+a.index+a[0].length};return t.lastIndex=0,o}return null}function Yn(e,t,n,s){let r;for(;r=e.exec(t);){const i=r.index||0;if(i<=n&&e.lastIndex>=n)return r;if(s>0&&i>s)return null}return null}class Fe{constructor(t){let n=dt(t);this._defaultValue=n,this._asciiMap=Fe._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let s=0;s<256;s++)n[s]=t;return n}set(t,n){let s=dt(n);t>=0&&t<256?this._asciiMap[t]=s:this._map.set(t,s)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Vn{constructor(t,n,s){const r=new Uint8Array(t*n);for(let i=0,l=t*n;in&&(n=a),u>s&&(s=u),o>s&&(s=o)}n++,s++;let r=new Vn(s,n,0);for(let i=0,l=t.length;i=this._maxCharCode?0:this._states.get(t,n)}}let Te=null;function zn(){return Te===null&&(Te=new $n([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Te}let ce=null;function Gn(){if(ce===null){ce=new Fe(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;nr);if(r>0){const u=n.charCodeAt(r-1),a=n.charCodeAt(l);(u===40&&a===41||u===91&&a===93||u===123&&a===125)&&l--}return{range:{startLineNumber:s,startColumn:r+1,endLineNumber:s,endColumn:l+2},url:n.substring(r,l+1)}}static computeLinks(t,n=zn()){const s=Gn();let r=[];for(let i=1,l=t.getLineCount();i<=l;i++){const u=t.getLineContent(i),a=u.length;let o=0,f=0,c=0,m=1,L=!1,b=!1,w=!1,M=!1;for(;o=0?(r+=s?1:-1,r<0?r=t.length-1:r%=t.length,t[r]):null}}Ie.INSTANCE=new Ie;class U{constructor(t){this.element=t,this.next=U.Undefined,this.prev=U.Undefined}}U.Undefined=new U(void 0);class _t{constructor(){this._first=U.Undefined,this._last=U.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===U.Undefined}clear(){let t=this._first;for(;t!==U.Undefined;){const n=t.next;t.prev=U.Undefined,t.next=U.Undefined,t=n}this._first=U.Undefined,this._last=U.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const s=new U(t);if(this._first===U.Undefined)this._first=s,this._last=s;else if(n){const i=this._last;this._last=s,s.prev=i,i.next=s}else{const i=this._first;this._first=s,s.next=i,i.prev=s}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(s))}}shift(){if(this._first!==U.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==U.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==U.Undefined&&t.next!==U.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===U.Undefined&&t.next===U.Undefined?(this._first=U.Undefined,this._last=U.Undefined):t.next===U.Undefined?(this._last=this._last.prev,this._last.next=U.Undefined):t.prev===U.Undefined&&(this._first=this._first.next,this._first.prev=U.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==U.Undefined;)yield t.element,t=t.next}}const yn=T.performance&&typeof T.performance.now=="function";class Le{constructor(t){this._highResolution=yn&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Le(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?T.performance.now():Date.now()}}var He;(function(e){e.None=()=>Je.None;function t(d){return(h,g=null,_)=>{let A=!1,S;return S=d(N=>{if(!A)return S?S.dispose():A=!0,h.call(g,N)},null,_),A&&S.dispose(),S}}e.once=t;function n(d,h){return a((g,_=null,A)=>d(S=>g.call(_,h(S)),null,A))}e.map=n;function s(d,h){return a((g,_=null,A)=>d(S=>{h(S),g.call(_,S)},null,A))}e.forEach=s;function r(d,h){return a((g,_=null,A)=>d(S=>h(S)&&g.call(_,S),null,A))}e.filter=r;function i(d){return d}e.signal=i;function l(...d){return(h,g=null,_)=>nn(...d.map(A=>A(S=>h.call(g,S),null,_)))}e.any=l;function u(d,h,g){let _=g;return n(d,A=>(_=h(_,A),_))}e.reduce=u;function a(d){let h;const g=new O({onFirstListenerAdd(){h=d(g.fire,g)},onLastListenerRemove(){h.dispose()}});return g.event}function o(d,h,g=100,_=!1,A){let S,N,p,I=0;const R=new O({leakWarningThreshold:A,onFirstListenerAdd(){S=d(C=>{I++,N=h(N,C),_&&!p&&(R.fire(N),N=void 0),clearTimeout(p),p=setTimeout(()=>{const Q=N;N=void 0,p=void 0,(!_||I>1)&&R.fire(Q),I=0},g)})},onLastListenerRemove(){S.dispose()}});return R.event}e.debounce=o;function f(d,h=(g,_)=>g===_){let g=!0,_;return r(d,A=>{const S=g||!h(A,_);return g=!1,_=A,S})}e.latch=f;function c(d,h){return[e.filter(d,h),e.filter(d,g=>!h(g))]}e.split=c;function m(d,h=!1,g=[]){let _=g.slice(),A=d(p=>{_?_.push(p):N.fire(p)});const S=()=>{_&&_.forEach(p=>N.fire(p)),_=null},N=new O({onFirstListenerAdd(){A||(A=d(p=>N.fire(p)))},onFirstListenerDidAdd(){_&&(h?setTimeout(S):S())},onLastListenerRemove(){A&&A.dispose(),A=null}});return N.event}e.buffer=m;class L{constructor(h){this.event=h}map(h){return new L(n(this.event,h))}forEach(h){return new L(s(this.event,h))}filter(h){return new L(r(this.event,h))}reduce(h,g){return new L(u(this.event,h,g))}latch(){return new L(f(this.event))}debounce(h,g=100,_=!1,A){return new L(o(this.event,h,g,_,A))}on(h,g,_){return this.event(h,g,_)}once(h,g,_){return t(this.event)(h,g,_)}}function b(d){return new L(d)}e.chain=b;function w(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.on(h,_),S=()=>d.removeListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromNodeEventEmitter=w;function M(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.addEventListener(h,_),S=()=>d.removeEventListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromDOMEventEmitter=M;function P(d){return new Promise(h=>t(d)(h))}e.toPromise=P})(He||(He={}));class Ne{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Ne._idPool++}`}start(t){this._stopWatch=new Le(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Ne._idPool=0;class O{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((n=this._options)===null||n===void 0)&&n._profName?new Ne(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,s)=>{var r;this._listeners||(this._listeners=new _t);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(n?[t,n]:t);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),a=Xe(()=>{u&&u(),this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return s instanceof le?s.add(a):Array.isArray(s)&&s.push(a),a}),this._event}fire(t){var n,s;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new _t);for(let r of this._listeners)this._deliveryQueue.push([r,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,i]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,i):r[0].call(r[1],i)}catch(l){Ot(l)}}(s=this._perfMon)===null||s===void 0||s.stop()}}dispose(){var t,n,s,r,i;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(r=(s=this._options)===null||s===void 0?void 0:s.onLastListenerRemove)===null||r===void 0||r.call(s),(i=this._leakageMon)===null||i===void 0||i.dispose())}}const Lt=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Se;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof be?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:He.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Lt})})(Se||(Se={}));class be{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Lt:(this._emitter||(this._emitter=new O),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Qn{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new be),this._token}cancel(){this._token?this._token instanceof be&&this._token.cancel():this._token=Se.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof be&&this._token.dispose():this._token=Se.None}}class qe{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const We=new qe,Be=new qe,Ye=new qe;(function(){function e(t,n,s=n,r=s){We.define(t,n),Be.define(t,s),Ye.define(t,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var Nt;(function(e){function t(l){return We.keyCodeToStr(l)}e.toString=t;function n(l){return We.strToKeyCode(l)}e.fromString=n;function s(l){return Be.keyCodeToStr(l)}e.toUserSettingsUS=s;function r(l){return Ye.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function i(l){return Be.strToKeyCode(l)||Ye.strToKeyCode(l)}e.fromUserSettings=i})(Nt||(Nt={}));function Zn(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class V extends E{constructor(t,n,s,r){super(t,n,s,r),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=s,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return V.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new V(this.startLineNumber,this.startColumn,t,n):new V(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new B(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new V(t,n,this.endLineNumber,this.endColumn):new V(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new V(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new V(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let s=0,r=t.length;sthis._lines.length)n=this._lines.length,s=this._lines[n-1].length+1,r=!0;else{let i=this._lines[n-1].length+1;s<1?(s=1,r=!0):s>i&&(s=i,r=!0)}return r?{lineNumber:n,column:s}:t}}class ie{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new On(J.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,s,r){return re(this,void 0,void 0,function*(){const i=this._getModel(t),l=this._getModel(n);if(!i||!l)return null;const u=i.getLinesContent(),a=l.getLinesContent(),f=new Dn(u,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:r}).computeDiff(),c=f.changes.length>0?!1:this._modelsAreIdentical(i,l);return{quitEarly:f.quitEarly,identical:c,changes:f.changes}})}_modelsAreIdentical(t,n){const s=t.getLineCount(),r=n.getLineCount();if(s!==r)return!1;for(let i=1;i<=s;i++){const l=t.getLineContent(i),u=n.getLineContent(i);if(l!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return re(this,void 0,void 0,function*(){const s=this._getModel(t);if(!s)return n;const r=[];let i;n=n.slice(0).sort((l,u)=>{if(l.range&&u.range)return E.compareRangesUsingStarts(l.range,u.range);let a=l.range?0:1,o=u.range?0:1;return a-o});for(let{range:l,text:u,eol:a}of n){if(typeof a=="number"&&(i=a),E.isEmpty(l)&&!u)continue;const o=s.getValueInRange(l);if(u=u.replace(/\r\n|\n|\r/g,s.eol),o===u)continue;if(Math.max(u.length,o.length)>ie._diffLimit){r.push({range:l,text:u});continue}const f=gn(o,u,!1),c=s.offsetAt(E.lift(l).getStartPosition());for(const m of f){const L=s.positionAt(c+m.originalStart),b=s.positionAt(c+m.originalStart+m.originalLength),w={text:u.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:b.lineNumber,endColumn:b.column}};s.getValueInRange(w.range)!==w.text&&r.push(w)}}return typeof i=="number"&&r.push({eol:i,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(t){return re(this,void 0,void 0,function*(){let n=this._getModel(t);return n?jn(n):null})}textualSuggest(t,n,s,r){return re(this,void 0,void 0,function*(){const i=new Le(!0),l=new RegExp(s,r),u=new Set;e:for(let a of t){const o=this._getModel(a);if(!!o){for(let f of o.words(l))if(!(f===n||!isNaN(Number(f)))&&(u.add(f),u.size>ie._suggestionsLimit))break e}}return{words:Array.from(u),duration:i.elapsed()}})}computeWordRanges(t,n,s,r){return re(this,void 0,void 0,function*(){let i=this._getModel(t);if(!i)return Object.create(null);const l=new RegExp(s,r),u=Object.create(null);for(let a=n.startLineNumber;athis._host.fhr(u,a)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(l,n),Promise.resolve(pe(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(s){return Promise.reject(s)}}}ie._diffLimit=1e5,ie._suggestionsLimit=1e4,typeof importScripts=="function"&&(T.monaco=Jn());let je=!1;function Kn(e){if(je)return;je=!0;const t=new cn(n=>{self.postMessage(n)},n=>new ie(n,e));self.onmessage=n=>{t.onmessage(n.data)}}self.onmessage=e=>{je||Kn(null)}})(); diff --git a/src/main/resources/magic-editor/assets/html.worker.5cedee30.js b/src/main/resources/magic-editor/assets/html.worker.5cedee30.js index 07b0de355ab4693e3081aad8b6785835c89b5428..8ef1986e684ad58e4bce1cf5fa083f23e5cb454a 100644 --- a/src/main/resources/magic-editor/assets/html.worker.5cedee30.js +++ b/src/main/resources/magic-editor/assets/html.worker.5cedee30.js @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ (function(){"use strict";class Sr{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Ar=new Sr;function Lr(e){Cr(e)||Ar.onUnexpectedError(e)}function gn(e){if(e instanceof Error){let{name:t,message:n}=e;const r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r}}return e}const bn="Canceled";function Cr(e){return e instanceof Error&&e.name===bn&&e.message===bn}function xr(e){const t=this;let n=!1,r;return function(){return n||(n=!0,r=e.apply(t,arguments)),r}}var Et;(function(e){function t(f){return f&&typeof f=="object"&&typeof f[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(f){yield f}e.single=i;function a(f){return f||n}e.from=a;function o(f){return!f||f[Symbol.iterator]().next().done===!0}e.isEmpty=o;function u(f){return f[Symbol.iterator]().next().value}e.first=u;function s(f,v){for(const A of f)if(v(A))return!0;return!1}e.some=s;function l(f,v){for(const A of f)if(v(A))return A}e.find=l;function*h(f,v){for(const A of f)v(A)&&(yield A)}e.filter=h;function*c(f,v){let A=0;for(const D of f)yield v(D,A++)}e.map=c;function*d(...f){for(const v of f)for(const A of v)yield A}e.concat=d;function*p(f){for(const v of f)for(const A of v)yield A}e.concatNested=p;function _(f,v,A){let D=A;for(const H of f)D=v(D,H);return D}e.reduce=_;function*b(f,v,A=f.length){for(v<0&&(v+=f.length),A<0?A+=f.length:A>f.length&&(A=f.length);vD===H){const D=f[Symbol.iterator](),H=v[Symbol.iterator]();for(;;){const g=D.next(),m=H.next();if(g.done!==m.done)return!1;if(g.done)return!0;if(!A(g.value,m.value))return!1}}e.equals=k})(Et||(Et={}));function Vs(e){return e}function Ys(e,t){}class Dr extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`),this.errors=t}}function _n(e){if(Et.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new Dr(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Er(...e){return vn(()=>_n(e))}function vn(e){return{dispose:xr(()=>{e()})}}class Ve{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{_n(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ve.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}Ve.DISABLE_DISPOSED_WARNING=!1;class wn{constructor(){this._store=new Ve,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}wn.None=Object.freeze({dispose(){}});var Mt;const at="en";let Rt=!1,Nt=!1,Ut=!1,st,Ht=at,Mr,Ee;const ie=typeof self=="object"?self:typeof global=="object"?global:{};let ee;typeof ie.vscode!="undefined"&&typeof ie.vscode.process!="undefined"?ee=ie.vscode.process:typeof process!="undefined"&&(ee=process);const Rr=typeof((Mt=ee==null?void 0:ee.versions)===null||Mt===void 0?void 0:Mt.electron)=="string"&&ee.type==="renderer";if(typeof navigator=="object"&&!Rr)Ee=navigator.userAgent,Rt=Ee.indexOf("Windows")>=0,Nt=Ee.indexOf("Macintosh")>=0,(Ee.indexOf("Macintosh")>=0||Ee.indexOf("iPad")>=0||Ee.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ut=Ee.indexOf("Linux")>=0,st=navigator.language,Ht=st;else if(typeof ee=="object"){Rt=ee.platform==="win32",Nt=ee.platform==="darwin",Ut=ee.platform==="linux",Ut&&!!ee.env.SNAP&&ee.env.SNAP_REVISION,st=at,Ht=at;const e=ee.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];st=t.locale,Ht=n||at,Mr=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const Ye=Rt,Nr=Nt,yn=function(){if(ie.setImmediate)return ie.setImmediate.bind(ie);if(typeof ie.postMessage=="function"&&!ie.importScripts){let n=[];ie.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let a=0,o=n.length;a{const a=++r;n.push({id:a,callback:i}),ie.postMessage({vscodeSetImmediateId:a},"*")}}if(typeof(ee==null?void 0:ee.nextTick)=="function")return ee.nextTick.bind(ee);const t=Promise.resolve();return n=>t.then(n)}();function Ur(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function zt(e){const t=[];for(const n of Ur(e))typeof e[n]=="function"&&t.push(n);return t}function Tn(e,t){const n=i=>function(){const a=Array.prototype.slice.call(arguments,0);return t(i,a)};let r={};for(const i of e)r[i]=n(i);return r}const Hr="$initialize";class zr{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let r=String(++this._lastSentReq);return new Promise((i,a)=>{this._pendingReplies[r]={resolve:i,reject:a},this._send({vsWorker:this._workerId,req:r,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let a=t;if(!this._pendingReplies[a.seq]){console.warn("Got reply to unknown seq");return}let o=this._pendingReplies[a.seq];if(delete this._pendingReplies[a.seq],a.err){let u=a.err;a.err.$isError&&(u=new Error,u.name=a.err.name,u.message=a.err.message,u.stack=a.err.stack),o.reject(u);return}o.resolve(a.res);return}let n=t,r=n.req;this._handler.handleMessage(n.method,n.args).then(a=>{this._send({vsWorker:this._workerId,seq:r,res:a,err:void 0})},a=>{a.detail instanceof Error&&(a.detail=gn(a.detail)),this._send({vsWorker:this._workerId,seq:r,res:void 0,err:gn(a)})})}_send(t){let n=[];if(t.req){const r=t;for(let i=0;i{t(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===Hr)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}initialize(t,n,r,i){this._protocol.setWorkerId(t);const o=Tn(i,(u,s)=>this._protocol.sendMessage(u,s));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(zt(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,s)=>{self.require([r],l=>{if(this._requestHandler=l.create(o),!this._requestHandler){s(new Error("No RequestHandler!"));return}u(zt(this._requestHandler))},s)}))}}class ye{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function Wr(e){return e.split(/\r\n|\r|\n/)}function Pr(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function kn(e,t){return(t<<5)-t+e|0}function Fr(e,t){t=kn(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ye(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Te{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,a,o]=Te._getElements(t),[u,s,l]=Te._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=a,this._modifiedStringElements=u,this._modifiedElementsOrHash=s,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Te._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,a=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let c;return r<=i?(ze.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new ye(t,0,r,i-r+1)]):t<=n?(ze.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[new ye(t,n-t+1,r,0)]):(ze.Assert(t===n+1,"originalStart should only be one more than originalEnd"),ze.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const o=[0],u=[0],s=this.ComputeRecursionPoint(t,n,r,i,o,u,a),l=o[0],h=u[0];if(s!==null)return s;if(!a[0]){const c=this.ComputeDiffRecursive(t,l,r,h,a);let d=[];return a[0]?d=[new ye(l+1,n-(l+1)+1,h+1,i-(h+1)+1)]:d=this.ComputeDiffRecursive(l+1,n,h+1,i,a),this.ConcatenateChanges(c,d)}return[new ye(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,a,o,u,s,l,h,c,d,p,_,b,T,k,f){let v=null,A=null,D=new An,H=n,g=r,m=p[0]-T[0]-i,w=-1073741824,B=this.m_forwardHistory.length-1;do{const R=m+t;R===H||R=0&&(l=this.m_forwardHistory[B],t=l[0],H=1,g=l.length-1)}while(--B>=-1);if(v=D.getReverseChanges(),f[0]){let R=p[0]+1,N=T[0]+1;if(v!==null&&v.length>0){const I=v[v.length-1];R=Math.max(R,I.getOriginalEnd()),N=Math.max(N,I.getModifiedEnd())}A=[new ye(R,d-R+1,N,b-N+1)]}else{D=new An,H=o,g=u,m=p[0]-T[0]-s,w=1073741824,B=k?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=m+a;R===H||R=h[R+1]?(c=h[R+1]-1,_=c-m-s,c>w&&D.MarkNextChange(),w=c+1,D.AddOriginalElement(c+1,_+1),m=R+1-a):(c=h[R-1],_=c-m-s,c>w&&D.MarkNextChange(),w=c,D.AddModifiedElement(c+1,_+1),m=R-1-a),B>=0&&(h=this.m_reverseHistory[B],a=h[0],H=1,g=h.length-1)}while(--B>=-1);A=D.getChanges()}return this.ConcatenateChanges(v,A)}ComputeRecursionPoint(t,n,r,i,a,o,u){let s=0,l=0,h=0,c=0,d=0,p=0;t--,r--,a[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const _=n-t+(i-r),b=_+1,T=new Int32Array(b),k=new Int32Array(b),f=i-r,v=n-t,A=t-r,D=n-i,g=(v-f)%2===0;T[f]=t,k[v]=n,u[0]=!1;for(let m=1;m<=_/2+1;m++){let w=0,B=0;h=this.ClipDiagonalBound(f-m,m,f,b),c=this.ClipDiagonalBound(f+m,m,f,b);for(let N=h;N<=c;N+=2){N===h||Nw+B&&(w=s,B=l),!g&&Math.abs(N-v)<=m-1&&s>=k[N])return a[0]=s,o[0]=l,I<=k[N]&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):null}const R=(w-t+(B-r)-m)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(w,R))return u[0]=!0,a[0]=w,o[0]=B,R>0&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):(t++,r++,[new ye(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(v-m,m,v,b),p=this.ClipDiagonalBound(v+m,m,v,b);for(let N=d;N<=p;N+=2){N===d||N=k[N+1]?s=k[N+1]-1:s=k[N-1],l=s-(N-v)-D;const I=s;for(;s>t&&l>r&&this.ElementsAreEqual(s,l);)s--,l--;if(k[N]=s,g&&Math.abs(N-f)<=m&&s<=T[N])return a[0]=s,o[0]=l,I>=T[N]&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):null}if(m<=1447){let N=new Int32Array(c-h+2);N[0]=f-h+1,Ie.Copy2(T,h,N,1,c-h+1),this.m_forwardHistory.push(N),N=new Int32Array(p-d+2),N[0]=v-d+1,Ie.Copy2(k,d,N,1,p-d+1),this.m_reverseHistory.push(N)}}return this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u)}PrettifyChanges(t){for(let n=0;n0,u=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,a=0;if(n>0){const c=t[n-1];i=c.originalStart+c.originalLength,a=c.modifiedStart+c.modifiedLength}const o=r.originalLength>0,u=r.modifiedLength>0;let s=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let c=1;;c++){const d=r.originalStart-c,p=r.modifiedStart-c;if(dl&&(l=b,s=c)}r.originalStart-=s,r.modifiedStart-=s;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&p>s&&(s=p,l=c,h=d)}return s>0?[l,h]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let a=0;a=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const a=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return a+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return Ie.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],Ie.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return Ie.Copy(t,0,i,0,t.length),Ie.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(ze.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),ze.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let a=t.originalLength;const o=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(a=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new ye(i,a,o,u),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&t=jr&&e<=Vr||e>=Gr&&e<=Yr}function ot(e,t,n,r){let i="",a=0,o=-1,u=0,s=0;for(let l=0;l<=e.length;++l){if(l2){const h=i.lastIndexOf(n);h===-1?(i="",a=0):(i=i.slice(0,h),a=i.length-1-i.lastIndexOf(n)),o=l,u=0;continue}else if(i.length!==0){i="",a=0,o=l,u=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",a=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),a=l-o-1;o=l,u=0}else s===ke&&u!==-1?++u:u=-1}return i}function Cn(e,t){if(t===null||typeof t!="object")throw new Ln("pathObject","Object",t);const n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ae={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let a;if(i>=0){if(a=e[i],Z(a,"path"),a.length===0)continue}else t.length===0?a=It():(a=Or[`=${t}`]||It(),(a===void 0||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===oe)&&(a=`${t}\\`));const o=a.length;let u=0,s="",l=!1;const h=a.charCodeAt(0);if(o===1)O(h)&&(u=1,l=!0);else if(O(h))if(l=!0,O(a.charCodeAt(1))){let c=2,d=c;for(;c2&&O(a.charCodeAt(2))&&(l=!0,u=3));if(s.length>0)if(t.length>0){if(s.toLowerCase()!==t.toLowerCase())continue}else t=s;if(r){if(t.length>0)break}else if(n=`${a.slice(u)}\\${n}`,r=l,l&&t.length>0)break}return n=ot(n,!r,"\\",O),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){Z(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const a=e.charCodeAt(0);if(t===1)return Wt(a)?"\\":e;if(O(a))if(i=!0,O(e.charCodeAt(1))){let u=2,s=u;for(;u2&&O(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&O(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){Z(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return O(n)||t>2&&Ae(n)&&e.charCodeAt(1)===Se&&O(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let a=0;a0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&O(n.charCodeAt(0))){++i;const a=n.length;a>1&&O(n.charCodeAt(1))&&(++i,a>2&&(O(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ae.normalize(t)},relative(e,t){if(Z(e,"from"),Z(t,"to"),e===t)return"";const n=ae.resolve(e),r=ae.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(a-1)===oe;)a--;const o=a-i;let u=0;for(;uu&&t.charCodeAt(s-1)===oe;)s--;const l=s-u,h=oh){if(t.charCodeAt(u+d)===oe)return r.slice(u+d+1);if(d===2)return r.slice(u+d)}o>h&&(e.charCodeAt(i+d)===oe?c=d:d===2&&(c=3)),c===-1&&(c=0)}let p="";for(d=i+c+1;d<=a;++d)(d===a||e.charCodeAt(d)===oe)&&(p+=p.length===0?"..":"\\..");return u+=c,p.length>0?`${p}${r.slice(u,s)}`:(r.charCodeAt(u)===oe&&++u,r.slice(u,s))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ae.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===oe){if(t.charCodeAt(1)===oe){const n=t.charCodeAt(2);if(n!==$r&&n!==ke)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Ae(t.charCodeAt(0))&&t.charCodeAt(1)===Se&&t.charCodeAt(2)===oe)return`\\\\?\\${t}`;return e},dirname(e){Z(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return O(i)?e:".";if(O(i)){if(n=r=1,O(e.charCodeAt(1))){let u=2,s=u;for(;u2&&O(e.charCodeAt(2))?3:2,r=n);let a=-1,o=!0;for(let u=t-1;u>=r;--u)if(O(e.charCodeAt(u))){if(!o){a=u;break}}else o=!1;if(a===-1){if(n===-1)return".";a=n}return e.slice(0,a)},basename(e,t){t!==void 0&&Z(t,"ext"),Z(e,"path");let n=0,r=-1,i=!0,a;if(e.length>=2&&Ae(e.charCodeAt(0))&&e.charCodeAt(1)===Se&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,u=-1;for(a=e.length-1;a>=n;--a){const s=e.charCodeAt(a);if(O(s)){if(!i){n=a+1;break}}else u===-1&&(i=!1,u=a+1),o>=0&&(s===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return n===r?r=u:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=n;--a)if(O(e.charCodeAt(a))){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?"":e.slice(n,r)},extname(e){Z(e,"path");let t=0,n=-1,r=0,i=-1,a=!0,o=0;e.length>=2&&e.charCodeAt(1)===Se&&Ae(e.charCodeAt(0))&&(t=r=2);for(let u=e.length-1;u>=t;--u){const s=e.charCodeAt(u);if(O(s)){if(!a){r=u+1;break}continue}i===-1&&(a=!1,i=u+1),s===ke?n===-1?n=u:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Cn.bind(null,"\\"),parse(e){Z(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return O(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(O(i)){if(r=1,O(e.charCodeAt(1))){let c=2,d=c;for(;c0&&(t.root=e.slice(0,r));let a=-1,o=r,u=-1,s=!0,l=e.length-1,h=0;for(;l>=r;--l){if(i=e.charCodeAt(l),O(i)){if(!s){o=l+1;break}continue}u===-1&&(s=!1,u=l+1),i===ke?a===-1?a=l:h!==1&&(h=1):a!==-1&&(h=-1)}return u!==-1&&(a===-1||h===0||h===1&&a===u-1&&a===o+1?t.base=t.name=e.slice(o,u):(t.name=e.slice(o,a),t.base=e.slice(o,u),t.ext=e.slice(a,u))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},le={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:It();Z(i,"path"),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===te)}return t=ot(t,!n,"/",Wt),n?`/${t}`:t.length>0?t:"."},normalize(e){if(Z(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===te,n=e.charCodeAt(e.length-1)===te;return e=ot(e,!t,"/",Wt),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return Z(e,"path"),e.length>0&&e.charCodeAt(0)===te},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":le.normalize(t)},relative(e,t){if(Z(e,"from"),Z(t,"to"),e===t||(e=le.resolve(e),t=le.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,a=1,o=t.length-a,u=iu){if(t.charCodeAt(a+l)===te)return t.slice(a+l+1);if(l===0)return t.slice(a+l)}else i>u&&(e.charCodeAt(n+l)===te?s=l:l===0&&(s=0));let h="";for(l=n+s+1;l<=r;++l)(l===r||e.charCodeAt(l)===te)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(a+s)}`},toNamespacedPath(e){return e},dirname(e){if(Z(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===te;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===te){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&Z(t,"ext"),Z(e,"path");let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,u=-1;for(a=e.length-1;a>=0;--a){const s=e.charCodeAt(a);if(s===te){if(!i){n=a+1;break}}else u===-1&&(i=!1,u=a+1),o>=0&&(s===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return n===r?r=u:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===te){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?"":e.slice(n,r)},extname(e){Z(e,"path");let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){const u=e.charCodeAt(o);if(u===te){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),u===ke?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Cn.bind(null,"/"),parse(e){Z(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===te;let r;n?(t.root="/",r=1):r=0;let i=-1,a=0,o=-1,u=!0,s=e.length-1,l=0;for(;s>=r;--s){const h=e.charCodeAt(s);if(h===te){if(!u){a=s+1;break}continue}o===-1&&(u=!1,o=s+1),h===ke?i===-1?i=s:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){const h=a===0&&n?1:a;i===-1||l===0||l===1&&i===o-1&&i===a+1?t.base=t.name=e.slice(h,o):(t.name=e.slice(h,i),t.base=e.slice(h,o),t.ext=e.slice(i,o))}return a>0?t.dir=e.slice(0,a-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};le.win32=ae.win32=ae,le.posix=ae.posix=le,Me==="win32"?ae.normalize:le.normalize,Me==="win32"?ae.resolve:le.resolve,Me==="win32"?ae.relative:le.relative,Me==="win32"?ae.dirname:le.dirname,Me==="win32"?ae.basename:le.basename,Me==="win32"?ae.extname:le.extname,Me==="win32"?ae.sep:le.sep;const Xr=/^\w[\w\d+.-]*$/,Qr=/^\//,Jr=/^\/\//;function xn(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Xr.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Qr.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Jr.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Zr(e,t){return!e&&!t?"file":e}function Kr(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==me&&(t=me+t):t=me;break}return t}const Q="",me="/",ea=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Re{constructor(t,n,r,i,a,o=!1){typeof t=="object"?(this.scheme=t.scheme||Q,this.authority=t.authority||Q,this.path=t.path||Q,this.query=t.query||Q,this.fragment=t.fragment||Q):(this.scheme=Zr(t,o),this.authority=n||Q,this.path=Kr(this.scheme,r||Q),this.query=i||Q,this.fragment=a||Q,xn(this,o))}static isUri(t){return t instanceof Re?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return Pt(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:a,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Q),r===void 0?r=this.authority:r===null&&(r=Q),i===void 0?i=this.path:i===null&&(i=Q),a===void 0?a=this.query:a===null&&(a=Q),o===void 0?o=this.fragment:o===null&&(o=Q),n===this.scheme&&r===this.authority&&i===this.path&&a===this.query&&o===this.fragment?this:new Pe(n,r,i,a,o)}static parse(t,n=!1){const r=ea.exec(t);return r?new Pe(r[2]||Q,lt(r[4]||Q),lt(r[5]||Q),lt(r[7]||Q),lt(r[9]||Q),n):new Pe(Q,Q,Q,Q,Q)}static file(t){let n=Q;if(Ye&&(t=t.replace(/\\/g,me)),t[0]===me&&t[1]===me){const r=t.indexOf(me,2);r===-1?(n=t.substring(2),t=me):(n=t.substring(2,r),t=t.substring(r)||me)}return new Pe("file",n,t,Q,Q)}static from(t){const n=new Pe(t.scheme,t.authority,t.path,t.query,t.fragment);return xn(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Ye&&t.scheme==="file"?r=Re.file(ae.join(Pt(t,!0),...n)).path:r=le.join(t.path,...n),t.with({path:r})}toString(t=!1){return Bt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Re)return t;{const n=new Pe(t);return n._formatted=t.external,n._fsPath=t._sep===Dn?t.fsPath:null,n}}else return t}}const Dn=Ye?1:void 0;class Pe extends Re{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Pt(this,!1)),this._fsPath}toString(t=!1){return t?Bt(this,!0):(this._formatted||(this._formatted=Bt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Dn),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const En={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function Mn(e,t){let n,r=-1;for(let i=0;i=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47)r!==-1&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n!==void 0&&(n+=e.charAt(i));else{n===void 0&&(n=e.substr(0,i));const o=En[a];o!==void 0?(r!==-1&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=o):r===-1&&(r=i)}}return r!==-1&&(n+=encodeURIComponent(e.substring(r))),n!==void 0?n:e}function ta(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Ye&&(n=n.replace(/\//g,"\\")),n}function Bt(e,t){const n=t?ta:Mn;let r="",{scheme:i,authority:a,path:o,query:u,fragment:s}=e;if(i&&(r+=i,r+=":"),(a||i==="file")&&(r+=me,r+=me),a){let l=a.indexOf("@");if(l!==-1){const h=a.substr(0,l);a=a.substr(l+1),l=h.indexOf(":"),l===-1?r+=n(h,!1):(r+=n(h.substr(0,l),!1),r+=":",r+=n(h.substr(l+1),!1)),r+="@"}a=a.toLowerCase(),l=a.indexOf(":"),l===-1?r+=n(a,!1):(r+=n(a.substr(0,l),!1),r+=a.substr(l))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const l=o.charCodeAt(1);l>=65&&l<=90&&(o=`/${String.fromCharCode(l+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const l=o.charCodeAt(0);l>=65&&l<=90&&(o=`${String.fromCharCode(l+32)}:${o.substr(2)}`)}r+=n(o,!0)}return u&&(r+="?",r+=n(u,!1)),s&&(r+="#",r+=t?s:Mn(s,!1)),r}function Rn(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Rn(e.substr(3)):e}}const Nn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function lt(e){return e.match(Nn)?e.replace(Nn,t=>Rn(t)):e}class he{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new he(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return he.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return he.isBefore(this,t)}static isBefore(t,n){return t.lineNumberr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return J.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return J.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return J.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return J.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return J.plusRange(this,t)}static plusRange(t,n){let r,i,a,o;return n.startLineNumbert.endLineNumber?(a=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(a=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(a=t.endLineNumber,o=t.endColumn),new J(r,i,a,o)}intersectRanges(t){return J.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,a=t.endLineNumber,o=t.endColumn,u=n.startLineNumber,s=n.startColumn,l=n.endLineNumber,h=n.endColumn;return rl?(a=l,o=h):a===l&&(o=Math.min(o,h)),r>a||r===a&&i>o?null:new J(r,i,a,o)}equalsRange(t){return J.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return J.getEndPosition(this)}static getEndPosition(t){return new he(t.endLineNumber,t.endColumn)}getStartPosition(){return J.getStartPosition(this)}static getStartPosition(t){return new he(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new J(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new J(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return J.collapseToStart(this)}static collapseToStart(t){return new J(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new J(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new J(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const na=3;function Un(e,t,n,r){return new Te(e,t,n).ComputeDiff(r)}class Hn{constructor(t){const n=[],r=[];for(let i=0,a=t.length;i0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&a()){const p=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),_=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let b=Un(p,_,a,!0).changes;u&&(b=ra(b)),d=[];for(let T=0,k=b.length;T1&&b>1;){const T=d.charCodeAt(_-2),k=p.charCodeAt(b-2);if(T!==k)break;_--,b--}(_>1||b>1)&&this._pushTrimWhitespaceCharChange(i,a+1,1,_,o+1,1,b)}{let _=qt(d,1),b=qt(p,1);const T=d.length+1,k=p.length+1;for(;_!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function Be(e){return e<0?0:e>4294967295?4294967295:e|0}class sa{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class oa{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Be(t);const r=this.values,i=this.prefixSum,a=n.length;return a===0?!1:(this.values=new Uint32Array(r.length+a),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+a),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=Be(t),n=Be(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;let a=r.length-t;return n>=a&&(n=a),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Be(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,a=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,a=this.prefixSum[i],o=a-this.values[i],t=a)n=i+1;else break;return new sa(i,t-o)}}class la{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new he(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function ha(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of ua)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const ca=ha();function da(e){let t=ca;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const ma={maxLen:1e3,windowSize:15,timeBudget:150};function Wn(e,t,n,r,i=ma){if(n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),Wn(e,t,n,r,i)}const a=Date.now(),o=e-1-r;let u=-1,s=null;for(let l=1;!(Date.now()-a>=i.timeBudget);l++){const h=o-i.windowSize*l;t.lastIndex=Math.max(0,h);const c=fa(t,n,o,u);if(!c&&s||(s=c,h<=0))break;u=h}if(s){let l={word:s[0],startColumn:r+1+s.index,endColumn:r+1+s.index+s[0].length};return t.lastIndex=0,l}return null}function fa(e,t,n,r){let i;for(;i=e.exec(t);){const a=i.index||0;if(a<=n&&e.lastIndex>=n)return i;if(r>0&&a>r)return null}return null}class Ot{constructor(t){let n=In(t);this._defaultValue=n,this._asciiMap=Ot._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let r=0;r<256;r++)n[r]=t;return n}set(t,n){let r=In(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class pa{constructor(t,n,r){const i=new Uint8Array(t*n);for(let a=0,o=t*n;an&&(n=s),u>r&&(r=u),l>r&&(r=l)}n++,r++;let i=new pa(r,n,0);for(let a=0,o=t.length;a=this._maxCharCode?0:this._states.get(t,n)}}let jt=null;function ba(){return jt===null&&(jt=new ga([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),jt}let Qe=null;function _a(){if(Qe===null){Qe=new Ot(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;ni);if(i>0){const u=n.charCodeAt(i-1),s=n.charCodeAt(o);(u===40&&s===41||u===91&&s===93||u===123&&s===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=ba()){const r=_a();let i=[];for(let a=1,o=t.getLineCount();a<=o;a++){const u=t.getLineContent(a),s=u.length;let l=0,h=0,c=0,d=1,p=!1,_=!1,b=!1,T=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Gt.INSTANCE=new Gt;class X{constructor(t){this.element=t,this.next=X.Undefined,this.prev=X.Undefined}}X.Undefined=new X(void 0);class Pn{constructor(){this._first=X.Undefined,this._last=X.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===X.Undefined}clear(){let t=this._first;for(;t!==X.Undefined;){const n=t.next;t.prev=X.Undefined,t.next=X.Undefined,t=n}this._first=X.Undefined,this._last=X.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new X(t);if(this._first===X.Undefined)this._first=r,this._last=r;else if(n){const a=this._last;this._last=r,r.prev=a,a.next=r}else{const a=this._first;this._first=r,r.next=a,a.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==X.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==X.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==X.Undefined&&t.next!==X.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===X.Undefined&&t.next===X.Undefined?(this._first=X.Undefined,this._last=X.Undefined):t.next===X.Undefined?(this._last=this._last.prev,this._last.next=X.Undefined):t.prev===X.Undefined&&(this._first=this._first.next,this._first.prev=X.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==X.Undefined;)yield t.element,t=t.next}}const wa=ie.performance&&typeof ie.performance.now=="function";class ht{constructor(t){this._highResolution=wa&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new ht(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ie.performance.now():Date.now()}}var Vt;(function(e){e.None=()=>wn.None;function t(f){return(v,A=null,D)=>{let H=!1,g;return g=f(m=>{if(!H)return g?g.dispose():H=!0,v.call(A,m)},null,D),H&&g.dispose(),g}}e.once=t;function n(f,v){return s((A,D=null,H)=>f(g=>A.call(D,v(g)),null,H))}e.map=n;function r(f,v){return s((A,D=null,H)=>f(g=>{v(g),A.call(D,g)},null,H))}e.forEach=r;function i(f,v){return s((A,D=null,H)=>f(g=>v(g)&&A.call(D,g),null,H))}e.filter=i;function a(f){return f}e.signal=a;function o(...f){return(v,A=null,D)=>Er(...f.map(H=>H(g=>v.call(A,g),null,D)))}e.any=o;function u(f,v,A){let D=A;return n(f,H=>(D=v(D,H),D))}e.reduce=u;function s(f){let v;const A=new Ne({onFirstListenerAdd(){v=f(A.fire,A)},onLastListenerRemove(){v.dispose()}});return A.event}function l(f,v,A=100,D=!1,H){let g,m,w,B=0;const R=new Ne({leakWarningThreshold:H,onFirstListenerAdd(){g=f(N=>{B++,m=v(m,N),D&&!w&&(R.fire(m),m=void 0),clearTimeout(w),w=setTimeout(()=>{const I=m;m=void 0,w=void 0,(!D||B>1)&&R.fire(I),B=0},A)})},onLastListenerRemove(){g.dispose()}});return R.event}e.debounce=l;function h(f,v=(A,D)=>A===D){let A=!0,D;return i(f,H=>{const g=A||!v(H,D);return A=!1,D=H,g})}e.latch=h;function c(f,v){return[e.filter(f,v),e.filter(f,A=>!v(A))]}e.split=c;function d(f,v=!1,A=[]){let D=A.slice(),H=f(w=>{D?D.push(w):m.fire(w)});const g=()=>{D&&D.forEach(w=>m.fire(w)),D=null},m=new Ne({onFirstListenerAdd(){H||(H=f(w=>m.fire(w)))},onFirstListenerDidAdd(){D&&(v?setTimeout(g):g())},onLastListenerRemove(){H&&H.dispose(),H=null}});return m.event}e.buffer=d;class p{constructor(v){this.event=v}map(v){return new p(n(this.event,v))}forEach(v){return new p(r(this.event,v))}filter(v){return new p(i(this.event,v))}reduce(v,A){return new p(u(this.event,v,A))}latch(){return new p(h(this.event))}debounce(v,A=100,D=!1,H){return new p(l(this.event,v,A,D,H))}on(v,A,D){return this.event(v,A,D)}once(v,A,D){return t(this.event)(v,A,D)}}function _(f){return new p(f)}e.chain=_;function b(f,v,A=D=>D){const D=(...w)=>m.fire(A(...w)),H=()=>f.on(v,D),g=()=>f.removeListener(v,D),m=new Ne({onFirstListenerAdd:H,onLastListenerRemove:g});return m.event}e.fromNodeEventEmitter=b;function T(f,v,A=D=>D){const D=(...w)=>m.fire(A(...w)),H=()=>f.addEventListener(v,D),g=()=>f.removeEventListener(v,D),m=new Ne({onFirstListenerAdd:H,onLastListenerRemove:g});return m.event}e.fromDOMEventEmitter=T;function k(f){return new Promise(v=>t(f)(v))}e.toPromise=k})(Vt||(Vt={}));class ct{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${ct._idPool++}`}start(t){this._stopWatch=new ht(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}ct._idPool=0;class Ne{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((n=this._options)===null||n===void 0)&&n._profName?new ct(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,r)=>{var i;this._listeners||(this._listeners=new Pn);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(n?[t,n]:t);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),s=vn(()=>{u&&u(),this._disposed||(o(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return r instanceof Ve?r.add(s):Array.isArray(r)&&r.push(s),s}),this._event}fire(t){var n,r;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Pn);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,a]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,a):i[0].call(i[1],a)}catch(o){Lr(o)}}(r=this._perfMon)===null||r===void 0||r.stop()}}dispose(){var t,n,r,i,a;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(i=(r=this._options)===null||r===void 0?void 0:r.onLastListenerRemove)===null||i===void 0||i.call(r),(a=this._leakageMon)===null||a===void 0||a.dispose())}}const Bn=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var dt;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof mt?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Vt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Bn})})(dt||(dt={}));class mt{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Bn:(this._emitter||(this._emitter=new Ne),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class ya{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new mt),this._token}cancel(){this._token?this._token instanceof mt&&this._token.cancel():this._token=dt.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof mt&&this._token.dispose():this._token=dt.None}}class Yt{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const $t=new Yt,Xt=new Yt,Qt=new Yt;(function(){function e(t,n,r=n,i=r){$t.define(t,n),Xt.define(t,r),Qt.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var Fn;(function(e){function t(o){return $t.keyCodeToStr(o)}e.toString=t;function n(o){return $t.strToKeyCode(o)}e.fromString=n;function r(o){return Xt.keyCodeToStr(o)}e.toUserSettingsUS=r;function i(o){return Qt.keyCodeToStr(o)}e.toUserSettingsGeneral=i;function a(o){return Xt.strToKeyCode(o)||Qt.strToKeyCode(o)}e.fromUserSettings=a})(Fn||(Fn={}));function Ta(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class fe extends J{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return fe.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new fe(this.startLineNumber,this.startColumn,t,n):new fe(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new he(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new fe(t,n,this.endLineNumber,this.endColumn):new fe(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new fe(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new fe(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let a=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>a&&(r=a,i=!0)}return i?{lineNumber:n,column:r}:t}}class qe{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new Aa(Re.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,r,i){return Fe(this,void 0,void 0,function*(){const a=this._getModel(t),o=this._getModel(n);if(!a||!o)return null;const u=a.getLinesContent(),s=o.getLinesContent(),h=new aa(u,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:r,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),c=h.changes.length>0?!1:this._modelsAreIdentical(a,o);return{quitEarly:h.quitEarly,identical:c,changes:h.changes}})}_modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let a=1;a<=r;a++){const o=t.getLineContent(a),u=n.getLineContent(a);if(o!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return Fe(this,void 0,void 0,function*(){const r=this._getModel(t);if(!r)return n;const i=[];let a;n=n.slice(0).sort((o,u)=>{if(o.range&&u.range)return J.compareRangesUsingStarts(o.range,u.range);let s=o.range?0:1,l=u.range?0:1;return s-l});for(let{range:o,text:u,eol:s}of n){if(typeof s=="number"&&(a=s),J.isEmpty(o)&&!u)continue;const l=r.getValueInRange(o);if(u=u.replace(/\r\n|\n|\r/g,r.eol),l===u)continue;if(Math.max(u.length,l.length)>qe._diffLimit){i.push({range:o,text:u});continue}const h=qr(l,u,!1),c=r.offsetAt(J.lift(o).getStartPosition());for(const d of h){const p=r.positionAt(c+d.originalStart),_=r.positionAt(c+d.originalStart+d.originalLength),b={text:u.substr(d.modifiedStart,d.modifiedLength),range:{startLineNumber:p.lineNumber,startColumn:p.column,endLineNumber:_.lineNumber,endColumn:_.column}};r.getValueInRange(b.range)!==b.text&&i.push(b)}}return typeof a=="number"&&i.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Fe(this,void 0,void 0,function*(){let n=this._getModel(t);return n?va(n):null})}textualSuggest(t,n,r,i){return Fe(this,void 0,void 0,function*(){const a=new ht(!0),o=new RegExp(r,i),u=new Set;e:for(let s of t){const l=this._getModel(s);if(!!l){for(let h of l.words(o))if(!(h===n||!isNaN(Number(h)))&&(u.add(h),u.size>qe._suggestionsLimit))break e}}return{words:Array.from(u),duration:a.elapsed()}})}computeWordRanges(t,n,r,i){return Fe(this,void 0,void 0,function*(){let a=this._getModel(t);if(!a)return Object.create(null);const o=new RegExp(r,i),u=Object.create(null);for(let s=n.startLineNumber;sthis._host.fhr(u,s)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve(zt(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}qe._diffLimit=1e5,qe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ie.monaco=Sa());let tn=!1;function vi(e){if(tn)return;tn=!0;const t=new Ir(n=>{self.postMessage(n)},n=>new qe(n,e));self.onmessage=n=>{t.onmessage(n.data)}}self.onmessage=e=>{tn||vi(null)};function La(e,t){var n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,function(r,i){var a=i[0];return typeof t[a]!="undefined"?t[a]:r}),n}function Ca(e,t){for(var n=[],r=2;r0&&(u.arguments=a),u}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.title)&&S.string(i.command)}e.is=n})(Ze||(Ze={}));var K;(function(e){function t(a,o){return{range:a,newText:o}}e.replace=t;function n(a,o){return{range:{start:a,end:a},newText:o}}e.insert=n;function r(a){return{range:a,newText:""}}e.del=r;function i(a){var o=a;return S.objectLiteral(o)&&S.string(o.newText)&&G.is(o.range)}e.is=i})(K||(K={}));var Oe;(function(e){function t(r,i,a){var o={label:r};return i!==void 0&&(o.needsConfirmation=i),a!==void 0&&(o.description=a),o}e.create=t;function n(r){var i=r;return i!==void 0&&S.objectLiteral(i)&&S.string(i.label)&&(S.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(S.string(i.description)||i.description===void 0)}e.is=n})(Oe||(Oe={}));var re;(function(e){function t(n){var r=n;return typeof r=="string"}e.is=t})(re||(re={}));var Le;(function(e){function t(a,o,u){return{range:a,newText:o,annotationId:u}}e.replace=t;function n(a,o,u){return{range:{start:a,end:a},newText:o,annotationId:u}}e.insert=n;function r(a,o){return{range:a,newText:"",annotationId:o}}e.del=r;function i(a){var o=a;return K.is(o)&&(Oe.is(o.annotationId)||re.is(o.annotationId))}e.is=i})(Le||(Le={}));var _t;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){var i=r;return S.defined(i)&&wt.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(_t||(_t={}));var Ke;(function(e){function t(r,i,a){var o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){var i=r;return i&&i.kind==="create"&&S.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||re.is(i.annotationId))}e.is=n})(Ke||(Ke={}));var et;(function(e){function t(r,i,a,o){var u={kind:"rename",oldUri:r,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(u.options=a),o!==void 0&&(u.annotationId=o),u}e.create=t;function n(r){var i=r;return i&&i.kind==="rename"&&S.string(i.oldUri)&&S.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||re.is(i.annotationId))}e.is=n})(et||(et={}));var tt;(function(e){function t(r,i,a){var o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){var i=r;return i&&i.kind==="delete"&&S.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||S.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||S.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||re.is(i.annotationId))}e.is=n})(tt||(tt={}));var sn;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return S.string(i.kind)?Ke.is(i)||et.is(i)||tt.is(i):_t.is(i)}))}e.is=t})(sn||(sn={}));var vt=function(){function e(t,n){this.edits=t,this.changeAnnotations=n}return e.prototype.insert=function(t,n,r){var i,a;if(r===void 0?i=K.insert(t,n):re.is(r)?(a=r,i=Le.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),i=Le.insert(t,n,a)),this.edits.push(i),a!==void 0)return a},e.prototype.replace=function(t,n,r){var i,a;if(r===void 0?i=K.replace(t,n):re.is(r)?(a=r,i=Le.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),i=Le.replace(t,n,a)),this.edits.push(i),a!==void 0)return a},e.prototype.delete=function(t,n){var r,i;if(n===void 0?r=K.del(t):re.is(n)?(i=n,r=Le.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Le.del(t,i)),this.edits.push(r),i!==void 0)return i},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),xi=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,n){var r;if(re.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new xi(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(_t.is(r)){var i=new vt(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(r){var i=new vt(t.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(wt.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){var i=[],a={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(a),r=new vt(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var i=[];this._workspaceEdit.changes[t]=i,r=new vt(i),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new xi,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Oe.is(n)||re.is(n)?i=n:r=n;var a,o;if(i===void 0?a=Ke.create(t,r):(o=re.is(i)?i:this._changeAnnotations.manage(i),a=Ke.create(t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.renameFile=function(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Oe.is(r)||re.is(r)?a=r:i=r;var o,u;if(a===void 0?o=et.create(t,n,i):(u=re.is(a)?a:this._changeAnnotations.manage(a),o=et.create(t,n,i,u)),this._workspaceEdit.documentChanges.push(o),u!==void 0)return u},e.prototype.deleteFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Oe.is(n)||re.is(n)?i=n:r=n;var a,o;if(i===void 0?a=tt.create(t,r):(o=re.is(i)?i:this._changeAnnotations.manage(i),a=tt.create(t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e})();var Di;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)}e.is=n})(Di||(Di={}));var Ei;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)&&S.integer(i.version)}e.is=n})(Ei||(Ei={}));var wt;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)&&(i.version===null||S.integer(i.version))}e.is=n})(wt||(wt={}));var Mi;(function(e){function t(r,i,a,o){return{uri:r,languageId:i,version:a,text:o}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)&&S.string(i.languageId)&&S.integer(i.version)&&S.string(i.text)}e.is=n})(Mi||(Mi={}));var pe;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(pe||(pe={})),function(e){function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t}(pe||(pe={}));var on;(function(e){function t(n){var r=n;return S.objectLiteral(n)&&pe.is(r.kind)&&S.string(r.value)}e.is=t})(on||(on={}));var ue;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ue||(ue={}));var ge;(function(e){e.PlainText=1,e.Snippet=2})(ge||(ge={}));var Ri;(function(e){e.Deprecated=1})(Ri||(Ri={}));var Ni;(function(e){function t(r,i,a){return{newText:r,insert:i,replace:a}}e.create=t;function n(r){var i=r;return i&&S.string(i.newText)&&G.is(i.insert)&&G.is(i.replace)}e.is=n})(Ni||(Ni={}));var Ui;(function(e){e.asIs=1,e.adjustIndentation=2})(Ui||(Ui={}));var Hi;(function(e){function t(n){return{label:n}}e.create=t})(Hi||(Hi={}));var zi;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(zi||(zi={}));var yt;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var i=r;return S.string(i)||S.objectLiteral(i)&&S.string(i.language)&&S.string(i.value)}e.is=n})(yt||(yt={}));var Ii;(function(e){function t(n){var r=n;return!!r&&S.objectLiteral(r)&&(on.is(r.contents)||yt.is(r.contents)||S.typedArray(r.contents,yt.is))&&(n.range===void 0||G.is(n.range))}e.is=t})(Ii||(Ii={}));var Wi;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Wi||(Wi={}));var Pi;(function(e){function t(n,r){for(var i=[],a=2;a=0;h--){var c=s[h],d=a.offsetAt(c.range.start),p=a.offsetAt(c.range.end);if(p<=l)u=u.substring(0,d)+c.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");l=d}return u}e.applyEdits=r;function i(a,o){if(a.length<=1)return a;var u=a.length/2|0,s=a.slice(0,u),l=a.slice(u);i(s,o),i(l,o);for(var h=0,c=0,d=0;h. + */ import"./app.a9d6cb03.js";import"./vue.6f28a6f0.js";import"./axios.23e7b955.js";import"./vendor.3be44c84.js";const s=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerpolicy&&(r.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?r.credentials="include":e.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}};s(); diff --git a/src/main/resources/magic-editor/assets/json.worker.69e5d80a.js b/src/main/resources/magic-editor/assets/json.worker.69e5d80a.js index e629a6b9bca8fb2167abee71f05de9a8bd523d7f..3d25b617529ad766d3ea232a46cc6c9626ce5bd3 100644 --- a/src/main/resources/magic-editor/assets/json.worker.69e5d80a.js +++ b/src/main/resources/magic-editor/assets/json.worker.69e5d80a.js @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ (function(){"use strict";class Wi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(r=>{r(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const qi=new Wi;function Hi(e){Bi(e)||qi.onUnexpectedError(e)}function jr(e){if(e instanceof Error){let{name:t,message:r}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:n}}return e}const Ur="Canceled";function Bi(e){return e instanceof Error&&e.name===Ur&&e.message===Ur}function Yi(e){const t=this;let r=!1,n;return function(){return r||(r=!0,n=e.apply(t,arguments)),n}}var Rt;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return p||r}e.from=s;function a(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=a;function o(p){return p[Symbol.iterator]().next().value}e.first=o;function u(p,g){for(const _ of p)if(g(_))return!0;return!1}e.some=u;function l(p,g){for(const _ of p)if(g(_))return _}e.find=l;function*c(p,g){for(const _ of p)g(_)&&(yield _)}e.filter=c;function*f(p,g){let _=0;for(const L of p)yield g(L,_++)}e.map=f;function*h(...p){for(const g of p)for(const _ of g)yield _}e.concat=h;function*d(p){for(const g of p)for(const _ of g)yield _}e.concatNested=d;function m(p,g,_){let L=_;for(const S of p)L=g(L,S);return L}e.reduce=m;function*v(p,g,_=p.length){for(g<0&&(g+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);g<_;g++)yield p[g]}e.slice=v;function b(p,g=Number.POSITIVE_INFINITY){const _=[];if(g===0)return[_,p];const L=p[Symbol.iterator]();for(let S=0;SL===S){const L=p[Symbol.iterator](),S=g[Symbol.iterator]();for(;;){const A=L.next(),w=S.next();if(A.done!==w.done)return!1;if(A.done)return!0;if(!_(A.value,w.value))return!1}}e.equals=N})(Rt||(Rt={}));function Qa(e){return e}function Xa(e,t){}class zi extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`),this.errors=t}}function Rr(e){if(Rt.is(e)){let t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new zi(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Gi(...e){return Or(()=>Rr(e))}function Or(e){return{dispose:Yi(()=>{e()})}}class tt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Rr(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?tt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}tt.DISABLE_DISPOSED_WARNING=!1;class Vr{constructor(){this._store=new tt,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Vr.None=Object.freeze({dispose(){}});var Ot;const bt="en";let Vt=!1,$t=!1,Wt=!1,yt,qt=bt,Ji,je;const ee=typeof self=="object"?self:typeof global=="object"?global:{};let Z;typeof ee.vscode!="undefined"&&typeof ee.vscode.process!="undefined"?Z=ee.vscode.process:typeof process!="undefined"&&(Z=process);const Qi=typeof((Ot=Z==null?void 0:Z.versions)===null||Ot===void 0?void 0:Ot.electron)=="string"&&Z.type==="renderer";if(typeof navigator=="object"&&!Qi)je=navigator.userAgent,Vt=je.indexOf("Windows")>=0,$t=je.indexOf("Macintosh")>=0,(je.indexOf("Macintosh")>=0||je.indexOf("iPad")>=0||je.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Wt=je.indexOf("Linux")>=0,yt=navigator.language,qt=yt;else if(typeof Z=="object"){Vt=Z.platform==="win32",$t=Z.platform==="darwin",Wt=Z.platform==="linux",Wt&&!!Z.env.SNAP&&Z.env.SNAP_REVISION,yt=bt,qt=bt;const e=Z.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),r=t.availableLanguages["*"];yt=t.locale,qt=r||bt,Ji=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const rt=Vt,Xi=$t,$r=function(){if(ee.setImmediate)return ee.setImmediate.bind(ee);if(typeof ee.postMessage=="function"&&!ee.importScripts){let r=[];ee.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let s=0,a=r.length;s{const s=++n;r.push({id:s,callback:i}),ee.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(Z==null?void 0:Z.nextTick)=="function")return Z.nextTick.bind(Z);const t=Promise.resolve();return r=>t.then(r)}();function Zi(e){let t=[],r=Object.getPrototypeOf(e);for(;Object.prototype!==r;)t=t.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return t}function Ht(e){const t=[];for(const r of Zi(e))typeof e[r]=="function"&&t.push(r);return t}function Wr(e,t){const r=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)};let n={};for(const i of e)n[i]=r(i);return n}const Ki="$initialize";class es{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,r){let n=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[n]={resolve:i,reject:s},this._send({vsWorker:this._workerId,req:n,method:t,args:r})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let s=t;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let a=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let o=s.err;s.err.$isError&&(o=new Error,o.name=s.err.name,o.message=s.err.message,o.stack=s.err.stack),a.reject(o);return}a.resolve(s.res);return}let r=t,n=r.req;this._handler.handleMessage(r.method,r.args).then(s=>{this._send({vsWorker:this._workerId,seq:n,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=jr(s.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:jr(s)})})}_send(t){let r=[];if(t.req){const n=t;for(let i=0;i{t(n,i)},handleMessage:(n,i)=>this._handleMessage(n,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,r){if(t===Ki)return this.initialize(r[0],r[1],r[2],r[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,r))}catch(n){return Promise.reject(n)}}initialize(t,r,n,i){this._protocol.setWorkerId(t);const a=Wr(i,(o,u)=>this._protocol.sendMessage(o,u));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(Ht(this._requestHandler))):(r&&(typeof r.baseUrl!="undefined"&&delete r.baseUrl,typeof r.paths!="undefined"&&typeof r.paths.vs!="undefined"&&delete r.paths.vs,typeof r.trustedTypesPolicy!==void 0&&delete r.trustedTypesPolicy,r.catchError=!0,self.require.config(r)),new Promise((o,u)=>{self.require([n],l=>{if(this._requestHandler=l.create(a),!this._requestHandler){u(new Error("No RequestHandler!"));return}o(Ht(this._requestHandler))},u)}))}}class Le{constructor(t,r,n,i){this.originalStart=t,this.originalLength=r,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function rs(e){return e.split(/\r\n|\r|\n/)}function ns(e){for(let t=0,r=e.length;t=0;r--){const n=e.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}function qr(e,t){return(t<<5)-t+e|0}function ss(e,t){t=qr(149417,t);for(let r=0,n=e.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new Le(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Ce{constructor(t,r,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=r;const[i,s,a]=Ce._getElements(t),[o,u,l]=Ce._getElements(r);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const r=t.getElements();if(Ce._isStringArray(r)){const n=new Int32Array(r.length);for(let i=0,s=r.length;i=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let f;return n<=i?(He.Assert(t===r+1,"originalStart should only be one more than originalEnd"),f=[new Le(t,0,n,i-n+1)]):t<=r?(He.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Le(t,r-t+1,n,0)]):(He.Assert(t===r+1,"originalStart should only be one more than originalEnd"),He.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,r,n,i,a,o,s),l=a[0],c=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,n,c,s);let h=[];return s[0]?h=[new Le(l+1,r-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,r,c+1,i,s),this.ConcatenateChanges(f,h)}return[new Le(t,r-t+1,n,i-n+1)]}WALKTRACE(t,r,n,i,s,a,o,u,l,c,f,h,d,m,v,b,N,p){let g=null,_=null,L=new Br,S=r,A=n,w=d[0]-b[0]-i,y=-1073741824,T=this.m_forwardHistory.length-1;do{const M=w+t;M===S||M=0&&(l=this.m_forwardHistory[T],t=l[0],S=1,A=l.length-1)}while(--T>=-1);if(g=L.getReverseChanges(),p[0]){let M=d[0]+1,k=b[0]+1;if(g!==null&&g.length>0){const F=g[g.length-1];M=Math.max(M,F.getOriginalEnd()),k=Math.max(k,F.getModifiedEnd())}_=[new Le(M,h-M+1,k,v-k+1)]}else{L=new Br,S=a,A=o,w=d[0]-b[0]-u,y=1073741824,T=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const M=w+s;M===S||M=c[M+1]?(f=c[M+1]-1,m=f-w-u,f>y&&L.MarkNextChange(),y=f+1,L.AddOriginalElement(f+1,m+1),w=M+1-s):(f=c[M-1],m=f-w-u,f>y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m+1),w=M-1-s),T>=0&&(c=this.m_reverseHistory[T],s=c[0],S=1,A=c.length-1)}while(--T>=-1);_=L.getChanges()}return this.ConcatenateChanges(g,_)}ComputeRecursionPoint(t,r,n,i,s,a,o){let u=0,l=0,c=0,f=0,h=0,d=0;t--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=r-t+(i-n),v=m+1,b=new Int32Array(v),N=new Int32Array(v),p=i-n,g=r-t,_=t-n,L=r-i,A=(g-p)%2===0;b[p]=t,N[g]=r,o[0]=!1;for(let w=1;w<=m/2+1;w++){let y=0,T=0;c=this.ClipDiagonalBound(p-w,w,p,v),f=this.ClipDiagonalBound(p+w,w,p,v);for(let k=c;k<=f;k+=2){k===c||ky+T&&(y=u,T=l),!A&&Math.abs(k-g)<=w-1&&u>=N[k])return s[0]=u,a[0]=l,F<=N[k]&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):null}const M=(y-t+(T-n)-w)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(y,M))return o[0]=!0,s[0]=y,a[0]=T,M>0&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):(t++,n++,[new Le(t,r-t+1,n,i-n+1)]);h=this.ClipDiagonalBound(g-w,w,g,v),d=this.ClipDiagonalBound(g+w,w,g,v);for(let k=h;k<=d;k+=2){k===h||k=N[k+1]?u=N[k+1]-1:u=N[k-1],l=u-(k-g)-L;const F=u;for(;u>t&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(N[k]=u,A&&Math.abs(k-p)<=w&&u<=b[k])return s[0]=u,a[0]=l,F>=b[k]&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):null}if(w<=1447){let k=new Int32Array(f-c+2);k[0]=p-c+1,Be.Copy2(b,c,k,1,f-c+1),this.m_forwardHistory.push(k),k=new Int32Array(d-h+2),k[0]=g-h+1,Be.Copy2(N,h,k,1,d-h+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o)}PrettifyChanges(t){for(let r=0;r0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;r--){const n=t[r];let i=0,s=0;if(r>0){const f=t[r-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let u=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let f=1;;f++){const h=n.originalStart-f,d=n.modifiedStart-f;if(hl&&(l=v,u=f)}n.originalStart-=u,n.modifiedStart-=u;const c=[null];if(r>0&&this.ChangesOverlap(t[r-1],t[r],c)){t[r-1]=c[0],t.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,n=t.length;r0&&d>u&&(u=d,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,r,n){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,r){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,r){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,r,n,i){const s=this._OriginalRegionIsBoundary(t,r)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return s+a}ConcatenateChanges(t,r){let n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){const i=new Array(t.length+r.length-1);return Be.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],Be.Copy(r,1,i,t.length,r.length-1),i}else{const i=new Array(t.length+r.length);return Be.Copy(t,0,i,0,t.length),Be.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(He.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),He.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(s=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(o=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new Le(i,s,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t=us&&e<=fs||e>=ls&&e<=cs}function St(e,t,r,n){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l2){const c=i.lastIndexOf(r);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(r)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===xe&&o!==-1?++o:o=-1}return i}function zr(e,t){if(t===null||typeof t!="object")throw new Yr("pathObject","Object",t);const r=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}const ie={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],J(s,"path"),s.length===0)continue}else t.length===0?s=Bt():(s=os[`=${t}`]||Bt(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===se)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const c=s.charCodeAt(0);if(a===1)R(c)&&(o=1,l=!0);else if(R(c))if(l=!0,R(s.charCodeAt(1))){let f=2,h=f;for(;f2&&R(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(o)}\\${r}`,n=l,l&&t.length>0)break}return r=St(r,!n,"\\",R),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){J(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return Yt(s)?"\\":e;if(R(s))if(i=!0,R(e.charCodeAt(1))){let o=2,u=o;for(;o2&&R(e.charCodeAt(2))&&(i=!0,r=3));let a=r0&&R(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){J(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return R(r)||t>2&&Te(r)&&e.charCodeAt(1)===ke&&R(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&R(r.charCodeAt(0))){++i;const s=r.length;s>1&&R(r.charCodeAt(1))&&(++i,s>2&&(R(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i=2&&(t=`\\${t.slice(i)}`)}return ie.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t)return"";const r=ie.resolve(e),n=ie.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===se;)s--;const a=s-i;let o=0;for(;oo&&t.charCodeAt(u-1)===se;)u--;const l=u-o,c=ac){if(t.charCodeAt(o+h)===se)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(e.charCodeAt(i+h)===se?f=h:h===2&&(f=3)),f===-1&&(f=0)}let d="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===se)&&(d+=d.length===0?"..":"\\..");return o+=f,d.length>0?`${d}${n.slice(o,u)}`:(n.charCodeAt(o)===se&&++o,n.slice(o,u))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ie.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===se){if(t.charCodeAt(1)===se){const r=t.charCodeAt(2);if(r!==hs&&r!==xe)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Te(t.charCodeAt(0))&&t.charCodeAt(1)===ke&&t.charCodeAt(2)===se)return`\\\\?\\${t}`;return e},dirname(e){J(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return R(i)?e:".";if(R(i)){if(r=n=1,R(e.charCodeAt(1))){let o=2,u=o;for(;o2&&R(e.charCodeAt(2))?3:2,n=r);let s=-1,a=!0;for(let o=t-1;o>=n;--o)if(R(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&Te(e.charCodeAt(0))&&e.charCodeAt(1)===ke&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=r;--s){const u=e.charCodeAt(s);if(R(u)){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(R(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===ke&&Te(e.charCodeAt(0))&&(t=n=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(R(u)){if(!s){n=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===xe?r===-1?r=o:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:zr.bind(null,"\\"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return R(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(R(i)){if(n=1,R(e.charCodeAt(1))){let f=2,h=f;for(;f0&&(t.root=e.slice(0,n));let s=-1,a=n,o=-1,u=!0,l=e.length-1,c=0;for(;l>=n;--l){if(i=e.charCodeAt(l),R(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===xe?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return o!==-1&&(s===-1||c===0||c===1&&s===o-1&&s===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,s),t.base=e.slice(a,o),t.ext=e.slice(s,o))),a>0&&a!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ae={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Bt();J(i,"path"),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===K)}return t=St(t,!r,"/",Yt),r?`/${t}`:t.length>0?t:"."},normalize(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===K,r=e.charCodeAt(e.length-1)===K;return e=St(e,!t,"/",Yt),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return J(e,"path"),e.length>0&&e.charCodeAt(0)===K},join(...e){if(e.length===0)return".";let t;for(let r=0;r0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":ae.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t||(e=ae.resolve(e),t=ae.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,a=t.length-s,o=io){if(t.charCodeAt(s+l)===K)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(r+l)===K?u=l:l===0&&(u=0));let c="";for(l=r+u+1;l<=n;++l)(l===n||e.charCodeAt(l)===K)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===K;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===K){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===K){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===K){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e.charCodeAt(a);if(o===K){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===xe?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:zr.bind(null,"/"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===K;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=n;--u){const c=e.charCodeAt(u);if(c===K){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),c===xe?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=s===0&&r?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,i),t.base=e.slice(c,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ae.win32=ie.win32=ie,ae.posix=ie.posix=ae,Ue==="win32"?ie.normalize:ae.normalize,Ue==="win32"?ie.resolve:ae.resolve,Ue==="win32"?ie.relative:ae.relative,Ue==="win32"?ie.dirname:ae.dirname,Ue==="win32"?ie.basename:ae.basename,Ue==="win32"?ie.extname:ae.extname,Ue==="win32"?ie.sep:ae.sep;const ds=/^\w[\w\d+.-]*$/,gs=/^\//,ms=/^\/\//;function Gr(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!ds.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!gs.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(ms.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function ps(e,t){return!e&&!t?"file":e}function vs(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ge&&(t=ge+t):t=ge;break}return t}const Y="",ge="/",bs=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Re{constructor(t,r,n,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Y,this.authority=t.authority||Y,this.path=t.path||Y,this.query=t.query||Y,this.fragment=t.fragment||Y):(this.scheme=ps(t,a),this.authority=r||Y,this.path=vs(this.scheme,n||Y),this.query=i||Y,this.fragment=s||Y,Gr(this,a))}static isUri(t){return t instanceof Re?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return zt(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=Y),n===void 0?n=this.authority:n===null&&(n=Y),i===void 0?i=this.path:i===null&&(i=Y),s===void 0?s=this.query:s===null&&(s=Y),a===void 0?a=this.fragment:a===null&&(a=Y),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new ze(r,n,i,s,a)}static parse(t,r=!1){const n=bs.exec(t);return n?new ze(n[2]||Y,_t(n[4]||Y),_t(n[5]||Y),_t(n[7]||Y),_t(n[9]||Y),r):new ze(Y,Y,Y,Y,Y)}static file(t){let r=Y;if(rt&&(t=t.replace(/\\/g,ge)),t[0]===ge&&t[1]===ge){const n=t.indexOf(ge,2);n===-1?(r=t.substring(2),t=ge):(r=t.substring(2,n),t=t.substring(n)||ge)}return new ze("file",r,t,Y,Y)}static from(t){const r=new ze(t.scheme,t.authority,t.path,t.query,t.fragment);return Gr(r,!0),r}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return rt&&t.scheme==="file"?n=Re.file(ie.join(zt(t,!0),...r)).path:n=ae.join(t.path,...r),t.with({path:n})}toString(t=!1){return Gt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Re)return t;{const r=new ze(t);return r._formatted=t.external,r._fsPath=t._sep===Jr?t.fsPath:null,r}}else return t}}const Jr=rt?1:void 0;class ze extends Re{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=zt(this,!1)),this._fsPath}toString(t=!1){return t?Gt(this,!0):(this._formatted||(this._formatted=Gt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Jr),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Qr={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function Xr(e,t){let r,n=-1;for(let i=0;i=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||t&&s===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const a=Qr[s];a!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=a):n===-1&&(n=i)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function ys(e){let t;for(let r=0;r1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,rt&&(r=r.replace(/\//g,"\\")),r}function Gt(e,t){const r=t?ys:Xr;let n="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=ge,n+=ge),s){let l=s.indexOf("@");if(l!==-1){const c=s.substr(0,l);s=s.substr(l+1),l=c.indexOf(":"),l===-1?n+=r(c,!1):(n+=r(c.substr(0,l),!1),n+=":",n+=r(c.substr(l+1),!1)),n+="@"}s=s.toLowerCase(),l=s.indexOf(":"),l===-1?n+=r(s,!1):(n+=r(s.substr(0,l),!1),n+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=r(a,!0)}return o&&(n+="?",n+=r(o,!1)),u&&(n+="#",n+=t?u:Xr(u,!1)),n}function Zr(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Zr(e.substr(3)):e}}const Kr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _t(e){return e.match(Kr)?e.replace(Kr,t=>Zr(t)):e}class le{constructor(t,r){this.lineNumber=t,this.column=r}with(t=this.lineNumber,r=this.column){return t===this.lineNumber&&r===this.column?this:new le(t,r)}delta(t=0,r=0){return this.with(this.lineNumber+t,this.column+r)}equals(t){return le.equals(this,t)}static equals(t,r){return!t&&!r?!0:!!t&&!!r&&t.lineNumber===r.lineNumber&&t.column===r.column}isBefore(t){return le.isBefore(this,t)}static isBefore(t,r){return t.lineNumbern||t===n&&r>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=t,this.endColumn=r):(this.startLineNumber=t,this.startColumn=r,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return G.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return G.containsPosition(this,t)}static containsPosition(t,r){return!(r.lineNumbert.endLineNumber||r.lineNumber===t.startLineNumber&&r.columnt.endColumn)}containsRange(t){return G.containsRange(this,t)}static containsRange(t,r){return!(r.startLineNumbert.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumnt.endColumn)}strictContainsRange(t){return G.strictContainsRange(this,t)}static strictContainsRange(t,r){return!(r.startLineNumbert.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<=t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>=t.endColumn)}plusRange(t){return G.plusRange(this,t)}static plusRange(t,r){let n,i,s,a;return r.startLineNumbert.endLineNumber?(s=r.endLineNumber,a=r.endColumn):r.endLineNumber===t.endLineNumber?(s=r.endLineNumber,a=Math.max(r.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new G(n,i,s,a)}intersectRanges(t){return G.intersectRanges(this,t)}static intersectRanges(t,r){let n=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn,o=r.startLineNumber,u=r.startColumn,l=r.endLineNumber,c=r.endColumn;return nl?(s=l,a=c):s===l&&(a=Math.min(a,c)),n>s||n===s&&i>a?null:new G(n,i,s,a)}equalsRange(t){return G.equalsRange(this,t)}static equalsRange(t,r){return!!t&&!!r&&t.startLineNumber===r.startLineNumber&&t.startColumn===r.startColumn&&t.endLineNumber===r.endLineNumber&&t.endColumn===r.endColumn}getEndPosition(){return G.getEndPosition(this)}static getEndPosition(t){return new le(t.endLineNumber,t.endColumn)}getStartPosition(){return G.getStartPosition(this)}static getStartPosition(t){return new le(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,r){return new G(this.startLineNumber,this.startColumn,t,r)}setStartPosition(t,r){return new G(t,r,this.endLineNumber,this.endColumn)}collapseToStart(){return G.collapseToStart(this)}static collapseToStart(t){return new G(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,r=t){return new G(t.lineNumber,t.column,r.lineNumber,r.column)}static lift(t){return t?new G(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,r){return!(t.endLineNumbert.startLineNumber}}const Ss=3;function en(e,t,r,n){return new Ce(e,t,r).ComputeDiff(n)}class tn{constructor(t){const r=[],n=[];for(let i=0,s=t.length;i0&&r.originalLength<20&&r.modifiedLength>0&&r.modifiedLength<20&&s()){const d=n.createCharSequence(t,r.originalStart,r.originalStart+r.originalLength-1),m=i.createCharSequence(t,r.modifiedStart,r.modifiedStart+r.modifiedLength-1);let v=en(d,m,s,!0).changes;o&&(v=As(v)),h=[];for(let b=0,N=v.length;b1&&v>1;){const b=h.charCodeAt(m-2),N=d.charCodeAt(v-2);if(b!==N)break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,m,a+1,1,v)}{let m=Qt(h,1),v=Qt(d,1);const b=h.length+1,N=d.length+1;for(;m!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function Ge(e){return e<0?0:e>4294967295?4294967295:e|0}class Ns{constructor(t,r){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=r}}class Ls{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,r){t=Ge(t);const n=this.values,i=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+s),this.values.set(r,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,r){return t=Ge(t),r=Ge(r),this.values[t]===r?!1:(this.values[t]=r,t-1=n.length)return!1;let s=n.length-t;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+r),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Ge(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),t>=this.values.length&&(t=this.values.length-1);for(let n=r;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let r=0,n=this.values.length-1,i=0,s=0,a=0;for(;r<=n;)if(i=r+(n-r)/2|0,s=this.prefixSum[i],a=s-this.values[i],t=s)r=i+1;else break;return new Ns(i,t-a)}}class Cs{constructor(t,r,n,i){this._uri=t,this._lines=r,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const r=t.changes;for(const n of r)this._acceptDeleteRange(n.range),this._acceptInsertText(new le(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,r=this._lines.length,n=new Uint32Array(r);for(let i=0;i/?";function ks(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const r of xs)e.indexOf(r)>=0||(t+="\\"+r);return t+="\\s]+)",new RegExp(t,"g")}const Ts=ks();function Ps(e){let t=Ts;if(e&&e instanceof RegExp)if(e.global)t=e;else{let r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),t=new RegExp(e.source,r)}return t.lastIndex=0,t}const Ms={maxLen:1e3,windowSize:15,timeBudget:150};function sn(e,t,r,n,i=Ms){if(r.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:n+=l,r=r.substring(l,e+i.maxLen/2),sn(e,t,r,n,i)}const s=Date.now(),a=e-1-n;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const c=a-i.windowSize*l;t.lastIndex=Math.max(0,c);const f=Es(t,r,a,o);if(!f&&u||(u=f,c<=0))break;o=c}if(u){let l={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function Es(e,t,r,n){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=r&&e.lastIndex>=r)return i;if(n>0&&s>n)return null}return null}class Xt{constructor(t){let r=nn(t);this._defaultValue=r,this._asciiMap=Xt._createAsciiMap(r),this._map=new Map}static _createAsciiMap(t){let r=new Uint8Array(256);for(let n=0;n<256;n++)r[n]=t;return r}set(t,r){let n=nn(r);t>=0&&t<256?this._asciiMap[t]=n:this._map.set(t,n)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Is{constructor(t,r,n){const i=new Uint8Array(t*r);for(let s=0,a=t*r;sr&&(r=u),o>n&&(n=o),l>n&&(n=l)}r++,n++;let i=new Is(n,r,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,r)}}let Zt=null;function Ds(){return Zt===null&&(Zt=new Fs([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Zt}let st=null;function js(){if(st===null){st=new Xt(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let r=0;ri);if(i>0){const o=r.charCodeAt(i-1),u=r.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:r.substring(i,a+1)}}static computeLinks(t,r=Ds()){const n=js();let i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,c=0,f=0,h=1,d=!1,m=!1,v=!1,b=!1;for(;l=0?(i+=n?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Kt.INSTANCE=new Kt;class H{constructor(t){this.element=t,this.next=H.Undefined,this.prev=H.Undefined}}H.Undefined=new H(void 0);class an{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let t=this._first;for(;t!==H.Undefined;){const r=t.next;t.prev=H.Undefined,t.next=H.Undefined,t=r}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,r){const n=new H(t);if(this._first===H.Undefined)this._first=n,this._last=n;else if(r){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==H.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==H.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==H.Undefined&&t.next!==H.Undefined){const r=t.prev;r.next=t.next,t.next.prev=r}else t.prev===H.Undefined&&t.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):t.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):t.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==H.Undefined;)yield t.element,t=t.next}}const Rs=ee.performance&&typeof ee.performance.now=="function";class wt{constructor(t){this._highResolution=Rs&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new wt(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ee.performance.now():Date.now()}}var er;(function(e){e.None=()=>Vr.None;function t(p){return(g,_=null,L)=>{let S=!1,A;return A=p(w=>{if(!S)return A?A.dispose():S=!0,g.call(_,w)},null,L),S&&A.dispose(),A}}e.once=t;function r(p,g){return u((_,L=null,S)=>p(A=>_.call(L,g(A)),null,S))}e.map=r;function n(p,g){return u((_,L=null,S)=>p(A=>{g(A),_.call(L,A)},null,S))}e.forEach=n;function i(p,g){return u((_,L=null,S)=>p(A=>g(A)&&_.call(L,A),null,S))}e.filter=i;function s(p){return p}e.signal=s;function a(...p){return(g,_=null,L)=>Gi(...p.map(S=>S(A=>g.call(_,A),null,L)))}e.any=a;function o(p,g,_){let L=_;return r(p,S=>(L=g(L,S),L))}e.reduce=o;function u(p){let g;const _=new Oe({onFirstListenerAdd(){g=p(_.fire,_)},onLastListenerRemove(){g.dispose()}});return _.event}function l(p,g,_=100,L=!1,S){let A,w,y,T=0;const M=new Oe({leakWarningThreshold:S,onFirstListenerAdd(){A=p(k=>{T++,w=g(w,k),L&&!y&&(M.fire(w),w=void 0),clearTimeout(y),y=setTimeout(()=>{const F=w;w=void 0,y=void 0,(!L||T>1)&&M.fire(F),T=0},_)})},onLastListenerRemove(){A.dispose()}});return M.event}e.debounce=l;function c(p,g=(_,L)=>_===L){let _=!0,L;return i(p,S=>{const A=_||!g(S,L);return _=!1,L=S,A})}e.latch=c;function f(p,g){return[e.filter(p,g),e.filter(p,_=>!g(_))]}e.split=f;function h(p,g=!1,_=[]){let L=_.slice(),S=p(y=>{L?L.push(y):w.fire(y)});const A=()=>{L&&L.forEach(y=>w.fire(y)),L=null},w=new Oe({onFirstListenerAdd(){S||(S=p(y=>w.fire(y)))},onFirstListenerDidAdd(){L&&(g?setTimeout(A):A())},onLastListenerRemove(){S&&S.dispose(),S=null}});return w.event}e.buffer=h;class d{constructor(g){this.event=g}map(g){return new d(r(this.event,g))}forEach(g){return new d(n(this.event,g))}filter(g){return new d(i(this.event,g))}reduce(g,_){return new d(o(this.event,g,_))}latch(){return new d(c(this.event))}debounce(g,_=100,L=!1,S){return new d(l(this.event,g,_,L,S))}on(g,_,L){return this.event(g,_,L)}once(g,_,L){return t(this.event)(g,_,L)}}function m(p){return new d(p)}e.chain=m;function v(p,g,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.on(g,L),A=()=>p.removeListener(g,L),w=new Oe({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromNodeEventEmitter=v;function b(p,g,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.addEventListener(g,L),A=()=>p.removeEventListener(g,L),w=new Oe({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromDOMEventEmitter=b;function N(p){return new Promise(g=>t(p)(g))}e.toPromise=N})(er||(er={}));class Nt{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Nt._idPool++}`}start(t){this._stopWatch=new wt(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Nt._idPool=0;class Oe{constructor(t){var r;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new Nt(this._options._profName):void 0}get event(){return this._event||(this._event=(t,r,n)=>{var i;this._listeners||(this._listeners=new an);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(r?[t,r]:t);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,r);const o=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),u=Or(()=>{o&&o(),this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return n instanceof tt?n.add(u):Array.isArray(n)&&n.push(u),u}),this._event}fire(t){var r,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new an);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,s]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,s):i[0].call(i[1],s)}catch(a){Hi(a)}}(n=this._perfMon)===null||n===void 0||n.stop()}}dispose(){var t,r,n,i,s;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=(n=this._options)===null||n===void 0?void 0:n.onLastListenerRemove)===null||i===void 0||i.call(n),(s=this._leakageMon)===null||s===void 0||s.dispose())}}const on=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}});var Lt;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof Ct?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:er.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:on})})(Lt||(Lt={}));class Ct{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?on:(this._emitter||(this._emitter=new Oe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Os{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Ct),this._token}cancel(){this._token?this._token instanceof Ct&&this._token.cancel():this._token=Lt.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Ct&&this._token.dispose():this._token=Lt.None}}class tr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,r){this._keyCodeToStr[t]=r,this._strToKeyCode[r.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const rr=new tr,nr=new tr,ir=new tr;(function(){function e(t,r,n=r,i=n){rr.define(t,r),nr.define(t,n),ir.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var un;(function(e){function t(a){return rr.keyCodeToStr(a)}e.toString=t;function r(a){return rr.strToKeyCode(a)}e.fromString=r;function n(a){return nr.keyCodeToStr(a)}e.toUserSettingsUS=n;function i(a){return ir.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return nr.strToKeyCode(a)||ir.strToKeyCode(a)}e.fromUserSettings=s})(un||(un={}));function Vs(e,t){const r=(t&65535)<<16>>>0;return(e|r)>>>0}class me extends G{constructor(t,r,n,i){super(t,r,n,i),this.selectionStartLineNumber=t,this.selectionStartColumn=r,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return me.selectionsEqual(this,t)}static selectionsEqual(t,r){return t.selectionStartLineNumber===r.selectionStartLineNumber&&t.selectionStartColumn===r.selectionStartColumn&&t.positionLineNumber===r.positionLineNumber&&t.positionColumn===r.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,r){return this.getDirection()===0?new me(this.startLineNumber,this.startColumn,t,r):new me(t,r,this.startLineNumber,this.startColumn)}getPosition(){return new le(this.positionLineNumber,this.positionColumn)}setStartPosition(t,r){return this.getDirection()===0?new me(t,r,this.endLineNumber,this.endColumn):new me(this.endLineNumber,this.endColumn,t,r)}static fromPositions(t,r=t){return new me(t.lineNumber,t.column,r.lineNumber,r.column)}static liftSelection(t){return new me(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,r){if(t&&!r||!t&&r)return!1;if(!t&&!r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;nthis._lines.length)r=this._lines.length,n=this._lines[r-1].length+1,i=!0;else{let s=this._lines[r-1].length+1;n<1?(n=1,i=!0):n>s&&(n=s,i=!0)}return i?{lineNumber:r,column:n}:t}}class Qe{constructor(t,r){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=r,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(r=>t.push(this._models[r])),t}acceptNewModel(t){this._models[t.url]=new qs(Re.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,r){if(!this._models[t])return;this._models[t].onEvents(r)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,r,n,i){return Je(this,void 0,void 0,function*(){const s=this._getModel(t),a=this._getModel(r);if(!s||!a)return null;const o=s.getLinesContent(),u=a.getLinesContent(),c=new ws(o,u,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),f=c.changes.length>0?!1:this._modelsAreIdentical(s,a);return{quitEarly:c.quitEarly,identical:f,changes:c.changes}})}_modelsAreIdentical(t,r){const n=t.getLineCount(),i=r.getLineCount();if(n!==i)return!1;for(let s=1;s<=n;s++){const a=t.getLineContent(s),o=r.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(t,r){return Je(this,void 0,void 0,function*(){const n=this._getModel(t);if(!n)return r;const i=[];let s;r=r.slice(0).sort((a,o)=>{if(a.range&&o.range)return G.compareRangesUsingStarts(a.range,o.range);let u=a.range?0:1,l=o.range?0:1;return u-l});for(let{range:a,text:o,eol:u}of r){if(typeof u=="number"&&(s=u),G.isEmpty(a)&&!o)continue;const l=n.getValueInRange(a);if(o=o.replace(/\r\n|\n|\r/g,n.eol),l===o)continue;if(Math.max(o.length,l.length)>Qe._diffLimit){i.push({range:a,text:o});continue}const c=as(l,o,!1),f=n.offsetAt(G.lift(a).getStartPosition());for(const h of c){const d=n.positionAt(f+h.originalStart),m=n.positionAt(f+h.originalStart+h.originalLength),v={text:o.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:d.lineNumber,startColumn:d.column,endLineNumber:m.lineNumber,endColumn:m.column}};n.getValueInRange(v.range)!==v.text&&i.push(v)}}return typeof s=="number"&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Je(this,void 0,void 0,function*(){let r=this._getModel(t);return r?Us(r):null})}textualSuggest(t,r,n,i){return Je(this,void 0,void 0,function*(){const s=new wt(!0),a=new RegExp(n,i),o=new Set;e:for(let u of t){const l=this._getModel(u);if(!!l){for(let c of l.words(a))if(!(c===r||!isNaN(Number(c)))&&(o.add(c),o.size>Qe._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(t,r,n,i){return Je(this,void 0,void 0,function*(){let s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let u=r.startLineNumber;uthis._host.fhr(o,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,r),Promise.resolve(Ht(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,r){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,r))}catch(n){return Promise.reject(n)}}}Qe._diffLimit=1e5,Qe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ee.monaco=Ws());let lr=!1;function Vn(e){if(lr)return;lr=!0;const t=new ts(r=>{self.postMessage(r)},r=>new Qe(r,e));self.onmessage=r=>{t.onmessage(r.data)}}self.onmessage=e=>{lr||Vn(null)};function fr(e,t){t===void 0&&(t=!1);var r=e.length,n=0,i="",s=0,a=16,o=0,u=0,l=0,c=0,f=0;function h(g,_){for(var L=0,S=0;L=48&&A<=57)S=S*16+A-48;else if(A>=65&&A<=70)S=S*16+A-65+10;else if(A>=97&&A<=102)S=S*16+A-97+10;else break;n++,L++}return L=r){g+=e.substring(_,n),f=2;break}var L=e.charCodeAt(n);if(L===34){g+=e.substring(_,n),n++;break}if(L===92){if(g+=e.substring(_,n),n++,n>=r){f=2;break}var S=e.charCodeAt(n++);switch(S){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=` diff --git a/src/main/resources/magic-editor/assets/style.07c46cc4.css b/src/main/resources/magic-editor/assets/style.07c46cc4.css index adb62a5ea7603899b01b4c830917462dd037ce79..f857beecfddd696edc68c4ddba866c6f9fe638b0 100644 --- a/src/main/resources/magic-editor/assets/style.07c46cc4.css +++ b/src/main/resources/magic-editor/assets/style.07c46cc4.css @@ -1 +1,18 @@ +/** + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ html,body,#app{width:100%;height:100%;margin:0!important}@font-face{font-family:JetBrainsMono;src:url(./JetBrainsMono-Regular.bceff071.woff2) format("woff2");font-weight:100;font-style:normal}@font-face{font-family:PoetsenOne;src:url(./PoetsenOne.14047964.woff2) format("woff2");font-weight:100;font-style:normal}.magic-editor{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;position:relative;min-width:1200px;min-height:600px;font-size:12px;letter-spacing:0px;background-color:var(--main-background-color);cursor:default;color:var(--main-color);outline:0;--main-color: #000;--main-background-color: #f2f2f2;--main-border-color: #cdcdcd;--main-hover-background-color: #d9d9d9;--main-hover-icon-background-color: #d9d9d9;--main-selected-background-color: #bdbdbd;--main-selected-color: #000;--main-icon-color: #6e6e6e;--navbar-body-background-color: #fff;--navbar-body-border-color: #c0c0c0;--header-title-color: #000;--header-default-color: #6e6e6e;--empty-background-color: #b6b6b6;--empty-color: #505050;--empty-key-color: #5263a0;--tree-hover-background-color: #d4d4d4;--tree-icon-color: #aeb9c0;--table-border-color: #bdbdbd;--input-border-color: #bdbdbd;--input-background-color: #fff;--input-focus-color: #0784de;--dialog-border-color: #707070;--dialog-shadow-color: #cfcfcf;--button-border-color: #adadad;--button-background-color: #e3e3e3;--button-hover-border-color: #99a0a5;--button-hover-background-color: #e3f1fa;--button-disabled-color: #bdbdbd;--select-background-color: #e3e3e3;--select-hover-background-color: #e3f1fa;--select-option-background-color: #fff;--select-option-border-color: #808080;--select-option-hover-background-color: #1a7dc4;--select-option-hover-color: #fff;--select-inputable-background-color: #fff;--tab-selected-background-color: #fff;--icon-debug-color: #59A869;--icon-step-color: #389FD6;--data-type-default-color: #000;--data-type-string-color: #008000;--data-type-integer-color: #0000ff;--data-type-number-color: #0000ff;--data-type-byte-color: #0000ff;--data-type-long-color: #0000ff;--data-type-float-color: #0000ff;--data-type-double-color: #0000ff;--data-type-short-color: #0000ff;--data-type-boolean-color: #000080;--data-type-class-color: #660e7a;--data-type-key-color: #AC0039;--breakpoints-background-color: #db5860;--debug-line-background-color: #2154A6;--breakpoint-line-background-color: #FAEAE6;--run-log-background-color: #fff;--log-color-info: #00cd00;--log-color-warn: #A66F00;--log-color-debug: #00cccc;--log-color-error: #cd0000;--log-color-trace: #0000EE;--log-color-cyan: #00CCCC;--log-color-link: #006DCC;--todo-color: #008dde;--message-em-color: #007F31;--checkbox-background-color: #fff;--checkbox-text-color: #fff;--checkbox-border-color: #b0b0b0;--checkbox-selected-boder-color: #4F9EE3;--checkbox-selected-background-color: #4F9EE3;--resource-label-color: #000;--resource-span-color: #999;--scollbar-color: rgba(170, 170, 170, .7);--scollbar-background: rgba(194, 194, 194, .1);--scollbar-thumb-background: rgba(170, 170, 170, .4);--scollbar-thumb-hover-background: rgba(170, 170, 170, .7);--scollbar-scrollbar-corner-background: rgba(194, 194, 194, .1);--magic-navbar-vertical-width: 22px;--magic-navbar-vertical-title-display: block;--magic-navbar-vertical-icon-size: 1.3em;--magic-navbar-vertical-header-padding: 8px 3px;--magic-navbar-vertical-header-margin: 0;--magic-navbar-vertical-header-border-radius: 0;--magic-navbar-vertical-header-border-width: 1px;--magic-resource-header-icon-display: inline-flex;--magic-header-height: 30px;--magic-header-icon-size: 24px;--magic-panel-toolbar-width: 28px;--magic-panel-toolbar-size: 18px;--tab-selected-border-color: #4083c9;--magic-navbar-horizontal-height: 24px;--magic-input-height: 22px;--magic-table-row-height: 24px;--input-focus-border-width: 1px;--input-border-radius: 0px;--button-hover-color: var(--main-color);--button-border-hover-color: var(--button-border-color);--button-height: 22px;--magic-header-logo-padding: 25px;--magic-header-logo-background-size: 16px;--magic-header-logo-background-position: 4px 7px;--context-menu-background: var(--main-background-color);--context-menu-padding: 0;--context-menu-item-border-radius: 0;--tooltip-background-color: #27282E;--tooltip-color: #fff;--tooltip-border-color: transparent}.magic-editor,.magic-editor .monaco-editor,.magic-log pre,.magic-input,.magic-dialog pre{font-family:JetBrainsMono,Consolas,Courier New,\5fae\8f6f\96c5\9ed1}.magic-editor *{box-sizing:border-box;padding:0;margin:0}.magic-editor .none-select{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none}.magic-editor ul{list-style:none;margin:0;padding:0}.magic-editor *{scrollbar-color:var(--scollbar-thumb-background) var(--scollbar-thumb-background);scrollbar-track-color:var(--scollbar-thumb-background);-ms-scrollbar-track-color:var(--scollbar-thumb-background);scrollbar-width:thin}.magic-editor *::-webkit-scrollbar{width:5px;height:5px;background:var(--scollbar-background)}.magic-editor *::-webkit-scrollbar-thumb{border-radius:3px;background:var(--scollbar-thumb-background)}.magic-editor *::-webkit-scrollbar-thumb:hover{background:var(--scollbar-thumb-hover-background)}.magic-editor *::-webkit-scrollbar-corner{background:var(--scollbar-scrollbar-corner-background)}.magic-header .magic-logo,.magic-dialog .magic-dialog-header{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAAB3RJTUUH5QgUECk1a4VTIAAABdZJREFUeNrtm11IFF0cxp+Z1d1NdFtNbW3FDa1WoQ1hCcrUzPTOgkARNnpjuxHrovemu+jqvQmKlCC8DLooefMiQUWFFGLNj9KMgihBjSyyze+lmXHbfS9ilz17zqy7mp5edh4YmHnOmTP/85vznzlnPwTjdSWIJJbIOwDe0gDwDoC3kh5ACsuU/tHzjmtbJKRbYPj7I+El/QjQAPAOgLc0ALwD4C0NAO8AeEsDwDsA3kpJ9IS7d+8iPz+f8JaXl9Hb24tHjx4hGGSvruvr63H+/HnKX1tbw9OnT3H//n3VcwFAFEW0trYS115YWEBraytev369eQLG60owegOgun39+jXo9/uZ2507d1TP83g8quf5/f5gc3NzzOu6XC7meV6vN2i1WmOeG9qEdAvV14RTYNeuXaplV65cQXFxMeWbTCY4nc6Y7Z46dUq1TBAEXLt2jVlmNpvR1NS06QGQEAC9Xo+0tDT1xkQRDQ0NlF9ZWYmUlNjZZjQaVcuqqqrgcDhUy+vq6nYGwJ49ezasU1FRQXmx7m5IkiSpll2+fJk4lmWZOHY4HHHFtmUAWVlZlBcdTGlpKVWnurp6w876fD7mNa1WK86cOUN47e3txLEgCEzwvx0Ai/Lz588pSBaLJXycm5uLw4cPE3WGh4epdlZWVpjXdLvdRPooioK2tjaqXmVl5fYDyM7OprzBwUHKO3ToUHj/9OnTEAQhfOz1evH27VvqnOXlZTo4UcSlS5cIb2hoCK9evYLf7/8zAExOTmJtbY3wDh48SACIVGdnJ8xmM9XO4uIi5dXU1KCgoIDw+vr6oCgKpqenCf/IkSPIzMzceQCSJGFiYoLwDhw4QHQiUh0dHcjJyYkLgNvtpry+vj4AwLt378iOiCLKy8u3FwDrGaAoCl6+fMkEUFJSQszclpaWMDAwgNzc3A0BZGZm4uzZs4Q3Pz+PyclJJgBgc2mQEADWnZNlGePj44QXSoHa2lrC7+rqgqIoxENSDUBjYyMMBgPh9ff3h6fLvwtAQmsBVgrIsswcATqdjhr+T548gU6niysFXC4XVcdms6GlpQUAqPUI8OsVbDKZVN8oWwbASgFZlvHhwwesrKzAZDIB+DWrs9vtxB358eMHent7sXfvXuh0upgA9u/fj+PHj1N1ysvLY+a5TqfDiRMn0NPTE3effsszIBAIUA9Ct9uN9PT08HF/fz98Ph+sViuz7UgA9fX1xKszESU6IdoygPX1dQDA2NgY4Ue/vzs6OgAA+/bto9qQZZmYCZ47d25TnQeQ8Jsg7hTQ6/XIyMigfEVRAACjo6OEv3v37vC+JEno7OwEAOTl5VFtfP/+PbxvsVhw9OhRqs7Y2Bi+fftGeHa7HUVFRYTndDphNBpjri02BSCU39EKjYDoKXGkurq6sLq6Gu5gLAC1tbUQRXpgulwuavJz9epV3L59m/AMBgOcTic8Hk9c/Yo7BdSWqyEAX758wfv375l1Hj58GN5nLagWFhbC+2VlZVT53Nwc1XkAePPmDfN6x44di7db8QPwer3MYRU5Jw/N0qI7193dTbQTrcgRwJomP3v2jBmTx+PB/Pw85W/04cumAEiShBs3bhAdDgQC4WcAANy8eZN6GD548ICo09bWRt25yNy+desWPn/+HBcASZJw8eJFCgJrjqAmgfUboVhfj2dlZcFut0Ov18Pn8+HFixdUncLCQlgsFiiKgomJCfz8+ZOkLoooLi5GdnY2BEHA1NQU5ubmwuWpqalwOBzIyMhAIBDAyMgIATFaqampKCkpgdlshiAImJ2dxczMDN1ZxtfjCQP4P0v7fQBDGgDeAfCWBoB3ALylAeAdAG/FtRj668IF5geU26V/Hz/GvXv3/hwANpsNVSdP7hiA6A9XtlNJnwJJDyCuFFhdXcWnT592LKilpaUdu5a2GOIdFG9pAHgHwFsaAN4B8JYGgHcAvJX0AJgzQcFs4x3XtkhIo3+XIGj/HU5yaQB4B8Bb/wGL33wfrIpOmgAAACx6VFh0ZGF0ZTpjcmVhdGUAAAiZMzIwMtQ1sNA1MggxsLAyMbQyNdYGMgwMAEGtBRRid74MAAAALHpUWHRkYXRlOm1vZGlmeQAACJkzMjAy1DWw0DUyCDGwsDIxtDI11gYyDAwAQa0FFGA7xkMAAAAASUVORK5CYII=);background-size:16px}.magic-data-type{color:var(--data-type-default-color)}.magic-data-type.string{color:var(--data-type-string-color);font-weight:700}.magic-data-type.integer{color:var(--data-type-integer-color)}.magic-data-type.number{color:var(--data-type-number-color)}.magic-data-type.double{color:var(--data-type-double-color)}.magic-data-type.float{color:var(--data-type-float-color)}.magic-data-type.short{color:var(--data-type-short-color)}.magic-data-type.long{color:var(--data-type-long-color)}.magic-data-type.byte{color:var(--data-type-byte-color)}.magic-data-type.boolean{color:var(--data-type-boolean-color);font-weight:700}.magic-data-type.class{color:var(--data-type-class-color)}.magic-icon.magic-icon-difference{fill:#389fd6!important}.magic-status-bar .message em,.magic-event em{color:var(--message-em-color);font-style:normal;font-weight:700}.magic-editor .magic-monaco-editor[data-mode-id=magicscript] .monaco-editor .margin-view-overlays .codicon-folding-expanded,.magic-editor .magic-monaco-editor[data-mode-id=magicscript] .monaco-editor .margin-view-overlays .codicon-folding-collapsed{margin-left:12px!important}.magic-editor [data-title]{position:relative}.magic-editor [data-title]:hover{overflow:visible}.magic-editor [data-title]:hover:after{opacity:1;transition:all .1s ease .5s;visibility:visible}.magic-editor [data-title]:after{content:attr(data-title);background-color:var(--tooltip-background-color);color:var(--tooltip-color);font-size:12px;position:absolute;height:30px;line-height:30px;padding:0 10px;white-space:nowrap;box-shadow:0 0 4px #00000029;z-index:99999;visibility:hidden;opacity:0;border:1px solid var(--tooltip-border-color);box-sizing:border-box}.magic-editor [data-title][data-tooltip-direction=right]:after{transform:translate(100%,-50%);right:-5px;top:0;margin-top:50%}.magic-editor [data-title][data-tooltip-direction=top]:after{top:-5px;left:0;transform:translate(-50%,-100%);margin-left:50%}.magic-editor [data-title][data-tooltip-direction=left]:after{transform:translate(-100%,-50%);top:0;left:-5px;margin-top:50%}.magic-editor [data-title][data-tooltip-direction=left-top]:after{transform:translate(-100%,-100%);top:-5px;left:0;margin-left:100%}.magic-editor [data-title][data-tooltip-direction=left-bottom]:after{transform:translate(-100%,100%);bottom:-5px;left:0;margin-top:50%;margin-left:100%}.magic-editor [data-title][data-tooltip-direction=bottom]:after{bottom:0;left:0;transform:translate(-50%,100%);margin-left:50%}.magic-context-menu[data-v-75aac978]{position:absolute;z-index:999999;background-color:var(--context-menu-background);border:1px solid var(--main-border-color);padding:var(--context-menu-padding)}.magic-context-menu li[data-v-75aac978]{height:24px;line-height:24px;padding:0 10px;cursor:pointer;display:flex;border-radius:var(--context-menu-item-border-radius)}.magic-context-menu li>span[data-v-75aac978],.magic-context-menu li>label[data-v-75aac978]{cursor:pointer;white-space:pre}.magic-context-menu li.divided[data-v-75aac978]{margin-bottom:5px;position:relative}.magic-context-menu li.divided[data-v-75aac978]:after{content:"";height:2px;width:100%;border-bottom:1px solid var(--main-border-color);margin-bottom:2px;position:absolute;left:0;top:100%}.magic-context-menu .magic-context-menu-icon[data-v-75aac978]{display:inline-block;text-align:center;margin-right:8px;width:13px}.magic-context-menu li[data-v-75aac978]:hover{background-color:var(--select-option-hover-background-color)}.magic-context-menu li:hover>span[data-v-75aac978],.magic-context-menu li:hover>label[data-v-75aac978]{color:var(--select-option-hover-color)}.magic-context-menu li:hover>span[data-v-75aac978] .magic-icon{fill:var(--select-option-hover-color)}.magic-context-menu li:hover .magic-context-menu[data-v-75aac978]{display:block}.magic-context-menu li .magic-context-menu[data-v-75aac978]{left:100%;margin-top:-1px;display:none}.magic-context-menu li .magic-context-menu-icon.right[data-v-75aac978]{float:right;margin-right:0;margin-left:5px}.magic-empty[data-v-70308d5a]{width:100%;height:100%;position:relative}.magic-empty p[data-v-70308d5a]{text-align:center;width:100%;height:24px;line-height:24px;top:50%;position:relative;margin-top:-12px}.magic-loading[data-v-19c11c56]{width:100%;height:100%;position:relative;top:0;left:0}.magic-loading p[data-v-19c11c56]{position:absolute;text-align:center;width:100%;top:50%;margin-top:-20px}.magic-loading .icon[data-v-19c11c56]{width:20px;margin:0 auto;animation:rotate-19c11c56 1s linear infinite;display:block}@keyframes rotate-19c11c56{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.magic-monaco-editor[data-v-59a04eab],.magic-monaco-editor[data-v-9b3f02a8]{flex:1;overflow:hidden}.magic-monaco-editor[data-v-9b3f02a8] .breakpoints{background:var(--breakpoints-background-color);width:10px!important;height:10px!important;right:0px!important;margin-left:12px;top:5px;border-radius:5px}.magic-monaco-editor[data-v-9b3f02a8] .debug-line{background:var(--debug-line-background-color);color:#fff!important}.magic-monaco-editor[data-v-9b3f02a8] .breakpoint-line{background:var(--breakpoint-line-background-color)}.magic-resizer-x[data-v-032bc45e],.magic-resizer-y[data-v-032bc45e]{display:flex;position:relative;overflow:hidden;transition:none}.magic-resizer-event[data-v-032bc45e]{position:absolute;z-index:20;--width: 100%;--height: 100%}.magic-resizer-event[data-v-032bc45e]:after{content:" ";position:fixed;z-index:9999}.magic-resizer-x .magic-resizer-event[data-v-032bc45e]{width:15px;height:100%;right:-15px;cursor:col-resize}.magic-resizer-x .magic-resizer-event[data-v-032bc45e]:after{width:10px;height:var(--height)}.magic-resizer-x .magic-resizer-event.reverse[data-v-032bc45e]{right:unset;left:-5px}.magic-resizer-x[data-v-032bc45e]{height:100%}.magic-resizer-y .magic-resizer-event[data-v-032bc45e]{height:10px;width:100%;top:-5px;cursor:row-resize}.magic-resizer-y .magic-resizer-event[data-v-032bc45e]:after{height:10px;width:var(--width)}.magic-navbar-item[data-v-30388e35]{height:100%;width:100%}svg[data-v-15383e92]{width:1.3em;height:1.3em;vertical-align:-.25em;overflow:hidden;fill:var(--main-icon-color)}.magic-navbar{display:flex;background-color:var(--main-background-color);transition:.3s}.magic-navbar .magic-navbar-body{background-color:var(--navbar-body-background-color);overflow:auto}.magic-navbar .magic-navbar-header li:hover{background-color:var(--main-hover-background-color)}.magic-navbar .magic-navbar-header li.selected{background-color:var(--main-selected-background-color);color:var(--main-selected-color)}.magic-navbar .magic-navbar-header li.selected svg text{fill:var(--main-selected-color)}.magic-navbar .magic-navbar-header li svg text{letter-spacing:0px;font-size:10px}.magic-navbar__vertical.reverse{flex-direction:row-reverse}.magic-navbar__vertical .magic-navbar-header li{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:var(--magic-navbar-vertical-header-padding);margin:var(--magic-navbar-vertical-header-margin);cursor:pointer;border-bottom-color:var(--main-border-color);border-bottom-style:solid;border-bottom-width:var(--magic-navbar-vertical-header-border-width);border-radius:var(--magic-navbar-vertical-header-border-radius)}.magic-navbar__vertical .magic-navbar-header{width:var(--magic-navbar-vertical-width);height:100%;letter-spacing:2px;text-align:center;padding:0;border-right:1px solid var(--main-border-color)}.magic-navbar__vertical.reverse .magic-navbar-header{border-left:1px solid var(--main-border-color);border-right:none}.magic-navbar__vertical.reverse .magic-navbar-header li{display:flex;flex-direction:column-reverse}.magic-navbar__vertical .magic-navbar-header li{line-height:14px;word-break:break-all}.magic-navbar__vertical .magic-navbar-body{flex:1}.magic-navbar__vertical .magic-navbar-body{border-right:1px solid var(--navbar-body-border-color)}.magic-navbar__vertical.reverse .magic-navbar-body{border-left:1px solid var(--navbar-body-border-color);border-right:none}.magic-navbar__horizontal>ul{width:100%}.magic-navbar__horizontal>ul li{display:inline-flex;flex-direction:row-reverse;padding:0 8px;height:var(--magic-navbar-horizontal-height);line-height:var(--magic-navbar-horizontal-height);cursor:pointer;color:var(--main-color)}.magic-navbar__horizontal>ul li svg.magic-icon{height:100%;margin-right:4px}.magic-navbar__horizontal>ul{border-top:1px solid var(--main-border-color)}.magic-navbar.magic-navbar__vertical .magic-navbar-title{padding-bottom:4px;display:var(--magic-navbar-vertical-title-display)}.magic-navbar.magic-navbar__vertical>ul li svg.magic-icon{width:var(--magic-navbar-vertical-icon-size);height:var(--magic-navbar-vertical-icon-size)}.magic-navbar.magic-navbar__vertical.reverse .magic-navbar-title{padding-top:4px;padding-bottom:0;display:var(--magic-navbar-vertical-title-display)}.magic-tab{width:100%;overflow:hidden;flex-wrap:nowrap;white-space:nowrap;transition:.3s}.magic-tab ul{overflow-x:auto}.magic-tab ul li{display:inline-block;cursor:pointer;padding:0 10px;height:24px;line-height:24px}.magic-tab ul li.selected,.magic-tab ul li:hover,.magic-tab.magic-script-tab ul li.selected:hover,.magic-tab ul li.draggable-target-item{background-color:var(--main-hover-background-color)}.magic-tab.magic-script-tab{border-bottom:1px solid var(--main-border-color);height:30px;position:absolute}.magic-tab.magic-script-tab ul li{height:30px;line-height:30px;border-bottom:3px solid transparent}.magic-tab.magic-script-tab ul li.selected{border-bottom-color:var(--tab-selected-border-color);background-color:var(--tab-selected-background-color)}.magic-table{display:flex;flex-direction:column;box-sizing:border-box}.magic-table .magic-table-body{flex:1;overflow:auto}.magic-table .magic-table-header,.magic-table .magic-table-body .magic-table-row{display:flex;height:var(--magic-table-row-height);line-height:var(--magic-table-row-height);border-bottom:1px solid var(--main-border-color)}.magic-table .magic-table-body .magic-table-row:hover{background-color:var(--main-hover-background-color)}.magic-table .magic-table-column{flex:1;display:inline-flex}.magic-table .magic-table-column span:last-child{flex:1;overflow:hidden;text-overflow:ellipsis;width:0px;white-space:pre}.magic-table .magic-table-column .magic-select{width:100%}.magic-table__border .magic-table-body .magic-table-row{border-bottom:1px solid var(--table-border-color)}.magic-table__border .magic-table-column:not(:last-child){border-right:1px solid var(--table-border-color)}.magic-tree{position:relative;overflow:auto}.magic-tree>ul{position:absolute;top:0;left:0}.magic-tree .magic-tree-item{height:20px;line-height:20px;transition:.3s;word-break:break-all;white-space:nowrap}.magic-tree .magic-tree-item:hover,.magic-tree .magic-tree-item.selected,.magic-tree .magic-tree-item.draggable-target-item{background-color:var(--tree-hover-background-color)}.magic-tree .magic-tree-item .magic-icon{fill:var(--tree-icon-color);margin-right:2px}.magic-tree ul{max-height:99999px;min-width:100%}.magic-tree li{white-space:nowrap;word-break:break-all}.magic-tree .hide{opacity:0;max-height:0;position:relative}.magic-tree svg:not(.root) .magic-icon-datasource{fill:#089910}.magic-dialog[data-v-3e8f0d71]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;text-align:center}.magic-dialog__shade[data-v-3e8f0d71]{background-color:#0000004d}.magic-dialog[data-v-3e8f0d71]:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-.25em}.magic-dialog-main[data-v-3e8f0d71]{background:var(--main-background-color);border:1px solid var(--dialog-border-color);display:inline-block;vertical-align:middle;position:relative;min-width:250px;box-shadow:0 0 8px var(--dialog-shadow-color);max-width:800px;color:var(--main-color);transition:none}.magic-dialog-header[data-v-3e8f0d71]{height:30px;line-height:30px;padding-left:30px;padding-right:75px;background-position:7px 7px;background-repeat:no-repeat;text-align:left}.magic-dialog-header.moveable[data-v-3e8f0d71]{cursor:move}.magic-dialog-header span[data-v-3e8f0d71]{display:inline-block;width:30px;position:absolute;right:0;text-align:center;cursor:pointer;font-size:12px;height:30px;line-height:30px}.magic-dialog-header span[data-v-3e8f0d71]:hover{background-color:#e81123}.magic-dialog-header span:hover .magic-icon[data-v-3e8f0d71]{fill:#fff}.magic-dialog-body[data-v-3e8f0d71]{text-align:left;word-break:break-all}.magic-dialog[data-v-3e8f0d71] .magic-loading{min-width:200px;min-height:200px}.magic-notify[data-v-4a37ceea]{position:absolute;right:40px;bottom:65px;transition:.5s;z-index:999999}.magic-notify .magic-notify-item[data-v-4a37ceea]{background-color:var(--main-background-color);padding:5px;position:relative;border-radius:2px;border:1px solid var(--main-border-color);max-width:280px;box-shadow:0 0 8px var(--dialog-shadow-color)}.magic-notify .magic-notify-item[data-v-4a37ceea]:not(:first-child){margin-top:5px}.magic-notify .magic-notify-item .magic-icon-close[data-v-4a37ceea]{font-size:12px}.magic-notify .magic-notify-item .close[data-v-4a37ceea]{position:absolute;top:2px;right:2px;display:none}.magic-notify .magic-notify-item h3[data-v-4a37ceea]{font-size:12px;height:20px;line-height:20px;display:flex;align-items:center}.magic-notify .magic-notify-item h3 svg[data-v-4a37ceea]{vertical-align:middle;margin-right:2px}.magic-notify .magic-notify-item:hover .close[data-v-4a37ceea]{display:block}.magic-notify .magic-notify-item p[data-v-4a37ceea]{padding:5px 5px 5px 16px}.magic-notify .magic-notify-item .magic-button-group[data-v-4a37ceea]{padding-left:11px}.magic-button-group[data-v-70c60ab6] .magic-button:not(:last-child){margin-right:10px}.magic-button-group.right[data-v-70c60ab6]{text-align:right}.magic-button-group.left[data-v-70c60ab6]{text-align:left}.magic-button-group.center[data-v-70c60ab6]{text-align:center}.magic-button[data-v-d216a404]{height:var(--button-height);line-height:var(--button-height);background-color:var(--button-background-color);text-align:center;padding:0 15px;border:1px solid var(--button-border-color);outline:0;cursor:pointer;color:var(--main-color)}.magic-button.link[data-v-d216a404]{background-color:transparent;color:var(--log-color-link);border:none;padding:0 5px}.magic-button.active[data-v-d216a404],.magic-button[data-v-d216a404]:hover:not(.link){background-color:var(--button-hover-background-color);border-color:var(--button-hover-border-color);color:var(--button-hover-color);border-color:var(--button-border-hover-color)}.magic-checkbox[data-v-61c815ba]{width:100%;height:100%;text-align:center;display:inline-block}.magic-checkbox input[data-v-61c815ba]{display:none}.magic-checkbox input+label[data-v-61c815ba]{position:relative;color:#c9c9c9;font-size:12px;height:var(--magic-input-height);line-height:var(--magic-input-height);width:var(--magic-input-height);user-select:none;display:inline-block}.magic-checkbox input+label[data-v-61c815ba]:after{display:inline-block;background-color:var(--checkbox-background-color);border:1px solid var(--checkbox-border-color);content:"";width:calc(var(--magic-input-height) - 8px);height:calc(var(--magic-input-height) - 8px);line-height:calc(var(--magic-input-height) - 8px);position:absolute;top:4px;left:4px;text-align:center;font-size:12px;color:var(--checkbox-text-color)}.magic-checkbox input:checked+label[data-v-61c815ba]:after{content:"\2714";background-color:var(--checkbox-selected-background-color);border-color:var(--checkbox-selected-border-color)}.magic-checkbox input+label.checkedHalf[data-v-61c815ba]:after{content:"\2501"}.magic-file[data-v-a16f8c8a]{width:100%;position:relative}.magic-file .magic-icon[data-v-a16f8c8a]{position:absolute;right:4px;top:0;height:var(--magic-input-height);line-height:var(--magic-input-height)}.magic-input[data-v-15b9b158]{height:var(--magic-input-height);line-height:var(--magic-input-height);border-radius:0;outline:0;border:1px solid transparent;border-radius:var(--input-border-radius);margin:0;padding:0 0 0 5px;background-color:var(--input-background-color);color:var(--main-color)}.magic-input[data-v-15b9b158]:autofill{background:var(--input-background-color)}.magic-input[data-v-15b9b158]:-webkit-autofill,.magic-input[data-v-15b9b158]:-webkit-autofill:hover,.magic-input[data-v-15b9b158]:-webkit-autofill:focus,.magic-input[data-v-15b9b158]:-webkit-autofill:active{transition:background-color 5000s;-webkit-text-fill-color:var(--main-color)!important}.magic-input[data-v-15b9b158]:focus{border-color:var(--input-focus-color);border-width:var(--input-focus-border-width)}.magic-input__border[data-v-15b9b158]{border-color:var(--input-border-color)}.magic-input[data-v-15b9b158]::-webkit-outer-spin-button,.magic-input[data-v-15b9b158]::-webkit-inner-spin-button{-webkit-appearance:none}.magic-input[type=number][data-v-15b9b158]{-moz-appearance:textfield}.magic-select[data-v-9b6dc9a6]{position:relative;display:inline-block;background:var(--select-background-color);height:var(--magic-input-height);line-height:var(--magic-input-height);width:80px;font-size:12px;text-align:left}.magic-select.inputable[data-v-9b6dc9a6]{background:var(--select-inputable-background-color);border-color:var(--select-inputable-border-color)}.magic-select.border[data-v-9b6dc9a6]{border:1px solid var(--input-border-color)}.magic-select input[data-v-9b6dc9a6]{background:none;border:none;height:var(--magic-input-height);line-height:var(--magic-input-height);border-radius:0;outline:0;padding-left:5px;width:100%;color:var(--main-color)}.magic-select span[data-v-9b6dc9a6]{height:var(--magic-input-height);line-height:var(--magic-input-height);border-radius:0;outline:0;padding-left:5px}.magic-select[data-v-9b6dc9a6]:hover:not(.inputable){background:var(--select-hover-background-color)}.magic-select .magic-icon[data-v-9b6dc9a6]{position:absolute;right:5px;height:100%}.magic-select ul[data-v-9b6dc9a6]{display:block;position:fixed;z-index:10;background:var(--select-option-background-color);border:1px solid var(--select-option-border-color);margin-top:-2px;padding:0;box-sizing:content-box;margin-left:-1px}.magic-select ul li[data-v-9b6dc9a6]{padding:0 5px;width:100%!important;height:var(--magic-input-height);text-overflow:ellipsis;word-break:keep-all;text-align:left}.magic-select ul li[data-v-9b6dc9a6]:hover{background:var(--select-option-hover-background-color);color:var(--select-option-hover-color)}.magic-textarea[data-v-ca6693f6]{line-height:22px;border-radius:0;outline:0;border:1px solid var(--input-border-color);resize:none;background:var(--input-background-color);color:var(--input-color);width:100%;height:100%}.magic-textarea[data-v-ca6693f6]:focus{border-color:var(--input-focus-color)}.magic-avatar-group[data-v-511f7f80]{display:inline-block;height:22px;line-height:22px}.magic-avatar-group .magic-avatar[data-v-511f7f80]{position:relative;margin-left:-5px}.magic-avatar[data-v-73f02f44]{color:#fff;display:inline-block;text-align:center}.magic-api-body[data-v-25300c90]{display:flex;flex:1;height:100%}.magic-api-body>div[data-v-25300c90]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%;display:flex}.magic-api-group[data-v-07a9bc9f]{display:flex;flex-direction:column}.magic-api-group form[data-v-07a9bc9f]{display:flex;padding:5px}.magic-api-group form label[data-v-07a9bc9f]{display:inline-block;width:85px;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px}.magic-api-group+.magic-navbar[data-v-07a9bc9f]{flex-direction:column;overflow:hidden}.magic-api-group+.magic-navbar[data-v-07a9bc9f] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-07a9bc9f] .magic-navbar-body,.magic-navbar[data-v-07a9bc9f] .magic-navbar-item{width:100%;height:100%}.magic-api-group>form .magic-button[data-v-07a9bc9f]{margin-left:10px}.magic-api-info[data-v-31699d76]{display:flex;flex-direction:column}.magic-api-info form[data-v-31699d76]{display:flex;padding:5px}.magic-api-info form label[data-v-31699d76]{display:inline-block;width:75px;height:var(--magic-input-height);line-height:var(--magic-input-height);font-weight:400;text-align:right;padding:0 5px}.magic-api-info+.magic-navbar[data-v-31699d76]{flex-direction:column;overflow:hidden}.magic-api-info+.magic-navbar[data-v-31699d76] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-31699d76] .magic-navbar-body,.magic-navbar[data-v-31699d76] .magic-navbar-item{width:100%;height:100%}.magic-monaco-editor[data-v-7f02b65d]{position:absolute;left:0;right:0;top:0;bottom:0}.magic-table[data-v-bda6618c]{flex:1}.magic-table[data-v-bda6618c] .magic-table-column{display:flex;justify-content:center;text-align:center}.magic-table[data-v-bda6618c] .magic-table-column:first-child{justify-content:unset!important;text-align:unset!important}.magic-data-type[data-v-bda6618c]{display:inline-block;width:0;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;text-align:center}iframe[data-v-27b4e47a]{width:100%;height:100%;border:0}.magic-monaco-editor[data-v-27b4e47a]{position:absolute;left:0;right:0;top:0;bottom:0}.magic-table[data-v-76813707]{flex:1}.magic-table span[data-v-76813707]{padding:0 5px}.magic-table[data-v-051e4f5a]{flex:1}.magic-table[data-v-051e4f5a] .magic-table-column{display:flex;justify-content:center;text-align:center}.magic-table[data-v-051e4f5a] .magic-table-column:first-child{justify-content:unset!important;text-align:unset!important}.magic-data-type[data-v-051e4f5a]{display:inline-block;width:0;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.magic-panel-api-response[data-v-1cf463a0]{width:100%;height:100%;display:flex;flex-direction:column}.magic-panel-api-response[data-v-1cf463a0] .magic-navbar__horizontal>ul{border-top:none;border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-1cf463a0]{flex-direction:column;width:100%;height:100%}.magic-panel-api-response[data-v-1cf463a0] .magic-navbar .magic-navbar-body,.magic-panel-api-response[data-v-1cf463a0] .magic-navbar .magic-navbar-item{width:100%;height:100%}.magic-panel-api-response[data-v-1cf463a0] .magic-navbar .magic-navbar-item{display:flex;position:relative}.magic-global[data-v-03e7bbcc]{display:flex;flex-direction:column;flex:1;width:100%;height:100%}.magic-global>.magic-navbar[data-v-03e7bbcc]{flex-direction:column;overflow:hidden}.magic-global>.magic-navbar[data-v-03e7bbcc] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-03e7bbcc] .magic-navbar-body,.magic-navbar[data-v-03e7bbcc] .magic-navbar-item{width:100%;height:100%}.magic-global .magic-panel-global[data-v-03e7bbcc]{display:flex;width:100%;height:100%}.magic-global[data-v-03e7bbcc] .magic-panel-global>div{flex:1}.magic-panel-toolbar[data-v-332dea14]{width:var(--magic-panel-toolbar-width);border-right:1px solid var(--main-border-color);height:100%;text-align:center}.magic-panel-toolbar li[data-v-332dea14]{cursor:pointer;border-radius:2px;width:var(--magic-panel-toolbar-size);height:var(--magic-panel-toolbar-size);line-height:var(--magic-panel-toolbar-size);margin:3px auto;font-size:1em}.magic-panel-toolbar li[data-v-332dea14]:not(.disabled):hover,.magic-panel-toolbar li:not(.disabled).selected[data-v-332dea14]{background-color:var(--main-hover-icon-background-color)}.magic-panel-toolbar li.disabled[data-v-332dea14] .magic-icon>*{fill:var(--button-disabled-color)}.magic-resource-choose[data-v-4852fc0e]{max-height:400px;overflow:auto}.magic-resource-choose .magic-tree[data-v-4852fc0e]{margin-bottom:5px;min-height:300px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-icon.root{color:var(--main-icon-color)}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox{display:inline;margin-right:3px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox input+label{width:12px!important;height:12px!important}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-tree-item{padding-left:5px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox input+label:after{width:12px!important;height:12px!important;line-height:12px!important;top:0!important;left:0!important}.magic-resource-choose[data-v-4852fc0e] .magic-tree label{color:var(--resource-label-color)}.magic-resource-choose[data-v-4852fc0e] .magic-tree span{color:var(--resource-span-color)}.magic-table[data-v-ef606938]{width:270px;border-right:1px solid var(--table-border-color)}.magic-backup-file[data-v-ef606938]{height:100%;position:relative;overflow:hidden;display:flex}.magic-backup-file-diff-container[data-v-ef606938]{flex:1;overflow:hidden;height:100%;display:flex;flex-direction:column}.magic-backup-file-diff-container>ul[data-v-ef606938]{display:flex}.magic-backup-file-diff-container>ul li[data-v-ef606938]{flex:1;height:30px;line-height:30px;padding:0 5px}.magic-backup-file-diff-container>ul li button[data-v-ef606938]{float:right;margin-right:10px;margin-top:4px}.magic-backup[data-v-b15945c0]{display:flex;flex:1;height:100%}.magic-backup>div[data-v-b15945c0]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%}.magic-backup .magic-table[data-v-b15945c0]{height:100%;position:absolute;width:100%}.magic-backup[data-v-b15945c0] .magic-table-row .magic-table-column:last-child,.magic-backup[data-v-b15945c0] .magic-table-header .magic-table-column:last-child{padding-left:5px}.magic-backup-diff-container[data-v-b15945c0]{width:100%;height:100%;display:flex;flex-direction:column}.magic-backup-diff-container .magic-backup-diff-header[data-v-b15945c0]{height:30px;line-height:30px;display:flex}.magic-backup-diff-container .magic-backup-diff-header>div[data-v-b15945c0]{flex:1}.magic-backup-diff-container .magic-backup-diff-header>div[data-v-b15945c0]:last-child{text-align:right}.magic-dialog-diff .magic-dialog-main{display:inline-flex;flex-direction:column}.magic-dialog-diff .magic-dialog-main .magic-dialog-body{flex:1;display:flex;flex-direction:column}.magic-panel-toolbar[data-v-71b796dc] .magic-icon-continue{fill:var(--icon-debug-color)}.magic-panel-toolbar[data-v-71b796dc] .magic-icon-step-over{fill:var(--icon-step-color)}.magic-debug[data-v-71b796dc]{display:flex;flex:1}.magic-debug .magic-debug-variables[data-v-71b796dc]{flex:1;background-color:var(--navbar-body-background-color);position:relative;overflow:auto}.magic-debug[data-v-71b796dc] .magic-tree{position:absolute;width:100%;height:100%}.magic-debug[data-v-71b796dc] .magic-tree .magic-tree-item{height:auto}.magic-debug .object-type[data-v-71b796dc]{color:var(--resource-span-color)}.magic-debug label.key[data-v-71b796dc]{color:var(--data-type-key-color);padding-left:3px}.magic-debug label.separator[data-v-71b796dc]{padding:0 5px}.magic-debug svg[data-v-71b796dc]{display:inline-block;width:16px;height:16px;vertical-align:middle}.magic-event[data-v-06d5ba36],.magic-event[data-v-06d5ba36] .magic-table{display:flex;flex:1}.magic-event>div[data-v-06d5ba36]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%}.magic-event[data-v-06d5ba36] .magic-table{height:100%;position:absolute;width:100%}.magic-event[data-v-06d5ba36] .magic-table .magic-table-header{display:none}.magic-event[data-v-06d5ba36] .magic-table .magic-table-row{border-right:1px solid var(--main-border-color)}.magic-event[data-v-06d5ba36] .magic-table .magic-table-column{padding-left:5px}.magic-log-wrapper{display:flex;flex:1;height:100%;overflow:hidden;position:relative}.magic-log{font-size:13.5px;padding:5px;flex:1;overflow:auto;position:absolute;top:0;right:0;bottom:0;left:var(--magic-panel-toolbar-width)}.magic-log>div{width:100%}.magic-log>div pre{line-height:20px;width:100%}.magic-log>div.multiple pre{max-height:60px;overflow:hidden}.magic-log>div.multiple.more pre{max-height:none}.magic-log span.multiple{opacity:.5;font-size:13px;text-decoration:underline;cursor:pointer}.magic-log pre span.log-INFO{color:var(--log-color-info)}.magic-log pre span.log-DEBUG{color:var(--log-color-debug)}.magic-log pre span.log-ERROR{color:var(--log-color-error)}.magic-log pre span.log-WARN{color:var(--log-color-warn)}.magic-log pre span.log-TRACE{color:var(--log-color-trace)}.magic-log pre span.log-cyan{color:var(--log-color-cyan)}.magic-log pre a.log-link{color:var(--log-color-link)}.magic-online[data-v-0c296fa2]{height:30px;line-height:30px;float:right;padding-left:10px;max-width:500px}.magic-online>span[data-v-0c296fa2]{padding-left:5px}.magic-status-bar[data-v-55e90cbc]{height:30px;line-height:30px;display:flex;background-color:var(--main-background-color);padding-left:24px}.magic-status-bar .message[data-v-55e90cbc]{flex:1}.magic-status-bar ul[data-v-55e90cbc]{float:right;display:inline-flex;align-items:center;padding-right:2px}.magic-status-bar ul li[data-v-55e90cbc]{cursor:pointer;padding:0 4px;height:20px;line-height:20px;border-radius:3px}.magic-status-bar ul li .magic-icon[data-v-55e90cbc]{height:20px;line-height:20px}.magic-status-bar ul li[data-v-55e90cbc]:hover{background-color:var(--main-hover-icon-background-color)}.magic-todo[data-v-29308d9b]{display:flex;flex:1}.magic-todo div[data-v-29308d9b]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative}.magic-todo div[data-v-29308d9b] .magic-tree{width:100%;height:100%;position:absolute;overflow:auto}.magic-todo div[data-v-29308d9b] .magic-tree label{color:var(--resource-label-color)}.magic-todo div[data-v-29308d9b] .magic-tree label.todo{font-style:italic;color:var(--todo-color)}.magic-todo div[data-v-29308d9b] .magic-tree span{color:var(--resource-span-color)}.magic-toolbar .magic-navbar[data-v-68b3ca3b]{flex-direction:column-reverse}.magic-toolbar-header[data-v-68b3ca3b]{height:26px;line-height:26px;border-bottom:1px solid var(--main-border-color);border-top:1px solid var(--main-border-color);background-color:var(--main-background-color)}.magic-toolbar-header+div[data-v-68b3ca3b]{z-index:99999}.magic-toolbar-header label[data-v-68b3ca3b]{display:inline-block;padding-left:10px}.magic-toolbar .magic-resizer-y[data-v-68b3ca3b]{flex-direction:column}.magic-toolbar-header-buttons[data-v-68b3ca3b]{float:right;margin-right:5px;vertical-align:middle;display:flex;align-items:center;height:26px}.magic-toolbar-header-buttons .magic-icon[data-v-68b3ca3b]{display:inline-block;cursor:pointer;padding:0 2px;height:18px;line-height:18px;border-radius:3px;z-index:99999}.magic-toolbar-header-buttons .magic-icon[data-v-68b3ca3b]:hover{background-color:var(--main-hover-icon-background-color)}.magic-toolbar .magic-navbar[data-v-68b3ca3b] .magic-navbar-body{background-color:var(--main-background-color)}.magic-panel-api,.magic-panel-function,.magic-event{display:flex;width:100%;height:100%}.magic-panel-api>div,.magic-panel-function>div,.magic-event>div{flex:1}.magic-function-info[data-v-bc8654ec]{display:flex;flex-direction:column}.magic-function-info form[data-v-bc8654ec]{display:flex;padding:5px}.magic-function-info form label[data-v-bc8654ec]{display:inline-block;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px 0 20px}.magic-navbar[data-v-bc8654ec]{flex-direction:column;overflow:hidden}.magic-navbar[data-v-bc8654ec] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-bc8654ec] .magic-navbar-body,.magic-navbar[data-v-bc8654ec] .magic-navbar-item{width:100%;height:100%}.magic-dialog[data-v-097eba83] .magic-dialog-body{overflow:hidden}.magic-header[data-v-1e7d7426]{height:var(--magic-header-height);line-height:var(--magic-header-height);background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color);display:flex;color:var(--header-default-color)}.magic-header .magic-logo[data-v-1e7d7426]{float:left;font-weight:700;font-size:0;letter-spacing:0;background-repeat:no-repeat;background-position:var(--magic-header-logo-background-position);background-size:var(--magic-header-logo-background-size);padding-left:var(--magic-header-logo-padding);color:var(--header-title-color)}.magic-header .magic-logo label[data-v-1e7d7426]{font-size:16px;display:inline-block;margin-right:5px;text-align:left;font-weight:400}.magic-header .magic-logo label[data-v-1e7d7426]:last-child{font-size:12px}.magic-header ul[data-v-1e7d7426]{float:right}.magic-header ul li[data-v-1e7d7426]{cursor:pointer;height:var(--magic-header-height);text-align:center;display:inline-flex;align-items:center}.magic-header ul li svg[data-v-1e7d7426]{padding:0 4px;height:var(--magic-header-icon-size);width:var(--magic-header-icon-size);border-radius:4px}.magic-header ul li.disabled svg[data-v-1e7d7426]{fill:var(--button-disabled-color)}.magic-header ul li:not(.disabled) svg[data-v-1e7d7426]:hover{background-color:var(--main-hover-icon-background-color)}.magic-header ul li[data-v-1e7d7426]:not(.disabled) .magic-icon-run,.magic-header ul li[data-v-1e7d7426] .magic-icon-push{fill:#59a869}.magic-header-title[data-v-1e7d7426]{flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.magic-skin-selector[data-v-1e7d7426],.magic-locale-selector[data-v-1e7d7426]{position:absolute;top:var(--magic-header-height);right:24px;z-index:20;background-color:var(--main-background-color);border:1px solid var(--main-border-color);border-top:none}.magic-skin-selector[data-v-1e7d7426]{right:48px}.magic-skin-selector ul li[data-v-1e7d7426],.magic-locale-selector ul li[data-v-1e7d7426]{height:24px;line-height:24px;text-align:center;cursor:pointer;padding:2px 5px}.magic-skin-selector ul li[data-v-1e7d7426]:not(:last-child),.magic-locale-selector ul li[data-v-1e7d7426]:not(:last-child){border-bottom:1px solid var(--main-border-color)}.magic-skin-selector ul li[data-v-1e7d7426]:hover,.magic-locale-selector ul li[data-v-1e7d7426]:hover{background-color:var(--select-option-hover-background-color);color:var(--select-option-hover-color)}.magic-dialog[data-v-440447fe] .magic-dialog-body{overflow:hidden}.magic-push-form[data-v-440447fe]{padding:0 10px}.magic-push-form>div[data-v-440447fe]{display:flex;margin-top:5px}.magic-push-form label[data-v-440447fe]{width:80px;text-align:right;display:inline-block;height:var(--magic-input-height);line-height:var(--magic-input-height)}.magic-push-form[data-v-440447fe] .magic-input{width:auto!important;flex:1}.magic-search-result[data-v-4bbc2d10]{overflow:auto;max-height:200px;background-color:var(--navbar-body-background-color)}.magic-search-result .magic-search-result-item[data-v-4bbc2d10]{display:flex;padding:0 5px;line-height:20px}.magic-search-result .magic-search-result-item[data-v-4bbc2d10]:hover,.magic-search-result .magic-search-result-item.selected[data-v-4bbc2d10]{background-color:var(--tree-hover-background-color)}.magic-search-result .magic-search-result-item .label[data-v-4bbc2d10]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.magic-search-result .magic-search-result-item .label[data-v-4bbc2d10] .keyword{background:#FFDE7B;color:#000}.magic-search-result-item .name[data-v-4bbc2d10],.magic-search-result-item .line[data-v-4bbc2d10]{color:var(--resource-span-color)}.magic-search-result .magic-search-result-item .line[data-v-4bbc2d10]{padding-left:5px}.display-text[data-v-4bbc2d10]{height:30px;line-height:30px;border-top:1px solid var(--main-border-color);border-bottom:1px solid var(--main-border-color)}.magic-data-resource[data-v-4f1250a4]{display:flex;flex-direction:column;flex:1;width:100%}.magic-data-resource .magic-data-resource-header[data-v-4f1250a4]{height:24px;line-height:24px;display:flex;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color);padding-left:3px}.magic-data-resource .magic-data-resource-header input[data-v-4f1250a4]{flex:1;border:none;background:none;height:24px;line-height:24px}.magic-data-resource .magic-data-resource-header ul[data-v-4f1250a4]{display:inline-flex;align-items:center}.magic-data-resource .magic-data-resource-header ul li[data-v-4f1250a4]{display:inline-block;cursor:pointer;padding:0 3px;height:20px;line-height:20px;border-radius:3px}.magic-data-resource .magic-data-resource-header ul li.separator[data-v-4f1250a4]{background-color:var(--main-border-color);width:1px;border-radius:0;padding:0;margin:0 4px}.magic-data-resource .magic-data-resource-header ul li[data-v-4f1250a4]:hover{background:var(--main-hover-icon-background-color)}.magic-data-resource .magic-data-resource-header svg[data-v-4f1250a4]{height:100%}.magic-data-resource>ul[data-v-4f1250a4]{height:100%;overflow:auto}.magic-data-resource>ul li[data-v-4f1250a4]{line-height:22px;padding-left:10px;white-space:nowrap}.magic-data-resource>ul li[data-v-4f1250a4]:hover{background-color:var(--tree-hover-background-color)}.magic-data-resource>ul li .magic-icon[data-v-4f1250a4]{padding-right:2px}.magic-data-resource>ul li label[data-v-4f1250a4]{color:var(--resource-label-color)}.magic-data-resource>ul li span[data-v-4f1250a4]{color:var(--resource-span-color);display:inline-block;height:22px;line-height:22px}.magic-data-resource>ul li[data-v-4f1250a4] .magic-icon-datasource{fill:#089910}.magic-editor .magic-form-row{display:flex;margin-bottom:5px}.magic-editor .magic-form-row label{margin-right:5px;display:inline-block;width:70px;text-align:right;height:var(--magic-input-height);line-height:var(--magic-input-height)}.magic-editor .magic-form-row>input,.magic-editor .magic-form-row>.magic-select{flex:1;width:auto}label[data-v-cbcc40fa]{width:60px;text-align:right;display:inline-block}.magic-login[data-v-cbcc40fa]{position:fixed;z-index:999999999999;background:#fff;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-image:url(./login-bg.025a11cc.svg)}.magic-login .magic-login-box[data-v-cbcc40fa]{border-radius:5px;width:450px;box-shadow:0 7px 25px #00000014;position:absolute;box-sizing:border-box;padding-top:60px;top:33.333333%;margin-top:-125px;background-color:#fff}.magic-login-logo[data-v-cbcc40fa]{background-image:url(./logo-magic-api.7bf52c65.png);width:128px;height:128px;background-size:90px 90px;background-repeat:no-repeat;background-position:center center;position:absolute;top:-64px;left:50%;margin-left:-64px;border-radius:64px;box-shadow:0 0 20px 5px #00000014;padding:10px;background-color:#fff}.magic-login-text[data-v-cbcc40fa]{height:70px;line-height:70px;display:block;text-align:center;font-family:PoetsenOne;font-size:28px;color:gray}.magic-login-text span[data-v-cbcc40fa]{font-size:16px}.magic-login-copyright[data-v-cbcc40fa]{text-align:center;color:#999;font-size:18px;font-family:Avenir,Helvetica,Arial,sans-serif;position:absolute;bottom:50px}.magic-login-copyright a[data-v-cbcc40fa]{text-decoration:none;color:#2196f3;outline:0}.magic-login-row[data-v-cbcc40fa]{width:400px;margin:25px auto;position:relative}.magic-login-row.error[data-v-cbcc40fa]{background-color:#fff1f0;border:1px solid #ffa39e;color:#000;border-radius:4px;padding:10px 0 10px 40px}.magic-login-row.error span[data-v-cbcc40fa]{font-size:14px;word-break:break-all}.magic-login-row svg[data-v-cbcc40fa]{position:absolute;width:20px;height:20px;top:15px;left:15px}.magic-login-row.error svg[data-v-cbcc40fa]{top:10px}.magic-login-row[data-v-cbcc40fa] .magic-icon-error{fill:red}.magic-login-box .magic-input[data-v-cbcc40fa]{height:50px;line-height:50px;background-color:transparent;display:block;border:1px solid #D9D9D9;border-radius:4px;padding-left:40px;color:#000000a6;transition:all .3s;font-size:16px}.magic-login-box .magic-input[data-v-cbcc40fa]:focus{border-color:#0784de}.magic-login-box .magic-button[data-v-cbcc40fa]{width:100%;height:50px;line-height:50px;background-color:#2196f3;color:#fff;border-radius:4px;font-size:18px;border-color:#2196f3;transition:all .3s}.magic-login-box .magic-button[data-v-cbcc40fa]:hover,.magic-login-box .magic-button[data-v-cbcc40fa]:focus{background-color:#4db5ff!important;border-color:#4db5ff!important;color:#fff!important}.magic-login-box .magic-button[data-v-cbcc40fa]:active{background-color:#1272cc;border-color:#1272cc}.magic-main[data-v-478ba993]{flex:1;display:flex;border-bottom:1px solid var(--main-border-color);height:0;width:100%}.magic-main-body-wrapper[data-v-478ba993]{display:flex;flex:1;flex-direction:column}.magic-main-body[data-v-478ba993]{display:flex;flex:1;overflow:hidden}.magic-toolbar[data-v-478ba993] .magic-resizer-y .magic-resizer-event{top:auto}ul[data-v-44903aa6]{max-width:400px;max-height:600px;overflow:auto}ul li[data-v-44903aa6]:hover{background-color:var(--tree-hover-background-color)}ul li[data-v-44903aa6]{height:20px;line-height:20px;transition:.3s;word-break:break-all;white-space:nowrap}ul li label[data-v-44903aa6]{color:var(--resource-label-color)}ul li span[data-v-44903aa6]{color:var(--resource-span-color)}.magic-dialog-main[data-v-44903aa6] .magic-dialog-body{padding:0}.magic-resource[data-v-713f021e]{display:flex;flex-direction:column;flex:1;width:100%}.magic-resource .magic-resource-header[data-v-713f021e]{height:24px;line-height:24px;display:flex;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color)}.magic-resource .magic-resource-header input[data-v-713f021e]{flex:1;border:none;background:none;height:24px;line-height:24px}.magic-resource .magic-resource-header ul[data-v-713f021e]{display:var(--magic-resource-header-icon-display);align-items:center}.magic-resource:hover .magic-resource-header ul[data-v-713f021e]{display:inline-flex}.magic-resource .magic-resource-header ul li[data-v-713f021e]{display:inline-block;cursor:pointer;padding:0 3px;height:20px;line-height:20px;border-radius:3px}.magic-resource .magic-resource-header svg[data-v-713f021e]{height:100%}.magic-resource .magic-resource-header ul li.separator[data-v-713f021e]{background-color:var(--main-border-color);width:1px;border-radius:0;padding:0;margin:0 4px}.magic-resource .magic-resource-header ul li[data-v-713f021e]:hover{background:var(--main-hover-icon-background-color)}.magic-resource .magic-tree label[data-v-713f021e]{color:var(--resource-label-color)}.magic-resource .magic-tree span[data-v-713f021e]{color:var(--resource-span-color)}.magic-resource .magic-tree .magic-icon-lock[data-v-713f021e]{fill:var(--resource-label-color);margin-left:5px}.magic-resource>.magic-tree[data-v-713f021e]{flex:1;overflow:auto}.magic-create-group li[data-v-713f021e]{display:flex;height:26px;line-height:26px}.magic-create-group li[data-v-713f021e]:not(:first-child){margin-top:4px}.magic-create-group li input[data-v-713f021e]{flex:1}.magic-resource[data-v-713f021e] .magic-avatar-group{margin-left:10px}.magic-script-editor[data-v-6435d26c]{flex:1;overflow:hidden;position:relative}.magic-script-editor .magic-monaco-editor-wrapper[data-v-6435d26c]{position:absolute;top:30px;left:0;right:0;bottom:0}.magic-empty-container[data-v-6435d26c]{flex:1;position:relative;width:100%;height:100%;background:var(--empty-background-color)}.magic-hot-key[data-v-6435d26c]{position:absolute;top:50%;margin-top:-105px;text-align:center;color:var(--empty-color);font-size:16px;width:100%}.magic-hot-key p[data-v-6435d26c]{display:inline-block;text-align:left;line-height:30px}.magic-hot-key p em[data-v-6435d26c]{margin-left:15px;font-style:normal;color:var(--empty-key-color)}.magic-monaco-editor[data-v-6435d26c]{position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible!important}.magic-script-editor[data-v-6435d26c] .magic-avatar-group{margin-left:10px}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs .view-overlays .current-line,.monaco-editor.vs-dark .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs .cursor,.monaco-editor.vs-dark .cursor{background-color:windowtext!important}.monaco-editor.vs .dnd-target,.monaco-editor.vs-dark .dnd-target{border-color:windowtext!important}.monaco-editor.vs .selected-text,.monaco-editor.vs-dark .selected-text{background-color:highlight!important}.monaco-editor.vs .view-line,.monaco-editor.vs-dark .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs .view-line span,.monaco-editor.vs-dark .view-line span{color:windowtext!important}.monaco-editor.vs .view-line span.inline-selected-text,.monaco-editor.vs-dark .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs .view-overlays,.monaco-editor.vs-dark .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs .selectionHighlight,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs .wordHighlightStrong,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs-dark .reference-decoration{border:2px dotted highlight!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .rangeHighlight,.monaco-editor.vs-dark .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs .bracket-match,.monaco-editor.vs-dark .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs .findMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs-dark .currentFindMatch{border:2px dotted activeborder!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .find-widget,.monaco-editor.vs-dark .find-widget{border:1px solid windowtext}.monaco-editor.vs .monaco-list .monaco-list-row,.monaco-editor.vs-dark .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs .monaco-list .monaco-list-row.focused,.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-list .monaco-list-row:hover,.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:highlight!important}.monaco-editor.vs .decorationsOverviewRuler,.monaco-editor.vs-dark .decorationsOverviewRuler{opacity:0}.monaco-editor.vs .minimap,.monaco-editor.vs-dark .minimap{display:none}.monaco-editor.vs .squiggly-d-error,.monaco-editor.vs-dark .squiggly-d-error{background:transparent!important;border-bottom:4px double #E47777}.monaco-editor.vs .squiggly-c-warning,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs-dark .squiggly-b-info{border-bottom:4px double #71B771}.monaco-editor.vs .squiggly-a-hint,.monaco-editor.vs-dark .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs .diffOverviewRuler,.monaco-diff-editor.vs-dark .diffOverviewRuler{display:none}.monaco-editor.vs .line-insert,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs-dark .line-delete{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs .char-insert,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs-dark .char-delete{background:transparent!important}}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.vs-dark .mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.hc-black.mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:#ddd 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:#ddd 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:#ddd 6px 6px 6px -6px inset}.vs .monaco-scrollable-element>.scrollbar>.slider{background:rgba(100,100,100,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:rgba(121,121,121,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(100,100,100,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(191,191,191,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(111,195,223,1)}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:#000 6px 0 6px -6px inset}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:#000 6px 6px 6px -6px inset}.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .lines-content .core-guide{position:absolute}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{position:absolute;top:0;background:white}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:rgba(255,255,255,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:rgba(0,0,0,0)}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:rgba(171,171,171,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}:root{--sash-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--sash-size) * 2);width:calc(var(--sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size) * -.5);top:calc(var(--sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--sash-size) * -.5);bottom:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--sash-size) * -.5);left:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--sash-size) * -.5);right:calc(var(--sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color .1s ease-out;background:transparent}.monaco-sash.vertical:before{width:var(--sash-hover-size);left:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.debug{background:cyan}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}@font-face{font-family:codicon;font-display:block;src:url(./codicon.d86f69b1.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}.context-view .monaco-menu{min-width:130px}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter{display:flex;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:flex;align-items:center;box-sizing:border-box;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;flex-shrink:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:grab}.monaco-list-type-filter.dragging{cursor:grabbing}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent}.monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight,.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight,.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button>.codicon{margin:0 .2em;color:inherit!important}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear;transform:translateZ(0)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.quick-input-widget{position:absolute;width:600px;z-index:2000;padding:0 1px 1px;left:50%;margin-left:-300px}.quick-input-titlebar{display:flex;align-items:center}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;padding:6px 6px 0;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:27.5px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px 5px 2px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:1px 4px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{display:flex;align-items:center;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;-ms-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:center;font-size:13px;margin-left:20px;min-width:0}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta,.monaco-editor .peekview-widget .head .peekview-title .dirname{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,.hc-black .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-dropdown-with-default>.action-container.menu-entry>.action-label,.hc-black .monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-hover{cursor:default;position:absolute;overflow:hidden;z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;box-sizing:initial;animation:fadein .1s linear;line-height:1.5em}.monaco-hover.hidden{display:none}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:500px;word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .colorpicker-hover:focus{outline:none}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:216px;line-height:24px;cursor:pointer;color:#fff;flex:1;text-align:center}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,#ff0000 0%,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid transparent;overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{opacity:.5;color:inherit}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text{font-style:italic}.monaco-editor.vs .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines{cursor:copy}.monaco-custom-checkbox{margin-left:2px;float:left;cursor:pointer;overflow:hidden;opacity:.7;width:20px;height:20px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-custom-checkbox:hover,.monaco-custom-checkbox.checked{opacity:1}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px))}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:4px 0 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{opacity:.3;cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:rgba(255,255,255,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:rgba(255,255,255,.44)}99%{background:transparent}}.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:gray;margin:.1em .2em 0;content:"\22ef";display:inline;line-height:1em;cursor:pointer}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{z-index:10;display:flex;flex-direction:column;line-height:1.5em}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;opacity:.5;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700;text-decoration:underline}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .accessibilityHelpWidget{padding:10px;vertical-align:middle;overflow:scroll}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:10px}.tokens-inspect-separator{height:1px;border:0}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)} diff --git a/src/main/resources/magic-editor/assets/vendor.3be44c84.js b/src/main/resources/magic-editor/assets/vendor.3be44c84.js index 83906155eb9e48622e13f02744ae47e38a80ba8d..123d024e3fc3901519c101f0442fd7ea69d4cdee 100644 --- a/src/main/resources/magic-editor/assets/vendor.3be44c84.js +++ b/src/main/resources/magic-editor/assets/vendor.3be44c84.js @@ -1,3 +1,20 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ import{g as LH}from"./axios.23e7b955.js";import{_ as Te}from"./app.a9d6cb03.js";var TH=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},vR=typeof Symbol!="undefined"&&Symbol,IH=TH,DH=function(){return typeof vR!="function"||typeof Symbol!="function"||typeof vR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:IH()},AH="Function.prototype.bind called on incompatible ",HS=Array.prototype.slice,NH=Object.prototype.toString,RH="[object Function]",OH=function(e){var t=this;if(typeof t!="function"||NH.call(t)!==RH)throw new TypeError(AH+t);for(var i=HS.call(arguments,1),n,s=function(){if(this instanceof n){var d=t.apply(this,i.concat(HS.call(arguments)));return Object(d)===d?d:this}else return t.apply(e,i.concat(HS.call(arguments)))},o=Math.max(0,t.length-i.length),a=[],l=0;l1&&typeof t!="boolean")throw new af('"allowMissing" argument must be a boolean');if(UH(/^%?[^%]*%?$/,e)===null)throw new Af("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=qH(e),n=i.length>0?i[0]:"",s=GH("%"+n+"%",t),o=s.name,a=s.value,l=!1,c=s.alias;c&&(n=c[0],$H(i,HH([0,1],c)));for(var d=1,u=!0;d=i.length){var p=Rd(a,h);u=!!p,u&&"get"in p&&!("originalValue"in p.get)?a=p.get:a=a[h]}else u=AC(a,h),a=a[h];u&&!l&&(lf[o]=a)}}return a},pB={exports:{}};(function(r){var e=KI,t=YI,i=t("%Function.prototype.apply%"),n=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(n,i),o=t("%Object.getOwnPropertyDescriptor%",!0),a=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}r.exports=function(u){var h=s(e,n,arguments);if(o&&a){var f=o(h,"length");f.configurable&&a(h,"length",{value:1+l(0,u.length-(arguments.length-1))})}return h};var c=function(){return s(e,i,arguments)};a?a(r.exports,"apply",{value:c}):r.exports.apply=c})(pB);var mB=YI,_B=pB.exports,KH=_B(mB("String.prototype.indexOf")),YH=function(e,t){var i=mB(e,!!t);return typeof i=="function"&&KH(e,".prototype.")>-1?_B(i):i},ZH={},XH=Object.freeze(Object.defineProperty({__proto__:null,default:ZH},Symbol.toStringTag,{value:"Module"})),QH=LH(XH),ZI=typeof Map=="function"&&Map.prototype,zS=Object.getOwnPropertyDescriptor&&ZI?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,RC=ZI&&zS&&typeof zS.get=="function"?zS.get:null,JH=ZI&&Map.prototype.forEach,XI=typeof Set=="function"&&Set.prototype,jS=Object.getOwnPropertyDescriptor&&XI?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,OC=XI&&jS&&typeof jS.get=="function"?jS.get:null,e$=XI&&Set.prototype.forEach,t$=typeof WeakMap=="function"&&WeakMap.prototype,Op=t$?WeakMap.prototype.has:null,i$=typeof WeakSet=="function"&&WeakSet.prototype,Mp=i$?WeakSet.prototype.has:null,n$=typeof WeakRef=="function"&&WeakRef.prototype,yR=n$?WeakRef.prototype.deref:null,r$=Boolean.prototype.valueOf,s$=Object.prototype.toString,o$=Function.prototype.toString,a$=String.prototype.match,QI=String.prototype.slice,Xl=String.prototype.replace,l$=String.prototype.toUpperCase,SR=String.prototype.toLowerCase,bB=RegExp.prototype.test,xR=Array.prototype.concat,Fo=Array.prototype.join,c$=Array.prototype.slice,ER=Math.floor,EE=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qS=Object.getOwnPropertySymbols,kE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ir=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Nf?"object":"symbol")?Symbol.toStringTag:null,vB=Object.prototype.propertyIsEnumerable,kR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function LR(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||bB.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-ER(-r):ER(r);if(i!==r){var n=String(i),s=QI.call(e,n.length+1);return Xl.call(n,t,"$&_")+"."+Xl.call(Xl.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Xl.call(e,t,"$&_")}var LE=QH,TR=LE.custom,IR=wB(TR)?TR:null,d$=function r(e,t,i,n){var s=t||{};if(Hl(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Hl(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Hl(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Hl(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Hl(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return SB(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?LR(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?LR(e,c):c}var d=typeof s.depth=="undefined"?5:s.depth;if(typeof i=="undefined"&&(i=0),i>=d&&d>0&&typeof e=="object")return TE(e)?"[Array]":"[Object]";var u=T$(s,i);if(typeof n=="undefined")n=[];else if(yB(n,e)>=0)return"[Circular]";function h(j,ne,J){if(ne&&(n=c$.call(n),n.push(ne)),J){var N={depth:s.depth};return Hl(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),r(j,N,i+1,n)}return r(j,s,i+1,n)}if(typeof e=="function"&&!DR(e)){var f=v$(e),g=kb(e,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(g.length>0?" { "+Fo.call(g,", ")+" }":"")}if(wB(e)){var p=Nf?Xl.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):kE.call(e);return typeof e=="object"&&!Nf?zg(p):p}if(E$(e)){for(var _="<"+SR.call(String(e.nodeName)),v=e.attributes||[],b=0;b",_}if(TE(e)){if(e.length===0)return"[]";var C=kb(e,h);return u&&!L$(C)?"["+IE(C,u)+"]":"[ "+Fo.call(C,", ")+" ]"}if(f$(e)){var y=kb(e,h);return!("cause"in Error.prototype)&&"cause"in e&&!vB.call(e,"cause")?"{ ["+String(e)+"] "+Fo.call(xR.call("[cause]: "+h(e.cause),y),", ")+" }":y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Fo.call(y,", ")+" }"}if(typeof e=="object"&&o){if(IR&&typeof e[IR]=="function"&&LE)return LE(e,{depth:d-i});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(C$(e)){var E=[];return JH.call(e,function(j,ne){E.push(h(ne,e,!0)+" => "+h(j,e))}),AR("Map",RC.call(e),E,u)}if(S$(e)){var S=[];return e$.call(e,function(j){S.push(h(j,e))}),AR("Set",OC.call(e),S,u)}if(w$(e))return GS("WeakMap");if(x$(e))return GS("WeakSet");if(y$(e))return GS("WeakRef");if(p$(e))return zg(h(Number(e)));if(_$(e))return zg(h(EE.call(e)));if(m$(e))return zg(r$.call(e));if(g$(e))return zg(h(String(e)));if(!h$(e)&&!DR(e)){var w=kb(e,h),x=kR?kR(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",M=!x&&ir&&Object(e)===e&&ir in e?QI.call(Wc(e),8,-1):D?"Object":"",W=x||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",z=W+(M||D?"["+Fo.call(xR.call([],M||[],D||[]),": ")+"] ":"");return w.length===0?z+"{}":u?z+"{"+IE(w,u)+"}":z+"{ "+Fo.call(w,", ")+" }"}return String(e)};function CB(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function u$(r){return Xl.call(String(r),/"/g,""")}function TE(r){return Wc(r)==="[object Array]"&&(!ir||!(typeof r=="object"&&ir in r))}function h$(r){return Wc(r)==="[object Date]"&&(!ir||!(typeof r=="object"&&ir in r))}function DR(r){return Wc(r)==="[object RegExp]"&&(!ir||!(typeof r=="object"&&ir in r))}function f$(r){return Wc(r)==="[object Error]"&&(!ir||!(typeof r=="object"&&ir in r))}function g$(r){return Wc(r)==="[object String]"&&(!ir||!(typeof r=="object"&&ir in r))}function p$(r){return Wc(r)==="[object Number]"&&(!ir||!(typeof r=="object"&&ir in r))}function m$(r){return Wc(r)==="[object Boolean]"&&(!ir||!(typeof r=="object"&&ir in r))}function wB(r){if(Nf)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!kE)return!1;try{return kE.call(r),!0}catch{}return!1}function _$(r){if(!r||typeof r!="object"||!EE)return!1;try{return EE.call(r),!0}catch{}return!1}var b$=Object.prototype.hasOwnProperty||function(r){return r in this};function Hl(r,e){return b$.call(r,e)}function Wc(r){return s$.call(r)}function v$(r){if(r.name)return r.name;var e=a$.call(o$.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function yB(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return SB(QI.call(r,0,e.maxStringLength),e)+i}var n=Xl.call(Xl.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,k$);return CB(n,"single",e)}function k$(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+l$.call(e.toString(16))}function zg(r){return"Object("+r+")"}function GS(r){return r+" { ? }"}function AR(r,e,t,i){var n=i?IE(t,i):Fo.call(t,", ");return r+" ("+e+") {"+n+"}"}function L$(r){for(var e=0;e=0)return!1;return!0}function T$(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Fo.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Fo.call(Array(e+1),t)}}function IE(r,e){if(r.length===0)return"";var t=` `+e.prev+e.base;return t+Fo.call(r,","+t)+` diff --git a/src/main/resources/magic-editor/assets/vue.6f28a6f0.js b/src/main/resources/magic-editor/assets/vue.6f28a6f0.js index 985847dbb35c5218d4769744e565665e477e94c6..d9fd2d96ae60a4793f6f23faf4b03eabe07e347c 100644 --- a/src/main/resources/magic-editor/assets/vue.6f28a6f0.js +++ b/src/main/resources/magic-editor/assets/vue.6f28a6f0.js @@ -1 +1,18 @@ +/* + * java-magic-api - 基于Magic-api的工程,用于数据接口配置项目,可通过配置SQL、mybatis方式实现api输出,支持配置promQL编写Prometheus脚本,实现监控流数据和即时状态查询机展示 + * Copyright © 2020-2025 Linlan (open@linlan.net) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ function On(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r!!n[r.toLowerCase()]:r=>!!n[r]}const No="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",Bo=On(No);function en(e){if(I(e)){const t={};for(let n=0;n{if(n){const s=n.split(Lo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tn(e){let t="";if(se(e))t=e;else if(I(e))for(let n=0;nXe(n,t))}const Vo=e=>se(e)?e:e==null?"":I(e)||G(e)&&(e.toString===Qr||!$(e.toString))?JSON.stringify(e,Zr,2):String(e),Zr=(e,t)=>t&&t.__v_isRef?Zr(e,t.value):Tt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:yt(t)?{[`Set(${t.size})`]:[...t.values()]}:G(t)&&!I(t)&&!Gr(t)?String(t):t,Q={},wt=[],Pe=()=>{},Wo=()=>!1,qo=/^on[^a-z]/,nn=e=>qo.test(e),Ps=e=>e.startsWith("onUpdate:"),ie=Object.assign,Ss=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Jo=Object.prototype.hasOwnProperty,Y=(e,t)=>Jo.call(e,t),I=Array.isArray,Tt=e=>sn(e)==="[object Map]",yt=e=>sn(e)==="[object Set]",hr=e=>sn(e)==="[object Date]",$=e=>typeof e=="function",se=e=>typeof e=="string",Jt=e=>typeof e=="symbol",G=e=>e!==null&&typeof e=="object",Fs=e=>G(e)&&$(e.then)&&$(e.catch),Qr=Object.prototype.toString,sn=e=>Qr.call(e),Yo=e=>sn(e).slice(8,-1),Gr=e=>sn(e)==="[object Object]",Ms=e=>se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Dt=On(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},zo=/-(\w)/g,_e=Nn(e=>e.replace(zo,(t,n)=>n?n.toUpperCase():"")),Xo=/\B([A-Z])/g,ve=Nn(e=>e.replace(Xo,"-$1").toLowerCase()),rn=Nn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ut=Nn(e=>e?`on${rn(e)}`:""),Pt=(e,t)=>!Object.is(e,t),vt=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ue=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let pr;const Zo=()=>pr||(pr=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Ce;class Os{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Ce,!t&&Ce&&(this.index=(Ce.scopes||(Ce.scopes=[])).push(this)-1)}run(t){if(this.active){const n=Ce;try{return Ce=this,t()}finally{Ce=n}}}on(){Ce=this}off(){Ce=this.parent}stop(t){if(this.active){let n,s;for(n=0,s=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},ti=e=>(e.w&Ze)>0,ni=e=>(e.n&Ze)>0,tl=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s{(p==="length"||p>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":I(e)?Ms(n)&&l.push(o.get("length")):(l.push(o.get(ut)),Tt(e)&&l.push(o.get(as)));break;case"delete":I(e)||(l.push(o.get(ut)),Tt(e)&&l.push(o.get(as)));break;case"set":Tt(e)&&l.push(o.get(ut));break}if(l.length===1)l[0]&&ds(l[0]);else{const c=[];for(const u of l)u&&c.push(...u);ds(Is(c))}}function ds(e,t){const n=I(e)?e:[...e];for(const s of n)s.computed&&mr(s);for(const s of n)s.computed||mr(s)}function mr(e,t){(e!==Re||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const il=On("__proto__,__v_isRef,__isVue"),ii=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Jt)),ol=Bn(),ll=Bn(!1,!0),cl=Bn(!0),fl=Bn(!0,!0),_r=ul();function ul(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=z(this);for(let i=0,o=this.length;i{e[t]=function(...n){Ot();const s=z(this)[t].apply(this,n);return It(),s}}),e}function Bn(e=!1,t=!1){return function(s,r,i){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&i===(e?t?di:ai:t?ui:fi).get(s))return s;const o=I(s);if(!e&&o&&Y(_r,r))return Reflect.get(_r,r,i);const l=Reflect.get(s,r,i);return(Jt(r)?ii.has(r):il(r))||(e||we(s,"get",r),t)?l:ce(l)?o&&Ms(r)?l:l.value:G(l)?e?Bs(l):Hn(l):l}}const al=oi(),dl=oi(!0);function oi(e=!1){return function(n,s,r,i){let o=n[s];if(pt(o)&&ce(o)&&!ce(r))return!1;if(!e&&(!Yt(r)&&!pt(r)&&(o=z(o),r=z(r)),!I(n)&&ce(o)&&!ce(r)))return o.value=r,!0;const l=I(n)&&Ms(s)?Number(s)e,kn=e=>Reflect.getPrototypeOf(e);function dn(e,t,n=!1,s=!1){e=e.__v_raw;const r=z(e),i=z(t);n||(t!==i&&we(r,"get",t),we(r,"get",i));const{has:o}=kn(r),l=s?Ns:n?Hs:zt;if(o.call(r,t))return l(e.get(t));if(o.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function hn(e,t=!1){const n=this.__v_raw,s=z(n),r=z(e);return t||(e!==r&&we(s,"has",e),we(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function pn(e,t=!1){return e=e.__v_raw,!t&&we(z(e),"iterate",ut),Reflect.get(e,"size",e)}function yr(e){e=z(e);const t=z(this);return kn(t).has.call(t,e)||(t.add(e),je(t,"add",e,e)),this}function br(e,t){t=z(t);const n=z(this),{has:s,get:r}=kn(n);let i=s.call(n,e);i||(e=z(e),i=s.call(n,e));const o=r.call(n,e);return n.set(e,t),i?Pt(t,o)&&je(n,"set",e,t):je(n,"add",e,t),this}function Cr(e){const t=z(this),{has:n,get:s}=kn(t);let r=n.call(t,e);r||(e=z(e),r=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return r&&je(t,"delete",e,void 0),i}function xr(){const e=z(this),t=e.size!==0,n=e.clear();return t&&je(e,"clear",void 0,void 0),n}function gn(e,t){return function(s,r){const i=this,o=i.__v_raw,l=z(o),c=t?Ns:e?Hs:zt;return!e&&we(l,"iterate",ut),o.forEach((u,p)=>s.call(r,c(u),c(p),i))}}function mn(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=Tt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=r[e](...s),p=n?Ns:t?Hs:zt;return!t&&we(i,"iterate",c?as:ut),{next(){const{value:h,done:g}=u.next();return g?{value:h,done:g}:{value:l?[p(h[0]),p(h[1])]:p(h),done:g}},[Symbol.iterator](){return this}}}}function $e(e){return function(...t){return e==="delete"?!1:this}}function yl(){const e={get(i){return dn(this,i)},get size(){return pn(this)},has:hn,add:yr,set:br,delete:Cr,clear:xr,forEach:gn(!1,!1)},t={get(i){return dn(this,i,!1,!0)},get size(){return pn(this)},has:hn,add:yr,set:br,delete:Cr,clear:xr,forEach:gn(!1,!0)},n={get(i){return dn(this,i,!0)},get size(){return pn(this,!0)},has(i){return hn.call(this,i,!0)},add:$e("add"),set:$e("set"),delete:$e("delete"),clear:$e("clear"),forEach:gn(!0,!1)},s={get(i){return dn(this,i,!0,!0)},get size(){return pn(this,!0)},has(i){return hn.call(this,i,!0)},add:$e("add"),set:$e("set"),delete:$e("delete"),clear:$e("clear"),forEach:gn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=mn(i,!1,!1),n[i]=mn(i,!0,!1),t[i]=mn(i,!1,!0),s[i]=mn(i,!0,!0)}),[e,n,t,s]}const[bl,Cl,xl,El]=yl();function Ln(e,t){const n=t?e?El:xl:e?Cl:bl;return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Y(n,r)&&r in s?n:s,r,i)}const wl={get:Ln(!1,!1)},Tl={get:Ln(!1,!0)},vl={get:Ln(!0,!1)},Al={get:Ln(!0,!0)},fi=new WeakMap,ui=new WeakMap,ai=new WeakMap,di=new WeakMap;function Rl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Pl(e){return e.__v_skip||!Object.isExtensible(e)?0:Rl(Yo(e))}function Hn(e){return pt(e)?e:Dn(e,!1,li,wl,fi)}function hi(e){return Dn(e,!1,ml,Tl,ui)}function Bs(e){return Dn(e,!0,ci,vl,ai)}function Sl(e){return Dn(e,!0,_l,Al,di)}function Dn(e,t,n,s,r){if(!G(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=Pl(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function at(e){return pt(e)?at(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function ks(e){return at(e)||pt(e)}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function Ls(e){return An(e,"__v_skip",!0),e}const zt=e=>G(e)?Hn(e):e,Hs=e=>G(e)?Bs(e):e;function Ds(e){Ye&&Re&&(e=z(e),ri(e.dep||(e.dep=Is())))}function Un(e,t){e=z(e),e.dep&&ds(e.dep)}function ce(e){return!!(e&&e.__v_isRef===!0)}function wn(e){return pi(e,!1)}function Fl(e){return pi(e,!0)}function pi(e,t){return ce(e)?e:new Ml(e,t)}class Ml{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:z(t),this._value=n?t:zt(t)}get value(){return Ds(this),this._value}set value(t){const n=this.__v_isShallow||Yt(t)||pt(t);t=n?t:z(t),Pt(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:zt(t),Un(this))}}function Ol(e){Un(e)}function gi(e){return ce(e)?e.value:e}const Il={get:(e,t,n)=>gi(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ce(r)&&!ce(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Us(e){return at(e)?e:new Proxy(e,Il)}class Nl{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:s}=t(()=>Ds(this),()=>Un(this));this._get=n,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function Bl(e){return new Nl(e)}function kl(e){const t=I(e)?new Array(e.length):{};for(const n in e)t[n]=mi(e,n);return t}class Ll{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function mi(e,t,n){const s=e[t];return ce(s)?s:new Ll(e,t,n)}var _i;class Hl{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[_i]=!1,this._dirty=!0,this.effect=new on(t,()=>{this._dirty||(this._dirty=!0,Un(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=z(this);return Ds(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}_i="__v_isReadonly";function Dl(e,t,n=!1){let s,r;const i=$(e);return i?(s=e,r=Pe):(s=e.get,r=e.set),new Hl(s,r,i||!r,n)}function Ul(e,...t){}function De(e,t,n,s){let r;try{r=s?e(...s):e()}catch(i){bt(i,t,n)}return r}function Ee(e,t,n,s){if($(e)){const i=De(e,t,n,s);return i&&Fs(i)&&i.catch(o=>{bt(o,t,n)}),i}const r=[];for(let i=0;i>>1;Zt(de[s])Oe&&de.splice(t,1)}function $s(e){I(e)?At.push(...e):(!Le||!Le.includes(e,e.allowRecurse?lt+1:lt))&&At.push(e),bi()}function Er(e,t=Xt?Oe+1:0){for(;tZt(n)-Zt(s)),lt=0;lte.id==null?1/0:e.id,Vl=(e,t)=>{const n=Zt(e)-Zt(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ci(e){hs=!1,Xt=!0,de.sort(Vl);const t=Pe;try{for(Oe=0;OeEt.emit(r,...i)),_n=[]):typeof window!="undefined"&&window.HTMLElement&&!(!((s=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||s===void 0)&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{xi(i,t)}),setTimeout(()=>{Et||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,_n=[])},3e3)):_n=[]}function Wl(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Q;let r=n;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in s){const p=`${o==="modelValue"?"model":o}Modifiers`,{number:h,trim:g}=s[p]||Q;g&&(r=n.map(T=>se(T)?T.trim():T)),h&&(r=n.map(Ue))}let l,c=s[l=Ut(t)]||s[l=Ut(_e(t))];!c&&i&&(c=s[l=Ut(ve(t))]),c&&Ee(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ee(u,e,6,r)}}function Ei(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!$(e)){const c=u=>{const p=Ei(u,t,!0);p&&(l=!0,ie(o,p))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(G(e)&&s.set(e,null),null):(I(i)?i.forEach(c=>o[c]=null):ie(o,i),G(e)&&s.set(e,o),o)}function Kn(e,t){return!e||!nn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Y(e,t[0].toLowerCase()+t.slice(1))||Y(e,ve(t))||Y(e,t))}let ae=null,$n=null;function Qt(e){const t=ae;return ae=e,$n=e&&e.type.__scopeId||null,t}function ql(e){$n=e}function Jl(){$n=null}const Yl=e=>Vs;function Vs(e,t=ae,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Cs(-1);const i=Qt(t);let o;try{o=e(...r)}finally{Qt(i),s._d&&Cs(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Tn(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:i,propsOptions:[o],slots:l,attrs:c,emit:u,render:p,renderCache:h,data:g,setupState:T,ctx:R,inheritAttrs:S}=e;let V,y;const d=Qt(e);try{if(n.shapeFlag&4){const w=r||s;V=xe(p.call(w,w,h,i,T,g,R)),y=c}else{const w=t;V=xe(w.length>1?w(i,{attrs:c,slots:l,emit:u}):w(i,null)),y=t.props?c:Xl(c)}}catch(w){Wt.length=0,bt(w,e,1),V=ne(he)}let m=V;if(y&&S!==!1){const w=Object.keys(y),{shapeFlag:M}=m;w.length&&M&7&&(o&&w.some(Ps)&&(y=Zl(y,o)),m=Ne(m,y))}return n.dirs&&(m=Ne(m),m.dirs=m.dirs?m.dirs.concat(n.dirs):n.dirs),n.transition&&(m.transition=n.transition),V=m,Qt(d),V}function zl(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||nn(n))&&((t||(t={}))[n]=e[n]);return t},Zl=(e,t)=>{const n={};for(const s in e)(!Ps(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ql(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?wr(s,o,u):!!o;if(c&8){const p=t.dynamicProps;for(let h=0;he.__isSuspense,Gl={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,i,o,l,c,u){e==null?tc(t,n,s,r,i,o,l,c,u):nc(e,t,n,s,r,o,l,c,u)},hydrate:sc,create:qs,normalize:rc},ec=Gl;function Gt(e,t){const n=e.props&&e.props[t];$(n)&&n()}function tc(e,t,n,s,r,i,o,l,c){const{p:u,o:{createElement:p}}=c,h=p("div"),g=e.suspense=qs(e,r,s,t,h,n,i,o,l,c);u(null,g.pendingBranch=e.ssContent,h,null,s,g,i,o),g.deps>0?(Gt(e,"onPending"),Gt(e,"onFallback"),u(null,e.ssFallback,t,n,s,null,i,o),Rt(g,e.ssFallback)):g.resolve()}function nc(e,t,n,s,r,i,o,l,{p:c,um:u,o:{createElement:p}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const g=t.ssContent,T=t.ssFallback,{activeBranch:R,pendingBranch:S,isInFallback:V,isHydrating:y}=h;if(S)h.pendingBranch=g,Ie(g,S)?(c(S,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0?h.resolve():V&&(c(R,T,n,s,r,null,i,o,l),Rt(h,T))):(h.pendingId++,y?(h.isHydrating=!1,h.activeBranch=S):u(S,r,h),h.deps=0,h.effects.length=0,h.hiddenContainer=p("div"),V?(c(null,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0?h.resolve():(c(R,T,n,s,r,null,i,o,l),Rt(h,T))):R&&Ie(g,R)?(c(R,g,n,s,r,h,i,o,l),h.resolve(!0)):(c(null,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0&&h.resolve()));else if(R&&Ie(g,R))c(R,g,n,s,r,h,i,o,l),Rt(h,g);else if(Gt(t,"onPending"),h.pendingBranch=g,h.pendingId++,c(null,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0)h.resolve();else{const{timeout:d,pendingId:m}=h;d>0?setTimeout(()=>{h.pendingId===m&&h.fallback(T)},d):d===0&&h.fallback(T)}}function qs(e,t,n,s,r,i,o,l,c,u,p=!1){const{p:h,m:g,um:T,n:R,o:{parentNode:S,remove:V}}=u,y=Ue(e.props&&e.props.timeout),d={vnode:e,parent:t,parentComponent:n,isSVG:o,container:s,hiddenContainer:r,anchor:i,deps:0,pendingId:0,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:p,isUnmounted:!1,effects:[],resolve(m=!1){const{vnode:w,activeBranch:M,pendingBranch:k,pendingId:N,effects:E,parentComponent:D,container:H}=d;if(d.isHydrating)d.isHydrating=!1;else if(!m){const q=M&&k.transition&&k.transition.mode==="out-in";q&&(M.transition.afterLeave=()=>{N===d.pendingId&&g(k,H,L,0)});let{anchor:L}=d;M&&(L=R(M),T(M,D,d,!0)),q||g(k,H,L,0)}Rt(d,k),d.pendingBranch=null,d.isInFallback=!1;let K=d.parent,O=!1;for(;K;){if(K.pendingBranch){K.effects.push(...E),O=!0;break}K=K.parent}O||$s(E),d.effects=[],Gt(w,"onResolve")},fallback(m){if(!d.pendingBranch)return;const{vnode:w,activeBranch:M,parentComponent:k,container:N,isSVG:E}=d;Gt(w,"onFallback");const D=R(M),H=()=>{!d.isInFallback||(h(null,m,N,D,k,null,E,l,c),Rt(d,m))},K=m.transition&&m.transition.mode==="out-in";K&&(M.transition.afterLeave=H),d.isInFallback=!0,T(M,k,null,!0),K||H()},move(m,w,M){d.activeBranch&&g(d.activeBranch,m,w,M),d.container=m},next(){return d.activeBranch&&R(d.activeBranch)},registerDep(m,w){const M=!!d.pendingBranch;M&&d.deps++;const k=m.vnode.el;m.asyncDep.catch(N=>{bt(N,m,0)}).then(N=>{if(m.isUnmounted||d.isUnmounted||d.pendingId!==m.suspenseId)return;m.asyncResolved=!0;const{vnode:E}=m;xs(m,N,!1),k&&(E.el=k);const D=!k&&m.subTree.el;w(m,E,S(k||m.subTree.el),k?null:R(m.subTree),d,o,c),D&&V(D),Ws(m,E.el),M&&--d.deps===0&&d.resolve()})},unmount(m,w){d.isUnmounted=!0,d.activeBranch&&T(d.activeBranch,n,m,w),d.pendingBranch&&T(d.pendingBranch,n,m,w)}};return d}function sc(e,t,n,s,r,i,o,l,c){const u=t.suspense=qs(t,s,n,e.parentNode,document.createElement("div"),null,r,i,o,l,!0),p=c(e,u.pendingBranch=t.ssContent,n,u,i,o);return u.deps===0&&u.resolve(),p}function rc(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Tr(s?n.default:n),e.ssFallback=s?Tr(n.fallback):ne(he)}function Tr(e){let t;if($(e)){const n=_t&&e._c;n&&(e._d=!1,zn()),e=e(),n&&(e._d=!0,t=me,Zi())}return I(e)&&(e=zl(e)),e=xe(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Ti(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):$s(e)}function Rt(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e,r=n.el=t.el;s&&s.subTree===n&&(s.vnode.el=r,Ws(s,r))}function vi(e,t){if(le){let n=le.provides;const s=le.parent&&le.parent.provides;s===n&&(n=le.provides=Object.create(s)),n[e]=t}}function jt(e,t,n=!1){const s=le||ae;if(s){const r=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&$(t)?t.call(s.proxy):t}}function ic(e,t){return ln(e,null,t)}function Ai(e,t){return ln(e,null,{flush:"post"})}function oc(e,t){return ln(e,null,{flush:"sync"})}const yn={};function Kt(e,t,n){return ln(e,t,n)}function ln(e,t,{immediate:n,deep:s,flush:r,onTrack:i,onTrigger:o}=Q){const l=le;let c,u=!1,p=!1;if(ce(e)?(c=()=>e.value,u=Yt(e)):at(e)?(c=()=>e,s=!0):I(e)?(p=!0,u=e.some(m=>at(m)||Yt(m)),c=()=>e.map(m=>{if(ce(m))return m.value;if(at(m))return ft(m);if($(m))return De(m,l,2)})):$(e)?t?c=()=>De(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return h&&h(),Ee(e,l,3,[g])}:c=Pe,t&&s){const m=c;c=()=>ft(m())}let h,g=m=>{h=y.onStop=()=>{De(m,l,4)}},T;if(Ft)if(g=Pe,t?n&&Ee(t,l,3,[c(),p?[]:void 0,g]):c(),r==="sync"){const m=ao();T=m.__watcherHandles||(m.__watcherHandles=[])}else return Pe;let R=p?new Array(e.length).fill(yn):yn;const S=()=>{if(!!y.active)if(t){const m=y.run();(s||u||(p?m.some((w,M)=>Pt(w,R[M])):Pt(m,R)))&&(h&&h(),Ee(t,l,3,[m,R===yn?void 0:p&&R[0]===yn?[]:R,g]),R=m)}else y.run()};S.allowRecurse=!!t;let V;r==="sync"?V=S:r==="post"?V=()=>fe(S,l&&l.suspense):(S.pre=!0,l&&(S.id=l.uid),V=()=>jn(S));const y=new on(c,V);t?n?S():R=y.run():r==="post"?fe(y.run.bind(y),l&&l.suspense):y.run();const d=()=>{y.stop(),l&&l.scope&&Ss(l.scope.effects,y)};return T&&T.push(d),d}function lc(e,t,n){const s=this.proxy,r=se(e)?e.includes(".")?Ri(s,e):()=>s[e]:e.bind(s,s);let i;$(t)?i=t:(i=t.handler,n=t);const o=le;Ge(this);const l=ln(r,i.bind(s),n);return o?Ge(o):ze(),l}function Ri(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r{ft(n,t)});else if(Gr(e))for(const n in e)ft(e[n],t);return e}function Js(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return fn(()=>{e.isMounted=!0}),Jn(()=>{e.isUnmounting=!0}),e}const Te=[Function,Array],cc={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Te,onEnter:Te,onAfterEnter:Te,onEnterCancelled:Te,onBeforeLeave:Te,onLeave:Te,onAfterLeave:Te,onLeaveCancelled:Te,onBeforeAppear:Te,onAppear:Te,onAfterAppear:Te,onAppearCancelled:Te},setup(e,{slots:t}){const n=tt(),s=Js();let r;return()=>{const i=t.default&&Vn(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const S of i)if(S.type!==he){o=S;break}}const l=z(e),{mode:c}=l;if(s.isLeaving)return ts(o);const u=vr(o);if(!u)return ts(o);const p=St(u,l,s,n);gt(u,p);const h=n.subTree,g=h&&vr(h);let T=!1;const{getTransitionKey:R}=u.type;if(R){const S=R();r===void 0?r=S:S!==r&&(r=S,T=!0)}if(g&&g.type!==he&&(!Ie(u,g)||T)){const S=St(g,l,s,n);if(gt(g,S),c==="out-in")return s.isLeaving=!0,S.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&n.update()},ts(o);c==="in-out"&&u.type!==he&&(S.delayLeave=(V,y,d)=>{const m=Pi(s,g);m[String(g.key)]=g,V._leaveCb=()=>{y(),V._leaveCb=void 0,delete p.delayedLeave},p.delayedLeave=d})}return o}}},Ys=cc;function Pi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function St(e,t,n,s){const{appear:r,mode:i,persisted:o=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:h,onLeave:g,onAfterLeave:T,onLeaveCancelled:R,onBeforeAppear:S,onAppear:V,onAfterAppear:y,onAppearCancelled:d}=t,m=String(e.key),w=Pi(n,e),M=(E,D)=>{E&&Ee(E,s,9,D)},k=(E,D)=>{const H=D[1];M(E,D),I(E)?E.every(K=>K.length<=1)&&H():E.length<=1&&H()},N={mode:i,persisted:o,beforeEnter(E){let D=l;if(!n.isMounted)if(r)D=S||l;else return;E._leaveCb&&E._leaveCb(!0);const H=w[m];H&&Ie(e,H)&&H.el._leaveCb&&H.el._leaveCb(),M(D,[E])},enter(E){let D=c,H=u,K=p;if(!n.isMounted)if(r)D=V||c,H=y||u,K=d||p;else return;let O=!1;const q=E._enterCb=L=>{O||(O=!0,L?M(K,[E]):M(H,[E]),N.delayedLeave&&N.delayedLeave(),E._enterCb=void 0)};D?k(D,[E,q]):q()},leave(E,D){const H=String(e.key);if(E._enterCb&&E._enterCb(!0),n.isUnmounting)return D();M(h,[E]);let K=!1;const O=E._leaveCb=q=>{K||(K=!0,D(),q?M(R,[E]):M(T,[E]),E._leaveCb=void 0,w[H]===e&&delete w[H])};w[H]=e,g?k(g,[E,O]):O()},clone(E){return St(E,t,n,s)}};return N}function ts(e){if(cn(e))return e=Ne(e),e.children=null,e}function vr(e){return cn(e)?e.children?e.children[0]:void 0:e}function gt(e,t){e.shapeFlag&6&&e.component?gt(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vn(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader;function fc(e){$(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,timeout:i,suspensible:o=!0,onError:l}=e;let c=null,u,p=0;const h=()=>(p++,c=null,g()),g=()=>{let T;return c||(T=c=t().catch(R=>{if(R=R instanceof Error?R:new Error(String(R)),l)return new Promise((S,V)=>{l(R,()=>S(h()),()=>V(R),p+1)});throw R}).then(R=>T!==c&&c?c:(R&&(R.__esModule||R[Symbol.toStringTag]==="Module")&&(R=R.default),u=R,R)))};return zs({name:"AsyncComponentWrapper",__asyncLoader:g,get __asyncResolved(){return u},setup(){const T=le;if(u)return()=>ns(u,T);const R=d=>{c=null,bt(d,T,13,!s)};if(o&&T.suspense||Ft)return g().then(d=>()=>ns(d,T)).catch(d=>(R(d),()=>s?ne(s,{error:d}):null));const S=wn(!1),V=wn(),y=wn(!!r);return r&&setTimeout(()=>{y.value=!1},r),i!=null&&setTimeout(()=>{if(!S.value&&!V.value){const d=new Error(`Async component timed out after ${i}ms.`);R(d),V.value=d}},i),g().then(()=>{S.value=!0,T.parent&&cn(T.parent.vnode)&&jn(T.parent.update)}).catch(d=>{R(d),V.value=d}),()=>{if(S.value&&u)return ns(u,T);if(V.value&&s)return ne(s,{error:V.value});if(n&&!y.value)return ne(n)}}})}function ns(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=ne(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const cn=e=>e.type.__isKeepAlive,uc={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=tt(),s=n.ctx;if(!s.renderer)return()=>{const d=t.default&&t.default();return d&&d.length===1?d[0]:d};const r=new Map,i=new Set;let o=null;const l=n.suspense,{renderer:{p:c,m:u,um:p,o:{createElement:h}}}=s,g=h("div");s.activate=(d,m,w,M,k)=>{const N=d.component;u(d,m,w,0,l),c(N.vnode,d,m,w,N,l,M,d.slotScopeIds,k),fe(()=>{N.isDeactivated=!1,N.a&&vt(N.a);const E=d.props&&d.props.onVnodeMounted;E&&ge(E,N.parent,d)},l)},s.deactivate=d=>{const m=d.component;u(d,g,null,1,l),fe(()=>{m.da&&vt(m.da);const w=d.props&&d.props.onVnodeUnmounted;w&&ge(w,m.parent,d),m.isDeactivated=!0},l)};function T(d){ss(d),p(d,n,l,!0)}function R(d){r.forEach((m,w)=>{const M=ws(m.type);M&&(!d||!d(M))&&S(w)})}function S(d){const m=r.get(d);!o||m.type!==o.type?T(m):o&&ss(o),r.delete(d),i.delete(d)}Kt(()=>[e.include,e.exclude],([d,m])=>{d&&R(w=>Ht(d,w)),m&&R(w=>!Ht(m,w))},{flush:"post",deep:!0});let V=null;const y=()=>{V!=null&&r.set(V,rs(n.subTree))};return fn(y),qn(y),Jn(()=>{r.forEach(d=>{const{subTree:m,suspense:w}=n,M=rs(m);if(d.type===M.type){ss(M);const k=M.component.da;k&&fe(k,w);return}T(d)})}),()=>{if(V=null,!t.default)return null;const d=t.default(),m=d[0];if(d.length>1)return o=null,d;if(!Qe(m)||!(m.shapeFlag&4)&&!(m.shapeFlag&128))return o=null,m;let w=rs(m);const M=w.type,k=ws(dt(w)?w.type.__asyncResolved||{}:M),{include:N,exclude:E,max:D}=e;if(N&&(!k||!Ht(N,k))||E&&k&&Ht(E,k))return o=w,m;const H=w.key==null?M:w.key,K=r.get(H);return w.el&&(w=Ne(w),m.shapeFlag&128&&(m.ssContent=w)),V=H,K?(w.el=K.el,w.component=K.component,w.transition&>(w,w.transition),w.shapeFlag|=512,i.delete(H),i.add(H)):(i.add(H),D&&i.size>parseInt(D,10)&&S(i.values().next().value)),w.shapeFlag|=256,o=w,wi(m.type)?m:w}}},ac=uc;function Ht(e,t){return I(e)?e.some(n=>Ht(n,t)):se(e)?e.split(",").includes(t):e.test?e.test(t):!1}function Si(e,t){Mi(e,"a",t)}function Fi(e,t){Mi(e,"da",t)}function Mi(e,t,n=le){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Wn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)cn(r.parent.vnode)&&dc(s,t,n,r),r=r.parent}}function dc(e,t,n,s){const r=Wn(t,e,s,!0);Yn(()=>{Ss(s[t],r)},n)}function ss(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rs(e){return e.shapeFlag&128?e.ssContent:e}function Wn(e,t,n=le,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Ot(),Ge(n);const l=Ee(t,n,e,o);return ze(),It(),l});return s?r.unshift(i):r.push(i),i}}const Ke=e=>(t,n=le)=>(!Ft||e==="sp")&&Wn(e,(...s)=>t(...s),n),Oi=Ke("bm"),fn=Ke("m"),Ii=Ke("bu"),qn=Ke("u"),Jn=Ke("bum"),Yn=Ke("um"),Ni=Ke("sp"),Bi=Ke("rtg"),ki=Ke("rtc");function Li(e,t=le){Wn("ec",e,t)}function hc(e,t){const n=ae;if(n===null)return e;const s=Zn(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;it(o,l,void 0,i&&i[l]));else{const o=Object.keys(e);r=new Array(o.length);for(let l=0,c=o.length;l{const i=s.fn(...r);return i&&(i.key=s.key),i}:s.fn)}return e}function Cc(e,t,n={},s,r){if(ae.isCE||ae.parent&&dt(ae.parent)&&ae.parent.isCE)return t!=="default"&&(n.name=t),ne("slot",n,s&&s());let i=e[t];i&&i._c&&(i._d=!1),zn();const o=i&&Di(i(n)),l=tr(ue,{key:n.key||o&&o.key||`_${t}`},o||(s?s():[]),o&&e._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Di(e){return e.some(t=>Qe(t)?!(t.type===he||t.type===ue&&!Di(t.children)):!0)?e:null}function xc(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:Ut(s)]=e[s];return n}const ps=e=>e?so(e)?Zn(e)||e.proxy:ps(e.parent):null,$t=ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ps(e.parent),$root:e=>ps(e.root),$emit:e=>e.emit,$options:e=>Qs(e),$forceUpdate:e=>e.f||(e.f=()=>jn(e.update)),$nextTick:e=>e.n||(e.n=Ks.bind(e.proxy)),$watch:e=>lc.bind(e)}),is=(e,t)=>e!==Q&&!e.__isScriptSetup&&Y(e,t),gs={get({_:e},t){const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const T=o[t];if(T!==void 0)switch(T){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(is(s,t))return o[t]=1,s[t];if(r!==Q&&Y(r,t))return o[t]=2,r[t];if((u=e.propsOptions[0])&&Y(u,t))return o[t]=3,i[t];if(n!==Q&&Y(n,t))return o[t]=4,n[t];ms&&(o[t]=0)}}const p=$t[t];let h,g;if(p)return t==="$attrs"&&we(e,"get",t),p(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==Q&&Y(n,t))return o[t]=4,n[t];if(g=c.config.globalProperties,Y(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return is(r,t)?(r[t]=n,!0):s!==Q&&Y(s,t)?(s[t]=n,!0):Y(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==Q&&Y(e,o)||is(t,o)||(l=i[0])&&Y(l,o)||Y(s,o)||Y($t,o)||Y(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Y(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Ec=ie({},gs,{get(e,t){if(t!==Symbol.unscopables)return gs.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Bo(t)}});let ms=!0;function wc(e){const t=Qs(e),n=e.proxy,s=e.ctx;ms=!1,t.beforeCreate&&Rr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:u,created:p,beforeMount:h,mounted:g,beforeUpdate:T,updated:R,activated:S,deactivated:V,beforeDestroy:y,beforeUnmount:d,destroyed:m,unmounted:w,render:M,renderTracked:k,renderTriggered:N,errorCaptured:E,serverPrefetch:D,expose:H,inheritAttrs:K,components:O,directives:q,filters:L}=t;if(u&&Tc(u,s,null,e.appContext.config.unwrapInjectedRef),o)for(const re in o){const ee=o[re];$(ee)&&(s[re]=ee.bind(n))}if(r){const re=r.call(n,n);G(re)&&(e.data=Hn(re))}if(ms=!0,i)for(const re in i){const ee=i[re],nt=$(ee)?ee.bind(n,n):$(ee.get)?ee.get.bind(n,n):Pe,un=!$(ee)&&$(ee.set)?ee.set.bind(n):Pe,st=lo({get:nt,set:un});Object.defineProperty(s,re,{enumerable:!0,configurable:!0,get:()=>st.value,set:Se=>st.value=Se})}if(l)for(const re in l)Ui(l[re],s,n,re);if(c){const re=$(c)?c.call(n):c;Reflect.ownKeys(re).forEach(ee=>{vi(ee,re[ee])})}p&&Rr(p,e,"c");function X(re,ee){I(ee)?ee.forEach(nt=>re(nt.bind(n))):ee&&re(ee.bind(n))}if(X(Oi,h),X(fn,g),X(Ii,T),X(qn,R),X(Si,S),X(Fi,V),X(Li,E),X(ki,k),X(Bi,N),X(Jn,d),X(Yn,w),X(Ni,D),I(H))if(H.length){const re=e.exposed||(e.exposed={});H.forEach(ee=>{Object.defineProperty(re,ee,{get:()=>n[ee],set:nt=>n[ee]=nt})})}else e.exposed||(e.exposed={});M&&e.render===Pe&&(e.render=M),K!=null&&(e.inheritAttrs=K),O&&(e.components=O),q&&(e.directives=q)}function Tc(e,t,n=Pe,s=!1){I(e)&&(e=_s(e));for(const r in e){const i=e[r];let o;G(i)?"default"in i?o=jt(i.from||r,i.default,!0):o=jt(i.from||r):o=jt(i),ce(o)&&s?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[r]=o}}function Rr(e,t,n){Ee(I(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ui(e,t,n,s){const r=s.includes(".")?Ri(n,s):()=>n[s];if(se(e)){const i=t[e];$(i)&&Kt(r,i)}else if($(e))Kt(r,e.bind(n));else if(G(e))if(I(e))e.forEach(i=>Ui(i,t,n,s));else{const i=$(e.handler)?e.handler.bind(n):t[e.handler];$(i)&&Kt(r,i,e)}}function Qs(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>Pn(c,u,o,!0)),Pn(c,t,o)),G(t)&&i.set(t,c),c}function Pn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Pn(e,i,n,!0),r&&r.forEach(o=>Pn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=vc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const vc={data:Pr,props:ot,emits:ot,methods:ot,computed:ot,beforeCreate:pe,created:pe,beforeMount:pe,mounted:pe,beforeUpdate:pe,updated:pe,beforeDestroy:pe,beforeUnmount:pe,destroyed:pe,unmounted:pe,activated:pe,deactivated:pe,errorCaptured:pe,serverPrefetch:pe,components:ot,directives:ot,watch:Rc,provide:Pr,inject:Ac};function Pr(e,t){return t?e?function(){return ie($(e)?e.call(this,this):e,$(t)?t.call(this,this):t)}:t:e}function Ac(e,t){return ot(_s(e),_s(t))}function _s(e){if(I(e)){const t={};for(let n=0;n0)&&!(o&16)){if(o&8){const p=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[g,T]=Ki(h,t,!0);ie(o,g),T&&l.push(...T)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!i&&!c)return G(e)&&s.set(e,wt),wt;if(I(i))for(let p=0;p-1,T[1]=S<0||R-1||Y(T,"default"))&&l.push(h)}}}const u=[o,l];return G(e)&&s.set(e,u),u}function Sr(e){return e[0]!=="$"}function Fr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Mr(e,t){return Fr(e)===Fr(t)}function Or(e,t){return I(t)?t.findIndex(n=>Mr(n,e)):$(t)&&Mr(t,e)?0:-1}const $i=e=>e[0]==="_"||e==="$stable",Gs=e=>I(e)?e.map(xe):[xe(e)],Fc=(e,t,n)=>{if(t._n)return t;const s=Vs((...r)=>Gs(t(...r)),n);return s._c=!1,s},Vi=(e,t,n)=>{const s=e._ctx;for(const r in e){if($i(r))continue;const i=e[r];if($(i))t[r]=Fc(r,i,s);else if(i!=null){const o=Gs(i);t[r]=()=>o}}},Wi=(e,t)=>{const n=Gs(t);e.slots.default=()=>n},Mc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=z(t),An(t,"_",n)):Vi(t,e.slots={})}else e.slots={},t&&Wi(e,t);An(e.slots,Xn,1)},Oc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Q;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(ie(r,t),!n&&l===1&&delete r._):(i=!t.$stable,Vi(t,r)),o=t}else t&&(Wi(e,t),o={default:1});if(i)for(const l in r)!$i(l)&&!(l in o)&&delete r[l]};function qi(){return{app:null,config:{isNativeTag:Wo,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ic=0;function Nc(e,t){return function(s,r=null){$(s)||(s=Object.assign({},s)),r!=null&&!G(r)&&(r=null);const i=qi(),o=new Set;let l=!1;const c=i.app={_uid:Ic++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:po,get config(){return i.config},set config(u){},use(u,...p){return o.has(u)||(u&&$(u.install)?(o.add(u),u.install(c,...p)):$(u)&&(o.add(u),u(c,...p))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,p){return p?(i.components[u]=p,c):i.components[u]},directive(u,p){return p?(i.directives[u]=p,c):i.directives[u]},mount(u,p,h){if(!l){const g=ne(s,r);return g.appContext=i,p&&t?t(g,u):e(g,u,h),l=!0,c._container=u,u.__vue_app__=c,Zn(g.component)||g.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(u,p){return i.provides[u]=p,c}};return c}}function Sn(e,t,n,s,r=!1){if(I(e)){e.forEach((g,T)=>Sn(g,t&&(I(t)?t[T]:t),n,s,r));return}if(dt(s)&&!r)return;const i=s.shapeFlag&4?Zn(s.component)||s.component.proxy:s.el,o=r?null:i,{i:l,r:c}=e,u=t&&t.r,p=l.refs===Q?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(se(u)?(p[u]=null,Y(h,u)&&(h[u]=null)):ce(u)&&(u.value=null)),$(c))De(c,l,12,[o,p]);else{const g=se(c),T=ce(c);if(g||T){const R=()=>{if(e.f){const S=g?Y(h,c)?h[c]:p[c]:c.value;r?I(S)&&Ss(S,i):I(S)?S.includes(i)||S.push(i):g?(p[c]=[i],Y(h,c)&&(h[c]=p[c])):(c.value=[i],e.k&&(p[e.k]=c.value))}else g?(p[c]=o,Y(h,c)&&(h[c]=o)):T&&(c.value=o,e.k&&(p[e.k]=o))};o?(R.id=-1,fe(R,n)):R()}}}let Ve=!1;const bn=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",Cn=e=>e.nodeType===8;function Bc(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:u}}=e,p=(y,d)=>{if(!d.hasChildNodes()){n(null,y,d),Rn(),d._vnode=y;return}Ve=!1,h(d.firstChild,y,null,null,null),Rn(),d._vnode=y,Ve&&console.error("Hydration completed but contains mismatches.")},h=(y,d,m,w,M,k=!1)=>{const N=Cn(y)&&y.data==="[",E=()=>S(y,d,m,w,M,N),{type:D,ref:H,shapeFlag:K,patchFlag:O}=d;let q=y.nodeType;d.el=y,O===-2&&(k=!1,d.dynamicChildren=null);let L=null;switch(D){case mt:q!==3?d.children===""?(c(d.el=r(""),o(y),y),L=y):L=E():(y.data!==d.children&&(Ve=!0,y.data=d.children),L=i(y));break;case he:q!==8||N?L=E():L=i(y);break;case ht:if(N&&(y=i(y),q=y.nodeType),q===1||q===3){L=y;const ye=!d.children.length;for(let X=0;X{k=k||!!d.dynamicChildren;const{type:N,props:E,patchFlag:D,shapeFlag:H,dirs:K}=d,O=N==="input"&&K||N==="option";if(O||D!==-1){if(K&&Me(d,null,m,"created"),E)if(O||!k||D&48)for(const L in E)(O&&L.endsWith("value")||nn(L)&&!Dt(L))&&s(y,L,null,E[L],!1,void 0,m);else E.onClick&&s(y,"onClick",null,E.onClick,!1,void 0,m);let q;if((q=E&&E.onVnodeBeforeMount)&&ge(q,m,d),K&&Me(d,null,m,"beforeMount"),((q=E&&E.onVnodeMounted)||K)&&Ti(()=>{q&&ge(q,m,d),K&&Me(d,null,m,"mounted")},w),H&16&&!(E&&(E.innerHTML||E.textContent))){let L=T(y.firstChild,d,y,m,w,M,k);for(;L;){Ve=!0;const ye=L;L=L.nextSibling,l(ye)}}else H&8&&y.textContent!==d.children&&(Ve=!0,y.textContent=d.children)}return y.nextSibling},T=(y,d,m,w,M,k,N)=>{N=N||!!d.dynamicChildren;const E=d.children,D=E.length;for(let H=0;H{const{slotScopeIds:N}=d;N&&(M=M?M.concat(N):N);const E=o(y),D=T(i(y),d,E,m,w,M,k);return D&&Cn(D)&&D.data==="]"?i(d.anchor=D):(Ve=!0,c(d.anchor=u("]"),E,D),D)},S=(y,d,m,w,M,k)=>{if(Ve=!0,d.el=null,k){const D=V(y);for(;;){const H=i(y);if(H&&H!==D)l(H);else break}}const N=i(y),E=o(y);return l(y),n(null,d,E,N,m,w,bn(E),M),N},V=y=>{let d=0;for(;y;)if(y=i(y),y&&Cn(y)&&(y.data==="["&&d++,y.data==="]")){if(d===0)return i(y);d--}return y};return[p,h]}const fe=Ti;function Ji(e){return zi(e)}function Yi(e){return zi(e,Bc)}function zi(e,t){const n=Zo();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:p,parentNode:h,nextSibling:g,setScopeId:T=Pe,insertStaticContent:R}=e,S=(f,a,_,C=null,b=null,A=null,F=!1,v=null,P=!!a.dynamicChildren)=>{if(f===a)return;f&&!Ie(f,a)&&(C=an(f),Se(f,b,A,!0),f=null),a.patchFlag===-2&&(P=!1,a.dynamicChildren=null);const{type:x,ref:U,shapeFlag:B}=a;switch(x){case mt:V(f,a,_,C);break;case he:y(f,a,_,C);break;case ht:f==null&&d(a,_,C,F);break;case ue:O(f,a,_,C,b,A,F,v,P);break;default:B&1?M(f,a,_,C,b,A,F,v,P):B&6?q(f,a,_,C,b,A,F,v,P):(B&64||B&128)&&x.process(f,a,_,C,b,A,F,v,P,Ct)}U!=null&&b&&Sn(U,f&&f.ref,A,a||f,!a)},V=(f,a,_,C)=>{if(f==null)s(a.el=l(a.children),_,C);else{const b=a.el=f.el;a.children!==f.children&&u(b,a.children)}},y=(f,a,_,C)=>{f==null?s(a.el=c(a.children||""),_,C):a.el=f.el},d=(f,a,_,C)=>{[f.el,f.anchor]=R(f.children,a,_,C,f.el,f.anchor)},m=({el:f,anchor:a},_,C)=>{let b;for(;f&&f!==a;)b=g(f),s(f,_,C),f=b;s(a,_,C)},w=({el:f,anchor:a})=>{let _;for(;f&&f!==a;)_=g(f),r(f),f=_;r(a)},M=(f,a,_,C,b,A,F,v,P)=>{F=F||a.type==="svg",f==null?k(a,_,C,b,A,F,v,P):D(f,a,b,A,F,v,P)},k=(f,a,_,C,b,A,F,v)=>{let P,x;const{type:U,props:B,shapeFlag:j,transition:W,dirs:J}=f;if(P=f.el=o(f.type,A,B&&B.is,B),j&8?p(P,f.children):j&16&&E(f.children,P,null,C,b,A&&U!=="foreignObject",F,v),J&&Me(f,null,C,"created"),B){for(const Z in B)Z!=="value"&&!Dt(Z)&&i(P,Z,null,B[Z],A,f.children,C,b,Be);"value"in B&&i(P,"value",null,B.value),(x=B.onVnodeBeforeMount)&&ge(x,C,f)}N(P,f,f.scopeId,F,C),J&&Me(f,null,C,"beforeMount");const te=(!b||b&&!b.pendingBranch)&&W&&!W.persisted;te&&W.beforeEnter(P),s(P,a,_),((x=B&&B.onVnodeMounted)||te||J)&&fe(()=>{x&&ge(x,C,f),te&&W.enter(P),J&&Me(f,null,C,"mounted")},b)},N=(f,a,_,C,b)=>{if(_&&T(f,_),C)for(let A=0;A{for(let x=P;x{const v=a.el=f.el;let{patchFlag:P,dynamicChildren:x,dirs:U}=a;P|=f.patchFlag&16;const B=f.props||Q,j=a.props||Q;let W;_&&rt(_,!1),(W=j.onVnodeBeforeUpdate)&&ge(W,_,a,f),U&&Me(a,f,_,"beforeUpdate"),_&&rt(_,!0);const J=b&&a.type!=="foreignObject";if(x?H(f.dynamicChildren,x,v,_,C,J,A):F||ee(f,a,v,null,_,C,J,A,!1),P>0){if(P&16)K(v,a,B,j,_,C,b);else if(P&2&&B.class!==j.class&&i(v,"class",null,j.class,b),P&4&&i(v,"style",B.style,j.style,b),P&8){const te=a.dynamicProps;for(let Z=0;Z{W&&ge(W,_,a,f),U&&Me(a,f,_,"updated")},C)},H=(f,a,_,C,b,A,F)=>{for(let v=0;v{if(_!==C){if(_!==Q)for(const v in _)!Dt(v)&&!(v in C)&&i(f,v,_[v],null,F,a.children,b,A,Be);for(const v in C){if(Dt(v))continue;const P=C[v],x=_[v];P!==x&&v!=="value"&&i(f,v,x,P,F,a.children,b,A,Be)}"value"in C&&i(f,"value",_.value,C.value)}},O=(f,a,_,C,b,A,F,v,P)=>{const x=a.el=f?f.el:l(""),U=a.anchor=f?f.anchor:l("");let{patchFlag:B,dynamicChildren:j,slotScopeIds:W}=a;W&&(v=v?v.concat(W):W),f==null?(s(x,_,C),s(U,_,C),E(a.children,_,U,b,A,F,v,P)):B>0&&B&64&&j&&f.dynamicChildren?(H(f.dynamicChildren,j,_,b,A,F,v),(a.key!=null||b&&a===b.subTree)&&er(f,a,!0)):ee(f,a,_,U,b,A,F,v,P)},q=(f,a,_,C,b,A,F,v,P)=>{a.slotScopeIds=v,f==null?a.shapeFlag&512?b.ctx.activate(a,_,C,F,P):L(a,_,C,b,A,F,P):ye(f,a,P)},L=(f,a,_,C,b,A,F)=>{const v=f.component=no(f,C,b);if(cn(f)&&(v.ctx.renderer=Ct),ro(v),v.asyncDep){if(b&&b.registerDep(v,X),!f.el){const P=v.subTree=ne(he);y(null,P,a,_)}return}X(v,f,a,_,b,A,F)},ye=(f,a,_)=>{const C=a.component=f.component;if(Ql(f,a,_))if(C.asyncDep&&!C.asyncResolved){re(C,a,_);return}else C.next=a,$l(C.update),C.update();else a.el=f.el,C.vnode=a},X=(f,a,_,C,b,A,F)=>{const v=()=>{if(f.isMounted){let{next:U,bu:B,u:j,parent:W,vnode:J}=f,te=U,Z;rt(f,!1),U?(U.el=J.el,re(f,U,F)):U=J,B&&vt(B),(Z=U.props&&U.props.onVnodeBeforeUpdate)&&ge(Z,W,U,J),rt(f,!0);const oe=Tn(f),Ae=f.subTree;f.subTree=oe,S(Ae,oe,h(Ae.el),an(Ae),f,b,A),U.el=oe.el,te===null&&Ws(f,oe.el),j&&fe(j,b),(Z=U.props&&U.props.onVnodeUpdated)&&fe(()=>ge(Z,W,U,J),b)}else{let U;const{el:B,props:j}=a,{bm:W,m:J,parent:te}=f,Z=dt(a);if(rt(f,!1),W&&vt(W),!Z&&(U=j&&j.onVnodeBeforeMount)&&ge(U,te,a),rt(f,!0),B&&es){const oe=()=>{f.subTree=Tn(f),es(B,f.subTree,f,b,null)};Z?a.type.__asyncLoader().then(()=>!f.isUnmounted&&oe()):oe()}else{const oe=f.subTree=Tn(f);S(null,oe,_,C,f,b,A),a.el=oe.el}if(J&&fe(J,b),!Z&&(U=j&&j.onVnodeMounted)){const oe=a;fe(()=>ge(U,te,oe),b)}(a.shapeFlag&256||te&&dt(te.vnode)&&te.vnode.shapeFlag&256)&&f.a&&fe(f.a,b),f.isMounted=!0,a=_=C=null}},P=f.effect=new on(v,()=>jn(x),f.scope),x=f.update=()=>P.run();x.id=f.uid,rt(f,!0),x()},re=(f,a,_)=>{a.component=f;const C=f.vnode.props;f.vnode=a,f.next=null,Sc(f,a.props,C,_),Oc(f,a.children,_),Ot(),Er(),It()},ee=(f,a,_,C,b,A,F,v,P=!1)=>{const x=f&&f.children,U=f?f.shapeFlag:0,B=a.children,{patchFlag:j,shapeFlag:W}=a;if(j>0){if(j&128){un(x,B,_,C,b,A,F,v,P);return}else if(j&256){nt(x,B,_,C,b,A,F,v,P);return}}W&8?(U&16&&Be(x,b,A),B!==x&&p(_,B)):U&16?W&16?un(x,B,_,C,b,A,F,v,P):Be(x,b,A,!0):(U&8&&p(_,""),W&16&&E(B,_,C,b,A,F,v,P))},nt=(f,a,_,C,b,A,F,v,P)=>{f=f||wt,a=a||wt;const x=f.length,U=a.length,B=Math.min(x,U);let j;for(j=0;jU?Be(f,b,A,!0,!1,B):E(a,_,C,b,A,F,v,P,B)},un=(f,a,_,C,b,A,F,v,P)=>{let x=0;const U=a.length;let B=f.length-1,j=U-1;for(;x<=B&&x<=j;){const W=f[x],J=a[x]=P?Je(a[x]):xe(a[x]);if(Ie(W,J))S(W,J,_,null,b,A,F,v,P);else break;x++}for(;x<=B&&x<=j;){const W=f[B],J=a[j]=P?Je(a[j]):xe(a[j]);if(Ie(W,J))S(W,J,_,null,b,A,F,v,P);else break;B--,j--}if(x>B){if(x<=j){const W=j+1,J=Wj)for(;x<=B;)Se(f[x],b,A,!0),x++;else{const W=x,J=x,te=new Map;for(x=J;x<=j;x++){const be=a[x]=P?Je(a[x]):xe(a[x]);be.key!=null&&te.set(be.key,x)}let Z,oe=0;const Ae=j-J+1;let xt=!1,ur=0;const Nt=new Array(Ae);for(x=0;x=Ae){Se(be,b,A,!0);continue}let Fe;if(be.key!=null)Fe=te.get(be.key);else for(Z=J;Z<=j;Z++)if(Nt[Z-J]===0&&Ie(be,a[Z])){Fe=Z;break}Fe===void 0?Se(be,b,A,!0):(Nt[Fe-J]=x+1,Fe>=ur?ur=Fe:xt=!0,S(be,a[Fe],_,null,b,A,F,v,P),oe++)}const ar=xt?kc(Nt):wt;for(Z=ar.length-1,x=Ae-1;x>=0;x--){const be=J+x,Fe=a[be],dr=be+1{const{el:A,type:F,transition:v,children:P,shapeFlag:x}=f;if(x&6){st(f.component.subTree,a,_,C);return}if(x&128){f.suspense.move(a,_,C);return}if(x&64){F.move(f,a,_,Ct);return}if(F===ue){s(A,a,_);for(let B=0;Bv.enter(A),b);else{const{leave:B,delayLeave:j,afterLeave:W}=v,J=()=>s(A,a,_),te=()=>{B(A,()=>{J(),W&&W()})};j?j(A,J,te):te()}else s(A,a,_)},Se=(f,a,_,C=!1,b=!1)=>{const{type:A,props:F,ref:v,children:P,dynamicChildren:x,shapeFlag:U,patchFlag:B,dirs:j}=f;if(v!=null&&Sn(v,null,_,f,!0),U&256){a.ctx.deactivate(f);return}const W=U&1&&j,J=!dt(f);let te;if(J&&(te=F&&F.onVnodeBeforeUnmount)&&ge(te,a,f),U&6)Io(f.component,_,C);else{if(U&128){f.suspense.unmount(_,C);return}W&&Me(f,null,a,"beforeUnmount"),U&64?f.type.remove(f,a,_,b,Ct,C):x&&(A!==ue||B>0&&B&64)?Be(x,a,_,!1,!0):(A===ue&&B&384||!b&&U&16)&&Be(P,a,_),C&&cr(f)}(J&&(te=F&&F.onVnodeUnmounted)||W)&&fe(()=>{te&&ge(te,a,f),W&&Me(f,null,a,"unmounted")},_)},cr=f=>{const{type:a,el:_,anchor:C,transition:b}=f;if(a===ue){Oo(_,C);return}if(a===ht){w(f);return}const A=()=>{r(_),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(f.shapeFlag&1&&b&&!b.persisted){const{leave:F,delayLeave:v}=b,P=()=>F(_,A);v?v(f.el,A,P):P()}else A()},Oo=(f,a)=>{let _;for(;f!==a;)_=g(f),r(f),f=_;r(a)},Io=(f,a,_)=>{const{bum:C,scope:b,update:A,subTree:F,um:v}=f;C&&vt(C),b.stop(),A&&(A.active=!1,Se(F,f,a,_)),v&&fe(v,a),fe(()=>{f.isUnmounted=!0},a),a&&a.pendingBranch&&!a.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===a.pendingId&&(a.deps--,a.deps===0&&a.resolve())},Be=(f,a,_,C=!1,b=!1,A=0)=>{for(let F=A;Ff.shapeFlag&6?an(f.component.subTree):f.shapeFlag&128?f.suspense.next():g(f.anchor||f.el),fr=(f,a,_)=>{f==null?a._vnode&&Se(a._vnode,null,null,!0):S(a._vnode||null,f,a,null,null,null,_),Er(),Rn(),a._vnode=f},Ct={p:S,um:Se,m:st,r:cr,mt:L,mc:E,pc:ee,pbc:H,n:an,o:e};let Gn,es;return t&&([Gn,es]=t(Ct)),{render:fr,hydrate:Gn,createApp:Nc(fr,Gn)}}function rt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function er(e,t,n=!1){const s=e.children,r=t.children;if(I(s)&&I(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}const Lc=e=>e.__isTeleport,Vt=e=>e&&(e.disabled||e.disabled===""),Ir=e=>typeof SVGElement!="undefined"&&e instanceof SVGElement,bs=(e,t)=>{const n=e&&e.to;return se(n)?t?t(n):null:n},Hc={__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,u){const{mc:p,pc:h,pbc:g,o:{insert:T,querySelector:R,createText:S,createComment:V}}=u,y=Vt(t.props);let{shapeFlag:d,children:m,dynamicChildren:w}=t;if(e==null){const M=t.el=S(""),k=t.anchor=S("");T(M,n,s),T(k,n,s);const N=t.target=bs(t.props,R),E=t.targetAnchor=S("");N&&(T(E,N),o=o||Ir(N));const D=(H,K)=>{d&16&&p(m,H,K,r,i,o,l,c)};y?D(n,k):N&&D(N,E)}else{t.el=e.el;const M=t.anchor=e.anchor,k=t.target=e.target,N=t.targetAnchor=e.targetAnchor,E=Vt(e.props),D=E?n:k,H=E?M:N;if(o=o||Ir(k),w?(g(e.dynamicChildren,w,D,r,i,o,l),er(e,t,!0)):c||h(e,t,D,H,r,i,o,l,!1),y)E||xn(t,n,M,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const K=t.target=bs(t.props,R);K&&xn(t,K,null,u,0)}else E&&xn(t,k,N,u,1)}Xi(t)},remove(e,t,n,s,{um:r,o:{remove:i}},o){const{shapeFlag:l,children:c,anchor:u,targetAnchor:p,target:h,props:g}=e;if(h&&i(p),(o||!Vt(g))&&(i(u),l&16))for(let T=0;T0?me||wt:null,Zi(),_t>0&&me&&me.push(e),e}function jc(e,t,n,s,r,i){return Qi(nr(e,t,n,s,r,i,!0))}function tr(e,t,n,s,r){return Qi(ne(e,t,n,s,r,!0))}function Qe(e){return e?e.__v_isVNode===!0:!1}function Ie(e,t){return e.type===t.type&&e.key===t.key}function Kc(e){}const Xn="__vInternal",Gi=({key:e})=>e!=null?e:null,vn=({ref:e,ref_key:t,ref_for:n})=>e!=null?se(e)||ce(e)||$(e)?{i:ae,r:e,k:t,f:!!n}:e:null;function nr(e,t=null,n=null,s=0,r=null,i=e===ue?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Gi(t),ref:t&&vn(t),scopeId:$n,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ae};return l?(rr(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=se(n)?8:16),_t>0&&!o&&me&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&me.push(c),c}const ne=$c;function $c(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Hi)&&(e=he),Qe(e)){const l=Ne(e,t,!0);return n&&rr(l,n),_t>0&&!i&&me&&(l.shapeFlag&6?me[me.indexOf(e)]=l:me.push(l)),l.patchFlag|=-2,l}if(Qc(e)&&(e=e.__vccOpts),t){t=eo(t);let{class:l,style:c}=t;l&&!se(l)&&(t.class=tn(l)),G(c)&&(ks(c)&&!I(c)&&(c=ie({},c)),t.style=en(c))}const o=se(e)?1:wi(e)?128:Lc(e)?64:G(e)?4:$(e)?2:0;return nr(e,t,n,s,r,o,i,!0)}function eo(e){return e?ks(e)||Xn in e?ie({},e):e:null}function Ne(e,t,n=!1){const{props:s,ref:r,patchFlag:i,children:o}=e,l=t?to(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Gi(l),ref:t&&t.ref?n&&r?I(r)?r.concat(vn(t)):[r,vn(t)]:vn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ue?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ne(e.ssContent),ssFallback:e.ssFallback&&Ne(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx}}function sr(e=" ",t=0){return ne(mt,null,e,t)}function Vc(e,t){const n=ne(ht,null,e);return n.staticCount=t,n}function Wc(e="",t=!1){return t?(zn(),tr(he,null,e)):ne(he,null,e)}function xe(e){return e==null||typeof e=="boolean"?ne(he):I(e)?ne(ue,null,e.slice()):typeof e=="object"?Je(e):ne(mt,null,String(e))}function Je(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ne(e)}function rr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(I(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),rr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Xn in t)?t._ctx=ae:r===3&&ae&&(ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $(t)?(t={default:t,_ctx:ae},n=32):(t=String(t),s&64?(n=16,t=[sr(t)]):n=8);e.children=t,e.shapeFlag|=n}function to(...e){const t={};for(let n=0;nle||ae,Ge=e=>{le=e,e.scope.on()},ze=()=>{le&&le.scope.off(),le=null};function so(e){return e.vnode.shapeFlag&4}let Ft=!1;function ro(e,t=!1){Ft=t;const{props:n,children:s}=e.vnode,r=so(e);Pc(e,n,r,t),Mc(e,s);const i=r?Yc(e,t):void 0;return Ft=!1,i}function Yc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Ls(new Proxy(e.ctx,gs));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?oo(e):null;Ge(e),Ot();const i=De(s,e,0,[e.props,r]);if(It(),ze(),Fs(i)){if(i.then(ze,ze),t)return i.then(o=>{xs(e,o,t)}).catch(o=>{bt(o,e,0)});e.asyncDep=i}else xs(e,i,t)}else io(e,t)}function xs(e,t,n){$(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:G(t)&&(e.setupState=Us(t)),io(e,n)}let Fn,Es;function zc(e){Fn=e,Es=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Ec))}}const Xc=()=>!Fn;function io(e,t,n){const s=e.type;if(!e.render){if(!t&&Fn&&!s.render){const r=s.template||Qs(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,u=ie(ie({isCustomElement:i,delimiters:l},o),c);s.render=Fn(r,u)}}e.render=s.render||Pe,Es&&Es(e)}Ge(e),Ot(),wc(e),It(),ze()}function Zc(e){return new Proxy(e.attrs,{get(t,n){return we(e,"get","$attrs"),t[n]}})}function oo(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=Zc(e))},slots:e.slots,emit:e.emit,expose:t}}function Zn(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Us(Ls(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in $t)return $t[n](e)},has(t,n){return n in t||n in $t}}))}function ws(e,t=!0){return $(e)?e.displayName||e.name:e.name||t&&e.__name}function Qc(e){return $(e)&&"__vccOpts"in e}const lo=(e,t)=>Dl(e,t,Ft);function Gc(){return null}function ef(){return null}function tf(e){}function nf(e,t){return null}function sf(){return co().slots}function rf(){return co().attrs}function co(){const e=tt();return e.setupContext||(e.setupContext=oo(e))}function of(e,t){const n=I(e)?e.reduce((s,r)=>(s[r]={},s),{}):e;for(const s in t){const r=n[s];r?I(r)||$(r)?n[s]={type:r,default:t[s]}:r.default=t[s]:r===null&&(n[s]={default:t[s]})}return n}function lf(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n}function cf(e){const t=tt();let n=e();return ze(),Fs(n)&&(n=n.catch(s=>{throw Ge(t),s})),[n,()=>Ge(t)]}function fo(e,t,n){const s=arguments.length;return s===2?G(t)&&!I(t)?Qe(t)?ne(e,null,[t]):ne(e,t):ne(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Qe(n)&&(n=[n]),ne(e,t,n))}const uo=Symbol(""),ao=()=>jt(uo);function ff(){}function uf(e,t,n,s){const r=n[s];if(r&&ho(r,e))return r;const i=t();return i.memo=e.slice(),n[s]=i}function ho(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s0&&me&&me.push(e),!0}const po="3.2.45",af={createComponentInstance:no,setupComponent:ro,renderComponentRoot:Tn,setCurrentRenderingInstance:Qt,isVNode:Qe,normalizeVNode:xe},df=af,hf=null,pf=null,gf="http://www.w3.org/2000/svg",ct=typeof document!="undefined"?document:null,Nr=ct&&ct.createElement("template"),mf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t?ct.createElementNS(gf,e):ct.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ct.createTextNode(e),createComment:e=>ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Nr.innerHTML=s?`${e}`:e;const l=Nr.content;if(s){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function _f(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function yf(e,t,n){const s=e.style,r=se(n);if(n&&!r){for(const i in n)Ts(s,i,n[i]);if(t&&!se(t))for(const i in t)n[i]==null&&Ts(s,i,"")}else{const i=s.display;r?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=i)}}const Br=/\s*!important$/;function Ts(e,t,n){if(I(n))n.forEach(s=>Ts(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=bf(e,t);Br.test(n)?e.setProperty(ve(s),n.replace(Br,""),"important"):e[s]=n}}const kr=["Webkit","Moz","ms"],os={};function bf(e,t){const n=os[t];if(n)return n;let s=_e(t);if(s!=="filter"&&s in e)return os[t]=s;s=rn(s);for(let r=0;rls||(vf.then(()=>ls=0),ls=Date.now());function Rf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Ee(Pf(s,n.value),t,5,[s])};return n.value=e,n.attached=Af(),n}function Pf(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Dr=/^on[a-z]/,Sf=(e,t,n,s,r=!1,i,o,l,c)=>{t==="class"?_f(e,s,r):t==="style"?yf(e,n,s):nn(t)?Ps(t)||wf(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ff(e,t,s,r))?xf(e,t,s,i,o,l,c):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Cf(e,t,s,r))};function Ff(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&Dr.test(t)&&$(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Dr.test(t)&&se(n)?!1:t in e}function go(e,t){const n=zs(e);class s extends Qn{constructor(i){super(n,i,t)}}return s.def=n,s}const Mf=e=>go(e,Fo),Of=typeof HTMLElement!="undefined"?HTMLElement:class{};class Qn extends Of{constructor(t,n={},s){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&s?s(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,Ks(()=>{this._connected||(Rs(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let s=0;s{for(const r of s)this._setAttr(r.attributeName)}).observe(this,{attributes:!0});const t=(s,r=!1)=>{const{props:i,styles:o}=s;let l;if(i&&!I(i))for(const c in i){const u=i[c];(u===Number||u&&u.type===Number)&&(c in this._props&&(this._props[c]=Ue(this._props[c])),(l||(l=Object.create(null)))[_e(c)]=!0)}this._numberProps=l,r&&this._resolveProps(s),this._applyStyles(o),this._update()},n=this._def.__asyncLoader;n?n().then(s=>t(s,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,s=I(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&s.includes(r)&&this._setProp(r,this[r],!0,!1);for(const r of s.map(_e))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(i){this._setProp(r,i)}})}_setAttr(t){let n=this.getAttribute(t);const s=_e(t);this._numberProps&&this._numberProps[s]&&(n=Ue(n)),this._setProp(s,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,r=!0){n!==this._props[t]&&(this._props[t]=n,r&&this._instance&&this._update(),s&&(n===!0?this.setAttribute(ve(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(ve(t),n+""):n||this.removeAttribute(ve(t))))}_update(){Rs(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ne(this._def,ie({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,{detail:o}))};n.emit=(i,...o)=>{s(i,o),ve(i)!==i&&s(ve(i),o)};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof Qn){n.parent=r._instance,n.provides=r._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const s=document.createElement("style");s.textContent=n,this.shadowRoot.appendChild(s)})}}function If(e="$style"){{const t=tt();if(!t)return Q;const n=t.type.__cssModules;if(!n)return Q;const s=n[e];return s||Q}}function Nf(e){const t=tt();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>As(i,r))},s=()=>{const r=e(t.proxy);vs(t.subTree,r),n(r)};Ai(s),fn(()=>{const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Yn(()=>r.disconnect())})}function vs(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{vs(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)As(e.el,t);else if(e.type===ue)e.children.forEach(n=>vs(n,t));else if(e.type===ht){let{el:n,anchor:s}=e;for(;n&&(As(n,t),n!==s);)n=n.nextSibling}}function As(e,t){if(e.nodeType===1){const n=e.style;for(const s in t)n.setProperty(`--${s}`,t[s])}}const We="transition",Bt="animation",ir=(e,{slots:t})=>fo(Ys,_o(e),t);ir.displayName="Transition";const mo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Bf=ir.props=ie({},Ys.props,mo),it=(e,t=[])=>{I(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ur=e=>e?I(e)?e.some(t=>t.length>1):e.length>1:!1;function _o(e){const t={};for(const O in e)O in mo||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:p=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,R=kf(r),S=R&&R[0],V=R&&R[1],{onBeforeEnter:y,onEnter:d,onEnterCancelled:m,onLeave:w,onLeaveCancelled:M,onBeforeAppear:k=y,onAppear:N=d,onAppearCancelled:E=m}=t,D=(O,q,L)=>{qe(O,q?p:l),qe(O,q?u:o),L&&L()},H=(O,q)=>{O._isLeaving=!1,qe(O,h),qe(O,T),qe(O,g),q&&q()},K=O=>(q,L)=>{const ye=O?N:d,X=()=>D(q,O,L);it(ye,[q,X]),jr(()=>{qe(q,O?c:i),ke(q,O?p:l),Ur(ye)||Kr(q,s,S,X)})};return ie(t,{onBeforeEnter(O){it(y,[O]),ke(O,i),ke(O,o)},onBeforeAppear(O){it(k,[O]),ke(O,c),ke(O,u)},onEnter:K(!1),onAppear:K(!0),onLeave(O,q){O._isLeaving=!0;const L=()=>H(O,q);ke(O,h),bo(),ke(O,g),jr(()=>{!O._isLeaving||(qe(O,h),ke(O,T),Ur(w)||Kr(O,s,V,L))}),it(w,[O,L])},onEnterCancelled(O){D(O,!1),it(m,[O])},onAppearCancelled(O){D(O,!0),it(E,[O])},onLeaveCancelled(O){H(O),it(M,[O])}})}function kf(e){if(e==null)return null;if(G(e))return[cs(e.enter),cs(e.leave)];{const t=cs(e);return[t,t]}}function cs(e){return Ue(e)}function ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function qe(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function jr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Lf=0;function Kr(e,t,n,s){const r=e._endId=++Lf,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=yo(e,t);if(!o)return s();const u=o+"end";let p=0;const h=()=>{e.removeEventListener(u,g),i()},g=T=>{T.target===e&&++p>=c&&h()};setTimeout(()=>{p(n[R]||"").split(", "),r=s(`${We}Delay`),i=s(`${We}Duration`),o=$r(r,i),l=s(`${Bt}Delay`),c=s(`${Bt}Duration`),u=$r(l,c);let p=null,h=0,g=0;t===We?o>0&&(p=We,h=o,g=i.length):t===Bt?u>0&&(p=Bt,h=u,g=c.length):(h=Math.max(o,u),p=h>0?o>u?We:Bt:null,g=p?p===We?i.length:c.length:0);const T=p===We&&/\b(transform|all)(,|$)/.test(s(`${We}Property`).toString());return{type:p,timeout:h,propCount:g,hasTransform:T}}function $r(e,t){for(;e.lengthVr(n)+Vr(e[s])))}function Vr(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function bo(){return document.body.offsetHeight}const Co=new WeakMap,xo=new WeakMap,Hf={name:"TransitionGroup",props:ie({},Bf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=tt(),s=Js();let r,i;return qn(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!$f(r[0].el,n.vnode.el,o))return;r.forEach(Uf),r.forEach(jf);const l=r.filter(Kf);bo(),l.forEach(c=>{const u=c.el,p=u.style;ke(u,o),p.transform=p.webkitTransform=p.transitionDuration="";const h=u._moveCb=g=>{g&&g.target!==u||(!g||/transform$/.test(g.propertyName))&&(u.removeEventListener("transitionend",h),u._moveCb=null,qe(u,o))};u.addEventListener("transitionend",h)})}),()=>{const o=z(e),l=_o(o);let c=o.tag||ue;r=i,i=t.default?Vn(t.default()):[];for(let u=0;u{o.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(o=>o&&s.classList.add(o)),s.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(s);const{hasTransform:i}=yo(s);return r.removeChild(s),i}const et=e=>{const t=e.props["onUpdate:modelValue"]||!1;return I(t)?n=>vt(t,n):t};function Vf(e){e.target.composing=!0}function Wr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mn={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e._assign=et(r);const i=s||r.props&&r.props.type==="number";He(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Ue(l)),e._assign(l)}),n&&He(e,"change",()=>{e.value=e.value.trim()}),t||(He(e,"compositionstart",Vf),He(e,"compositionend",Wr),He(e,"change",Wr))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:r}},i){if(e._assign=et(i),e.composing||document.activeElement===e&&e.type!=="range"&&(n||s&&e.value.trim()===t||(r||e.type==="number")&&Ue(e.value)===t))return;const o=t==null?"":t;e.value!==o&&(e.value=o)}},or={deep:!0,created(e,t,n){e._assign=et(n),He(e,"change",()=>{const s=e._modelValue,r=Mt(e),i=e.checked,o=e._assign;if(I(s)){const l=In(s,r),c=l!==-1;if(i&&!c)o(s.concat(r));else if(!i&&c){const u=[...s];u.splice(l,1),o(u)}}else if(yt(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(wo(e,i))})},mounted:qr,beforeUpdate(e,t,n){e._assign=et(n),qr(e,t,n)}};function qr(e,{value:t,oldValue:n},s){e._modelValue=t,I(t)?e.checked=In(t,s.props.value)>-1:yt(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=Xe(t,wo(e,!0)))}const lr={created(e,{value:t},n){e.checked=Xe(t,n.props.value),e._assign=et(n),He(e,"change",()=>{e._assign(Mt(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e._assign=et(s),t!==n&&(e.checked=Xe(t,s.props.value))}},Eo={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=yt(t);He(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Ue(Mt(o)):Mt(o));e._assign(e.multiple?r?new Set(i):i:i[0])}),e._assign=et(s)},mounted(e,{value:t}){Jr(e,t)},beforeUpdate(e,t,n){e._assign=et(n)},updated(e,{value:t}){Jr(e,t)}};function Jr(e,t){const n=e.multiple;if(!(n&&!I(t)&&!yt(t))){for(let s=0,r=e.options.length;s-1:i.selected=t.has(o);else if(Xe(Mt(i),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Mt(e){return"_value"in e?e._value:e.value}function wo(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const To={created(e,t,n){En(e,t,n,null,"created")},mounted(e,t,n){En(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){En(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){En(e,t,n,s,"updated")}};function vo(e,t){switch(e){case"SELECT":return Eo;case"TEXTAREA":return Mn;default:switch(t){case"checkbox":return or;case"radio":return lr;default:return Mn}}}function En(e,t,n,s,r){const o=vo(e.tagName,n.props&&n.props.type)[r];o&&o(e,t,n,s)}function Wf(){Mn.getSSRProps=({value:e})=>({value:e}),lr.getSSRProps=({value:e},t)=>{if(t.props&&Xe(t.props.value,e))return{checked:!0}},or.getSSRProps=({value:e},t)=>{if(I(e)){if(t.props&&In(e,t.props.value)>-1)return{checked:!0}}else if(yt(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},To.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=vo(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const qf=["ctrl","shift","alt","meta"],Jf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>qf.some(n=>e[`${n}Key`]&&!t.includes(n))},Yf=(e,t)=>(n,...s)=>{for(let r=0;rn=>{if(!("key"in n))return;const s=ve(n.key);if(t.some(r=>r===s||zf[r]===s))return e(n)},Ao={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),kt(e,!0),s.enter(e)):s.leave(e,()=>{kt(e,!1)}):kt(e,t))},beforeUnmount(e,{value:t}){kt(e,t)}};function kt(e,t){e.style.display=t?e._vod:"none"}function Zf(){Ao.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Ro=ie({patchProp:Sf},mf);let qt,Yr=!1;function Po(){return qt||(qt=Ji(Ro))}function So(){return qt=Yr?qt:Yi(Ro),Yr=!0,qt}const Rs=(...e)=>{Po().render(...e)},Fo=(...e)=>{So().hydrate(...e)},Qf=(...e)=>{const t=Po().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Mo(s);if(!r)return;const i=t._component;!$(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.innerHTML="";const o=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},Gf=(...e)=>{const t=So().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Mo(s);if(r)return n(r,!0,r instanceof SVGElement)},t};function Mo(e){return se(e)?document.querySelector(e):e}let zr=!1;const eu=()=>{zr||(zr=!0,Wf(),Zf())},tu=()=>{};var nu=Object.freeze(Object.defineProperty({__proto__:null,compile:tu,EffectScope:Os,ReactiveEffect:on,customRef:Bl,effect:sl,effectScope:Qo,getCurrentScope:Go,isProxy:ks,isReactive:at,isReadonly:pt,isRef:ce,isShallow:Yt,markRaw:Ls,onScopeDispose:el,proxyRefs:Us,reactive:Hn,readonly:Bs,ref:wn,shallowReactive:hi,shallowReadonly:Sl,shallowRef:Fl,stop:rl,toRaw:z,toRef:mi,toRefs:kl,triggerRef:Ol,unref:gi,camelize:_e,capitalize:rn,normalizeClass:tn,normalizeProps:Uo,normalizeStyle:en,toDisplayString:Vo,toHandlerKey:Ut,BaseTransition:Ys,Comment:he,Fragment:ue,KeepAlive:ac,Static:ht,Suspense:ec,Teleport:Uc,Text:mt,callWithAsyncErrorHandling:Ee,callWithErrorHandling:De,cloneVNode:Ne,compatUtils:pf,computed:lo,createBlock:tr,createCommentVNode:Wc,createElementBlock:jc,createElementVNode:nr,createHydrationRenderer:Yi,createPropsRestProxy:lf,createRenderer:Ji,createSlots:bc,createStaticVNode:Vc,createTextVNode:sr,createVNode:ne,defineAsyncComponent:fc,defineComponent:zs,defineEmits:ef,defineExpose:tf,defineProps:Gc,get devtools(){return Et},getCurrentInstance:tt,getTransitionRawChildren:Vn,guardReactiveProps:eo,h:fo,handleError:bt,initCustomFormatter:ff,inject:jt,isMemoSame:ho,isRuntimeOnly:Xc,isVNode:Qe,mergeDefaults:of,mergeProps:to,nextTick:Ks,onActivated:Si,onBeforeMount:Oi,onBeforeUnmount:Jn,onBeforeUpdate:Ii,onDeactivated:Fi,onErrorCaptured:Li,onMounted:fn,onRenderTracked:ki,onRenderTriggered:Bi,onServerPrefetch:Ni,onUnmounted:Yn,onUpdated:qn,openBlock:zn,popScopeId:Jl,provide:vi,pushScopeId:ql,queuePostFlushCb:$s,registerRuntimeCompiler:zc,renderList:yc,renderSlot:Cc,resolveComponent:gc,resolveDirective:_c,resolveDynamicComponent:mc,resolveFilter:hf,resolveTransitionHooks:St,setBlockTracking:Cs,setDevtoolsHook:xi,setTransitionHooks:gt,ssrContextKey:uo,ssrUtils:df,toHandlers:xc,transformVNodeArgs:Kc,useAttrs:rf,useSSRContext:ao,useSlots:sf,useTransitionState:Js,version:po,warn:Ul,watch:Kt,watchEffect:ic,watchPostEffect:Ai,watchSyncEffect:oc,withAsyncContext:cf,withCtx:Vs,withDefaults:nf,withDirectives:hc,withMemo:uf,withScopeId:Yl,Transition:ir,TransitionGroup:Df,VueElement:Qn,createApp:Qf,createSSRApp:Gf,defineCustomElement:go,defineSSRCustomElement:Mf,hydrate:Fo,initDirectivesForSSR:eu,render:Rs,useCssModule:If,useCssVars:Nf,vModelCheckbox:or,vModelDynamic:To,vModelRadio:lr,vModelSelect:Eo,vModelText:Mn,vShow:Ao,withKeys:Xf,withModifiers:Yf},Symbol.toStringTag,{value:"Module"}));export{Kt as A,lo as B,fo as C,z as D,qn as E,ue as F,Dl as G,Xf as H,jt as I,Mn as J,ce as K,mc as L,to as M,ac as N,Fl as O,ql as P,Jl as Q,Uo as R,eo as S,Uc as T,nu as V,wn as a,nr as b,tr as c,ne as d,Qf as e,fn as f,tt as g,Yn as h,Hn as i,jc as j,hc as k,Wc as l,en as m,Ks as n,zn as o,vi as p,Yf as q,gc as r,yc as s,Vo as t,gi as u,Ao as v,Vs as w,tn as x,sr as y,Cc as z}; diff --git a/src/main/resources/magic-editor/favicon.ico b/src/main/resources/magic-editor/favicon.ico index 08c110b7e0ecc9971c64b36ab27fbca970b22490..8da34f7e6164d02cf4fb395d03773119d38d1ae2 100644 Binary files a/src/main/resources/magic-editor/favicon.ico and b/src/main/resources/magic-editor/favicon.ico differ diff --git a/src/main/resources/magic-editor/index.html b/src/main/resources/magic-editor/index.html index 085a122c78c06bea02de5801504d03c39586323c..c926a34663db57a981e7ea5ca9f828da4cfd21b0 100644 --- a/src/main/resources/magic-editor/index.html +++ b/src/main/resources/magic-editor/index.html @@ -4,7 +4,7 @@ - 接口管理平台 + 智能接口管理平台 @@ -48,8 +53,8 @@