diff --git a/pom.xml b/pom.xml
index b3ea38a1af..943eb7dd28 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,6 +18,7 @@
yudao-module-system
yudao-module-infra
yudao-module-pay
+ yudao-module-wechat-mp
${project.artifactId}
diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql
index 9590451868..c92842bde2 100644
--- a/sql/mysql/ruoyi-vue-pro.sql
+++ b/sql/mysql/ruoyi-vue-pro.sql
@@ -2647,3 +2647,248 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`,
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
+
+
+-- 公众号
+DROP TABLE IF EXISTS `wx_account`;
+CREATE TABLE `wx_account` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
+ `name` varchar(100) DEFAULT NULL COMMENT '公众号名称',
+ `account` varchar(100) DEFAULT NULL COMMENT '公众号账户',
+ `appid` varchar(100) DEFAULT NULL COMMENT '公众号appid',
+ `appsecret` varchar(100) DEFAULT NULL COMMENT '公众号密钥',
+ `url` varchar(100) DEFAULT NULL COMMENT '公众号url',
+ `token` varchar(100) DEFAULT NULL COMMENT '公众号token',
+ `aeskey` varchar(300) DEFAULT NULL COMMENT '加密密钥',
+ `qr_url` varchar(200) DEFAULT NULL COMMENT '二维码图片URL',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '公众号账户表';
+
+DROP TABLE IF EXISTS `wx_account_fans`;
+CREATE TABLE `wx_account_fans` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
+ `openid` varchar(100) DEFAULT NULL COMMENT '用户标识',
+ `subscribe_status` char(1) DEFAULT NULL COMMENT '订阅状态,0未关注,1已关注',
+ `subscribe_time` datetime DEFAULT NULL COMMENT '订阅时间',
+ `nickname` varbinary(2000) DEFAULT NULL COMMENT '昵称',
+ `gender` varchar(10) DEFAULT NULL COMMENT '性别,1男,2女,0未知',
+ `language` varchar(30) DEFAULT NULL COMMENT '语言',
+ `country` varchar(30) DEFAULT NULL COMMENT '国家',
+ `province` varchar(30) DEFAULT NULL COMMENT '省份',
+ `city` varchar(30) DEFAULT NULL COMMENT '城市',
+ `headimg_url` varchar(500) DEFAULT NULL COMMENT '头像地址',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信公众号ID',
+ `wx_account_appid` varchar(100) DEFAULT NULL COMMENT '微信公众号appid',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信公众号粉丝表';
+
+ DROP TABLE IF EXISTS `wx_account_fans_tag`;
+ CREATE TABLE `wx_account_fans_tag` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `openid` varchar(100) DEFAULT NULL COMMENT '用户标识',
+ `tag_id` varchar(32) DEFAULT NULL COMMENT '标签ID',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='粉丝标签关联表';
+
+ DROP TABLE IF EXISTS `wx_fans_msg`;
+ CREATE TABLE `wx_fans_msg` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `openid` varchar(100) DEFAULT NULL COMMENT '用户标识',
+ `nickname` varbinary(2000) DEFAULT NULL COMMENT '昵称',
+ `headimg_url` varchar(500) DEFAULT NULL COMMENT '头像地址',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型',
+ `content` varchar(500) DEFAULT NULL COMMENT '内容',
+ `res_content` text COMMENT '最近一条回复内容',
+ `is_res` varchar(32) DEFAULT NULL COMMENT '是否已回复',
+ `media_id` varchar(100) DEFAULT NULL COMMENT '微信素材ID',
+ `pic_url` varchar(500) DEFAULT NULL COMMENT '微信图片URL',
+ `pic_path` varchar(500) DEFAULT NULL COMMENT '本地图片路径',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='粉丝消息表 ';
+
+ DROP TABLE IF EXISTS `wx_fans_msg_res`;
+ CREATE TABLE `wx_fans_msg_res` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `fans_msg_id` varchar(32) DEFAULT NULL COMMENT '粉丝消息ID',
+ `res_content` text COMMENT '回复内容',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='回复粉丝消息历史表 ';
+
+
+ DROP TABLE IF EXISTS `wx_fans_tag`;
+ CREATE TABLE `wx_fans_tag` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(32) DEFAULT NULL COMMENT '标签名称',
+ `count` int(11) DEFAULT NULL COMMENT '粉丝数量',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='粉丝标签表';
+
+ DROP TABLE IF EXISTS `wx_media_upload`;
+ CREATE TABLE `wx_media_upload` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `type` varchar(32) DEFAULT NULL COMMENT '类型',
+ `url` varchar(500) DEFAULT NULL COMMENT '图片URL',
+ `media_id` varchar(32) DEFAULT NULL COMMENT '素材ID',
+ `thumb_media_id` varchar(32) DEFAULT NULL COMMENT '缩略图素材ID',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信素材上传表 ';
+
+ DROP TABLE IF EXISTS `wx_menu`;
+ CREATE TABLE `wx_menu` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `parent_id` varchar(32) DEFAULT NULL COMMENT '父ID',
+ `menu_name` varchar(32) DEFAULT NULL COMMENT '菜单名称',
+ `menu_type` varchar(32) DEFAULT NULL COMMENT '菜单类型 1文本消息;2图文消息;3网址链接;4小程序',
+ `menu_level` varchar(32) DEFAULT NULL COMMENT '菜单等级',
+ `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID',
+ `menu_url` varchar(255) DEFAULT NULL COMMENT '菜单URL',
+ `menu_sort` varchar(32) DEFAULT NULL COMMENT '排序',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `miniprogram_appid` varchar(32) DEFAULT NULL COMMENT '小程序appid',
+ `miniprogram_pagepath` varchar(200) DEFAULT NULL COMMENT '小程序页面路径',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COMMENT='微信菜单表';
+
+
+ DROP TABLE IF EXISTS `wx_news_article_item`;
+ CREATE TABLE `wx_news_article_item` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `title` varchar(32) DEFAULT NULL COMMENT '标题',
+ `digest` varchar(50) DEFAULT NULL COMMENT '摘要',
+ `author` varchar(32) DEFAULT NULL COMMENT '作者',
+ `show_cover_pic` char(1) DEFAULT NULL COMMENT '是否展示封面图片(0/1)',
+ `thumb_media_id` varchar(50) DEFAULT NULL COMMENT '上传微信,封面图片标识',
+ `content` text COMMENT '内容',
+ `content_source_url` varchar(50) DEFAULT NULL COMMENT '内容链接',
+ `order_no` int(11) DEFAULT NULL COMMENT '文章排序',
+ `pic_path` varchar(255) DEFAULT NULL COMMENT '图片路径',
+ `need_open_comment` varchar(32) DEFAULT NULL COMMENT '是否可以留言',
+ `only_fans_can_comment` varchar(32) DEFAULT NULL COMMENT '是否仅粉丝可以留言',
+ `news_id` varchar(32) DEFAULT NULL COMMENT '图文ID',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='图文消息文章列表表 ';
+
+ DROP TABLE IF EXISTS `wx_news_template`;
+ CREATE TABLE `wx_news_template` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键 主键ID',
+ `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名称',
+ `is_upload` varchar(32) DEFAULT NULL COMMENT '是否已上传微信',
+ `media_id` varchar(50) DEFAULT NULL,
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='图文消息模板表';
+
+
+ DROP TABLE IF EXISTS `wx_receive_text`;
+ CREATE TABLE `wx_receive_text` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `receive_text` varchar(32) DEFAULT NULL COMMENT '关键字',
+ `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型 1文本消息;2图文消息;',
+ `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='回复关键字表';
+
+
+ DROP TABLE IF EXISTS `wx_subscribe_text`;
+ CREATE TABLE `wx_subscribe_text` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型 1文本消息;2图文消息;',
+ `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID',
+ `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='关注欢迎语表';
+
+
+ DROP TABLE IF EXISTS `wx_text_template`;
+ CREATE TABLE `wx_text_template` (
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名字',
+ `content` varchar(255) DEFAULT NULL COMMENT '模板内容',
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
+ `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='文本模板表';
diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml
index 37a2c8a1b7..7b91eeb6c6 100644
--- a/yudao-dependencies/pom.xml
+++ b/yudao-dependencies/pom.xml
@@ -64,6 +64,7 @@
3.1.471
1.2.7
1.4.0
+ 3.3.0
@@ -567,6 +568,12 @@
${justauth.version}
+
+ com.github.binarywang
+ weixin-java-mp
+ ${weixin-java-mp.version}
+
+
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java
index a21582cbd1..b54319a8a8 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java
@@ -47,7 +47,7 @@ public class SmsCallbackController {
}
@PostMapping("/tencent")
- @ApiOperation(value = "腾讯云短信的回调", notes = "参见 https://cloud.tencent.com/document/product/382/52077 文档")
+ @ApiOperation(value = "腾讯云短信的回调", notes = "参见 https://cloud.tencent.com/document/producer/382/52077 文档")
@OperateLog(enable = false)
public CommonResult receiveTencentSmsStatus(HttpServletRequest request) throws Throwable {
String text = ServletUtil.getBody(request);
diff --git a/yudao-module-wechat-mp/pom.xml b/yudao-module-wechat-mp/pom.xml
new file mode 100644
index 0000000000..97818d4e7d
--- /dev/null
+++ b/yudao-module-wechat-mp/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.boot
+ ${revision}
+
+ 4.0.0
+
+ yudao-module-wechat-mp-api
+ yudao-module-wechat-mp-biz
+
+ yudao-module-wechat-mp
+ pom
+
+ ${project.artifactId}
+
+ 微信公众号模块,主要实现 账号管理,粉丝管理 等功能。
+
+
+
+
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-api/pom.xml b/yudao-module-wechat-mp/yudao-module-wechat-mp-api/pom.xml
new file mode 100644
index 0000000000..6049507887
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-api/pom.xml
@@ -0,0 +1,26 @@
+
+
+
+ yudao-module-wechat-mp
+ cn.iocoder.boot
+ ${revision}
+
+ 4.0.0
+ yudao-module-wechat-mp-api
+ jar
+
+ ${project.artifactId}
+
+ 微信公众号模块 API,暴露给其它模块调用
+
+
+
+
+ cn.iocoder.boot
+ yudao-common
+
+
+
+
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-api/src/main/java/cn/iocoder/yudao/module/wechatMp/enums/ErrorCodeConstants.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-api/src/main/java/cn/iocoder/yudao/module/wechatMp/enums/ErrorCodeConstants.java
new file mode 100644
index 0000000000..ea356c0bbe
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-api/src/main/java/cn/iocoder/yudao/module/wechatMp/enums/ErrorCodeConstants.java
@@ -0,0 +1,16 @@
+package cn.iocoder.yudao.module.wechatMp.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * Member 错误码枚举类
+ *
+ * wechatMp 系统,使用 1-004-000-000 段
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 用户相关 1004001000============
+ ErrorCode WX_ACCOUNT_NOT_EXISTS = new ErrorCode(1004001000, "用户不存在");
+ ErrorCode WX_ACCOUNT_FANS_NOT_EXISTS = new ErrorCode(1004001000, "用户不存在");
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/pom.xml b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/pom.xml
new file mode 100644
index 0000000000..9266de9ac2
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/pom.xml
@@ -0,0 +1,77 @@
+
+
+
+ yudao-module-wechat-mp
+ cn.iocoder.boot
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-wechat-mp-biz
+
+ ${project.artifactId}
+
+ 微信公众号模块,主要实现 账号管理,粉丝管理 等功能。
+
+
+
+
+ cn.iocoder.boot
+ yudao-module-wechat-mp-api
+ ${revision}
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-biz-operatelog
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-mybatis
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-test
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-excel
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-mq
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+ com.github.binarywang
+ weixin-java-mp
+
+
+
+
+
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/AbstractBuilder.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/AbstractBuilder.java
new file mode 100644
index 0000000000..faee1706e4
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/AbstractBuilder.java
@@ -0,0 +1,14 @@
+package cn.iocoder.yudao.module.wechatMp.builder;
+
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractBuilder {
+ protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+ public abstract WxMpXmlOutMessage build(String content,
+ WxMpXmlMessage wxMessage, WxMpService service);
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/ImageBuilder.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/ImageBuilder.java
new file mode 100644
index 0000000000..9924984edc
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/ImageBuilder.java
@@ -0,0 +1,21 @@
+package cn.iocoder.yudao.module.wechatMp.builder;
+
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutImageMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+
+public class ImageBuilder extends AbstractBuilder {
+
+ @Override
+ public WxMpXmlOutMessage build(String content, WxMpXmlMessage wxMessage,
+ WxMpService service) {
+
+ WxMpXmlOutImageMessage m = WxMpXmlOutMessage.IMAGE().mediaId(content)
+ .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser())
+ .build();
+
+ return m;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/TextBuilder.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/TextBuilder.java
new file mode 100644
index 0000000000..a1b1849dc4
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/builder/TextBuilder.java
@@ -0,0 +1,19 @@
+package cn.iocoder.yudao.module.wechatMp.builder;
+
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutTextMessage;
+
+public class TextBuilder extends AbstractBuilder {
+
+ @Override
+ public WxMpXmlOutMessage build(String content, WxMpXmlMessage wxMessage,
+ WxMpService service) {
+ WxMpXmlOutTextMessage m = WxMpXmlOutMessage.TEXT().content(content)
+ .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser())
+ .build();
+ return m;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/config/WxMpConfig.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/config/WxMpConfig.java
new file mode 100644
index 0000000000..46b14d602e
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/config/WxMpConfig.java
@@ -0,0 +1,137 @@
+package cn.iocoder.yudao.module.wechatMp.config;
+
+
+import cn.hutool.extra.spring.SpringUtil;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo.WxAccountExportReqVO;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.module.wechatMp.handler.*;
+import cn.iocoder.yudao.module.wechatMp.service.account.WxAccountService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.api.WxConsts;
+import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
+import me.chanjar.weixin.mp.api.WxMpMessageRouter;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
+import me.chanjar.weixin.mp.constant.WxMpEventConstants;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Component
+@Slf4j
+public class WxMpConfig implements InitializingBean {
+
+ private static Map routers = Maps.newHashMap();
+ private static Map mpServices = Maps.newHashMap();
+
+ @Autowired
+ private WxAccountService wxAccountService;
+
+ /**
+ * 初始化公众号配置
+ */
+ public synchronized void initWxConfig() {
+ WxAccountExportReqVO req = new WxAccountExportReqVO();
+ List wxAccountList = wxAccountService.getWxAccountList(req);
+ if (CollectionUtils.isEmpty(wxAccountList)) {
+ return;
+ }
+ WxMpConfig.init(wxAccountList);
+ log.info("加载公众号配置成功");
+ }
+
+ public static void init(List wxAccountDOS) {
+ mpServices = wxAccountDOS.stream().map(wxAccountDO -> {
+ WxMpInMemoryConfigStorage configStorage = new WxMpInMemoryConfigStorage();
+ configStorage.setAppId(wxAccountDO.getAppid());
+ configStorage.setSecret(wxAccountDO.getAppsecret());
+ configStorage.setToken(wxAccountDO.getToken());
+ configStorage.setAesKey(wxAccountDO.getAeskey());
+
+ WxMpService service = new WxMpServiceImpl();
+ service.setWxMpConfigStorage(configStorage);
+ routers.put(wxAccountDO.getAppid(), newRouter(service));
+ return service;
+ }).collect(Collectors.toMap(s -> s.getWxMpConfigStorage().getAppId(), a -> a, (o, n) -> o));
+
+ }
+
+ public static Map getRouters() {
+ return routers;
+ }
+
+ public static Map getMpServices() {
+ return mpServices;
+ }
+
+ private static WxMpMessageRouter newRouter(WxMpService wxMpService) {
+ final WxMpMessageRouter newRouter = new WxMpMessageRouter(wxMpService);
+ // 记录所有事件的日志 (异步执行)
+ newRouter.rule().handler(SpringUtil.getBean(LogHandler.class)).next();
+
+ // 接收客服会话管理事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxMpEventConstants.CustomerService.KF_CREATE_SESSION)
+ .handler(SpringUtil.getBean(KfSessionHandler.class)).end();
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxMpEventConstants.CustomerService.KF_CLOSE_SESSION)
+ .handler(SpringUtil.getBean(KfSessionHandler.class))
+ .end();
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxMpEventConstants.CustomerService.KF_SWITCH_SESSION)
+ .handler(SpringUtil.getBean(KfSessionHandler.class)).end();
+
+ // 门店审核事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxMpEventConstants.POI_CHECK_NOTIFY)
+ .handler(SpringUtil.getBean(StoreCheckNotifyHandler.class)).end();
+
+ // 自定义菜单事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxConsts.MenuButtonType.CLICK).handler(SpringUtil.getBean(MenuHandler.class)).end();
+
+ // 点击菜单连接事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxConsts.MenuButtonType.VIEW).handler(SpringUtil.getBean(NullHandler.class)).end();
+
+ // 关注事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxConsts.EventType.SUBSCRIBE).handler(SpringUtil.getBean(SubscribeHandler.class))
+ .end();
+
+ // 取消关注事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxConsts.EventType.UNSUBSCRIBE)
+ .handler(SpringUtil.getBean(UnsubscribeHandler.class)).end();
+
+ // 上报地理位置事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxConsts.EventType.LOCATION).handler(SpringUtil.getBean(LocationHandler.class))
+ .end();
+
+ // 接收地理位置消息
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.LOCATION)
+ .handler(SpringUtil.getBean(LocationHandler.class)).end();
+
+ // 扫码事件
+ newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
+ .event(WxConsts.EventType.SCAN).handler(SpringUtil.getBean(ScanHandler.class)).end();
+
+ // 默认
+ newRouter.rule().async(false).handler(SpringUtil.getBean(MsgHandler.class)).end();
+
+ return newRouter;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception {
+ initWxConfig();
+ }
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/WxAccountController.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/WxAccountController.java
new file mode 100644
index 0000000000..d17b3cddd1
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/WxAccountController.java
@@ -0,0 +1,103 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account;
+
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.annotations.*;
+
+import javax.validation.*;
+import javax.servlet.http.*;
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
+
+import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
+
+import cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.module.wechatMp.convert.account.WxAccountConvert;
+import cn.iocoder.yudao.module.wechatMp.service.account.WxAccountService;
+
+@Api(tags = "管理后台 - 公众号账户")
+@RestController
+@RequestMapping("/wechatMp/wx-account")
+@Validated
+public class WxAccountController {
+
+ @Resource
+ private WxAccountService wxAccountService;
+
+ @PostMapping("/create")
+ @ApiOperation("创建公众号账户")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:create')")
+ public CommonResult createWxAccount(@Valid @RequestBody WxAccountCreateReqVO createReqVO) {
+ return success(wxAccountService.createWxAccount(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @ApiOperation("更新公众号账户")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:update')")
+ public CommonResult updateWxAccount(@Valid @RequestBody WxAccountUpdateReqVO updateReqVO) {
+ wxAccountService.updateWxAccount(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @ApiOperation("删除公众号账户")
+ @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:delete')")
+ public CommonResult deleteWxAccount(@RequestParam("id") Long id) {
+ wxAccountService.deleteWxAccount(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @ApiOperation("获得公众号账户")
+ @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:query')")
+ public CommonResult getWxAccount(@RequestParam("id") Long id) {
+ WxAccountDO wxAccount = wxAccountService.getWxAccount(id);
+ return success(WxAccountConvert.INSTANCE.convert(wxAccount));
+ }
+
+ @GetMapping("/list")
+ @ApiOperation("获得公众号账户列表")
+ @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:query')")
+ public CommonResult> getWxAccountList(@RequestParam("ids") Collection ids) {
+ List list = wxAccountService.getWxAccountList(ids);
+ return success(WxAccountConvert.INSTANCE.convertList(list));
+ }
+
+ @GetMapping("/page")
+ @ApiOperation("获得公众号账户分页")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:query')")
+ public CommonResult> getWxAccountPage(@Valid WxAccountPageReqVO pageVO) {
+ PageResult pageResult = wxAccountService.getWxAccountPage(pageVO);
+ return success(WxAccountConvert.INSTANCE.convertPage(pageResult));
+ }
+
+ @GetMapping("/export-excel")
+ @ApiOperation("导出公众号账户 Excel")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account:export')")
+ @OperateLog(type = EXPORT)
+ public void exportWxAccountExcel(@Valid WxAccountExportReqVO exportReqVO,
+ HttpServletResponse response) throws IOException {
+ List list = wxAccountService.getWxAccountList(exportReqVO);
+ // 导出 Excel
+ List datas = WxAccountConvert.INSTANCE.convertList02(list);
+ ExcelUtils.write(response, "公众号账户.xls", "数据", WxAccountExcelVO.class, datas);
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountBaseVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountBaseVO.java
new file mode 100644
index 0000000000..05d5bffdf1
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountBaseVO.java
@@ -0,0 +1,36 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import javax.validation.constraints.*;
+
+/**
+* 公众号账户 Base VO,提供给添加、修改、详细的子 VO 使用
+* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
+*/
+@Data
+public class WxAccountBaseVO {
+
+ @ApiModelProperty(value = "公众号名称")
+ private String name;
+
+ @ApiModelProperty(value = "公众号账户")
+ private String account;
+
+ @ApiModelProperty(value = "公众号appid")
+ private String appid;
+
+ @ApiModelProperty(value = "公众号密钥")
+ private String appsecret;
+
+ @ApiModelProperty(value = "公众号token")
+ private String token;
+
+ @ApiModelProperty(value = "加密密钥")
+ private String aeskey;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountCreateReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountCreateReqVO.java
new file mode 100644
index 0000000000..c60125c0ca
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountCreateReqVO.java
@@ -0,0 +1,14 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import javax.validation.constraints.*;
+
+@ApiModel("管理后台 - 公众号账户创建 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountCreateReqVO extends WxAccountBaseVO {
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountExcelVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountExcelVO.java
new file mode 100644
index 0000000000..4885a0a98f
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountExcelVO.java
@@ -0,0 +1,50 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+
+/**
+ * 公众号账户 Excel VO
+ *
+ * @author 芋道源码
+ */
+@Data
+public class WxAccountExcelVO {
+
+ @ExcelProperty("编号")
+ private Long id;
+
+ @ExcelProperty("公众号名称")
+ private String name;
+
+ @ExcelProperty("公众号账户")
+ private String account;
+
+ @ExcelProperty("公众号appid")
+ private String appid;
+
+ @ExcelProperty("公众号密钥")
+ private String appsecret;
+
+ @ExcelProperty("公众号url")
+ private String url;
+
+ @ExcelProperty("公众号token")
+ private String token;
+
+ @ExcelProperty("加密密钥")
+ private String aeskey;
+
+ @ExcelProperty("二维码图片URL")
+ private String qrUrl;
+
+ @ExcelProperty("备注")
+ private String remark;
+
+ @ExcelProperty("创建时间")
+ private Date createTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountExportReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountExportReqVO.java
new file mode 100644
index 0000000000..563dd2ab19
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountExportReqVO.java
@@ -0,0 +1,32 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@ApiModel(value = "管理后台 - 公众号账户 Excel 导出 Request VO", description = "参数和 WxAccountPageReqVO 是一致的")
+@Data
+public class WxAccountExportReqVO {
+
+ @ApiModelProperty(value = "公众号名称")
+ private String name;
+
+ @ApiModelProperty(value = "公众号账户")
+ private String account;
+
+ @ApiModelProperty(value = "公众号appid")
+ private String appid;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "开始创建时间")
+ private Date beginCreateTime;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "结束创建时间")
+ private Date endCreateTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountPageReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountPageReqVO.java
new file mode 100644
index 0000000000..443c26ed65
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountPageReqVO.java
@@ -0,0 +1,34 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@ApiModel("管理后台 - 公众号账户分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountPageReqVO extends PageParam {
+
+ @ApiModelProperty(value = "公众号名称")
+ private String name;
+
+ @ApiModelProperty(value = "公众号账户")
+ private String account;
+
+ @ApiModelProperty(value = "公众号appid")
+ private String appid;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "开始创建时间")
+ private Date beginCreateTime;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "结束创建时间")
+ private Date endCreateTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountRespVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountRespVO.java
new file mode 100644
index 0000000000..63eeecad51
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountRespVO.java
@@ -0,0 +1,25 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+
+@ApiModel("管理后台 - 公众号账户 Response VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountRespVO extends WxAccountBaseVO {
+
+ @ApiModelProperty(value = "编号", required = true)
+ private Long id;
+
+ @ApiModelProperty(value = "公众号url")
+ private String url;
+
+ @ApiModelProperty(value = "二维码图片URL")
+ private String qrUrl;
+
+ @ApiModelProperty(value = "创建时间", required = true)
+ private Date createTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountUpdateReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountUpdateReqVO.java
new file mode 100644
index 0000000000..53ec0181fa
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/account/vo/WxAccountUpdateReqVO.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import javax.validation.constraints.*;
+
+@ApiModel("管理后台 - 公众号账户更新 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountUpdateReqVO extends WxAccountBaseVO {
+
+ @ApiModelProperty(value = "编号", required = true)
+ @NotNull(message = "编号不能为空")
+ private Long id;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/WxAccountFansController.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/WxAccountFansController.java
new file mode 100644
index 0000000000..0d97b0f0f8
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/WxAccountFansController.java
@@ -0,0 +1,100 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans;
+
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.annotations.*;
+
+import javax.validation.constraints.*;
+import javax.validation.*;
+import javax.servlet.http.*;
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
+import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
+
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+import cn.iocoder.yudao.module.wechatMp.convert.accountfans.WxAccountFansConvert;
+import cn.iocoder.yudao.module.wechatMp.service.accountfans.WxAccountFansService;
+
+@Api(tags = "管理后台 - 微信公众号粉丝")
+@RestController
+@RequestMapping("/wechatMp/wx-account-fans")
+@Validated
+public class WxAccountFansController {
+
+ @Resource
+ private WxAccountFansService wxAccountFansService;
+
+ @PostMapping("/create")
+ @ApiOperation("创建微信公众号粉丝")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:create')")
+ public CommonResult createWxAccountFans(@Valid @RequestBody WxAccountFansCreateReqVO createReqVO) {
+ return success(wxAccountFansService.createWxAccountFans(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @ApiOperation("更新微信公众号粉丝")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:update')")
+ public CommonResult updateWxAccountFans(@Valid @RequestBody WxAccountFansUpdateReqVO updateReqVO) {
+ wxAccountFansService.updateWxAccountFans(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @ApiOperation("删除微信公众号粉丝")
+ @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:delete')")
+ public CommonResult deleteWxAccountFans(@RequestParam("id") Long id) {
+ wxAccountFansService.deleteWxAccountFans(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @ApiOperation("获得微信公众号粉丝")
+ @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:query')")
+ public CommonResult getWxAccountFans(@RequestParam("id") Long id) {
+ WxAccountFansDO wxAccountFans = wxAccountFansService.getWxAccountFans(id);
+ return success(WxAccountFansConvert.INSTANCE.convert(wxAccountFans));
+ }
+
+ @GetMapping("/list")
+ @ApiOperation("获得微信公众号粉丝列表")
+ @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:query')")
+ public CommonResult> getWxAccountFansList(@RequestParam("ids") Collection ids) {
+ List list = wxAccountFansService.getWxAccountFansList(ids);
+ return success(WxAccountFansConvert.INSTANCE.convertList(list));
+ }
+
+ @GetMapping("/page")
+ @ApiOperation("获得微信公众号粉丝分页")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:query')")
+ public CommonResult> getWxAccountFansPage(@Valid WxAccountFansPageReqVO pageVO) {
+ PageResult pageResult = wxAccountFansService.getWxAccountFansPage(pageVO);
+ return success(WxAccountFansConvert.INSTANCE.convertPage(pageResult));
+ }
+
+ @GetMapping("/export-excel")
+ @ApiOperation("导出微信公众号粉丝 Excel")
+ @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans:export')")
+ @OperateLog(type = EXPORT)
+ public void exportWxAccountFansExcel(@Valid WxAccountFansExportReqVO exportReqVO,
+ HttpServletResponse response) throws IOException {
+ List list = wxAccountFansService.getWxAccountFansList(exportReqVO);
+ // 导出 Excel
+ List datas = WxAccountFansConvert.INSTANCE.convertList02(list);
+ ExcelUtils.write(response, "微信公众号粉丝.xls", "数据", WxAccountFansExcelVO.class, datas);
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansBaseVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansBaseVO.java
new file mode 100644
index 0000000000..3345dc429a
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansBaseVO.java
@@ -0,0 +1,58 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import javax.validation.constraints.*;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+/**
+* 微信公众号粉丝 Base VO,提供给添加、修改、详细的子 VO 使用
+* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
+*/
+@Data
+public class WxAccountFansBaseVO {
+
+ @ApiModelProperty(value = "用户标识")
+ private String openid;
+
+ @ApiModelProperty(value = "订阅状态,0未关注,1已关注")
+ private String subscribeStatus;
+
+ @ApiModelProperty(value = "订阅时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private Date subscribeTime;
+
+ @ApiModelProperty(value = "昵称")
+ private byte[] nickname;
+
+ @ApiModelProperty(value = "性别,1男,2女,0未知")
+ private String gender;
+
+ @ApiModelProperty(value = "语言")
+ private String language;
+
+ @ApiModelProperty(value = "国家")
+ private String country;
+
+ @ApiModelProperty(value = "省份")
+ private String province;
+
+ @ApiModelProperty(value = "城市")
+ private String city;
+
+ @ApiModelProperty(value = "头像地址")
+ private String headimgUrl;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "微信公众号ID")
+ private String wxAccountId;
+
+ @ApiModelProperty(value = "微信公众号appid")
+ private String wxAccountAppid;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansCreateReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansCreateReqVO.java
new file mode 100644
index 0000000000..4fa90d7edc
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansCreateReqVO.java
@@ -0,0 +1,14 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import javax.validation.constraints.*;
+
+@ApiModel("管理后台 - 微信公众号粉丝创建 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountFansCreateReqVO extends WxAccountFansBaseVO {
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansExcelVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansExcelVO.java
new file mode 100644
index 0000000000..9be42b4a85
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansExcelVO.java
@@ -0,0 +1,62 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+
+/**
+ * 微信公众号粉丝 Excel VO
+ *
+ * @author 芋道源码
+ */
+@Data
+public class WxAccountFansExcelVO {
+
+ @ExcelProperty("编号")
+ private Long id;
+
+ @ExcelProperty("用户标识")
+ private String openid;
+
+ @ExcelProperty("订阅状态,0未关注,1已关注")
+ private String subscribeStatus;
+
+ @ExcelProperty("订阅时间")
+ private Date subscribeTime;
+
+ @ExcelProperty("昵称")
+ private byte[] nickname;
+
+ @ExcelProperty("性别,1男,2女,0未知")
+ private String gender;
+
+ @ExcelProperty("语言")
+ private String language;
+
+ @ExcelProperty("国家")
+ private String country;
+
+ @ExcelProperty("省份")
+ private String province;
+
+ @ExcelProperty("城市")
+ private String city;
+
+ @ExcelProperty("头像地址")
+ private String headimgUrl;
+
+ @ExcelProperty("备注")
+ private String remark;
+
+ @ExcelProperty("微信公众号ID")
+ private String wxAccountId;
+
+ @ExcelProperty("微信公众号appid")
+ private String wxAccountAppid;
+
+ @ExcelProperty("创建时间")
+ private Date createTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansExportReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansExportReqVO.java
new file mode 100644
index 0000000000..1a38318582
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansExportReqVO.java
@@ -0,0 +1,67 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@ApiModel(value = "管理后台 - 微信公众号粉丝 Excel 导出 Request VO", description = "参数和 WxAccountFansPageReqVO 是一致的")
+@Data
+public class WxAccountFansExportReqVO {
+
+ @ApiModelProperty(value = "用户标识")
+ private String openid;
+
+ @ApiModelProperty(value = "订阅状态,0未关注,1已关注")
+ private String subscribeStatus;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "开始订阅时间")
+ private Date beginSubscribeTime;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "结束订阅时间")
+ private Date endSubscribeTime;
+
+ @ApiModelProperty(value = "昵称")
+ private String nickname;
+
+ @ApiModelProperty(value = "性别,1男,2女,0未知")
+ private String gender;
+
+ @ApiModelProperty(value = "语言")
+ private String language;
+
+ @ApiModelProperty(value = "国家")
+ private String country;
+
+ @ApiModelProperty(value = "省份")
+ private String province;
+
+ @ApiModelProperty(value = "城市")
+ private String city;
+
+ @ApiModelProperty(value = "头像地址")
+ private String headimgUrl;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "微信公众号ID")
+ private String wxAccountId;
+
+ @ApiModelProperty(value = "微信公众号appid")
+ private String wxAccountAppid;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "开始创建时间")
+ private Date beginCreateTime;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "结束创建时间")
+ private Date endCreateTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansPageReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansPageReqVO.java
new file mode 100644
index 0000000000..577eccc9d8
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansPageReqVO.java
@@ -0,0 +1,69 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@ApiModel("管理后台 - 微信公众号粉丝分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountFansPageReqVO extends PageParam {
+
+ @ApiModelProperty(value = "用户标识")
+ private String openid;
+
+ @ApiModelProperty(value = "订阅状态,0未关注,1已关注")
+ private String subscribeStatus;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "开始订阅时间")
+ private Date beginSubscribeTime;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "结束订阅时间")
+ private Date endSubscribeTime;
+
+ @ApiModelProperty(value = "昵称")
+ private String nickname;
+
+ @ApiModelProperty(value = "性别,1男,2女,0未知")
+ private String gender;
+
+ @ApiModelProperty(value = "语言")
+ private String language;
+
+ @ApiModelProperty(value = "国家")
+ private String country;
+
+ @ApiModelProperty(value = "省份")
+ private String province;
+
+ @ApiModelProperty(value = "城市")
+ private String city;
+
+ @ApiModelProperty(value = "头像地址")
+ private String headimgUrl;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "微信公众号ID")
+ private String wxAccountId;
+
+ @ApiModelProperty(value = "微信公众号appid")
+ private String wxAccountAppid;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "开始创建时间")
+ private Date beginCreateTime;
+
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ @ApiModelProperty(value = "结束创建时间")
+ private Date endCreateTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansRespVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansRespVO.java
new file mode 100644
index 0000000000..18f1398edd
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansRespVO.java
@@ -0,0 +1,19 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+
+@ApiModel("管理后台 - 微信公众号粉丝 Response VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountFansRespVO extends WxAccountFansBaseVO {
+
+ @ApiModelProperty(value = "编号", required = true)
+ private Long id;
+
+ @ApiModelProperty(value = "创建时间", required = true)
+ private Date createTime;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansUpdateReqVO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansUpdateReqVO.java
new file mode 100644
index 0000000000..5fd8a76a28
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/controller/admin/accountfans/vo/WxAccountFansUpdateReqVO.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.annotations.*;
+import javax.validation.constraints.*;
+
+@ApiModel("管理后台 - 微信公众号粉丝更新 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class WxAccountFansUpdateReqVO extends WxAccountFansBaseVO {
+
+ @ApiModelProperty(value = "编号", required = true)
+ @NotNull(message = "编号不能为空")
+ private Long id;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/convert/account/WxAccountConvert.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/convert/account/WxAccountConvert.java
new file mode 100644
index 0000000000..183fd21085
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/convert/account/WxAccountConvert.java
@@ -0,0 +1,34 @@
+package cn.iocoder.yudao.module.wechatMp.convert.account;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+
+/**
+ * 公众号账户 Convert
+ *
+ * @author 芋道源码
+ */
+@Mapper
+public interface WxAccountConvert {
+
+ WxAccountConvert INSTANCE = Mappers.getMapper(WxAccountConvert.class);
+
+ WxAccountDO convert(WxAccountCreateReqVO bean);
+
+ WxAccountDO convert(WxAccountUpdateReqVO bean);
+
+ WxAccountRespVO convert(WxAccountDO bean);
+
+ List convertList(List list);
+
+ PageResult convertPage(PageResult page);
+
+ List convertList02(List list);
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/convert/accountfans/WxAccountFansConvert.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/convert/accountfans/WxAccountFansConvert.java
new file mode 100644
index 0000000000..8c755744b8
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/convert/accountfans/WxAccountFansConvert.java
@@ -0,0 +1,34 @@
+package cn.iocoder.yudao.module.wechatMp.convert.accountfans;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+
+/**
+ * 微信公众号粉丝 Convert
+ *
+ * @author 芋道源码
+ */
+@Mapper
+public interface WxAccountFansConvert {
+
+ WxAccountFansConvert INSTANCE = Mappers.getMapper(WxAccountFansConvert.class);
+
+ WxAccountFansDO convert(WxAccountFansCreateReqVO bean);
+
+ WxAccountFansDO convert(WxAccountFansUpdateReqVO bean);
+
+ WxAccountFansRespVO convert(WxAccountFansDO bean);
+
+ List convertList(List list);
+
+ PageResult convertPage(PageResult page);
+
+ List convertList02(List list);
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/dataobject/account/WxAccountDO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/dataobject/account/WxAccountDO.java
new file mode 100644
index 0000000000..f345875dbd
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/dataobject/account/WxAccountDO.java
@@ -0,0 +1,65 @@
+package cn.iocoder.yudao.module.wechatMp.dal.dataobject.account;
+
+import lombok.*;
+import java.util.*;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * 公众号账户 DO
+ *
+ * @author 芋道源码
+ */
+@TableName("wx_account")
+@KeySequence("wx_account_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class WxAccountDO extends BaseDO {
+
+ /**
+ * 编号
+ */
+ @TableId
+ private Long id;
+ /**
+ * 公众号名称
+ */
+ private String name;
+ /**
+ * 公众号账户
+ */
+ private String account;
+ /**
+ * 公众号appid
+ */
+ private String appid;
+ /**
+ * 公众号密钥
+ */
+ private String appsecret;
+ /**
+ * 公众号url
+ */
+ private String url;
+ /**
+ * 公众号token
+ */
+ private String token;
+ /**
+ * 加密密钥
+ */
+ private String aeskey;
+ /**
+ * 二维码图片URL
+ */
+ private String qrUrl;
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/dataobject/accountfans/WxAccountFansDO.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/dataobject/accountfans/WxAccountFansDO.java
new file mode 100644
index 0000000000..88c125f86b
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/dataobject/accountfans/WxAccountFansDO.java
@@ -0,0 +1,81 @@
+package cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans;
+
+import lombok.*;
+import java.util.*;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * 微信公众号粉丝 DO
+ *
+ * @author 芋道源码
+ */
+@TableName("wx_account_fans")
+@KeySequence("wx_account_fans_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class WxAccountFansDO extends BaseDO {
+
+ /**
+ * 编号
+ */
+ @TableId
+ private Long id;
+ /**
+ * 用户标识
+ */
+ private String openid;
+ /**
+ * 订阅状态,0未关注,1已关注
+ */
+ private String subscribeStatus;
+ /**
+ * 订阅时间
+ */
+ private Date subscribeTime;
+ /**
+ * 昵称
+ */
+ private byte[] nickname;
+ /**
+ * 性别,1男,2女,0未知
+ */
+ private String gender;
+ /**
+ * 语言
+ */
+ private String language;
+ /**
+ * 国家
+ */
+ private String country;
+ /**
+ * 省份
+ */
+ private String province;
+ /**
+ * 城市
+ */
+ private String city;
+ /**
+ * 头像地址
+ */
+ private String headimgUrl;
+ /**
+ * 备注
+ */
+ private String remark;
+ /**
+ * 微信公众号ID
+ */
+ private String wxAccountId;
+ /**
+ * 微信公众号appid
+ */
+ private String wxAccountAppid;
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/mysql/account/WxAccountMapper.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/mysql/account/WxAccountMapper.java
new file mode 100644
index 0000000000..9cf80c4f83
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/mysql/account/WxAccountMapper.java
@@ -0,0 +1,38 @@
+package cn.iocoder.yudao.module.wechatMp.dal.mysql.account;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import org.apache.ibatis.annotations.Mapper;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo.*;
+
+/**
+ * 公众号账户 Mapper
+ *
+ * @author 芋道源码
+ */
+@Mapper
+public interface WxAccountMapper extends BaseMapperX {
+
+ default PageResult selectPage(WxAccountPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .likeIfPresent(WxAccountDO::getName, reqVO.getName())
+ .eqIfPresent(WxAccountDO::getAccount, reqVO.getAccount())
+ .eqIfPresent(WxAccountDO::getAppid, reqVO.getAppid())
+ .betweenIfPresent(WxAccountDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
+ .orderByDesc(WxAccountDO::getId));
+ }
+
+ default List selectList(WxAccountExportReqVO reqVO) {
+ return selectList(new LambdaQueryWrapperX()
+ .likeIfPresent(WxAccountDO::getName, reqVO.getName())
+ .eqIfPresent(WxAccountDO::getAccount, reqVO.getAccount())
+ .eqIfPresent(WxAccountDO::getAppid, reqVO.getAppid())
+ .betweenIfPresent(WxAccountDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
+ .orderByDesc(WxAccountDO::getId));
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/mysql/accountfans/WxAccountFansMapper.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/mysql/accountfans/WxAccountFansMapper.java
new file mode 100644
index 0000000000..f62221c6ae
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/dal/mysql/accountfans/WxAccountFansMapper.java
@@ -0,0 +1,58 @@
+package cn.iocoder.yudao.module.wechatMp.dal.mysql.accountfans;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+import org.apache.ibatis.annotations.Mapper;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.*;
+
+/**
+ * 微信公众号粉丝 Mapper
+ *
+ * @author 芋道源码
+ */
+@Mapper
+public interface WxAccountFansMapper extends BaseMapperX {
+
+ default PageResult selectPage(WxAccountFansPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .eqIfPresent(WxAccountFansDO::getOpenid, reqVO.getOpenid())
+ .eqIfPresent(WxAccountFansDO::getSubscribeStatus, reqVO.getSubscribeStatus())
+ .betweenIfPresent(WxAccountFansDO::getSubscribeTime, reqVO.getBeginSubscribeTime(), reqVO.getEndSubscribeTime())
+ .likeIfPresent(WxAccountFansDO::getNickname, reqVO.getNickname())
+ .eqIfPresent(WxAccountFansDO::getGender, reqVO.getGender())
+ .eqIfPresent(WxAccountFansDO::getLanguage, reqVO.getLanguage())
+ .eqIfPresent(WxAccountFansDO::getCountry, reqVO.getCountry())
+ .eqIfPresent(WxAccountFansDO::getProvince, reqVO.getProvince())
+ .eqIfPresent(WxAccountFansDO::getCity, reqVO.getCity())
+ .eqIfPresent(WxAccountFansDO::getHeadimgUrl, reqVO.getHeadimgUrl())
+ .eqIfPresent(WxAccountFansDO::getRemark, reqVO.getRemark())
+ .eqIfPresent(WxAccountFansDO::getWxAccountId, reqVO.getWxAccountId())
+ .eqIfPresent(WxAccountFansDO::getWxAccountAppid, reqVO.getWxAccountAppid())
+ .betweenIfPresent(WxAccountFansDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
+ .orderByDesc(WxAccountFansDO::getId));
+ }
+
+ default List selectList(WxAccountFansExportReqVO reqVO) {
+ return selectList(new LambdaQueryWrapperX()
+ .eqIfPresent(WxAccountFansDO::getOpenid, reqVO.getOpenid())
+ .eqIfPresent(WxAccountFansDO::getSubscribeStatus, reqVO.getSubscribeStatus())
+ .betweenIfPresent(WxAccountFansDO::getSubscribeTime, reqVO.getBeginSubscribeTime(), reqVO.getEndSubscribeTime())
+ .likeIfPresent(WxAccountFansDO::getNickname, reqVO.getNickname())
+ .eqIfPresent(WxAccountFansDO::getGender, reqVO.getGender())
+ .eqIfPresent(WxAccountFansDO::getLanguage, reqVO.getLanguage())
+ .eqIfPresent(WxAccountFansDO::getCountry, reqVO.getCountry())
+ .eqIfPresent(WxAccountFansDO::getProvince, reqVO.getProvince())
+ .eqIfPresent(WxAccountFansDO::getCity, reqVO.getCity())
+ .eqIfPresent(WxAccountFansDO::getHeadimgUrl, reqVO.getHeadimgUrl())
+ .eqIfPresent(WxAccountFansDO::getRemark, reqVO.getRemark())
+ .eqIfPresent(WxAccountFansDO::getWxAccountId, reqVO.getWxAccountId())
+ .eqIfPresent(WxAccountFansDO::getWxAccountAppid, reqVO.getWxAccountAppid())
+ .betweenIfPresent(WxAccountFansDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
+ .orderByDesc(WxAccountFansDO::getId));
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/KfSessionHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/KfSessionHandler.java
new file mode 100644
index 0000000000..dc7b02287d
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/KfSessionHandler.java
@@ -0,0 +1,23 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class KfSessionHandler implements WxMpMessageHandler {
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService wxMpService,
+ WxSessionManager sessionManager) {
+ //TODO 对会话做处理
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/LocationHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/LocationHandler.java
new file mode 100644
index 0000000000..57c50b010e
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/LocationHandler.java
@@ -0,0 +1,44 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import cn.iocoder.yudao.module.wechatMp.builder.TextBuilder;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+import static me.chanjar.weixin.common.api.WxConsts.XmlMsgType;
+
+@Component
+@Slf4j
+public class LocationHandler implements WxMpMessageHandler {
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService wxMpService,
+ WxSessionManager sessionManager) {
+ if (wxMessage.getMsgType().equals(XmlMsgType.LOCATION)) {
+ //TODO 接收处理用户发送的地理位置消息
+ try {
+ String content = "感谢反馈,您的的地理位置已收到!";
+ return new TextBuilder().build(content, wxMessage, null);
+ } catch (Exception e) {
+ log.error("位置消息接收处理失败", e);
+ return null;
+ }
+ }
+
+ //上报地理位置事件
+ log.info("上报地理位置,纬度 : {},经度 : {},精度 : {}",
+ wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision()));
+
+ //TODO 可以将用户地理位置信息保存到本地数据库,以便以后使用
+
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/LogHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/LogHandler.java
new file mode 100644
index 0000000000..f199d0b5a6
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/LogHandler.java
@@ -0,0 +1,25 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+@Slf4j
+public class LogHandler implements WxMpMessageHandler {
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService wxMpService,
+ WxSessionManager sessionManager) {
+ log.info("接收到请求消息,内容:{}", JsonUtils.toJsonString(wxMessage));
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/MenuHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/MenuHandler.java
new file mode 100644
index 0000000000..5ba320a39b
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/MenuHandler.java
@@ -0,0 +1,32 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+import static me.chanjar.weixin.common.api.WxConsts.MenuButtonType;
+
+@Component
+public class MenuHandler implements WxMpMessageHandler {
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService weixinService,
+ WxSessionManager sessionManager) {
+
+ String msg = wxMessage.getEventKey();
+ if (MenuButtonType.VIEW.equals(wxMessage.getEvent())) {
+ return null;
+ }
+
+ return WxMpXmlOutMessage.TEXT().content(msg)
+ .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser())
+ .build();
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/MsgHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/MsgHandler.java
new file mode 100644
index 0000000000..fed4aba1f2
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/MsgHandler.java
@@ -0,0 +1,184 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.http.HtmlUtil;
+import cn.hutool.http.HttpUtil;
+import cn.hutool.json.JSONUtil;
+import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
+import cn.iocoder.yudao.module.wechatMp.builder.TextBuilder;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.module.wechatMp.service.account.WxAccountService;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.error.WxErrorException;
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import me.chanjar.weixin.mp.bean.result.WxMpUser;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+
+import static me.chanjar.weixin.common.api.WxConsts.XmlMsgType;
+
+@Component
+@Slf4j
+public class MsgHandler implements WxMpMessageHandler {
+
+/*
+ @Autowired
+ WxReceiveTextService wxReceiveTextService;
+
+ @Autowired
+ WxTextTemplateService wxTextTemplateService;
+
+ @Autowired
+ WxAccountService wxAccountService;
+
+ @Autowired
+ WxFansMsgService wxFansMsgService;
+*/
+
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService weixinService,
+ WxSessionManager sessionManager) {
+ /* log.info( "收到信息内容:{}", JsonUtils.toJsonString(wxMessage) );
+ log.info( "关键字:{}", wxMessage.getContent() );
+
+ if (!wxMessage.getMsgType().equals(XmlMsgType.EVENT)) {
+ //可以选择将消息保存到本地
+
+ // 获取微信用户基本信息
+ try {
+ WxMpUser wxmpUser = weixinService.getUserService()
+ .userInfo(wxMessage.getFromUser(), null);
+ if (wxmpUser != null) {
+ WxAccountDO wxAccount = wxAccountService.findBy( WxAccountDO::getAccount,wxMessage.getToUser());
+ if(wxAccount != null){
+
+ if(wxMessage.getMsgType().equals( XmlMsgType.TEXT )){
+ WxFansMsg wxFansMsg = new WxFansMsg();
+ wxFansMsg.setOpenid( wxmpUser.getOpenId() );
+ try {
+ wxFansMsg.setNickname(wxmpUser.getNickname().getBytes("UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ wxFansMsg.setHeadimgUrl( wxmpUser.getHeadImgUrl() );
+ wxFansMsg.setWxAccountId( String.valueOf( wxAccount.getId() ) );
+ wxFansMsg.setMsgType( wxMessage.getMsgType());
+ wxFansMsg.setContent( wxMessage.getContent() );
+ wxFansMsg.setIsRes( "1" );
+ wxFansMsg.setCreateTime( DateUtil.date() );
+ wxFansMsg.setUpdateTime( DateUtil.date() );
+
+ //组装回复消息
+ String content = processContent(wxMessage);
+ content = HtmlUtil.escape( content );
+ wxFansMsg.setResContent( content );
+
+ wxFansMsgService.save( wxFansMsg );
+ return new TextBuilder().build(content, wxMessage, weixinService);
+
+ }
+ if(wxMessage.getMsgType().equals( XmlMsgType.IMAGE )){
+ WxFansMsg wxFansMsg = new WxFansMsg();
+ wxFansMsg.setOpenid( wxmpUser.getOpenId() );
+ try {
+ wxFansMsg.setNickname(wxmpUser.getNickname().getBytes("UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ wxFansMsg.setHeadimgUrl( wxmpUser.getHeadImgUrl() );
+ wxFansMsg.setWxAccountId( String.valueOf( wxAccount.getId() ) );
+ wxFansMsg.setMsgType( wxMessage.getMsgType());
+ wxFansMsg.setMediaId( wxMessage.getMediaId() );
+ wxFansMsg.setPicUrl( wxMessage.getPicUrl() );
+
+ File downloadDir = new File(downloadDirStr);
+ if (!downloadDir.exists()) {
+ downloadDir.mkdirs();
+ }
+ String filepath = downloadDirStr + String.valueOf( System.currentTimeMillis() ) + ".png";
+ //微信pic url下载到本地,防止失效
+ long size = HttpUtil.downloadFile(wxMessage.getPicUrl(), FileUtil.file(filepath));
+ log.info("download pic size : {}",size);
+ wxFansMsg.setPicPath( filepath );
+ wxFansMsg.setIsRes( "0" );
+ wxFansMsg.setCreateTime( DateUtil.date() );
+ wxFansMsg.setUpdateTime( DateUtil.date() );
+ wxFansMsgService.save( wxFansMsg );
+ }
+
+ }
+ }
+ } catch (WxErrorException e) {
+ if (e.getError().getErrorCode() == 48001) {
+ log.info("该公众号没有获取用户信息权限!");
+ }
+ }
+
+ }
+
+ //当用户输入关键词如“你好”,“客服”等,并且有客服在线时,把消息转发给在线客服
+// try {
+// if (StringUtils.startsWithAny(wxMessage.getContent(), "你好", "客服")
+// && weixinService.getKefuService().kfOnlineList()
+// .getKfOnlineList().size() > 0) {
+// return WxMpXmlOutMessage.TRANSFER_CUSTOMER_SERVICE()
+// .fromUser(wxMessage.getToUser())
+// .toUser(wxMessage.getFromUser()).build();
+// }
+// } catch (WxErrorException e) {
+// e.printStackTrace();
+// }
+
+ //组装默认回复消息
+ String content = defaultResponseContent;//默认
+ return new TextBuilder().build(content, wxMessage, weixinService);
+ */
+ return null;
+ }
+
+ //处理回复信息,优先级,关键字、智能机器人、默认值
+ String processContent(WxMpXmlMessage wxMessage){
+ String content = "";
+ /* content = processReceiveTextContent(wxMessage);
+ if(StringUtils.isNotBlank( content )){
+ return content;
+ }
+
+ content = defaultResponseContent;*/
+ return content;
+ }
+
+ //处理关键字
+ String processReceiveTextContent(WxMpXmlMessage wxMessage){
+ String content = "";
+ /* WxAccountDO wxAccount = wxAccountService.findBy( WxAccountDO::getAccount,wxMessage.getToUser());
+ if(wxAccount != null){
+ WxReceiveText wxReceiveTextTpl = new WxReceiveText();
+ wxReceiveTextTpl.setWxAccountId( String.valueOf( wxAccount.getId() ) );
+ wxReceiveTextTpl.setReceiveText( wxMessage.getContent() );
+ List wxReceiveTextList = wxReceiveTextService.findListByReceiveTest( wxReceiveTextTpl );
+ if(wxReceiveTextList != null && wxReceiveTextList.size() > 0){
+ WxReceiveText wxReceiveText = wxReceiveTextList.get( 0 );
+ WxTextTemplate wxTextTemplate = wxTextTemplateService.findById( Integer.parseInt( wxReceiveText.getTplId() ) );
+ content = wxTextTemplate.getContent();
+ }
+ }*/
+ return content;
+ }
+
+
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/NullHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/NullHandler.java
new file mode 100644
index 0000000000..94003e05d2
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/NullHandler.java
@@ -0,0 +1,22 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class NullHandler implements WxMpMessageHandler {
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService wxMpService,
+ WxSessionManager sessionManager) {
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/ScanHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/ScanHandler.java
new file mode 100644
index 0000000000..b84198468e
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/ScanHandler.java
@@ -0,0 +1,22 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import me.chanjar.weixin.common.error.WxErrorException;
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class ScanHandler implements WxMpMessageHandler {
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMpXmlMessage, Map map,
+ WxMpService wxMpService, WxSessionManager wxSessionManager) throws WxErrorException {
+ // 扫码事件处理
+ return null;
+ }
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/StoreCheckNotifyHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/StoreCheckNotifyHandler.java
new file mode 100644
index 0000000000..7e7a409ab9
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/StoreCheckNotifyHandler.java
@@ -0,0 +1,27 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * 门店审核事件处理
+ *
+ */
+@Component
+public class StoreCheckNotifyHandler implements WxMpMessageHandler {
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService wxMpService,
+ WxSessionManager sessionManager) {
+ // TODO 处理门店审核事件
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/SubscribeHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/SubscribeHandler.java
new file mode 100644
index 0000000000..1ce10d0e96
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/SubscribeHandler.java
@@ -0,0 +1,164 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import cn.hutool.core.date.DateUtil;
+import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
+import cn.iocoder.yudao.module.wechatMp.builder.TextBuilder;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.WxAccountFansCreateReqVO;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+import cn.iocoder.yudao.module.wechatMp.service.account.WxAccountService;
+import cn.iocoder.yudao.module.wechatMp.service.accountfans.WxAccountFansService;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.error.WxErrorException;
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import me.chanjar.weixin.mp.bean.result.WxMpUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+
+@Component
+@Slf4j
+public class SubscribeHandler implements WxMpMessageHandler {
+
+ /* @Autowired
+ private WxTextTemplateService wxTextTemplateService;
+
+ @Autowired
+ private WxAccountService wxAccountService;
+
+ @Autowired
+ private WxSubscribeTextService wxSubscribeTextService;
+
+ @Autowired
+ private WxAccountFansService wxAccountFansService;
+
+ @Autowired
+ private WxAccountFansTagService wxAccountFansTagService;*/
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService weixinService,
+ WxSessionManager sessionManager) throws WxErrorException {
+
+ log.info("新关注用户 OPENID: " + wxMessage.getFromUser());
+/*
+
+ // 获取微信用户基本信息
+ try {
+ WxMpUser wxmpUser = weixinService.getUserService()
+ .userInfo(wxMessage.getFromUser(), null);
+ if (wxmpUser != null) {
+ // 可以添加关注用户到本地数据库
+ WxAccountDO wxAccount = wxAccountService.findBy(WxAccountDO::getAccount, wxMessage.getToUser());
+ if (wxAccount != null) {
+ WxAccountFansDO wxAccountFans = wxAccountFansService.findBy(WxAccountFansDO::getOpenid, wxmpUser.getOpenId());
+ if (wxAccountFans == null) {//insert
+ WxAccountFansCreateReqVO wxAccountFansCreateReqVO = new WxAccountFansCreateReqVO();
+ wxAccountFansCreateReqVO.setOpenid(wxmpUser.getOpenId());
+ wxAccountFansCreateReqVO.setSubscribeStatus(wxmpUser.getSubscribe() ? "1" : "0");
+ wxAccountFansCreateReqVO.setSubscribeTime(DateUtil.date(wxmpUser.getSubscribeTime() * 1000L));
+ try {
+ wxAccountFansCreateReqVO.setNickname(wxmpUser.getNickname().getBytes("UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ wxAccountFansCreateReqVO.setGender(String.valueOf(wxmpUser.getSex()));
+ wxAccountFansCreateReqVO.setLanguage(wxmpUser.getLanguage());
+ wxAccountFansCreateReqVO.setCountry(wxmpUser.getCountry());
+ wxAccountFansCreateReqVO.setProvince(wxmpUser.getProvince());
+ wxAccountFansCreateReqVO.setCity(wxmpUser.getCity());
+ wxAccountFansCreateReqVO.setHeadimgUrl(wxmpUser.getHeadImgUrl());
+ wxAccountFansCreateReqVO.setRemark(wxmpUser.getRemark());
+ wxAccountFansCreateReqVO.setWxAccountId(String.valueOf(wxAccount.getId()));
+ wxAccountFansCreateReqVO.setWxAccountAppid(wxAccount.getAppid());
+ wxAccountFansService.createWxAccountFans(wxAccountFansCreateReqVO);
+
+ //process tags
+ wxAccountFansTagService.processFansTags(wxAccount, wxmpUser);
+
+ } else {//update
+ WxAccountFansUpdateReqVO wxAccountFansUpdateReqVO = new WxAccountFansUpdateReqVO();
+ wxAccountFansUpdateReqVO.setId(wxAccountFans.getId());
+ wxAccountFansUpdateReqVO.setOpenid(wxmpUser.getOpenId());
+ wxAccountFansUpdateReqVO.setSubscribeStatus(wxmpUser.getSubscribe() ? "1" : "0");
+ wxAccountFansUpdateReqVO.setSubscribeTime(DateUtil.date(wxmpUser.getSubscribeTime() * 1000L));
+ try {
+ wxAccountFans.setNickname(wxmpUser.getNickname().getBytes("UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ wxAccountFansUpdateReqVO.setGender(String.valueOf(wxmpUser.getSex()));
+ wxAccountFansUpdateReqVO.setLanguage(wxmpUser.getLanguage());
+ wxAccountFansUpdateReqVO.setCountry(wxmpUser.getCountry());
+ wxAccountFansUpdateReqVO.setProvince(wxmpUser.getProvince());
+ wxAccountFansUpdateReqVO.setCity(wxmpUser.getCity());
+ wxAccountFansUpdateReqVO.setHeadimgUrl(wxmpUser.getHeadImgUrl());
+ wxAccountFansUpdateReqVO.setRemark(wxmpUser.getRemark());
+ wxAccountFansUpdateReqVO.setWxAccountId(String.valueOf(wxAccount.getId()));
+ wxAccountFansUpdateReqVO.setWxAccountAppid(wxAccount.getAppid());
+ wxAccountFansService.updateWxAccountFans(wxAccountFansUpdateReqVO);
+
+ //process tags
+ wxAccountFansTagService.processFansTags(wxAccount, wxmpUser);
+
+ }
+ }
+
+ }
+ } catch (WxErrorException e) {
+ if (e.getError().getErrorCode() == 48001) {
+ log.info("该公众号没有获取用户信息权限!");
+ }
+ }
+
+
+ WxMpXmlOutMessage responseResult = null;
+ try {
+ responseResult = this.handleSpecial(wxMessage);
+ } catch (Exception e) {
+ log.error(e.getMessage(), e);
+ }
+
+ if (responseResult != null) {
+ return responseResult;
+ }
+
+ try {
+ String content = "感谢关注!";//默认
+ WxAccountDO wxAccount = wxAccountService.findBy(WxAccountDO::getAccount, wxMessage.getToUser());
+ if (wxAccount != null) {
+ WxSubscribeText wxSubscribeText = wxSubscribeTextService.findBy("wxAccountId", String.valueOf(wxAccount.getId()));
+ if (wxSubscribeText != null) {
+ WxTextTemplate wxTextTemplate = wxTextTemplateService.findById(Integer.parseInt(wxSubscribeText.getTplId()));
+ if (wxTextTemplate != null) {
+ content = wxTextTemplate.getContent();
+ }
+ }
+ }
+ log.info("wxMessage : {}", JsonUtils.toJsonString(wxMessage));
+ return new TextBuilder().build(content, wxMessage, weixinService);
+ } catch (Exception e) {
+ log.error(e.getMessage(), e);
+ }
+*/
+
+ return null;
+ }
+
+ /**
+ * 处理特殊请求,比如如果是扫码进来的,可以做相应处理
+ */
+ private WxMpXmlOutMessage handleSpecial(WxMpXmlMessage wxMessage)
+ throws Exception {
+ //TODO
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/UnsubscribeHandler.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/UnsubscribeHandler.java
new file mode 100644
index 0000000000..17340e7bb5
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/handler/UnsubscribeHandler.java
@@ -0,0 +1,54 @@
+package cn.iocoder.yudao.module.wechatMp.handler;
+
+import cn.hutool.core.date.DateUtil;
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+import cn.iocoder.yudao.module.wechatMp.service.account.WxAccountService;
+import cn.iocoder.yudao.module.wechatMp.service.accountfans.WxAccountFansService;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.mp.api.WxMpMessageHandler;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
+import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+@Slf4j
+public class UnsubscribeHandler implements WxMpMessageHandler {
+
+ @Autowired
+ private WxAccountService wxAccountService;
+
+ @Autowired
+ private WxAccountFansService wxAccountFansService;
+
+ @Override
+ public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
+ Map context, WxMpService wxMpService,
+ WxSessionManager sessionManager) {
+ String openId = wxMessage.getFromUser();
+ log.info("取消关注用户 OPENID: " + openId);
+ // TODO 可以更新本地数据库为取消关注状态
+
+ WxAccountDO wxAccountDO = wxAccountService.findBy(WxAccountDO::getAccount, wxMessage.getToUser());
+ if (wxAccountDO != null) {
+ WxAccountFansDO wxAccountFansDO = wxAccountFansService.findBy(WxAccountFansDO::getOpenid, openId);
+ if (wxAccountFansDO != null) {
+ WxAccountFansUpdateReqVO wxAccountFansUpdateReqVO = new WxAccountFansUpdateReqVO();
+ wxAccountFansUpdateReqVO.setId(wxAccountDO.getId());
+ wxAccountFansDO.setSubscribeStatus("0");//取消订阅
+ wxAccountFansService.updateWxAccountFans(wxAccountFansUpdateReqVO);
+ }
+ }
+
+
+ return null;
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/costomer/dict/WxConfigDataRefreshConsumer.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/costomer/dict/WxConfigDataRefreshConsumer.java
new file mode 100644
index 0000000000..af46f2232c
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/costomer/dict/WxConfigDataRefreshConsumer.java
@@ -0,0 +1,29 @@
+package cn.iocoder.yudao.module.wechatMp.mq.costomer.dict;
+
+import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
+import cn.iocoder.yudao.module.wechatMp.config.WxMpConfig;
+import cn.iocoder.yudao.module.wechatMp.mq.message.dict.WxConfigDataRefreshMessage;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * 针对 {@link WxConfigDataRefreshMessage} 的消费者
+ *
+ * @author lyz
+ */
+@Component
+@Slf4j
+public class WxConfigDataRefreshConsumer extends AbstractChannelMessageListener {
+
+ @Resource
+ private WxMpConfig wxMpConfig;
+
+ @Override
+ public void onMessage(WxConfigDataRefreshMessage message) {
+ log.info("[onMessage][收到 WxConfigData 刷新消息]");
+ wxMpConfig.initWxConfig();
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/message/dict/WxConfigDataRefreshMessage.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/message/dict/WxConfigDataRefreshMessage.java
new file mode 100644
index 0000000000..92d2e195c1
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/message/dict/WxConfigDataRefreshMessage.java
@@ -0,0 +1,19 @@
+package cn.iocoder.yudao.module.wechatMp.mq.message.dict;
+
+import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessage;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 微信配置数据刷新 Message
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WxConfigDataRefreshMessage extends AbstractChannelMessage {
+
+ @Override
+ public String getChannel() {
+ return "wechat-mp.wx-config-data.refresh";
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/producer/dict/WxMpConfigDataProducer.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/producer/dict/WxMpConfigDataProducer.java
new file mode 100644
index 0000000000..8e51203281
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/mq/producer/dict/WxMpConfigDataProducer.java
@@ -0,0 +1,26 @@
+package cn.iocoder.yudao.module.wechatMp.mq.producer.dict;
+
+import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate;
+import cn.iocoder.yudao.module.wechatMp.mq.message.dict.WxConfigDataRefreshMessage;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * 微信配置数据相关消息的 Producer
+ */
+@Component
+public class WxMpConfigDataProducer {
+
+ @Resource
+ private RedisMQTemplate redisMQTemplate;
+
+ /**
+ * 发送 {@link WxConfigDataRefreshMessage} 消息
+ */
+ public void sendDictDataRefreshMessage() {
+ WxConfigDataRefreshMessage message = new WxConfigDataRefreshMessage();
+ redisMQTemplate.send(message);
+ }
+
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/account/WxAccountService.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/account/WxAccountService.java
new file mode 100644
index 0000000000..0ab38a02f1
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/account/WxAccountService.java
@@ -0,0 +1,80 @@
+package cn.iocoder.yudao.module.wechatMp.service.account;
+
+import java.util.*;
+import javax.validation.*;
+
+import cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
+
+/**
+ * 公众号账户 Service 接口
+ *
+ * @author 芋道源码
+ */
+public interface WxAccountService {
+
+ /**
+ * 创建公众号账户
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createWxAccount(@Valid WxAccountCreateReqVO createReqVO);
+
+ /**
+ * 更新公众号账户
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateWxAccount(@Valid WxAccountUpdateReqVO updateReqVO);
+
+ /**
+ * 删除公众号账户
+ *
+ * @param id 编号
+ */
+ void deleteWxAccount(Long id);
+
+ /**
+ * 获得公众号账户
+ *
+ * @param id 编号
+ * @return 公众号账户
+ */
+ WxAccountDO getWxAccount(Long id);
+
+ /**
+ * 获得公众号账户列表
+ *
+ * @param ids 编号
+ * @return 公众号账户列表
+ */
+ List getWxAccountList(Collection ids);
+
+ /**
+ * 获得公众号账户分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 公众号账户分页
+ */
+ PageResult getWxAccountPage(WxAccountPageReqVO pageReqVO);
+
+ /**
+ * 获得公众号账户列表, 用于 Excel 导出
+ *
+ * @param exportReqVO 查询条件
+ * @return 公众号账户列表
+ */
+ List getWxAccountList(WxAccountExportReqVO exportReqVO);
+
+ /**
+ * 查询账户
+ *
+ * @param field
+ * @param val
+ * @return
+ */
+ WxAccountDO findBy(SFunction field, Object val);
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/account/WxAccountServiceImpl.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/account/WxAccountServiceImpl.java
new file mode 100644
index 0000000000..5d9142a3ba
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/account/WxAccountServiceImpl.java
@@ -0,0 +1,97 @@
+package cn.iocoder.yudao.module.wechatMp.service.account;
+
+import cn.iocoder.yudao.module.wechatMp.mq.producer.dict.WxMpConfigDataProducer;
+import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+import org.springframework.validation.annotation.Validated;
+
+import java.util.*;
+
+import cn.iocoder.yudao.module.wechatMp.controller.admin.account.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+
+import cn.iocoder.yudao.module.wechatMp.convert.account.WxAccountConvert;
+import cn.iocoder.yudao.module.wechatMp.dal.mysql.account.WxAccountMapper;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.iocoder.yudao.module.wechatMp.enums.ErrorCodeConstants.*;
+
+/**
+ * 公众号账户 Service 实现类
+ *
+ * @author 芋道源码
+ */
+@Service
+@Validated
+public class WxAccountServiceImpl implements WxAccountService {
+
+ @Resource
+ private WxAccountMapper wxAccountMapper;
+
+ @Resource
+ private WxMpConfigDataProducer wxMpConfigDataProducer;
+
+ @Override
+ public Long createWxAccount(WxAccountCreateReqVO createReqVO) {
+ // 插入
+ WxAccountDO wxAccount = WxAccountConvert.INSTANCE.convert(createReqVO);
+ wxAccountMapper.insert(wxAccount);
+ wxMpConfigDataProducer.sendDictDataRefreshMessage();
+ // 返回
+ return wxAccount.getId();
+ }
+
+ @Override
+ public void updateWxAccount(WxAccountUpdateReqVO updateReqVO) {
+ // 校验存在
+ this.validateWxAccountExists(updateReqVO.getId());
+ // 更新
+ WxAccountDO updateObj = WxAccountConvert.INSTANCE.convert(updateReqVO);
+ wxAccountMapper.updateById(updateObj);
+ wxMpConfigDataProducer.sendDictDataRefreshMessage();
+ }
+
+ @Override
+ public void deleteWxAccount(Long id) {
+ // 校验存在
+ this.validateWxAccountExists(id);
+ // 删除
+ wxAccountMapper.deleteById(id);
+ wxMpConfigDataProducer.sendDictDataRefreshMessage();
+ }
+
+ private void validateWxAccountExists(Long id) {
+ if (wxAccountMapper.selectById(id) == null) {
+ throw exception(WX_ACCOUNT_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public WxAccountDO getWxAccount(Long id) {
+ return wxAccountMapper.selectById(id);
+ }
+
+ @Override
+ public List getWxAccountList(Collection ids) {
+ return wxAccountMapper.selectBatchIds(ids);
+ }
+
+ @Override
+ public PageResult getWxAccountPage(WxAccountPageReqVO pageReqVO) {
+ return wxAccountMapper.selectPage(pageReqVO);
+ }
+
+ @Override
+ public List getWxAccountList(WxAccountExportReqVO exportReqVO) {
+ return wxAccountMapper.selectList(exportReqVO);
+ }
+
+ @Override
+ public WxAccountDO findBy(SFunction field, Object val) {
+ return wxAccountMapper.selectOne(field, val);
+ }
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/accountfans/WxAccountFansService.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/accountfans/WxAccountFansService.java
new file mode 100644
index 0000000000..1daf08c30e
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/accountfans/WxAccountFansService.java
@@ -0,0 +1,81 @@
+package cn.iocoder.yudao.module.wechatMp.service.accountfans;
+
+import java.util.*;
+import javax.validation.*;
+
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.account.WxAccountDO;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
+
+/**
+ * 微信公众号粉丝 Service 接口
+ *
+ * @author 芋道源码
+ */
+public interface WxAccountFansService {
+
+ /**
+ * 创建微信公众号粉丝
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createWxAccountFans(@Valid WxAccountFansCreateReqVO createReqVO);
+
+ /**
+ * 更新微信公众号粉丝
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateWxAccountFans(@Valid WxAccountFansUpdateReqVO updateReqVO);
+
+ /**
+ * 删除微信公众号粉丝
+ *
+ * @param id 编号
+ */
+ void deleteWxAccountFans(Long id);
+
+ /**
+ * 获得微信公众号粉丝
+ *
+ * @param id 编号
+ * @return 微信公众号粉丝
+ */
+ WxAccountFansDO getWxAccountFans(Long id);
+
+ /**
+ * 获得微信公众号粉丝列表
+ *
+ * @param ids 编号
+ * @return 微信公众号粉丝列表
+ */
+ List getWxAccountFansList(Collection ids);
+
+ /**
+ * 获得微信公众号粉丝分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 微信公众号粉丝分页
+ */
+ PageResult getWxAccountFansPage(WxAccountFansPageReqVO pageReqVO);
+
+ /**
+ * 获得微信公众号粉丝列表, 用于 Excel 导出
+ *
+ * @param exportReqVO 查询条件
+ * @return 微信公众号粉丝列表
+ */
+ List getWxAccountFansList(WxAccountFansExportReqVO exportReqVO);
+
+ /**
+ * 查询粉丝
+ *
+ * @param sFunction
+ * @param val
+ * @return
+ */
+ WxAccountFansDO findBy(SFunction sFunction, Object val);
+}
diff --git a/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/accountfans/WxAccountFansServiceImpl.java b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/accountfans/WxAccountFansServiceImpl.java
new file mode 100644
index 0000000000..4afe73049c
--- /dev/null
+++ b/yudao-module-wechat-mp/yudao-module-wechat-mp-biz/src/main/java/cn/iocoder/yudao/module/wechatMp/service/accountfans/WxAccountFansServiceImpl.java
@@ -0,0 +1,90 @@
+package cn.iocoder.yudao.module.wechatMp.service.accountfans;
+
+import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+import org.springframework.validation.annotation.Validated;
+
+import java.util.*;
+
+import cn.iocoder.yudao.module.wechatMp.controller.admin.accountfans.vo.*;
+import cn.iocoder.yudao.module.wechatMp.dal.dataobject.accountfans.WxAccountFansDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+
+import cn.iocoder.yudao.module.wechatMp.convert.accountfans.WxAccountFansConvert;
+import cn.iocoder.yudao.module.wechatMp.dal.mysql.accountfans.WxAccountFansMapper;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.iocoder.yudao.module.wechatMp.enums.ErrorCodeConstants.*;
+
+/**
+ * 微信公众号粉丝 Service 实现类
+ *
+ * @author 芋道源码
+ */
+@Service
+@Validated
+public class WxAccountFansServiceImpl implements WxAccountFansService {
+
+ @Resource
+ private WxAccountFansMapper wxAccountFansMapper;
+
+ @Override
+ public Long createWxAccountFans(WxAccountFansCreateReqVO createReqVO) {
+ // 插入
+ WxAccountFansDO wxAccountFans = WxAccountFansConvert.INSTANCE.convert(createReqVO);
+ wxAccountFansMapper.insert(wxAccountFans);
+ // 返回
+ return wxAccountFans.getId();
+ }
+
+ @Override
+ public void updateWxAccountFans(WxAccountFansUpdateReqVO updateReqVO) {
+ // 校验存在
+ this.validateWxAccountFansExists(updateReqVO.getId());
+ // 更新
+ WxAccountFansDO updateObj = WxAccountFansConvert.INSTANCE.convert(updateReqVO);
+ wxAccountFansMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteWxAccountFans(Long id) {
+ // 校验存在
+ this.validateWxAccountFansExists(id);
+ // 删除
+ wxAccountFansMapper.deleteById(id);
+ }
+
+ private void validateWxAccountFansExists(Long id) {
+ if (wxAccountFansMapper.selectById(id) == null) {
+ throw exception(WX_ACCOUNT_FANS_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public WxAccountFansDO getWxAccountFans(Long id) {
+ return wxAccountFansMapper.selectById(id);
+ }
+
+ @Override
+ public List getWxAccountFansList(Collection ids) {
+ return wxAccountFansMapper.selectBatchIds(ids);
+ }
+
+ @Override
+ public PageResult getWxAccountFansPage(WxAccountFansPageReqVO pageReqVO) {
+ return wxAccountFansMapper.selectPage(pageReqVO);
+ }
+
+ @Override
+ public List getWxAccountFansList(WxAccountFansExportReqVO exportReqVO) {
+ return wxAccountFansMapper.selectList(exportReqVO);
+ }
+
+ @Override
+ public WxAccountFansDO findBy(SFunction sFunction, Object val) {
+ return wxAccountFansMapper.selectOne(sFunction, val);
+ }
+}
diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml
index 4480f88a5a..be9b75424c 100644
--- a/yudao-server/pom.xml
+++ b/yudao-server/pom.xml
@@ -47,6 +47,7 @@
yudao-module-bpm-biz-flowable
${revision}
+
@@ -59,6 +60,12 @@
spring-boot-configuration-processor
true
+
+
+ cn.iocoder.boot
+ yudao-module-wechat-mp-biz
+ ${revision}
+
diff --git a/yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/language/html/htmlMode.js b/yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/language/html/htmlMode.js
index 09d6b204c7..9d625a5ac9 100644
--- a/yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/language/html/htmlMode.js
+++ b/yudao-server/src/main/resources/admin-ui/libs/monaco-editor/vs/language/html/htmlMode.js
@@ -4,4 +4,4 @@
* Released under the MIT license
* https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
-define("vs/language/html/workerManager",["require","exports","./fillers/monaco-editor-core"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0;var i=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval((function(){return t._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return t._stopWorker()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&(Date.now()-this._lastUsedTime>12e4&&this._stopWorker())},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=n.editor.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],i=0;i0&&(r.arguments=n),r},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.title)&&L.string(t.command)}}(c=t.Command||(t.Command={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return L.objectLiteral(t)&&L.string(t.newText)&&r.is(t.range)}}(d=t.TextEdit||(t.TextEdit={})),function(e){e.create=function(e,t,n){var i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){var t=e;return void 0!==t&&L.objectLiteral(t)&&L.string(t.label)&&(L.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(L.string(t.description)||void 0===t.description)}}(h=t.ChangeAnnotation||(t.ChangeAnnotation={})),function(e){e.is=function(e){return"string"==typeof e}}(u=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return d.is(t)&&(h.is(t.annotationId)||u.is(t.annotationId))}}(p=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return L.defined(t)&&_.is(t.textDocument)&&Array.isArray(t.edits)}}(m=t.TextDocumentEdit||(t.TextDocumentEdit={})),function(e){e.create=function(e,t,n){var i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"create"===t.kind&&L.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||L.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||L.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||u.is(t.annotationId))}}(f=t.CreateFile||(t.CreateFile={})),function(e){e.create=function(e,t,n,i){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&L.string(t.oldUri)&&L.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||L.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||L.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||u.is(t.annotationId))}}(g=t.RenameFile||(t.RenameFile={})),function(e){e.create=function(e,t,n){var i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"delete"===t.kind&&L.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||L.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||L.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||u.is(t.annotationId))}}(b=t.DeleteFile||(t.DeleteFile={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return L.string(e.kind)?f.is(e)||g.is(e)||b.is(e):m.is(e)})))}}(v=t.WorkspaceEdit||(t.WorkspaceEdit={}));var _,w,y,T,k=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var i,r;if(void 0===n?i=d.insert(e,t):u.is(n)?(r=n,i=p.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=p.insert(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.replace=function(e,t,n){var i,r;if(void 0===n?i=d.replace(e,t):u.is(n)?(r=n,i=p.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=p.replace(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.delete=function(e,t){var n,i;if(void 0===t?n=d.del(e):u.is(t)?(i=t,n=p.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=p.del(e,i)),this.edits.push(n),void 0!==i)return i},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),S=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,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(e,t){var n;if(u.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),x=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new S(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(m.is(e)){var n=new k(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new k(e.changes[n]);t._textEditChanges[n]=i}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(_.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),i=new k(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,i=new k(r),this._textEditChanges[e]=i}return i},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new S,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,a;if(h.is(t)||u.is(t)?i=t:n=t,void 0===i?r=f.create(e,n):(a=u.is(i)?i:this._changeAnnotations.manage(i),r=f.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),void 0!==a)return a},e.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,a,o;if(h.is(n)||u.is(n)?r=n:i=n,void 0===r?a=g.create(e,t,i):(o=u.is(r)?r:this._changeAnnotations.manage(r),a=g.create(e,t,i,o)),this._workspaceEdit.documentChanges.push(a),void 0!==o)return o},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,a;if(h.is(t)||u.is(t)?i=t:n=t,void 0===i?r=b.create(e,n):(a=u.is(i)?i:this._changeAnnotations.manage(i),r=b.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),void 0!==a)return a},e}();t.WorkspaceChange=x,function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)}}(t.TextDocumentIdentifier||(t.TextDocumentIdentifier={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)&&L.integer(t.version)}}(t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)&&(null===t.version||L.integer(t.version))}}(_=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)&&L.string(t.languageId)&&L.integer(t.version)&&L.string(t.text)}}(t.TextDocumentItem||(t.TextDocumentItem={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(w=t.MarkupKind||(t.MarkupKind={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(w=t.MarkupKind||(t.MarkupKind={})),function(e){e.is=function(e){var t=e;return L.objectLiteral(e)&&w.is(t.kind)&&L.string(t.value)}}(y=t.MarkupContent||(t.MarkupContent={})),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}(t.CompletionItemKind||(t.CompletionItemKind={})),function(e){e.PlainText=1,e.Snippet=2}(t.InsertTextFormat||(t.InsertTextFormat={})),function(e){e.Deprecated=1}(t.CompletionItemTag||(t.CompletionItemTag={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&L.string(t.newText)&&r.is(t.insert)&&r.is(t.replace)}}(t.InsertReplaceEdit||(t.InsertReplaceEdit={})),function(e){e.asIs=1,e.adjustIndentation=2}(t.InsertTextMode||(t.InsertTextMode={})),function(e){e.create=function(e){return{label:e}}}(t.CompletionItem||(t.CompletionItem={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(t.CompletionList||(t.CompletionList={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return L.string(t)||L.objectLiteral(t)&&L.string(t.language)&&L.string(t.value)}}(T=t.MarkedString||(t.MarkedString={})),function(e){e.is=function(e){var t=e;return!!t&&L.objectLiteral(t)&&(y.is(t.contents)||T.is(t.contents)||L.typedArray(t.contents,T.is))&&(void 0===e.range||r.is(e.range))}}(t.Hover||(t.Hover={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(t.ParameterInformation||(t.ParameterInformation={})),function(e){e.create=function(e,t){for(var n=[],i=2;i=0;o--){var s=r[o],l=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=a))throw new Error("Overlapping edit");i=i.substring(0,l)+s.newText+i.substring(c,i.length),a=l}return i}}(t.TextDocument||(t.TextDocument={}));var L,M=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return i.create(0,e);for(;ne?r=a:n=a+1}var o=n-1;return i.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1e?i=r:n=r+1}var a=n-1;return{line:a,character:e-t[a]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function o(e){var t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,i,r){return new n(e,t,i,r)},e.update=function(e,t,i){if(e instanceof n)return e.update(t,i),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),r=0,a=[],s=0,l=i(t.map(o),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));sr&&a.push(n.substring(r,d)),c.newText.length&&a.push(c.newText),r=e.offsetAt(c.range.end)}return a.push(n.substr(r)),a.join("")}}(t.TextDocument||(t.TextDocument={}))})),define("vscode-languageserver-textdocument",["vscode-languageserver-textdocument/main"],(function(e){return e}));var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),__exportStar=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/htmlLanguageTypes",["require","exports","vscode-languageserver-types","vscode-languageserver-textdocument","vscode-languageserver-types"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.ClientCapabilities=t.ScannerState=t.TokenType=t.TextDocument=void 0;var n=e("vscode-languageserver-types"),i=e("vscode-languageserver-textdocument");Object.defineProperty(t,"TextDocument",{enumerable:!0,get:function(){return i.TextDocument}}),__exportStar(e("vscode-languageserver-types"),t),function(e){e[e.StartCommentTag=0]="StartCommentTag",e[e.Comment=1]="Comment",e[e.EndCommentTag=2]="EndCommentTag",e[e.StartTagOpen=3]="StartTagOpen",e[e.StartTagClose=4]="StartTagClose",e[e.StartTagSelfClose=5]="StartTagSelfClose",e[e.StartTag=6]="StartTag",e[e.EndTagOpen=7]="EndTagOpen",e[e.EndTagClose=8]="EndTagClose",e[e.EndTag=9]="EndTag",e[e.DelimiterAssign=10]="DelimiterAssign",e[e.AttributeName=11]="AttributeName",e[e.AttributeValue=12]="AttributeValue",e[e.StartDoctypeTag=13]="StartDoctypeTag",e[e.Doctype=14]="Doctype",e[e.EndDoctypeTag=15]="EndDoctypeTag",e[e.Content=16]="Content",e[e.Whitespace=17]="Whitespace",e[e.Unknown=18]="Unknown",e[e.Script=19]="Script",e[e.Styles=20]="Styles",e[e.EOS=21]="EOS"}(t.TokenType||(t.TokenType={})),function(e){e[e.WithinContent=0]="WithinContent",e[e.AfterOpeningStartTag=1]="AfterOpeningStartTag",e[e.AfterOpeningEndTag=2]="AfterOpeningEndTag",e[e.WithinDoctype=3]="WithinDoctype",e[e.WithinTag=4]="WithinTag",e[e.WithinEndTag=5]="WithinEndTag",e[e.WithinComment=6]="WithinComment",e[e.WithinScriptContent=7]="WithinScriptContent",e[e.WithinStyleContent=8]="WithinStyleContent",e[e.AfterAttributeName=9]="AfterAttributeName",e[e.BeforeAttributeValue=10]="BeforeAttributeValue"}(t.ScannerState||(t.ScannerState={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[n.MarkupKind.Markdown,n.MarkupKind.PlainText]}},hover:{contentFormat:[n.MarkupKind.Markdown,n.MarkupKind.PlainText]}}}}(t.ClientCapabilities||(t.ClientCapabilities={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={}))})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/parser/htmlScanner",["require","exports","vscode-nls","../htmlLanguageTypes"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScanner=void 0;var n=e("vscode-nls"),i=e("../htmlLanguageTypes"),r=n.loadMessageBundle(),a=function(){function e(e,t){this.source=e,this.len=e.length,this.position=t}return e.prototype.eos=function(){return this.len<=this.position},e.prototype.getSource=function(){return this.source},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.goToEnd=function(){this.position=this.source.length},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)},e.prototype.advanceIfChars=function(e){var t;if(this.position+e.length>this.source.length)return!1;for(t=0;t0},e.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position".charCodeAt(0),d="/".charCodeAt(0),h="=".charCodeAt(0),u='"'.charCodeAt(0),p="'".charCodeAt(0),m="\n".charCodeAt(0),f="\r".charCodeAt(0),g="\f".charCodeAt(0),b=" ".charCodeAt(0),v="\t".charCodeAt(0),_={"text/x-handlebars-template":!0};t.createScanner=function(e,t,n,m){void 0===t&&(t=0),void 0===n&&(n=i.ScannerState.WithinContent),void 0===m&&(m=!1);var f,g,b,v,w,y=new a(e,t),T=n,k=0,S=i.TokenType.Unknown;function x(){return y.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase()}function L(e,t,n){return S=t,k=e,f=n,t}function M(){var e,t=y.pos();if(y.eos())return L(t,i.TokenType.EOS);switch(T){case i.ScannerState.WithinComment:return y.advanceIfChars([s,s,c])?(T=i.ScannerState.WithinContent,L(t,i.TokenType.EndCommentTag)):(y.advanceUntilChars([s,s,c]),L(t,i.TokenType.Comment));case i.ScannerState.WithinDoctype:return y.advanceIfChar(c)?(T=i.ScannerState.WithinContent,L(t,i.TokenType.EndDoctypeTag)):(y.advanceUntilChar(c),L(t,i.TokenType.Doctype));case i.ScannerState.WithinContent:if(y.advanceIfChar(l)){if(!y.eos()&&y.peekChar()===o){if(y.advanceIfChars([o,s,s]))return T=i.ScannerState.WithinComment,L(t,i.TokenType.StartCommentTag);if(y.advanceIfRegExp(/^!doctype/i))return T=i.ScannerState.WithinDoctype,L(t,i.TokenType.StartDoctypeTag)}return y.advanceIfChar(d)?(T=i.ScannerState.AfterOpeningEndTag,L(t,i.TokenType.EndTagOpen)):(T=i.ScannerState.AfterOpeningStartTag,L(t,i.TokenType.StartTagOpen))}return y.advanceUntilChar(l),L(t,i.TokenType.Content);case i.ScannerState.AfterOpeningEndTag:return x().length>0?(T=i.ScannerState.WithinEndTag,L(t,i.TokenType.EndTag)):y.skipWhitespace()?L(t,i.TokenType.Whitespace,r("error.unexpectedWhitespace","Tag name must directly follow the open bracket.")):(T=i.ScannerState.WithinEndTag,y.advanceUntilChar(c),t0?(g=!1,T=i.ScannerState.WithinTag,L(t,i.TokenType.StartTag)):y.skipWhitespace()?L(t,i.TokenType.Whitespace,r("error.unexpectedWhitespace","Tag name must directly follow the open bracket.")):(T=i.ScannerState.WithinTag,y.advanceUntilChar(c),t=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase()).length>0?(T=i.ScannerState.AfterAttributeName,g=!1,L(t,i.TokenType.AttributeName)):y.advanceIfChars([d,c])?(T=i.ScannerState.WithinContent,L(t,i.TokenType.StartTagSelfClose)):y.advanceIfChar(c)?(T="script"===b?w&&_[w]?i.ScannerState.WithinContent:i.ScannerState.WithinScriptContent:"style"===b?i.ScannerState.WithinStyleContent:i.ScannerState.WithinContent,L(t,i.TokenType.StartTagClose)):m&&y.peekChar()===l?(T=i.ScannerState.WithinContent,L(t,i.TokenType.StartTagClose,r("error.closingBracketMissing","Closing bracket missing."))):(y.advance(1),L(t,i.TokenType.Unknown,r("error.unexpectedCharacterInTag","Unexpected character in tag.")));case i.ScannerState.AfterAttributeName:return y.skipWhitespace()?(g=!0,L(t,i.TokenType.Whitespace)):y.advanceIfChar(h)?(T=i.ScannerState.BeforeAttributeValue,L(t,i.TokenType.DelimiterAssign)):(T=i.ScannerState.WithinTag,M());case i.ScannerState.BeforeAttributeValue:if(y.skipWhitespace())return L(t,i.TokenType.Whitespace);var n=y.advanceIfRegExp(/^[^\s"'`=<>]+/);if(n.length>0)return y.peekChar()===c&&y.peekChar(-1)===d&&(y.goBack(1),n=n.substr(0,n.length-1)),"type"===v&&(w=n),T=i.ScannerState.WithinTag,g=!1,L(t,i.TokenType.AttributeValue);var a=y.peekChar();return a===p||a===u?(y.advance(1),y.advanceUntilChar(a)&&y.advance(1),"type"===v&&(w=y.getSource().substring(t+1,y.pos()-1)),T=i.ScannerState.WithinTag,g=!1,L(t,i.TokenType.AttributeValue)):(T=i.ScannerState.WithinTag,g=!1,M());case i.ScannerState.WithinScriptContent:for(var f=1;!y.eos();){var k=y.advanceIfRegExp(/|<\/?script\s*\/?>?/i);if(0===k.length)return y.goToEnd(),L(t,i.TokenType.Script);if("\x3c!--"===k)1===f&&(f=2);else if("--\x3e"===k)f=1;else if("/"!==k[1])2===f&&(f=3);else{if(3!==f){y.goBack(k.length);break}f=2}}return T=i.ScannerState.WithinContent,t0))return a;r=a-1}}return-(i+1)}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/languageFacts/fact",["require","exports","../utils/arrays"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVoidElement=t.VOID_ELEMENTS=void 0;var n=e("../utils/arrays");t.VOID_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],t.isVoidElement=function(e){return!!e&&n.binarySearch(t.VOID_ELEMENTS,e.toLowerCase(),(function(e,t){return e.localeCompare(t)}))>=0}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/parser/htmlParser",["require","exports","./htmlScanner","../utils/arrays","../htmlLanguageTypes","../languageFacts/fact"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.Node=void 0;var n=e("./htmlScanner"),i=e("../utils/arrays"),r=e("../htmlLanguageTypes"),a=e("../languageFacts/fact"),o=function(){function e(e,t,n,i){this.start=e,this.end=t,this.children=n,this.parent=i,this.closed=!1}return Object.defineProperty(e.prototype,"attributeNames",{get:function(){return this.attributes?Object.keys(this.attributes):[]},enumerable:!1,configurable:!0}),e.prototype.isSameTag=function(e){return void 0===this.tag?void 0===e:void 0!==e&&this.tag.length===e.length&&this.tag.toLowerCase()===e},Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length?this.children[this.children.length-1]:void 0},enumerable:!1,configurable:!0}),e.prototype.findNodeBefore=function(e){var t=i.findFirst(this.children,(function(t){return e<=t.start}))-1;if(t>=0){var n=this.children[t];if(e>n.start){if(e=0){var n=this.children[t];if(e>n.start&&e<=n.end)return n.findNodeAt(e)}return this},e}();t.Node=o,t.parse=function(e){for(var t=n.createScanner(e,void 0,void 0,!0),i=new o(0,e.length,[],void 0),s=i,l=-1,c=void 0,d=null,h=t.scan();h!==r.TokenType.EOS;){switch(h){case r.TokenType.StartTagOpen:var u=new o(t.getTokenOffset(),e.length,[],s);s.children.push(u),s=u;break;case r.TokenType.StartTag:s.tag=t.getTokenText();break;case r.TokenType.StartTagClose:s.parent&&(s.end=t.getTokenEnd(),t.getTokenLength()?(s.startTagEnd=t.getTokenEnd(),s.tag&&a.isVoidElement(s.tag)&&(s.closed=!0,s=s.parent)):s=s.parent);break;case r.TokenType.StartTagSelfClose:s.parent&&(s.closed=!0,s.end=t.getTokenEnd(),s.startTagEnd=t.getTokenEnd(),s=s.parent);break;case r.TokenType.EndTagOpen:l=t.getTokenOffset(),c=void 0;break;case r.TokenType.EndTag:c=t.getTokenText().toLowerCase();break;case r.TokenType.EndTagClose:for(var p=s;!p.isSameTag(c)&&p.parent;)p=p.parent;if(p.parent){for(;s!==p;)s.end=l,s.closed=!1,s=s.parent;s.closed=!0,s.endTagStart=l,s.end=t.getTokenEnd(),s=s.parent}break;case r.TokenType.AttributeName:d=t.getTokenText(),(m=s.attributes)||(s.attributes=m={}),m[d]=null;break;case r.TokenType.AttributeValue:var m,f=t.getTokenText();(m=s.attributes)&&d&&(m[d]=f,d=null)}h=t.scan()}for(;s.parent;)s.end=e.length,s.closed=!1,s=s.parent;return{roots:i.children,findNodeBefore:i.findNodeBefore.bind(i),findNodeAt:i.findNodeAt.bind(i)}}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/parser/htmlEntities",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.entities=void 0,t.entities={"Aacute;":"Á",Aacute:"Á","aacute;":"á",aacute:"á","Abreve;":"Ă","abreve;":"ă","ac;":"∾","acd;":"∿","acE;":"∾̳","Acirc;":"Â",Acirc:"Â","acirc;":"â",acirc:"â","acute;":"´",acute:"´","Acy;":"А","acy;":"а","AElig;":"Æ",AElig:"Æ","aelig;":"æ",aelig:"æ","af;":"","Afr;":"𝔄","afr;":"𝔞","Agrave;":"À",Agrave:"À","agrave;":"à",agrave:"à","alefsym;":"ℵ","aleph;":"ℵ","Alpha;":"Α","alpha;":"α","Amacr;":"Ā","amacr;":"ā","amalg;":"⨿","AMP;":"&",AMP:"&","amp;":"&",amp:"&","And;":"⩓","and;":"∧","andand;":"⩕","andd;":"⩜","andslope;":"⩘","andv;":"⩚","ang;":"∠","ange;":"⦤","angle;":"∠","angmsd;":"∡","angmsdaa;":"⦨","angmsdab;":"⦩","angmsdac;":"⦪","angmsdad;":"⦫","angmsdae;":"⦬","angmsdaf;":"⦭","angmsdag;":"⦮","angmsdah;":"⦯","angrt;":"∟","angrtvb;":"⊾","angrtvbd;":"⦝","angsph;":"∢","angst;":"Å","angzarr;":"⍼","Aogon;":"Ą","aogon;":"ą","Aopf;":"𝔸","aopf;":"𝕒","ap;":"≈","apacir;":"⩯","apE;":"⩰","ape;":"≊","apid;":"≋","apos;":"'","ApplyFunction;":"","approx;":"≈","approxeq;":"≊","Aring;":"Å",Aring:"Å","aring;":"å",aring:"å","Ascr;":"𝒜","ascr;":"𝒶","Assign;":"≔","ast;":"*","asymp;":"≈","asympeq;":"≍","Atilde;":"Ã",Atilde:"Ã","atilde;":"ã",atilde:"ã","Auml;":"Ä",Auml:"Ä","auml;":"ä",auml:"ä","awconint;":"∳","awint;":"⨑","backcong;":"≌","backepsilon;":"϶","backprime;":"‵","backsim;":"∽","backsimeq;":"⋍","Backslash;":"∖","Barv;":"⫧","barvee;":"⊽","Barwed;":"⌆","barwed;":"⌅","barwedge;":"⌅","bbrk;":"⎵","bbrktbrk;":"⎶","bcong;":"≌","Bcy;":"Б","bcy;":"б","bdquo;":"„","becaus;":"∵","Because;":"∵","because;":"∵","bemptyv;":"⦰","bepsi;":"϶","bernou;":"ℬ","Bernoullis;":"ℬ","Beta;":"Β","beta;":"β","beth;":"ℶ","between;":"≬","Bfr;":"𝔅","bfr;":"𝔟","bigcap;":"⋂","bigcirc;":"◯","bigcup;":"⋃","bigodot;":"⨀","bigoplus;":"⨁","bigotimes;":"⨂","bigsqcup;":"⨆","bigstar;":"★","bigtriangledown;":"▽","bigtriangleup;":"△","biguplus;":"⨄","bigvee;":"⋁","bigwedge;":"⋀","bkarow;":"⤍","blacklozenge;":"⧫","blacksquare;":"▪","blacktriangle;":"▴","blacktriangledown;":"▾","blacktriangleleft;":"◂","blacktriangleright;":"▸","blank;":"␣","blk12;":"▒","blk14;":"░","blk34;":"▓","block;":"█","bne;":"=⃥","bnequiv;":"≡⃥","bNot;":"⫭","bnot;":"⌐","Bopf;":"𝔹","bopf;":"𝕓","bot;":"⊥","bottom;":"⊥","bowtie;":"⋈","boxbox;":"⧉","boxDL;":"╗","boxDl;":"╖","boxdL;":"╕","boxdl;":"┐","boxDR;":"╔","boxDr;":"╓","boxdR;":"╒","boxdr;":"┌","boxH;":"═","boxh;":"─","boxHD;":"╦","boxHd;":"╤","boxhD;":"╥","boxhd;":"┬","boxHU;":"╩","boxHu;":"╧","boxhU;":"╨","boxhu;":"┴","boxminus;":"⊟","boxplus;":"⊞","boxtimes;":"⊠","boxUL;":"╝","boxUl;":"╜","boxuL;":"╛","boxul;":"┘","boxUR;":"╚","boxUr;":"╙","boxuR;":"╘","boxur;":"└","boxV;":"║","boxv;":"│","boxVH;":"╬","boxVh;":"╫","boxvH;":"╪","boxvh;":"┼","boxVL;":"╣","boxVl;":"╢","boxvL;":"╡","boxvl;":"┤","boxVR;":"╠","boxVr;":"╟","boxvR;":"╞","boxvr;":"├","bprime;":"‵","Breve;":"˘","breve;":"˘","brvbar;":"¦",brvbar:"¦","Bscr;":"ℬ","bscr;":"𝒷","bsemi;":"⁏","bsim;":"∽","bsime;":"⋍","bsol;":"\\","bsolb;":"⧅","bsolhsub;":"⟈","bull;":"•","bullet;":"•","bump;":"≎","bumpE;":"⪮","bumpe;":"≏","Bumpeq;":"≎","bumpeq;":"≏","Cacute;":"Ć","cacute;":"ć","Cap;":"⋒","cap;":"∩","capand;":"⩄","capbrcup;":"⩉","capcap;":"⩋","capcup;":"⩇","capdot;":"⩀","CapitalDifferentialD;":"ⅅ","caps;":"∩︀","caret;":"⁁","caron;":"ˇ","Cayleys;":"ℭ","ccaps;":"⩍","Ccaron;":"Č","ccaron;":"č","Ccedil;":"Ç",Ccedil:"Ç","ccedil;":"ç",ccedil:"ç","Ccirc;":"Ĉ","ccirc;":"ĉ","Cconint;":"∰","ccups;":"⩌","ccupssm;":"⩐","Cdot;":"Ċ","cdot;":"ċ","cedil;":"¸",cedil:"¸","Cedilla;":"¸","cemptyv;":"⦲","cent;":"¢",cent:"¢","CenterDot;":"·","centerdot;":"·","Cfr;":"ℭ","cfr;":"𝔠","CHcy;":"Ч","chcy;":"ч","check;":"✓","checkmark;":"✓","Chi;":"Χ","chi;":"χ","cir;":"○","circ;":"ˆ","circeq;":"≗","circlearrowleft;":"↺","circlearrowright;":"↻","circledast;":"⊛","circledcirc;":"⊚","circleddash;":"⊝","CircleDot;":"⊙","circledR;":"®","circledS;":"Ⓢ","CircleMinus;":"⊖","CirclePlus;":"⊕","CircleTimes;":"⊗","cirE;":"⧃","cire;":"≗","cirfnint;":"⨐","cirmid;":"⫯","cirscir;":"⧂","ClockwiseContourIntegral;":"∲","CloseCurlyDoubleQuote;":"”","CloseCurlyQuote;":"’","clubs;":"♣","clubsuit;":"♣","Colon;":"∷","colon;":":","Colone;":"⩴","colone;":"≔","coloneq;":"≔","comma;":",","commat;":"@","comp;":"∁","compfn;":"∘","complement;":"∁","complexes;":"ℂ","cong;":"≅","congdot;":"⩭","Congruent;":"≡","Conint;":"∯","conint;":"∮","ContourIntegral;":"∮","Copf;":"ℂ","copf;":"𝕔","coprod;":"∐","Coproduct;":"∐","COPY;":"©",COPY:"©","copy;":"©",copy:"©","copysr;":"℗","CounterClockwiseContourIntegral;":"∳","crarr;":"↵","Cross;":"⨯","cross;":"✗","Cscr;":"𝒞","cscr;":"𝒸","csub;":"⫏","csube;":"⫑","csup;":"⫐","csupe;":"⫒","ctdot;":"⋯","cudarrl;":"⤸","cudarrr;":"⤵","cuepr;":"⋞","cuesc;":"⋟","cularr;":"↶","cularrp;":"⤽","Cup;":"⋓","cup;":"∪","cupbrcap;":"⩈","CupCap;":"≍","cupcap;":"⩆","cupcup;":"⩊","cupdot;":"⊍","cupor;":"⩅","cups;":"∪︀","curarr;":"↷","curarrm;":"⤼","curlyeqprec;":"⋞","curlyeqsucc;":"⋟","curlyvee;":"⋎","curlywedge;":"⋏","curren;":"¤",curren:"¤","curvearrowleft;":"↶","curvearrowright;":"↷","cuvee;":"⋎","cuwed;":"⋏","cwconint;":"∲","cwint;":"∱","cylcty;":"⌭","Dagger;":"‡","dagger;":"†","daleth;":"ℸ","Darr;":"↡","dArr;":"⇓","darr;":"↓","dash;":"‐","Dashv;":"⫤","dashv;":"⊣","dbkarow;":"⤏","dblac;":"˝","Dcaron;":"Ď","dcaron;":"ď","Dcy;":"Д","dcy;":"д","DD;":"ⅅ","dd;":"ⅆ","ddagger;":"‡","ddarr;":"⇊","DDotrahd;":"⤑","ddotseq;":"⩷","deg;":"°",deg:"°","Del;":"∇","Delta;":"Δ","delta;":"δ","demptyv;":"⦱","dfisht;":"⥿","Dfr;":"𝔇","dfr;":"𝔡","dHar;":"⥥","dharl;":"⇃","dharr;":"⇂","DiacriticalAcute;":"´","DiacriticalDot;":"˙","DiacriticalDoubleAcute;":"˝","DiacriticalGrave;":"`","DiacriticalTilde;":"˜","diam;":"⋄","Diamond;":"⋄","diamond;":"⋄","diamondsuit;":"♦","diams;":"♦","die;":"¨","DifferentialD;":"ⅆ","digamma;":"ϝ","disin;":"⋲","div;":"÷","divide;":"÷",divide:"÷","divideontimes;":"⋇","divonx;":"⋇","DJcy;":"Ђ","djcy;":"ђ","dlcorn;":"⌞","dlcrop;":"⌍","dollar;":"$","Dopf;":"𝔻","dopf;":"𝕕","Dot;":"¨","dot;":"˙","DotDot;":"⃜","doteq;":"≐","doteqdot;":"≑","DotEqual;":"≐","dotminus;":"∸","dotplus;":"∔","dotsquare;":"⊡","doublebarwedge;":"⌆","DoubleContourIntegral;":"∯","DoubleDot;":"¨","DoubleDownArrow;":"⇓","DoubleLeftArrow;":"⇐","DoubleLeftRightArrow;":"⇔","DoubleLeftTee;":"⫤","DoubleLongLeftArrow;":"⟸","DoubleLongLeftRightArrow;":"⟺","DoubleLongRightArrow;":"⟹","DoubleRightArrow;":"⇒","DoubleRightTee;":"⊨","DoubleUpArrow;":"⇑","DoubleUpDownArrow;":"⇕","DoubleVerticalBar;":"∥","DownArrow;":"↓","Downarrow;":"⇓","downarrow;":"↓","DownArrowBar;":"⤓","DownArrowUpArrow;":"⇵","DownBreve;":"̑","downdownarrows;":"⇊","downharpoonleft;":"⇃","downharpoonright;":"⇂","DownLeftRightVector;":"⥐","DownLeftTeeVector;":"⥞","DownLeftVector;":"↽","DownLeftVectorBar;":"⥖","DownRightTeeVector;":"⥟","DownRightVector;":"⇁","DownRightVectorBar;":"⥗","DownTee;":"⊤","DownTeeArrow;":"↧","drbkarow;":"⤐","drcorn;":"⌟","drcrop;":"⌌","Dscr;":"𝒟","dscr;":"𝒹","DScy;":"Ѕ","dscy;":"ѕ","dsol;":"⧶","Dstrok;":"Đ","dstrok;":"đ","dtdot;":"⋱","dtri;":"▿","dtrif;":"▾","duarr;":"⇵","duhar;":"⥯","dwangle;":"⦦","DZcy;":"Џ","dzcy;":"џ","dzigrarr;":"⟿","Eacute;":"É",Eacute:"É","eacute;":"é",eacute:"é","easter;":"⩮","Ecaron;":"Ě","ecaron;":"ě","ecir;":"≖","Ecirc;":"Ê",Ecirc:"Ê","ecirc;":"ê",ecirc:"ê","ecolon;":"≕","Ecy;":"Э","ecy;":"э","eDDot;":"⩷","Edot;":"Ė","eDot;":"≑","edot;":"ė","ee;":"ⅇ","efDot;":"≒","Efr;":"𝔈","efr;":"𝔢","eg;":"⪚","Egrave;":"È",Egrave:"È","egrave;":"è",egrave:"è","egs;":"⪖","egsdot;":"⪘","el;":"⪙","Element;":"∈","elinters;":"⏧","ell;":"ℓ","els;":"⪕","elsdot;":"⪗","Emacr;":"Ē","emacr;":"ē","empty;":"∅","emptyset;":"∅","EmptySmallSquare;":"◻","emptyv;":"∅","EmptyVerySmallSquare;":"▫","emsp;":" ","emsp13;":" ","emsp14;":" ","ENG;":"Ŋ","eng;":"ŋ","ensp;":" ","Eogon;":"Ę","eogon;":"ę","Eopf;":"𝔼","eopf;":"𝕖","epar;":"⋕","eparsl;":"⧣","eplus;":"⩱","epsi;":"ε","Epsilon;":"Ε","epsilon;":"ε","epsiv;":"ϵ","eqcirc;":"≖","eqcolon;":"≕","eqsim;":"≂","eqslantgtr;":"⪖","eqslantless;":"⪕","Equal;":"⩵","equals;":"=","EqualTilde;":"≂","equest;":"≟","Equilibrium;":"⇌","equiv;":"≡","equivDD;":"⩸","eqvparsl;":"⧥","erarr;":"⥱","erDot;":"≓","Escr;":"ℰ","escr;":"ℯ","esdot;":"≐","Esim;":"⩳","esim;":"≂","Eta;":"Η","eta;":"η","ETH;":"Ð",ETH:"Ð","eth;":"ð",eth:"ð","Euml;":"Ë",Euml:"Ë","euml;":"ë",euml:"ë","euro;":"€","excl;":"!","exist;":"∃","Exists;":"∃","expectation;":"ℰ","ExponentialE;":"ⅇ","exponentiale;":"ⅇ","fallingdotseq;":"≒","Fcy;":"Ф","fcy;":"ф","female;":"♀","ffilig;":"ffi","fflig;":"ff","ffllig;":"ffl","Ffr;":"𝔉","ffr;":"𝔣","filig;":"fi","FilledSmallSquare;":"◼","FilledVerySmallSquare;":"▪","fjlig;":"fj","flat;":"♭","fllig;":"fl","fltns;":"▱","fnof;":"ƒ","Fopf;":"𝔽","fopf;":"𝕗","ForAll;":"∀","forall;":"∀","fork;":"⋔","forkv;":"⫙","Fouriertrf;":"ℱ","fpartint;":"⨍","frac12;":"½",frac12:"½","frac13;":"⅓","frac14;":"¼",frac14:"¼","frac15;":"⅕","frac16;":"⅙","frac18;":"⅛","frac23;":"⅔","frac25;":"⅖","frac34;":"¾",frac34:"¾","frac35;":"⅗","frac38;":"⅜","frac45;":"⅘","frac56;":"⅚","frac58;":"⅝","frac78;":"⅞","frasl;":"⁄","frown;":"⌢","Fscr;":"ℱ","fscr;":"𝒻","gacute;":"ǵ","Gamma;":"Γ","gamma;":"γ","Gammad;":"Ϝ","gammad;":"ϝ","gap;":"⪆","Gbreve;":"Ğ","gbreve;":"ğ","Gcedil;":"Ģ","Gcirc;":"Ĝ","gcirc;":"ĝ","Gcy;":"Г","gcy;":"г","Gdot;":"Ġ","gdot;":"ġ","gE;":"≧","ge;":"≥","gEl;":"⪌","gel;":"⋛","geq;":"≥","geqq;":"≧","geqslant;":"⩾","ges;":"⩾","gescc;":"⪩","gesdot;":"⪀","gesdoto;":"⪂","gesdotol;":"⪄","gesl;":"⋛︀","gesles;":"⪔","Gfr;":"𝔊","gfr;":"𝔤","Gg;":"⋙","gg;":"≫","ggg;":"⋙","gimel;":"ℷ","GJcy;":"Ѓ","gjcy;":"ѓ","gl;":"≷","gla;":"⪥","glE;":"⪒","glj;":"⪤","gnap;":"⪊","gnapprox;":"⪊","gnE;":"≩","gne;":"⪈","gneq;":"⪈","gneqq;":"≩","gnsim;":"⋧","Gopf;":"𝔾","gopf;":"𝕘","grave;":"`","GreaterEqual;":"≥","GreaterEqualLess;":"⋛","GreaterFullEqual;":"≧","GreaterGreater;":"⪢","GreaterLess;":"≷","GreaterSlantEqual;":"⩾","GreaterTilde;":"≳","Gscr;":"𝒢","gscr;":"ℊ","gsim;":"≳","gsime;":"⪎","gsiml;":"⪐","GT;":">",GT:">","Gt;":"≫","gt;":">",gt:">","gtcc;":"⪧","gtcir;":"⩺","gtdot;":"⋗","gtlPar;":"⦕","gtquest;":"⩼","gtrapprox;":"⪆","gtrarr;":"⥸","gtrdot;":"⋗","gtreqless;":"⋛","gtreqqless;":"⪌","gtrless;":"≷","gtrsim;":"≳","gvertneqq;":"≩︀","gvnE;":"≩︀","Hacek;":"ˇ","hairsp;":" ","half;":"½","hamilt;":"ℋ","HARDcy;":"Ъ","hardcy;":"ъ","hArr;":"⇔","harr;":"↔","harrcir;":"⥈","harrw;":"↭","Hat;":"^","hbar;":"ℏ","Hcirc;":"Ĥ","hcirc;":"ĥ","hearts;":"♥","heartsuit;":"♥","hellip;":"…","hercon;":"⊹","Hfr;":"ℌ","hfr;":"𝔥","HilbertSpace;":"ℋ","hksearow;":"⤥","hkswarow;":"⤦","hoarr;":"⇿","homtht;":"∻","hookleftarrow;":"↩","hookrightarrow;":"↪","Hopf;":"ℍ","hopf;":"𝕙","horbar;":"―","HorizontalLine;":"─","Hscr;":"ℋ","hscr;":"𝒽","hslash;":"ℏ","Hstrok;":"Ħ","hstrok;":"ħ","HumpDownHump;":"≎","HumpEqual;":"≏","hybull;":"⁃","hyphen;":"‐","Iacute;":"Í",Iacute:"Í","iacute;":"í",iacute:"í","ic;":"","Icirc;":"Î",Icirc:"Î","icirc;":"î",icirc:"î","Icy;":"И","icy;":"и","Idot;":"İ","IEcy;":"Е","iecy;":"е","iexcl;":"¡",iexcl:"¡","iff;":"⇔","Ifr;":"ℑ","ifr;":"𝔦","Igrave;":"Ì",Igrave:"Ì","igrave;":"ì",igrave:"ì","ii;":"ⅈ","iiiint;":"⨌","iiint;":"∭","iinfin;":"⧜","iiota;":"℩","IJlig;":"IJ","ijlig;":"ij","Im;":"ℑ","Imacr;":"Ī","imacr;":"ī","image;":"ℑ","ImaginaryI;":"ⅈ","imagline;":"ℐ","imagpart;":"ℑ","imath;":"ı","imof;":"⊷","imped;":"Ƶ","Implies;":"⇒","in;":"∈","incare;":"℅","infin;":"∞","infintie;":"⧝","inodot;":"ı","Int;":"∬","int;":"∫","intcal;":"⊺","integers;":"ℤ","Integral;":"∫","intercal;":"⊺","Intersection;":"⋂","intlarhk;":"⨗","intprod;":"⨼","InvisibleComma;":"","InvisibleTimes;":"","IOcy;":"Ё","iocy;":"ё","Iogon;":"Į","iogon;":"į","Iopf;":"𝕀","iopf;":"𝕚","Iota;":"Ι","iota;":"ι","iprod;":"⨼","iquest;":"¿",iquest:"¿","Iscr;":"ℐ","iscr;":"𝒾","isin;":"∈","isindot;":"⋵","isinE;":"⋹","isins;":"⋴","isinsv;":"⋳","isinv;":"∈","it;":"","Itilde;":"Ĩ","itilde;":"ĩ","Iukcy;":"І","iukcy;":"і","Iuml;":"Ï",Iuml:"Ï","iuml;":"ï",iuml:"ï","Jcirc;":"Ĵ","jcirc;":"ĵ","Jcy;":"Й","jcy;":"й","Jfr;":"𝔍","jfr;":"𝔧","jmath;":"ȷ","Jopf;":"𝕁","jopf;":"𝕛","Jscr;":"𝒥","jscr;":"𝒿","Jsercy;":"Ј","jsercy;":"ј","Jukcy;":"Є","jukcy;":"є","Kappa;":"Κ","kappa;":"κ","kappav;":"ϰ","Kcedil;":"Ķ","kcedil;":"ķ","Kcy;":"К","kcy;":"к","Kfr;":"𝔎","kfr;":"𝔨","kgreen;":"ĸ","KHcy;":"Х","khcy;":"х","KJcy;":"Ќ","kjcy;":"ќ","Kopf;":"𝕂","kopf;":"𝕜","Kscr;":"𝒦","kscr;":"𝓀","lAarr;":"⇚","Lacute;":"Ĺ","lacute;":"ĺ","laemptyv;":"⦴","lagran;":"ℒ","Lambda;":"Λ","lambda;":"λ","Lang;":"⟪","lang;":"⟨","langd;":"⦑","langle;":"⟨","lap;":"⪅","Laplacetrf;":"ℒ","laquo;":"«",laquo:"«","Larr;":"↞","lArr;":"⇐","larr;":"←","larrb;":"⇤","larrbfs;":"⤟","larrfs;":"⤝","larrhk;":"↩","larrlp;":"↫","larrpl;":"⤹","larrsim;":"⥳","larrtl;":"↢","lat;":"⪫","lAtail;":"⤛","latail;":"⤙","late;":"⪭","lates;":"⪭︀","lBarr;":"⤎","lbarr;":"⤌","lbbrk;":"❲","lbrace;":"{","lbrack;":"[","lbrke;":"⦋","lbrksld;":"⦏","lbrkslu;":"⦍","Lcaron;":"Ľ","lcaron;":"ľ","Lcedil;":"Ļ","lcedil;":"ļ","lceil;":"⌈","lcub;":"{","Lcy;":"Л","lcy;":"л","ldca;":"⤶","ldquo;":"“","ldquor;":"„","ldrdhar;":"⥧","ldrushar;":"⥋","ldsh;":"↲","lE;":"≦","le;":"≤","LeftAngleBracket;":"⟨","LeftArrow;":"←","Leftarrow;":"⇐","leftarrow;":"←","LeftArrowBar;":"⇤","LeftArrowRightArrow;":"⇆","leftarrowtail;":"↢","LeftCeiling;":"⌈","LeftDoubleBracket;":"⟦","LeftDownTeeVector;":"⥡","LeftDownVector;":"⇃","LeftDownVectorBar;":"⥙","LeftFloor;":"⌊","leftharpoondown;":"↽","leftharpoonup;":"↼","leftleftarrows;":"⇇","LeftRightArrow;":"↔","Leftrightarrow;":"⇔","leftrightarrow;":"↔","leftrightarrows;":"⇆","leftrightharpoons;":"⇋","leftrightsquigarrow;":"↭","LeftRightVector;":"⥎","LeftTee;":"⊣","LeftTeeArrow;":"↤","LeftTeeVector;":"⥚","leftthreetimes;":"⋋","LeftTriangle;":"⊲","LeftTriangleBar;":"⧏","LeftTriangleEqual;":"⊴","LeftUpDownVector;":"⥑","LeftUpTeeVector;":"⥠","LeftUpVector;":"↿","LeftUpVectorBar;":"⥘","LeftVector;":"↼","LeftVectorBar;":"⥒","lEg;":"⪋","leg;":"⋚","leq;":"≤","leqq;":"≦","leqslant;":"⩽","les;":"⩽","lescc;":"⪨","lesdot;":"⩿","lesdoto;":"⪁","lesdotor;":"⪃","lesg;":"⋚︀","lesges;":"⪓","lessapprox;":"⪅","lessdot;":"⋖","lesseqgtr;":"⋚","lesseqqgtr;":"⪋","LessEqualGreater;":"⋚","LessFullEqual;":"≦","LessGreater;":"≶","lessgtr;":"≶","LessLess;":"⪡","lesssim;":"≲","LessSlantEqual;":"⩽","LessTilde;":"≲","lfisht;":"⥼","lfloor;":"⌊","Lfr;":"𝔏","lfr;":"𝔩","lg;":"≶","lgE;":"⪑","lHar;":"⥢","lhard;":"↽","lharu;":"↼","lharul;":"⥪","lhblk;":"▄","LJcy;":"Љ","ljcy;":"љ","Ll;":"⋘","ll;":"≪","llarr;":"⇇","llcorner;":"⌞","Lleftarrow;":"⇚","llhard;":"⥫","lltri;":"◺","Lmidot;":"Ŀ","lmidot;":"ŀ","lmoust;":"⎰","lmoustache;":"⎰","lnap;":"⪉","lnapprox;":"⪉","lnE;":"≨","lne;":"⪇","lneq;":"⪇","lneqq;":"≨","lnsim;":"⋦","loang;":"⟬","loarr;":"⇽","lobrk;":"⟦","LongLeftArrow;":"⟵","Longleftarrow;":"⟸","longleftarrow;":"⟵","LongLeftRightArrow;":"⟷","Longleftrightarrow;":"⟺","longleftrightarrow;":"⟷","longmapsto;":"⟼","LongRightArrow;":"⟶","Longrightarrow;":"⟹","longrightarrow;":"⟶","looparrowleft;":"↫","looparrowright;":"↬","lopar;":"⦅","Lopf;":"𝕃","lopf;":"𝕝","loplus;":"⨭","lotimes;":"⨴","lowast;":"∗","lowbar;":"_","LowerLeftArrow;":"↙","LowerRightArrow;":"↘","loz;":"◊","lozenge;":"◊","lozf;":"⧫","lpar;":"(","lparlt;":"⦓","lrarr;":"⇆","lrcorner;":"⌟","lrhar;":"⇋","lrhard;":"⥭","lrm;":"","lrtri;":"⊿","lsaquo;":"‹","Lscr;":"ℒ","lscr;":"𝓁","Lsh;":"↰","lsh;":"↰","lsim;":"≲","lsime;":"⪍","lsimg;":"⪏","lsqb;":"[","lsquo;":"‘","lsquor;":"‚","Lstrok;":"Ł","lstrok;":"ł","LT;":"<",LT:"<","Lt;":"≪","lt;":"<",lt:"<","ltcc;":"⪦","ltcir;":"⩹","ltdot;":"⋖","lthree;":"⋋","ltimes;":"⋉","ltlarr;":"⥶","ltquest;":"⩻","ltri;":"◃","ltrie;":"⊴","ltrif;":"◂","ltrPar;":"⦖","lurdshar;":"⥊","luruhar;":"⥦","lvertneqq;":"≨︀","lvnE;":"≨︀","macr;":"¯",macr:"¯","male;":"♂","malt;":"✠","maltese;":"✠","Map;":"⤅","map;":"↦","mapsto;":"↦","mapstodown;":"↧","mapstoleft;":"↤","mapstoup;":"↥","marker;":"▮","mcomma;":"⨩","Mcy;":"М","mcy;":"м","mdash;":"—","mDDot;":"∺","measuredangle;":"∡","MediumSpace;":" ","Mellintrf;":"ℳ","Mfr;":"𝔐","mfr;":"𝔪","mho;":"℧","micro;":"µ",micro:"µ","mid;":"∣","midast;":"*","midcir;":"⫰","middot;":"·",middot:"·","minus;":"−","minusb;":"⊟","minusd;":"∸","minusdu;":"⨪","MinusPlus;":"∓","mlcp;":"⫛","mldr;":"…","mnplus;":"∓","models;":"⊧","Mopf;":"𝕄","mopf;":"𝕞","mp;":"∓","Mscr;":"ℳ","mscr;":"𝓂","mstpos;":"∾","Mu;":"Μ","mu;":"μ","multimap;":"⊸","mumap;":"⊸","nabla;":"∇","Nacute;":"Ń","nacute;":"ń","nang;":"∠⃒","nap;":"≉","napE;":"⩰̸","napid;":"≋̸","napos;":"ʼn","napprox;":"≉","natur;":"♮","natural;":"♮","naturals;":"ℕ","nbsp;":" ",nbsp:" ","nbump;":"≎̸","nbumpe;":"≏̸","ncap;":"⩃","Ncaron;":"Ň","ncaron;":"ň","Ncedil;":"Ņ","ncedil;":"ņ","ncong;":"≇","ncongdot;":"⩭̸","ncup;":"⩂","Ncy;":"Н","ncy;":"н","ndash;":"–","ne;":"≠","nearhk;":"⤤","neArr;":"⇗","nearr;":"↗","nearrow;":"↗","nedot;":"≐̸","NegativeMediumSpace;":"","NegativeThickSpace;":"","NegativeThinSpace;":"","NegativeVeryThinSpace;":"","nequiv;":"≢","nesear;":"⤨","nesim;":"≂̸","NestedGreaterGreater;":"≫","NestedLessLess;":"≪","NewLine;":"\n","nexist;":"∄","nexists;":"∄","Nfr;":"𝔑","nfr;":"𝔫","ngE;":"≧̸","nge;":"≱","ngeq;":"≱","ngeqq;":"≧̸","ngeqslant;":"⩾̸","nges;":"⩾̸","nGg;":"⋙̸","ngsim;":"≵","nGt;":"≫⃒","ngt;":"≯","ngtr;":"≯","nGtv;":"≫̸","nhArr;":"⇎","nharr;":"↮","nhpar;":"⫲","ni;":"∋","nis;":"⋼","nisd;":"⋺","niv;":"∋","NJcy;":"Њ","njcy;":"њ","nlArr;":"⇍","nlarr;":"↚","nldr;":"‥","nlE;":"≦̸","nle;":"≰","nLeftarrow;":"⇍","nleftarrow;":"↚","nLeftrightarrow;":"⇎","nleftrightarrow;":"↮","nleq;":"≰","nleqq;":"≦̸","nleqslant;":"⩽̸","nles;":"⩽̸","nless;":"≮","nLl;":"⋘̸","nlsim;":"≴","nLt;":"≪⃒","nlt;":"≮","nltri;":"⋪","nltrie;":"⋬","nLtv;":"≪̸","nmid;":"∤","NoBreak;":"","NonBreakingSpace;":" ","Nopf;":"ℕ","nopf;":"𝕟","Not;":"⫬","not;":"¬",not:"¬","NotCongruent;":"≢","NotCupCap;":"≭","NotDoubleVerticalBar;":"∦","NotElement;":"∉","NotEqual;":"≠","NotEqualTilde;":"≂̸","NotExists;":"∄","NotGreater;":"≯","NotGreaterEqual;":"≱","NotGreaterFullEqual;":"≧̸","NotGreaterGreater;":"≫̸","NotGreaterLess;":"≹","NotGreaterSlantEqual;":"⩾̸","NotGreaterTilde;":"≵","NotHumpDownHump;":"≎̸","NotHumpEqual;":"≏̸","notin;":"∉","notindot;":"⋵̸","notinE;":"⋹̸","notinva;":"∉","notinvb;":"⋷","notinvc;":"⋶","NotLeftTriangle;":"⋪","NotLeftTriangleBar;":"⧏̸","NotLeftTriangleEqual;":"⋬","NotLess;":"≮","NotLessEqual;":"≰","NotLessGreater;":"≸","NotLessLess;":"≪̸","NotLessSlantEqual;":"⩽̸","NotLessTilde;":"≴","NotNestedGreaterGreater;":"⪢̸","NotNestedLessLess;":"⪡̸","notni;":"∌","notniva;":"∌","notnivb;":"⋾","notnivc;":"⋽","NotPrecedes;":"⊀","NotPrecedesEqual;":"⪯̸","NotPrecedesSlantEqual;":"⋠","NotReverseElement;":"∌","NotRightTriangle;":"⋫","NotRightTriangleBar;":"⧐̸","NotRightTriangleEqual;":"⋭","NotSquareSubset;":"⊏̸","NotSquareSubsetEqual;":"⋢","NotSquareSuperset;":"⊐̸","NotSquareSupersetEqual;":"⋣","NotSubset;":"⊂⃒","NotSubsetEqual;":"⊈","NotSucceeds;":"⊁","NotSucceedsEqual;":"⪰̸","NotSucceedsSlantEqual;":"⋡","NotSucceedsTilde;":"≿̸","NotSuperset;":"⊃⃒","NotSupersetEqual;":"⊉","NotTilde;":"≁","NotTildeEqual;":"≄","NotTildeFullEqual;":"≇","NotTildeTilde;":"≉","NotVerticalBar;":"∤","npar;":"∦","nparallel;":"∦","nparsl;":"⫽⃥","npart;":"∂̸","npolint;":"⨔","npr;":"⊀","nprcue;":"⋠","npre;":"⪯̸","nprec;":"⊀","npreceq;":"⪯̸","nrArr;":"⇏","nrarr;":"↛","nrarrc;":"⤳̸","nrarrw;":"↝̸","nRightarrow;":"⇏","nrightarrow;":"↛","nrtri;":"⋫","nrtrie;":"⋭","nsc;":"⊁","nsccue;":"⋡","nsce;":"⪰̸","Nscr;":"𝒩","nscr;":"𝓃","nshortmid;":"∤","nshortparallel;":"∦","nsim;":"≁","nsime;":"≄","nsimeq;":"≄","nsmid;":"∤","nspar;":"∦","nsqsube;":"⋢","nsqsupe;":"⋣","nsub;":"⊄","nsubE;":"⫅̸","nsube;":"⊈","nsubset;":"⊂⃒","nsubseteq;":"⊈","nsubseteqq;":"⫅̸","nsucc;":"⊁","nsucceq;":"⪰̸","nsup;":"⊅","nsupE;":"⫆̸","nsupe;":"⊉","nsupset;":"⊃⃒","nsupseteq;":"⊉","nsupseteqq;":"⫆̸","ntgl;":"≹","Ntilde;":"Ñ",Ntilde:"Ñ","ntilde;":"ñ",ntilde:"ñ","ntlg;":"≸","ntriangleleft;":"⋪","ntrianglelefteq;":"⋬","ntriangleright;":"⋫","ntrianglerighteq;":"⋭","Nu;":"Ν","nu;":"ν","num;":"#","numero;":"№","numsp;":" ","nvap;":"≍⃒","nVDash;":"⊯","nVdash;":"⊮","nvDash;":"⊭","nvdash;":"⊬","nvge;":"≥⃒","nvgt;":">⃒","nvHarr;":"⤄","nvinfin;":"⧞","nvlArr;":"⤂","nvle;":"≤⃒","nvlt;":"<⃒","nvltrie;":"⊴⃒","nvrArr;":"⤃","nvrtrie;":"⊵⃒","nvsim;":"∼⃒","nwarhk;":"⤣","nwArr;":"⇖","nwarr;":"↖","nwarrow;":"↖","nwnear;":"⤧","Oacute;":"Ó",Oacute:"Ó","oacute;":"ó",oacute:"ó","oast;":"⊛","ocir;":"⊚","Ocirc;":"Ô",Ocirc:"Ô","ocirc;":"ô",ocirc:"ô","Ocy;":"О","ocy;":"о","odash;":"⊝","Odblac;":"Ő","odblac;":"ő","odiv;":"⨸","odot;":"⊙","odsold;":"⦼","OElig;":"Œ","oelig;":"œ","ofcir;":"⦿","Ofr;":"𝔒","ofr;":"𝔬","ogon;":"˛","Ograve;":"Ò",Ograve:"Ò","ograve;":"ò",ograve:"ò","ogt;":"⧁","ohbar;":"⦵","ohm;":"Ω","oint;":"∮","olarr;":"↺","olcir;":"⦾","olcross;":"⦻","oline;":"‾","olt;":"⧀","Omacr;":"Ō","omacr;":"ō","Omega;":"Ω","omega;":"ω","Omicron;":"Ο","omicron;":"ο","omid;":"⦶","ominus;":"⊖","Oopf;":"𝕆","oopf;":"𝕠","opar;":"⦷","OpenCurlyDoubleQuote;":"“","OpenCurlyQuote;":"‘","operp;":"⦹","oplus;":"⊕","Or;":"⩔","or;":"∨","orarr;":"↻","ord;":"⩝","order;":"ℴ","orderof;":"ℴ","ordf;":"ª",ordf:"ª","ordm;":"º",ordm:"º","origof;":"⊶","oror;":"⩖","orslope;":"⩗","orv;":"⩛","oS;":"Ⓢ","Oscr;":"𝒪","oscr;":"ℴ","Oslash;":"Ø",Oslash:"Ø","oslash;":"ø",oslash:"ø","osol;":"⊘","Otilde;":"Õ",Otilde:"Õ","otilde;":"õ",otilde:"õ","Otimes;":"⨷","otimes;":"⊗","otimesas;":"⨶","Ouml;":"Ö",Ouml:"Ö","ouml;":"ö",ouml:"ö","ovbar;":"⌽","OverBar;":"‾","OverBrace;":"⏞","OverBracket;":"⎴","OverParenthesis;":"⏜","par;":"∥","para;":"¶",para:"¶","parallel;":"∥","parsim;":"⫳","parsl;":"⫽","part;":"∂","PartialD;":"∂","Pcy;":"П","pcy;":"п","percnt;":"%","period;":".","permil;":"‰","perp;":"⊥","pertenk;":"‱","Pfr;":"𝔓","pfr;":"𝔭","Phi;":"Φ","phi;":"φ","phiv;":"ϕ","phmmat;":"ℳ","phone;":"☎","Pi;":"Π","pi;":"π","pitchfork;":"⋔","piv;":"ϖ","planck;":"ℏ","planckh;":"ℎ","plankv;":"ℏ","plus;":"+","plusacir;":"⨣","plusb;":"⊞","pluscir;":"⨢","plusdo;":"∔","plusdu;":"⨥","pluse;":"⩲","PlusMinus;":"±","plusmn;":"±",plusmn:"±","plussim;":"⨦","plustwo;":"⨧","pm;":"±","Poincareplane;":"ℌ","pointint;":"⨕","Popf;":"ℙ","popf;":"𝕡","pound;":"£",pound:"£","Pr;":"⪻","pr;":"≺","prap;":"⪷","prcue;":"≼","prE;":"⪳","pre;":"⪯","prec;":"≺","precapprox;":"⪷","preccurlyeq;":"≼","Precedes;":"≺","PrecedesEqual;":"⪯","PrecedesSlantEqual;":"≼","PrecedesTilde;":"≾","preceq;":"⪯","precnapprox;":"⪹","precneqq;":"⪵","precnsim;":"⋨","precsim;":"≾","Prime;":"″","prime;":"′","primes;":"ℙ","prnap;":"⪹","prnE;":"⪵","prnsim;":"⋨","prod;":"∏","Product;":"∏","profalar;":"⌮","profline;":"⌒","profsurf;":"⌓","prop;":"∝","Proportion;":"∷","Proportional;":"∝","propto;":"∝","prsim;":"≾","prurel;":"⊰","Pscr;":"𝒫","pscr;":"𝓅","Psi;":"Ψ","psi;":"ψ","puncsp;":" ","Qfr;":"𝔔","qfr;":"𝔮","qint;":"⨌","Qopf;":"ℚ","qopf;":"𝕢","qprime;":"⁗","Qscr;":"𝒬","qscr;":"𝓆","quaternions;":"ℍ","quatint;":"⨖","quest;":"?","questeq;":"≟","QUOT;":'"',QUOT:'"',"quot;":'"',quot:'"',"rAarr;":"⇛","race;":"∽̱","Racute;":"Ŕ","racute;":"ŕ","radic;":"√","raemptyv;":"⦳","Rang;":"⟫","rang;":"⟩","rangd;":"⦒","range;":"⦥","rangle;":"⟩","raquo;":"»",raquo:"»","Rarr;":"↠","rArr;":"⇒","rarr;":"→","rarrap;":"⥵","rarrb;":"⇥","rarrbfs;":"⤠","rarrc;":"⤳","rarrfs;":"⤞","rarrhk;":"↪","rarrlp;":"↬","rarrpl;":"⥅","rarrsim;":"⥴","Rarrtl;":"⤖","rarrtl;":"↣","rarrw;":"↝","rAtail;":"⤜","ratail;":"⤚","ratio;":"∶","rationals;":"ℚ","RBarr;":"⤐","rBarr;":"⤏","rbarr;":"⤍","rbbrk;":"❳","rbrace;":"}","rbrack;":"]","rbrke;":"⦌","rbrksld;":"⦎","rbrkslu;":"⦐","Rcaron;":"Ř","rcaron;":"ř","Rcedil;":"Ŗ","rcedil;":"ŗ","rceil;":"⌉","rcub;":"}","Rcy;":"Р","rcy;":"р","rdca;":"⤷","rdldhar;":"⥩","rdquo;":"”","rdquor;":"”","rdsh;":"↳","Re;":"ℜ","real;":"ℜ","realine;":"ℛ","realpart;":"ℜ","reals;":"ℝ","rect;":"▭","REG;":"®",REG:"®","reg;":"®",reg:"®","ReverseElement;":"∋","ReverseEquilibrium;":"⇋","ReverseUpEquilibrium;":"⥯","rfisht;":"⥽","rfloor;":"⌋","Rfr;":"ℜ","rfr;":"𝔯","rHar;":"⥤","rhard;":"⇁","rharu;":"⇀","rharul;":"⥬","Rho;":"Ρ","rho;":"ρ","rhov;":"ϱ","RightAngleBracket;":"⟩","RightArrow;":"→","Rightarrow;":"⇒","rightarrow;":"→","RightArrowBar;":"⇥","RightArrowLeftArrow;":"⇄","rightarrowtail;":"↣","RightCeiling;":"⌉","RightDoubleBracket;":"⟧","RightDownTeeVector;":"⥝","RightDownVector;":"⇂","RightDownVectorBar;":"⥕","RightFloor;":"⌋","rightharpoondown;":"⇁","rightharpoonup;":"⇀","rightleftarrows;":"⇄","rightleftharpoons;":"⇌","rightrightarrows;":"⇉","rightsquigarrow;":"↝","RightTee;":"⊢","RightTeeArrow;":"↦","RightTeeVector;":"⥛","rightthreetimes;":"⋌","RightTriangle;":"⊳","RightTriangleBar;":"⧐","RightTriangleEqual;":"⊵","RightUpDownVector;":"⥏","RightUpTeeVector;":"⥜","RightUpVector;":"↾","RightUpVectorBar;":"⥔","RightVector;":"⇀","RightVectorBar;":"⥓","ring;":"˚","risingdotseq;":"≓","rlarr;":"⇄","rlhar;":"⇌","rlm;":"","rmoust;":"⎱","rmoustache;":"⎱","rnmid;":"⫮","roang;":"⟭","roarr;":"⇾","robrk;":"⟧","ropar;":"⦆","Ropf;":"ℝ","ropf;":"𝕣","roplus;":"⨮","rotimes;":"⨵","RoundImplies;":"⥰","rpar;":")","rpargt;":"⦔","rppolint;":"⨒","rrarr;":"⇉","Rrightarrow;":"⇛","rsaquo;":"›","Rscr;":"ℛ","rscr;":"𝓇","Rsh;":"↱","rsh;":"↱","rsqb;":"]","rsquo;":"’","rsquor;":"’","rthree;":"⋌","rtimes;":"⋊","rtri;":"▹","rtrie;":"⊵","rtrif;":"▸","rtriltri;":"⧎","RuleDelayed;":"⧴","ruluhar;":"⥨","rx;":"℞","Sacute;":"Ś","sacute;":"ś","sbquo;":"‚","Sc;":"⪼","sc;":"≻","scap;":"⪸","Scaron;":"Š","scaron;":"š","sccue;":"≽","scE;":"⪴","sce;":"⪰","Scedil;":"Ş","scedil;":"ş","Scirc;":"Ŝ","scirc;":"ŝ","scnap;":"⪺","scnE;":"⪶","scnsim;":"⋩","scpolint;":"⨓","scsim;":"≿","Scy;":"С","scy;":"с","sdot;":"⋅","sdotb;":"⊡","sdote;":"⩦","searhk;":"⤥","seArr;":"⇘","searr;":"↘","searrow;":"↘","sect;":"§",sect:"§","semi;":";","seswar;":"⤩","setminus;":"∖","setmn;":"∖","sext;":"✶","Sfr;":"𝔖","sfr;":"𝔰","sfrown;":"⌢","sharp;":"♯","SHCHcy;":"Щ","shchcy;":"щ","SHcy;":"Ш","shcy;":"ш","ShortDownArrow;":"↓","ShortLeftArrow;":"←","shortmid;":"∣","shortparallel;":"∥","ShortRightArrow;":"→","ShortUpArrow;":"↑","shy;":"",shy:"","Sigma;":"Σ","sigma;":"σ","sigmaf;":"ς","sigmav;":"ς","sim;":"∼","simdot;":"⩪","sime;":"≃","simeq;":"≃","simg;":"⪞","simgE;":"⪠","siml;":"⪝","simlE;":"⪟","simne;":"≆","simplus;":"⨤","simrarr;":"⥲","slarr;":"←","SmallCircle;":"∘","smallsetminus;":"∖","smashp;":"⨳","smeparsl;":"⧤","smid;":"∣","smile;":"⌣","smt;":"⪪","smte;":"⪬","smtes;":"⪬︀","SOFTcy;":"Ь","softcy;":"ь","sol;":"/","solb;":"⧄","solbar;":"⌿","Sopf;":"𝕊","sopf;":"𝕤","spades;":"♠","spadesuit;":"♠","spar;":"∥","sqcap;":"⊓","sqcaps;":"⊓︀","sqcup;":"⊔","sqcups;":"⊔︀","Sqrt;":"√","sqsub;":"⊏","sqsube;":"⊑","sqsubset;":"⊏","sqsubseteq;":"⊑","sqsup;":"⊐","sqsupe;":"⊒","sqsupset;":"⊐","sqsupseteq;":"⊒","squ;":"□","Square;":"□","square;":"□","SquareIntersection;":"⊓","SquareSubset;":"⊏","SquareSubsetEqual;":"⊑","SquareSuperset;":"⊐","SquareSupersetEqual;":"⊒","SquareUnion;":"⊔","squarf;":"▪","squf;":"▪","srarr;":"→","Sscr;":"𝒮","sscr;":"𝓈","ssetmn;":"∖","ssmile;":"⌣","sstarf;":"⋆","Star;":"⋆","star;":"☆","starf;":"★","straightepsilon;":"ϵ","straightphi;":"ϕ","strns;":"¯","Sub;":"⋐","sub;":"⊂","subdot;":"⪽","subE;":"⫅","sube;":"⊆","subedot;":"⫃","submult;":"⫁","subnE;":"⫋","subne;":"⊊","subplus;":"⪿","subrarr;":"⥹","Subset;":"⋐","subset;":"⊂","subseteq;":"⊆","subseteqq;":"⫅","SubsetEqual;":"⊆","subsetneq;":"⊊","subsetneqq;":"⫋","subsim;":"⫇","subsub;":"⫕","subsup;":"⫓","succ;":"≻","succapprox;":"⪸","succcurlyeq;":"≽","Succeeds;":"≻","SucceedsEqual;":"⪰","SucceedsSlantEqual;":"≽","SucceedsTilde;":"≿","succeq;":"⪰","succnapprox;":"⪺","succneqq;":"⪶","succnsim;":"⋩","succsim;":"≿","SuchThat;":"∋","Sum;":"∑","sum;":"∑","sung;":"♪","Sup;":"⋑","sup;":"⊃","sup1;":"¹",sup1:"¹","sup2;":"²",sup2:"²","sup3;":"³",sup3:"³","supdot;":"⪾","supdsub;":"⫘","supE;":"⫆","supe;":"⊇","supedot;":"⫄","Superset;":"⊃","SupersetEqual;":"⊇","suphsol;":"⟉","suphsub;":"⫗","suplarr;":"⥻","supmult;":"⫂","supnE;":"⫌","supne;":"⊋","supplus;":"⫀","Supset;":"⋑","supset;":"⊃","supseteq;":"⊇","supseteqq;":"⫆","supsetneq;":"⊋","supsetneqq;":"⫌","supsim;":"⫈","supsub;":"⫔","supsup;":"⫖","swarhk;":"⤦","swArr;":"⇙","swarr;":"↙","swarrow;":"↙","swnwar;":"⤪","szlig;":"ß",szlig:"ß","Tab;":"\t","target;":"⌖","Tau;":"Τ","tau;":"τ","tbrk;":"⎴","Tcaron;":"Ť","tcaron;":"ť","Tcedil;":"Ţ","tcedil;":"ţ","Tcy;":"Т","tcy;":"т","tdot;":"⃛","telrec;":"⌕","Tfr;":"𝔗","tfr;":"𝔱","there4;":"∴","Therefore;":"∴","therefore;":"∴","Theta;":"Θ","theta;":"θ","thetasym;":"ϑ","thetav;":"ϑ","thickapprox;":"≈","thicksim;":"∼","ThickSpace;":" ","thinsp;":" ","ThinSpace;":" ","thkap;":"≈","thksim;":"∼","THORN;":"Þ",THORN:"Þ","thorn;":"þ",thorn:"þ","Tilde;":"∼","tilde;":"˜","TildeEqual;":"≃","TildeFullEqual;":"≅","TildeTilde;":"≈","times;":"×",times:"×","timesb;":"⊠","timesbar;":"⨱","timesd;":"⨰","tint;":"∭","toea;":"⤨","top;":"⊤","topbot;":"⌶","topcir;":"⫱","Topf;":"𝕋","topf;":"𝕥","topfork;":"⫚","tosa;":"⤩","tprime;":"‴","TRADE;":"™","trade;":"™","triangle;":"▵","triangledown;":"▿","triangleleft;":"◃","trianglelefteq;":"⊴","triangleq;":"≜","triangleright;":"▹","trianglerighteq;":"⊵","tridot;":"◬","trie;":"≜","triminus;":"⨺","TripleDot;":"⃛","triplus;":"⨹","trisb;":"⧍","tritime;":"⨻","trpezium;":"⏢","Tscr;":"𝒯","tscr;":"𝓉","TScy;":"Ц","tscy;":"ц","TSHcy;":"Ћ","tshcy;":"ћ","Tstrok;":"Ŧ","tstrok;":"ŧ","twixt;":"≬","twoheadleftarrow;":"↞","twoheadrightarrow;":"↠","Uacute;":"Ú",Uacute:"Ú","uacute;":"ú",uacute:"ú","Uarr;":"↟","uArr;":"⇑","uarr;":"↑","Uarrocir;":"⥉","Ubrcy;":"Ў","ubrcy;":"ў","Ubreve;":"Ŭ","ubreve;":"ŭ","Ucirc;":"Û",Ucirc:"Û","ucirc;":"û",ucirc:"û","Ucy;":"У","ucy;":"у","udarr;":"⇅","Udblac;":"Ű","udblac;":"ű","udhar;":"⥮","ufisht;":"⥾","Ufr;":"𝔘","ufr;":"𝔲","Ugrave;":"Ù",Ugrave:"Ù","ugrave;":"ù",ugrave:"ù","uHar;":"⥣","uharl;":"↿","uharr;":"↾","uhblk;":"▀","ulcorn;":"⌜","ulcorner;":"⌜","ulcrop;":"⌏","ultri;":"◸","Umacr;":"Ū","umacr;":"ū","uml;":"¨",uml:"¨","UnderBar;":"_","UnderBrace;":"⏟","UnderBracket;":"⎵","UnderParenthesis;":"⏝","Union;":"⋃","UnionPlus;":"⊎","Uogon;":"Ų","uogon;":"ų","Uopf;":"𝕌","uopf;":"𝕦","UpArrow;":"↑","Uparrow;":"⇑","uparrow;":"↑","UpArrowBar;":"⤒","UpArrowDownArrow;":"⇅","UpDownArrow;":"↕","Updownarrow;":"⇕","updownarrow;":"↕","UpEquilibrium;":"⥮","upharpoonleft;":"↿","upharpoonright;":"↾","uplus;":"⊎","UpperLeftArrow;":"↖","UpperRightArrow;":"↗","Upsi;":"ϒ","upsi;":"υ","upsih;":"ϒ","Upsilon;":"Υ","upsilon;":"υ","UpTee;":"⊥","UpTeeArrow;":"↥","upuparrows;":"⇈","urcorn;":"⌝","urcorner;":"⌝","urcrop;":"⌎","Uring;":"Ů","uring;":"ů","urtri;":"◹","Uscr;":"𝒰","uscr;":"𝓊","utdot;":"⋰","Utilde;":"Ũ","utilde;":"ũ","utri;":"▵","utrif;":"▴","uuarr;":"⇈","Uuml;":"Ü",Uuml:"Ü","uuml;":"ü",uuml:"ü","uwangle;":"⦧","vangrt;":"⦜","varepsilon;":"ϵ","varkappa;":"ϰ","varnothing;":"∅","varphi;":"ϕ","varpi;":"ϖ","varpropto;":"∝","vArr;":"⇕","varr;":"↕","varrho;":"ϱ","varsigma;":"ς","varsubsetneq;":"⊊︀","varsubsetneqq;":"⫋︀","varsupsetneq;":"⊋︀","varsupsetneqq;":"⫌︀","vartheta;":"ϑ","vartriangleleft;":"⊲","vartriangleright;":"⊳","Vbar;":"⫫","vBar;":"⫨","vBarv;":"⫩","Vcy;":"В","vcy;":"в","VDash;":"⊫","Vdash;":"⊩","vDash;":"⊨","vdash;":"⊢","Vdashl;":"⫦","Vee;":"⋁","vee;":"∨","veebar;":"⊻","veeeq;":"≚","vellip;":"⋮","Verbar;":"‖","verbar;":"|","Vert;":"‖","vert;":"|","VerticalBar;":"∣","VerticalLine;":"|","VerticalSeparator;":"❘","VerticalTilde;":"≀","VeryThinSpace;":" ","Vfr;":"𝔙","vfr;":"𝔳","vltri;":"⊲","vnsub;":"⊂⃒","vnsup;":"⊃⃒","Vopf;":"𝕍","vopf;":"𝕧","vprop;":"∝","vrtri;":"⊳","Vscr;":"𝒱","vscr;":"𝓋","vsubnE;":"⫋︀","vsubne;":"⊊︀","vsupnE;":"⫌︀","vsupne;":"⊋︀","Vvdash;":"⊪","vzigzag;":"⦚","Wcirc;":"Ŵ","wcirc;":"ŵ","wedbar;":"⩟","Wedge;":"⋀","wedge;":"∧","wedgeq;":"≙","weierp;":"℘","Wfr;":"𝔚","wfr;":"𝔴","Wopf;":"𝕎","wopf;":"𝕨","wp;":"℘","wr;":"≀","wreath;":"≀","Wscr;":"𝒲","wscr;":"𝓌","xcap;":"⋂","xcirc;":"◯","xcup;":"⋃","xdtri;":"▽","Xfr;":"𝔛","xfr;":"𝔵","xhArr;":"⟺","xharr;":"⟷","Xi;":"Ξ","xi;":"ξ","xlArr;":"⟸","xlarr;":"⟵","xmap;":"⟼","xnis;":"⋻","xodot;":"⨀","Xopf;":"𝕏","xopf;":"𝕩","xoplus;":"⨁","xotime;":"⨂","xrArr;":"⟹","xrarr;":"⟶","Xscr;":"𝒳","xscr;":"𝓍","xsqcup;":"⨆","xuplus;":"⨄","xutri;":"△","xvee;":"⋁","xwedge;":"⋀","Yacute;":"Ý",Yacute:"Ý","yacute;":"ý",yacute:"ý","YAcy;":"Я","yacy;":"я","Ycirc;":"Ŷ","ycirc;":"ŷ","Ycy;":"Ы","ycy;":"ы","yen;":"¥",yen:"¥","Yfr;":"𝔜","yfr;":"𝔶","YIcy;":"Ї","yicy;":"ї","Yopf;":"𝕐","yopf;":"𝕪","Yscr;":"𝒴","yscr;":"𝓎","YUcy;":"Ю","yucy;":"ю","Yuml;":"Ÿ","yuml;":"ÿ",yuml:"ÿ","Zacute;":"Ź","zacute;":"ź","Zcaron;":"Ž","zcaron;":"ž","Zcy;":"З","zcy;":"з","Zdot;":"Ż","zdot;":"ż","zeetrf;":"ℨ","ZeroWidthSpace;":"","Zeta;":"Ζ","zeta;":"ζ","Zfr;":"ℨ","zfr;":"𝔷","ZHcy;":"Ж","zhcy;":"ж","zigrarr;":"⇝","Zopf;":"ℤ","zopf;":"𝕫","Zscr;":"𝒵","zscr;":"𝓏","zwj;":"","zwnj;":""}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/utils/strings",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLetterOrDigit=t.repeat=t.commonPrefixLength=t.endsWith=t.startsWith=void 0,t.startsWith=function(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t},t.commonPrefixLength=function(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n0;)1==(1&t)&&(n+=e),e+=e,t>>>=1;return n};var n="a".charCodeAt(0),i="z".charCodeAt(0),r="A".charCodeAt(0),a="Z".charCodeAt(0),o="0".charCodeAt(0),s="9".charCodeAt(0);t.isLetterOrDigit=function(e,t){var l=e.charCodeAt(t);return n<=l&&l<=i||r<=l&&l<=a||o<=l&&l<=s}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/utils/object",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=void 0,t.isDefined=function(e){return void 0!==e}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/utils/markup",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeMarkupContent=void 0,t.normalizeMarkupContent=function(e){if(e)return"string"==typeof e?{kind:"markdown",value:e}:{kind:"markdown",value:e.value}}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/languageFacts/dataProvider",["require","exports","../utils/markup"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDocumentation=t.HTMLDataProvider=void 0;var n=e("../utils/markup"),i=function(){function e(e,t){var n=this;this.id=e,this._tags=[],this._tagMap={},this._valueSetMap={},this._tags=t.tags||[],this._globalAttributes=t.globalAttributes||[],this._tags.forEach((function(e){n._tagMap[e.name.toLowerCase()]=e})),t.valueSets&&t.valueSets.forEach((function(e){n._valueSetMap[e.name]=e.values}))}return e.prototype.isApplicable=function(){return!0},e.prototype.getId=function(){return this.id},e.prototype.provideTags=function(){return this._tags},e.prototype.provideAttributes=function(e){var t=[],n=function(e){t.push(e)},i=this._tagMap[e.toLowerCase()];return i&&i.attributes.forEach(n),this._globalAttributes.forEach(n),t},e.prototype.provideValues=function(e,t){var n=this,i=[];t=t.toLowerCase();var r=function(e){e.forEach((function(e){e.name.toLowerCase()===t&&(e.values&&e.values.forEach((function(e){i.push(e)})),e.valueSet&&n._valueSetMap[e.valueSet]&&n._valueSetMap[e.valueSet].forEach((function(e){i.push(e)})))}))},a=this._tagMap[e.toLowerCase()];return a?(r(a.attributes),r(this._globalAttributes),i):[]},e}();t.HTMLDataProvider=i,t.generateDocumentation=function(e,t,i){void 0===t&&(t={});var r={kind:i?"markdown":"plaintext",value:""};if(e.description&&!1!==t.documentation){var a=n.normalizeMarkupContent(e.description);a&&(r.value+=a.value)}if(e.references&&e.references.length>0&&!1!==t.references&&(r.value.length&&(r.value+="\n\n"),r.value+=i?e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | "):e.references.map((function(e){return e.name+": "+e.url})).join("\n")),""!==r.value)return r}}));var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]v&&(t=v),{start:e.positionAt(t),end:e.positionAt(n)}}function S(e,t){var n=k(e,t);return f.forEach((function(e){e.provideTags().forEach((function(e){d.items.push({label:e.name,kind:i.CompletionItemKind.Property,documentation:c.generateDocumentation(e,void 0,g),textEdit:i.TextEdit.replace(n,e.name),insertTextFormat:i.InsertTextFormat.PlainText})}))})),d}function x(e){for(var t=e;t>0;){var n=b.charAt(t-1);if("\n\r".indexOf(n)>=0)return b.substring(t,e);if(!p(n))return null;t--}return b.substring(0,e)}function L(e,t,n){void 0===n&&(n=v);var r=k(e,n),a=m(b,n,i.ScannerState.WithinEndTag,i.TokenType.EndTagClose)?"":">",o=_;for(t&&(o=o.parent);o;){var s=o.tag;if(s&&(!o.closed||o.endTagStart&&o.endTagStart>v)){var l={label:"/"+s,kind:i.CompletionItemKind.Property,filterText:"/"+s,textEdit:i.TextEdit.replace(r,"/"+s+a),insertTextFormat:i.InsertTextFormat.PlainText},h=x(o.start),u=x(e-1);if(null!==h&&null!==u&&h!==u){var p=h+""+s+a;l.textEdit=i.TextEdit.replace(k(e-1-u.length),p),l.filterText=u+""+s}return d.items.push(l),d}o=o.parent}return t||f.forEach((function(e){e.provideTags().forEach((function(e){d.items.push({label:"/"+e.name,kind:i.CompletionItemKind.Property,documentation:c.generateDocumentation(e,void 0,g),filterText:"/"+e.name+a,textEdit:i.TextEdit.replace(r,"/"+e.name+a),insertTextFormat:i.InsertTextFormat.PlainText})}))})),d}function M(t,n){if(l&&l.hideAutoCompleteProposals)return d;if(!s.isVoidElement(n)){var r=e.positionAt(t);d.items.push({label:""+n+">",kind:i.CompletionItemKind.Property,filterText:""+n+">",textEdit:i.TextEdit.insert(r,"$0"+n+">"),insertTextFormat:i.InsertTextFormat.Snippet})}return d}function E(e,t){return S(e,t),L(e,!0,t),d}function A(e,t){void 0===t&&(t=v);for(var n=v;nn&&v<=r&&(l=b[n],/^["']*$/.test(l))){var h=n+1,m=r;r>n&&b[r-1]===b[n]&&m--;var _=function(e,t,n){for(;t>n&&!p(e[t-1]);)t--;return t}(b,v,h),y=function(e,t,n){for(;t=h&&v<=m?b.substring(h,v):"",o=!1}else a=k(n,r),s=b.substring(n,v),o=!0;if(u.length>0)for(var S=T.toLowerCase(),x=w.toLowerCase(),L=k(n,r),M=0,E=u;M=0&&o.isLetterOrDigit(b,e);)e--,n--;if(e>=0&&"&"===b[e]){var a=i.Range.create(i.Position.create(t.line,n-1),t);for(var s in r.entities)if(o.endsWith(s,";")){var l="&"+s;d.items.push({label:l,kind:i.CompletionItemKind.Keyword,documentation:h("entity.propose","Character entity representing '"+r.entities[s]+"'"),textEdit:i.TextEdit.replace(a,l),insertTextFormat:i.InsertTextFormat.PlainText})}}return d}for(var z,U=y.scan();U!==i.TokenType.EOS&&y.getTokenOffset()<=v;){switch(U){case i.TokenType.StartTagOpen:if(y.getTokenEnd()===v){var W=R(i.TokenType.StartTag);return 0===t.line&&(z=void 0,z=k(v,W),d.items.push({label:"!DOCTYPE",kind:i.CompletionItemKind.Property,documentation:"A preamble for an HTML document.",textEdit:i.TextEdit.replace(z,"!DOCTYPE html>"),insertTextFormat:i.InsertTextFormat.PlainText})),E(v,W)}break;case i.TokenType.StartTag:if(y.getTokenOffset()<=v&&v<=y.getTokenEnd())return S(y.getTokenOffset(),y.getTokenEnd());T=y.getTokenText();break;case i.TokenType.AttributeName:if(y.getTokenOffset()<=v&&v<=y.getTokenEnd())return A(y.getTokenOffset(),y.getTokenEnd());w=y.getTokenText();break;case i.TokenType.DelimiterAssign:if(y.getTokenEnd()===v){W=R(i.TokenType.AttributeValue);return C(v,W)}break;case i.TokenType.AttributeValue:if(y.getTokenOffset()<=v&&v<=y.getTokenEnd())return C(y.getTokenOffset(),y.getTokenEnd());break;case i.TokenType.Whitespace:if(v<=y.getTokenEnd())switch(y.getScannerState()){case i.ScannerState.AfterOpeningStartTag:return E(y.getTokenOffset(),R(i.TokenType.StartTag));case i.ScannerState.WithinTag:case i.ScannerState.AfterAttributeName:return A(y.getTokenEnd());case i.ScannerState.BeforeAttributeValue:return C(y.getTokenEnd());case i.ScannerState.AfterOpeningEndTag:return L(y.getTokenOffset()-1,!1);case i.ScannerState.WithinContent:return I()}break;case i.TokenType.EndTagOpen:if(v<=y.getTokenEnd())return L(y.getTokenOffset()+1,!1,R(i.TokenType.EndTag));break;case i.TokenType.EndTag:if(v<=y.getTokenEnd())for(var D=y.getTokenOffset()-1;D>=0;){var P=b.charAt(D);if("/"===P)return L(D,!1,y.getTokenEnd());if(!p(P))break;D--}break;case i.TokenType.StartTagClose:if(v<=y.getTokenEnd()&&T)return M(y.getTokenEnd(),T);break;case i.TokenType.Content:if(v<=y.getTokenEnd())return I();break;default:if(v<=y.getTokenEnd())return d}U=y.scan()}return d},e.prototype.doTagComplete=function(e,t,r){var a=e.offsetAt(t);if(a<=0)return null;var o=e.getText().charAt(a-1);if(">"===o){if((c=r.findNodeBefore(a))&&c.tag&&!s.isVoidElement(c.tag)&&c.starta))for(var l=(d=n.createScanner(e.getText(),c.start)).scan();l!==i.TokenType.EOS&&d.getTokenEnd()<=a;){if(l===i.TokenType.StartTagClose&&d.getTokenEnd()===a)return"$0"+c.tag+">";l=d.scan()}}else if("/"===o){for(var c=r.findNodeBefore(a);c&&c.closed;)c=c.parent;if(c&&c.tag){var d;for(l=(d=n.createScanner(e.getText(),c.start)).scan();l!==i.TokenType.EOS&&d.getTokenEnd()<=a;){if(l===i.TokenType.EndTagOpen&&d.getTokenEnd()===a)return c.tag+">";l=d.scan()}}}return null},e.prototype.convertCompletionList=function(e){return this.doesSupportMarkdown()||e.items.forEach((function(e){e.documentation&&"string"!=typeof e.documentation&&(e.documentation={kind:"plaintext",value:e.documentation.value})})),e},e.prototype.doesSupportMarkdown=function(){var e,t,n;if(!l.isDefined(this.supportsMarkdown)){if(!l.isDefined(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var r=null===(n=null===(t=null===(e=this.lsOptions.clientCapabilities.textDocument)||void 0===e?void 0:e.completion)||void 0===t?void 0:t.completionItem)||void 0===n?void 0:n.documentationFormat;this.supportsMarkdown=Array.isArray(r)&&-1!==r.indexOf(i.MarkupKind.Markdown)}return this.supportsMarkdown},e}();function p(e){return/^\s*$/.test(e)}function m(e,t,r,a){for(var o=n.createScanner(e,t,r),s=o.scan();s===i.TokenType.Whitespace;)s=o.scan();return s===a}t.HTMLCompletion=u})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/services/htmlHover",["require","exports","../parser/htmlScanner","../htmlLanguageTypes","../utils/object","../languageFacts/dataProvider","../parser/htmlEntities","../utils/strings","vscode-nls"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLHover=void 0;var n=e("../parser/htmlScanner"),i=e("../htmlLanguageTypes"),r=e("../utils/object"),a=e("../languageFacts/dataProvider"),o=e("../parser/htmlEntities"),s=e("../utils/strings"),l=e("vscode-nls").loadMessageBundle(),c=function(){function e(e,t){this.lsOptions=e,this.dataManager=t}return e.prototype.doHover=function(e,t,r,c){var d=this.convertContents.bind(this),h=this.doesSupportMarkdown(),u=e.offsetAt(t),p=r.findNodeAt(u),m=e.getText();if(!p||!p.tag)return null;var f=this.dataManager.getDataProviders().filter((function(t){return t.isApplicable(e.languageId)}));function g(e,t,n){for(var i=function(n){var i=null;if(n.provideTags().forEach((function(n){if(n.name.toLowerCase()===e.toLowerCase()){var r=a.generateDocumentation(n,c,h);r||(r={kind:h?"markdown":"plaintext",value:""}),i={contents:r,range:t}}})),i)return i.contents=d(i.contents),{value:i}},r=0,o=f;r=p.endTagStart){var v=b(i.TokenType.EndTag,p.endTagStart);return v?g(p.tag,v):null}var _=b(i.TokenType.StartTag,p.start);if(_)return g(p.tag,_);var w=b(i.TokenType.AttributeName,p.start);if(w)return function(e,t,n){for(var i=function(i){var r=null;if(i.provideAttributes(e).forEach((function(e){if(t===e.name&&e.description){var i=a.generateDocumentation(e,c,h);r=i?{contents:i,range:n}:null}})),r)return r.contents=d(r.contents),{value:r}},r=0,o=f;r=0&&s.isLetterOrDigit(m,e);)e--,n--;for(var r=e+1,a=n;s.isLetterOrDigit(m,r);)r++,a++;if(e>=0&&"&"===m[e]){return";"===m[r]?i.Range.create(i.Position.create(t.line,n),i.Position.create(t.line,a+1)):i.Range.create(i.Position.create(t.line,n),i.Position.create(t.line,a))}return null}();if(y)return function(e,t){var n=function(e){for(var t=u-1,n="&";t>=0&&s.isLetterOrDigit(e,t);)t--;for(t+=1;s.isLetterOrDigit(e,t);)n+=e[t],t+=1;return n+";"}(e);for(var i in o.entities){var r=null;if(n==="&"+i){var a=o.entities[i].charCodeAt(0).toString(16).toUpperCase(),c="U+";if(a.length<4)for(var h=4-a.length,p=0;p0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function a(e,t){this.__indent_cache=new r(e,t),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.clone_empty=function(){var e=new i(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},i.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},i.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},i.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))},i.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)},i.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},i.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},i.prototype.is_empty=function(){return 0===this.__items.length},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},i.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},i.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},r.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},r.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},r.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},a.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(e,t){for(var n=this.__lines.length-2;n>=0;){var r=this.__lines[n];if(r.is_empty())break;if(0!==r.item(0).indexOf(e)&&r.item(-1)!==t){this.__lines.splice(n+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},e.exports.Output=a},,,,function(e,t,n){function i(e,t){this.raw_options=r(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}function r(e,t){var n,i={};for(n in e=a(e))n!==t&&(i[n]=e[n]);if(t&&e[t])for(n in e[t])i[n]=e[t][n];return i}function a(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}i.prototype._get_array=function(e,t){var n=this.raw_options[e],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},i.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},i.prototype._get_characters=function(e,t){var n=this.raw_options[e],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},i.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},i.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},i.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,n);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},i.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some((function(e){return-1===t.indexOf(e)}))},e.exports.Options=i,e.exports.normalizeOpts=a,e.exports.mergeOpts=r},,function(e,t,n){var i=RegExp.prototype.hasOwnProperty("sticky");function r(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=r},,,,,function(e,t,n){function i(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}i.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},i.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=i},,function(e,t,n){var i=n(16).Beautifier,r=n(17).Options;e.exports=function(e,t){return new i(e,t).beautify()},e.exports.defaultOptions=function(){return new r}},function(e,t,n){var i=n(17).Options,r=n(2).Output,a=n(8).InputScanner,o=new(0,n(13).Directives)(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=/\s/,d=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,u=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(e,t){this._source_text=e||"",this._options=new i(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}p.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},p.prototype.eatWhitespace=function(e){for(var t=c.test(this._input.peek()),n=0;c.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&s.test(e||"")&&(t=e.match(s)[0]));var n=(e=e.replace(l,"\n")).match(/^[\t ]*/)[0];this._output=new r(this._options,n),this._input=new a(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i,p,m=0,f=!1,g=!1,b=!1,v=!1,_=!1,w=this._ch;i=""!==this._input.read(d),p=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var y=this._input.read(h),T=o.get_directives(y);T&&"start"===T.ignore&&(y+=o.readIgnored(this._input)),this.print_string(y),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(u)),this.eatWhitespace(!0);else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s$/,""),this.print_string(k),this._output.space_before_token=!0),"extend"===(k=k.replace(/\s$/,""))?v=!0:"import"===k&&(_=!0),k in this.NESTED_AT_RULE?(this._nestedLevel+=1,k in this.CONDITIONAL_GROUP_RULE&&(b=!0)):f||0!==m||-1===k.indexOf(":")||(g=!0,this.indent())}else"#"===this._ch&&"{"===this._input.peek()?(this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"))):"{"===this._ch?(g&&(g=!1,this.outdent()),b?(b=!1,f=this._indentLevel>=this._nestedLevel):f=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&f&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):"}"===this._ch?(this.outdent(),this._output.add_new_line(),"{"===p&&this._output.trim(!0),_=!1,v=!1,g&&(this.outdent(),g=!1),this.print_string(this._ch),f=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0)):":"===this._ch?!f&&!b||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||v||0!==m?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):'"'===this._ch||"'"===this._ch?(this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):";"===this._ch?0===m?(g&&(this.outdent(),g=!1),v=!1,_=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):"("===this._ch?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),m++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),m&&(m--,this.outdent()))):(this.preserveSingleSpace(i),this.print_string(this._ch),this.eatWhitespace(),m++,this.indent()):")"===this._ch?(m&&(m--,this.outdent()),this.print_string(this._ch)):","===this._ch?(this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g||0!==m||_?this._output.space_before_token=!0:this._output.add_new_line()):">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==m?"]"===this._ch?this.print_string(this._ch):"["===this._ch?(this.preserveSingleSpace(i),this.print_string(this._ch)):"="===this._ch?(this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="")):"!"!==this._ch||this._input.lookBack("\\")?(this.preserveSingleSpace(i),this.print_string(this._ch)):(this.print_string(" "),this.print_string(this._ch)):this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=p},function(e,t,n){var i=n(6).Options;function r(e){i.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function a(e,t){this.__indent_cache=new r(e,t),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.clone_empty=function(){var e=new i(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},i.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},i.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},i.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))},i.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)},i.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},i.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},i.prototype.is_empty=function(){return 0===this.__items.length},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},i.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},i.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},r.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},r.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},r.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},a.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(e,t){for(var n=this.__lines.length-2;n>=0;){var r=this.__lines[n];if(r.is_empty())break;if(0!==r.item(0).indexOf(e)&&r.item(-1)!==t){this.__lines.splice(n+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},e.exports.Output=a},function(e,t,n){e.exports.Token=function(e,t,n,i){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},,,function(e,t,n){function i(e,t){this.raw_options=r(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}function r(e,t){var n,i={};for(n in e=a(e))n!==t&&(i[n]=e[n]);if(t&&e[t])for(n in e[t])i[n]=e[t][n];return i}function a(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}i.prototype._get_array=function(e,t){var n=this.raw_options[e],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},i.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},i.prototype._get_characters=function(e,t){var n=this.raw_options[e],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},i.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},i.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},i.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,n);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},i.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some((function(e){return-1===t.indexOf(e)}))},e.exports.Options=i,e.exports.normalizeOpts=a,e.exports.mergeOpts=r},,function(e,t,n){var i=RegExp.prototype.hasOwnProperty("sticky");function r(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=r},function(e,t,n){var i=n(8).InputScanner,r=n(3).Token,a=n(10).TokenStream,o=n(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(e,t){this._input=new i(e),this._options=t||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};l.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new a,this._reset();for(var t=new r(s.START,""),n=null,i=[],o=new a;t.type!==s.EOF;){for(e=this._get_next_token(t,n);this._is_comment(e);)o.add(e),e=this._get_next_token(t,n);o.isEmpty()||(e.comments_before=o,o=new a),e.parent=n,this._is_opening(e)?(i.push(n),n=e):n&&this._is_closing(e,n)&&(e.opened=n,n.closed=e,n=i.pop(),e.parent=n),e.previous=t,t.next=e,this.__tokens.add(e),t=e}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(s.RAW,n):this._create_token(s.EOF,"")},l.prototype._is_comment=function(e){return!1},l.prototype._is_opening=function(e){return!1},l.prototype._is_closing=function(e,t){return!1},l.prototype._create_token=function(e,t){return new r(e,t,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=l,e.exports.TOKEN=s},function(e,t,n){function i(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return 0===this.__tokens_length},i.prototype.hasNext=function(){return this.__position=0&&e/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new i,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},a.prototype.read_options=function(e){var t=this._create();for(var n in r)t._disabled[n]=-1===e.templating.indexOf(n);return t._update(),t},a.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},a.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},a.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},a.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(e=e||this.__patterns.erb.read())}else"{"===t&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},e.exports.TemplatablePattern=a},,,,function(e,t,n){var i=n(19).Beautifier,r=n(20).Options;e.exports=function(e,t,n,r){return new i(e,t,n,r).beautify()},e.exports.defaultOptions=function(){return new r}},function(e,t,n){var i=n(20).Options,r=n(2).Output,a=n(21).Tokenizer,o=n(21).TOKEN,s=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=function(e,t){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new r(e,t)};c.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},c.prototype.set_space_before_token=function(e,t){this._output.space_before_token=e,this._output.non_breaking_space=t},c.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},c.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},c.prototype.print_preserved_newlines=function(e){var t=0;e.type!==o.TEXT&&e.previous.type!==o.TEXT&&(t=e.newlines?1:0),this.preserve_newlines&&(t=e.newlines0);return 0!==t},c.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},c.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},c.prototype.print_newline=function(e){this._output.add_new_line(e)},c.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},c.prototype.indent=function(){this.indent_level++},c.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var d=function(e,t){var n=null,i=null;return t.closed?("script"===e?n="text/javascript":"style"===e&&(n="text/css"),(n=function(e){for(var t=null,n=e.next;n.type!==o.EOF&&e.closed!==n;){if(n.type===o.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===o.EQUALS&&n.next.next&&n.next.next.type===o.VALUE&&(t=n.next.next.text);break}n=n.next}return t}(t)||n).search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function h(e,t){return-1!==t.indexOf(e)}function u(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function p(e){this._printer=e,this._current_frame=null}function m(e,t,n,r){this._source_text=e||"",t=t||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var a=new i(t,"html");this._options=a,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,"force".length),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,"preserve".length),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}p.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},p.prototype.record_tag=function(e){var t=new u(this._current_frame,e,this._printer.indent_level);this._current_frame=t},p.prototype._try_pop_frame=function(e){var t=null;return e&&(t=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),t},p.prototype._get_frame=function(e,t){for(var n=this._current_frame;n&&-1===e.indexOf(n.tag);){if(t&&-1!==t.indexOf(n.tag)){n=null;break}n=n.parent}return n},p.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},p.prototype.indent_to_tag=function(e){var t=this._get_frame(e);t&&(this._printer.indent_level=t.indent_level)},m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&s.test(e)&&(t=e.match(s)[0]));var n=(e=e.replace(l,"\n")).match(/^[\t ]*/)[0],i={text:"",type:""},r=new f,d=new c(this._options,n),h=new a(e,this._options).tokenize();this._tag_stack=new p(d);for(var u=null,m=h.next();m.type!==o.EOF;)m.type===o.TAG_OPEN||m.type===o.COMMENT?r=u=this._handle_tag_open(d,m,r,i):m.type===o.ATTRIBUTE||m.type===o.EQUALS||m.type===o.VALUE||m.type===o.TEXT&&!r.tag_complete?u=this._handle_inside_tag(d,m,r,h):m.type===o.TAG_CLOSE?u=this._handle_tag_close(d,m,r):m.type===o.TEXT?u=this._handle_text(d,m,r):d.add_raw_token(m),i=u,m=h.next();return d._output.get_code(t)},m.prototype._handle_tag_close=function(e,t,n){var i={text:t.text,type:t.type};return e.alignment_size=0,n.tag_complete=!0,e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):("<"===n.tag_start_char&&(e.set_space_before_token("/"===t.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(t)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(e.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||e.set_wrap_point(),i},m.prototype._handle_inside_tag=function(e,t,n,i){var r=n.has_wrapped_attrs,a={text:t.text,type:t.type};if(e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted)e.add_raw_token(t);else if("{"===n.tag_start_char&&t.type===o.TEXT)e.print_preserved_newlines(t)?(t.newlines=0,e.add_raw_token(t)):e.print_token(t);else{if(t.type===o.ATTRIBUTE?(e.set_space_before_token(!0),n.attr_count+=1):(t.type===o.EQUALS||t.type===o.VALUE&&t.previous.type===o.EQUALS)&&e.set_space_before_token(!1),t.type===o.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(t),r=r||0!==t.newlines),this._is_wrap_attributes_force)){var s=n.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&1===n.attr_count){var l,c=!0,d=0;do{if((l=i.peek(d)).type===o.ATTRIBUTE){c=!1;break}d+=1}while(d<4&&l.type!==o.EOF&&l.type!==o.TAG_CLOSE);s=!c}s&&(e.print_newline(!1),r=!0)}e.print_token(t),r=r||e.previous_token_wrapped(),n.has_wrapped_attrs=r}return a},m.prototype._handle_text=function(e,t,n){var i={text:t.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(e,t,n):n.is_unformatted||n.is_content_unformatted?e.add_raw_token(t):(e.traverse_whitespace(t),e.print_token(t)),i},m.prototype._print_custom_beatifier_text=function(e,t,n){var i=this;if(""!==t.text){var r,a=t.text,o=1,s="",l="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?r=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?r=this._css_beautify:"html"===n.custom_beautifier_name&&(r=function(e,t){return new m(e,t,i._js_beautify,i._css_beautify).beautify()}),"keep"===this._options.indent_scripts?o=0:"separate"===this._options.indent_scripts&&(o=-e.indent_level);var c=e.get_full_indent(o);if(a=a.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===a[0]&&a.match(/^(|]]>)$/.exec(a);if(!d)return void e.add_raw_token(t);s=c+d[1]+"\n",a=d[4],d[5]&&(l=c+d[5]),a=a.replace(/\n[ \t]*$/,""),(d[2]||-1!==d[3].indexOf("\n"))&&(d=d[3].match(/[ \t]+$/))&&(t.whitespace_before=d[0])}if(a)if(r){var h=function(){this.eol="\n"};h.prototype=this._options.raw_options,a=r(c+a,new h)}else{var u=t.whitespace_before;u&&(a=a.replace(new RegExp("\n("+u+")?","g"),"\n")),a=c+a.replace(/\n/g,"\n"+c)}s&&(a=a?s+a+"\n"+l:s+l),e.print_newline(!1),a&&(t.text=a,t.whitespace_before="",t.newlines=0,e.add_raw_token(t),e.print_newline(!0))}},m.prototype._handle_tag_open=function(e,t,n,i){var r=this._get_tag_open_token(t);return!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||t.type!==o.TAG_OPEN||0!==t.text.indexOf("")?(e.traverse_whitespace(t),this._set_tag_position(e,t,r,n,i),r.is_inline_element||e.set_wrap_point(),e.print_token(t)):(e.add_raw_token(t),r.start_tag_token=this._tag_stack.try_pop(r.tag_name)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(r.alignment_size=t.text.length+1),r.tag_complete||r.is_unformatted||(e.alignment_size=r.alignment_size),r};var f=function(e,t){var n;(this.parent=e||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",t)?(this.tag_start_char=t.text[0],this.text=t.text,"<"===this.tag_start_char?(n=t.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:""):(n=t.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"","{{#>"===t.text&&">"===this.tag_check&&null!==t.next&&(this.tag_check=t.next.text)),this.tag_check=this.tag_check.toLowerCase(),t.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||t.closed&&"/>"===t.closed.text,this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))):this.tag_complete=!0};m.prototype._get_tag_open_token=function(e){var t=new f(this._tag_stack.get_parser_token(),e);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||h(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&h(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&h(t.tag_check,this._options.content_unformatted),t.is_inline_element=h(t.tag_name,this._options.inline)||"{"===t.tag_start_char,t},m.prototype._set_tag_position=function(e,t,n,i,r){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=d(n.tag_check,t)))),h(n.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===n.tag_name&&r.type===o.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n))}else if(n.is_end_tag){var a=!1;a=(a=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(r.type===o.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==r.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&e.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===r.type&&!n.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n)},m.prototype._calcluate_parent_multiline=function(e,t){!t.parent||!e._output.just_added_newline()||(t.is_inline_element||t.is_unformatted)&&t.parent.is_inline_element||(t.parent.multiline_content=!0)};var g=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],b=["a","audio","del","ins","map","noscript","video"];m.prototype._do_optional_end_element=function(e){var t=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)t=t||this._tag_stack.try_pop("head");else if("li"===e.tag_name)t=t||this._tag_stack.try_pop("li",["ol","ul"]);else if("dd"===e.tag_name||"dt"===e.tag_name)t=(t=t||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==g.indexOf(e.tag_name)){var n=e.parent.parent;n&&-1!==b.indexOf(n.tag_name)||(t=t||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?t=(t=t||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?t=t||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?t=t||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?t=t||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?t=(t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(t=(t=t||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),t}},e.exports.Beautifier=m},function(e,t,n){var i=n(6).Options;function r(e){i.call(this,e,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}r.prototype=new i,e.exports.Options=r},function(e,t,n){var i=n(9).Tokenizer,r=n(9).TOKEN,a=n(13).Directives,o=n(14).TemplatablePattern,s=n(12).Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},c=new a(/<\!--/,/-->/),d=function(e,t){i.call(this,e,t),this._current_tag_name="";var n=new o(this._input).read_options(this._options),r=new s(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(//),cdata:r.starting_with(//),conditional_comment:r.starting_with(//),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var a=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(a).until_after(a)}};(d.prototype=new i)._is_comment=function(e){return!1},d.prototype._is_opening=function(e){return e.type===l.TAG_OPEN},d.prototype._is_closing=function(e,t){return e.type===l.TAG_CLOSE&&t&&((">"===e.text||"/>"===e.text)&&"<"===t.text[0]||"}}"===e.text&&"{"===t.text[0]&&"{"===t.text[1])},d.prototype._reset=function(){this._current_tag_name=""},d.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(l.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(i,t))||this._read_attribute(i,e,t))||this._read_close(i,t))||this._read_raw_content(i,e,t))||this._read_content_word(i))||this._read_comment_or_cdata(i))||this._read_processing(i))||this._read_open(i,t))||this._create_token(l.UNKNOWN,this._input.next())},d.prototype._read_comment_or_cdata=function(e){var t=null,n=null,i=null;"<"===e&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(i=c.get_directives(n))&&"start"===i.ignore&&(n+=c.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((t=this._create_token(l.COMMENT,n)).directives=i));return t},d.prototype._read_processing=function(e){var t=null,n=null;if("<"===e){var i=this._input.peek(1);"!"!==i&&"?"!==i||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((t=this._create_token(l.COMMENT,n)).directives=null)}return t},d.prototype._read_open=function(e,t){var n=null,i=null;return t||"<"===e&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),i=this._create_token(l.TAG_OPEN,n)),i},d.prototype._read_open_handlebars=function(e,t){var n=null,i=null;return t||this._options.indent_handlebars&&"{"===e&&"{"===this._input.peek(1)&&("!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),i=this._create_token(l.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),i=this._create_token(l.TAG_OPEN,n))),i},d.prototype._read_close=function(e,t){var n=null,i=null;return t&&("<"===t.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(n=this._input.next(),"/"===e&&(n+=this._input.next()),i=this._create_token(l.TAG_CLOSE,n)):"{"===t.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),i=this._create_token(l.TAG_CLOSE,"}}"))),i},d.prototype._read_attribute=function(e,t,n){var i=null,r="";if(n&&"<"===n.text[0])if("="===e)i=this._create_token(l.EQUALS,this._input.next());else if('"'===e||"'"===e){var a=this._input.next();a+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),i=this._create_token(l.VALUE,a)}else(r=this.__patterns.attribute.read())&&(i=t.type===l.EQUALS?this._create_token(l.VALUE,r):this._create_token(l.ATTRIBUTE,r));return i},d.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},d.prototype._read_raw_content=function(e,t,n){var i="";if(n&&"{"===n.text[0])i=this.__patterns.handlebars_raw_close.read();else if(t.type===l.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var r=t.opened.text.substr(1).toLowerCase();if("script"===r||"style"===r){var a=this._read_comment_or_cdata(e);if(a)return a.type=l.TEXT,a;i=this._input.readUntil(new RegExp(""+r+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(r)&&(i=this._input.readUntil(new RegExp(""+r+"[\\n\\r\\t ]*?>","ig")))}return i?this._create_token(l.TEXT,i):null},d.prototype._read_content_word=function(e){var t="";if(this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(t=this.__patterns.unformatted_content_delimiter.read()),t||(t=this.__patterns.word.read()),t)return this._create_token(l.TEXT,t)},e.exports.Tokenizer=d,e.exports.TOKEN=l}]);if("function"==typeof define&&define.amd)define("vscode-html-languageservice/beautify/beautify-html",["require","./beautify","./beautify-css"],(function(t){var n=t("./beautify"),i=t("./beautify-css");return{html_beautify:function(t,r){return e(t,r,n.js_beautify,i.css_beautify)}}}));else if("undefined"!=typeof exports){var t=require("./beautify.js"),n=require("./beautify-css.js");exports.html_beautify=function(i,r){return e(i,r,t.js_beautify,n.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(t,n){return e(t,n,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(t,n){return e(t,n,global.js_beautify,global.css_beautify)})}(),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/services/htmlFormatter",["require","exports","../htmlLanguageTypes","../beautify/beautify-html","../utils/strings"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.format=void 0;var n=e("../htmlLanguageTypes"),i=e("../beautify/beautify-html"),r=e("../utils/strings");function a(e,t,n){if(e&&e.hasOwnProperty(t)){var i=e[t];if(null!==i)return i}return n}function o(e,t,n){var i=a(e,t,null);return"string"==typeof i?i.length>0?i.split(",").map((function(e){return e.trim().toLowerCase()})):[]:n}function s(e,t){return!0===a(e,"templating",t)?["auto"]:["none"]}function l(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function c(e,t){return-1!==" \t".indexOf(e.charAt(t))}t.format=function(e,t,d){var h=e.getText(),u=!0,p=0,m=d.tabSize||4;if(t){for(var f=e.offsetAt(t.start),g=f;g>0&&c(h,g-1);)g--;0===g||l(h,g-1)?f=g:g]*$/).test(_))return[{range:t,newText:h=h.substring(f,b)}];if(u=b===h.length,h=h.substring(f,b),0!==f){var w=e.offsetAt(n.Position.create(t.start.line,0));p=function(e,t,n){var i=t,r=0,a=n.tabSize||4;for(;i0){var k=d.insertSpaces?r.repeat(" ",m*p):r.repeat("\t",p);T=T.split("\n").join("\n"+k),0===t.start.character&&(T=k+T)}return[{range:t,newText:T}]}})),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("vscode-uri/index",[],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(this,(function(){return(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",r=0,a=-1,o=0,s=0;s<=e.length;++s){if(s2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=s,o=0;continue}}else if(2===i.length||1===i.length){i="",r=0,a=s,o=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(a+1,s):i=e.slice(a+1,s),r=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var o;a>=0?o=arguments[a]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,r=47===o.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;rc){if(47===n.charCodeAt(s+h))return n.slice(s+h+1);if(0===h)return n.slice(s+h)}else o>c&&(47===e.charCodeAt(r+h)?d=h:0===h&&(d=0));break}var u=e.charCodeAt(r+h);if(u!==n.charCodeAt(s+h))break;47===u&&(d=h)}var p="";for(h=r+d+1;h<=a;++h)h!==a&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(s+d):(s+=d,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,r=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!a){r=o;break}}else a=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){r=i+1;break}}else-1===l&&(o=!1,l=i+1),s>=0&&(c===n.charCodeAt(s)?-1==--s&&(a=i):(s=-1,a=l))}return r===a?a=l:-1===a&&(a=e.length),e.slice(r,a)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){r=i+1;break}}else-1===a&&(o=!1,a=i+1);return-1===a?"":e.slice(r,a)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47!==l)-1===r&&(a=!1,r=s+1),46===l?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){i=s+1;break}}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),a=47===r;a?(n.root="/",i=1):i=0;for(var o=-1,s=0,l=-1,c=!0,d=e.length-1,h=0;d>=i;--d)if(47!==(r=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===r?-1===o?o=d:1!==h&&(h=1):-1!==o&&(h=-1);else if(!c){s=d+1;break}return-1===o||-1===l||0===h||1===h&&o===l-1&&o===s+1?-1!==l&&(n.base=n.name=0===s&&a?e.slice(1,l):e.slice(s,l)):(0===s&&a?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(s,o),n.base=e.slice(s,l)),n.ext=e.slice(o,l)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},465:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;var i=n(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return i.URI}});var r=n(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return r.Utils}})},674:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows="win32"===process.platform;else if("object"==typeof navigator){var n=navigator.userAgent;t.isWindows=n.indexOf("Windows")>=0}},796:function(e,t,n){var i,r,a=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;var o=n(674),s=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//,d="",h="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p=function(){function e(e,t,n,i,r,a){void 0===a&&(a=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,a),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||d),this.query=i||d,this.fragment=r||d,function(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&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(c.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 ("//")')}(this,a))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return _(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,r=e.query,a=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===i?i=this.path:null===i&&(i=d),void 0===r?r=this.query:null===r&&(r=d),void 0===a?a=this.fragment:null===a&&(a=d),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&a===this.fragment?this:new f(t,n,i,r,a)},e.parse=function(e,t){void 0===t&&(t=!1);var n=u.exec(e);return n?new f(n[2]||d,k(n[4]||d),k(n[5]||d),k(n[7]||d),k(n[9]||d),t):new f(d,d,d,d,d)},e.file=function(e){var t=d;if(o.isWindows&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new f("file",t,e,d,d)},e.from=function(e){return new f(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),w(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new f(t);return n._formatted=t.external,n._fsPath=t._sep===m?t.fsPath:null,n}return t},e}();t.URI=p;var m=o.isWindows?1:void 0,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(p),g=((r={})[58]="%3A",r[47]="%2F",r[63]="%3F",r[35]="%23",r[91]="%5B",r[93]="%5D",r[64]="%40",r[33]="%21",r[36]="%24",r[38]="%26",r[39]="%27",r[40]="%28",r[41]="%29",r[42]="%2A",r[43]="%2B",r[44]="%2C",r[59]="%3B",r[61]="%3D",r[32]="%20",r);function b(e,t){for(var n=void 0,i=-1,r=0;r=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var o=g[a];void 0!==o?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=o):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function v(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.isWindows&&(n=n.replace(/\//g,"\\")),n}function w(e,t){var n=t?v:b,i="",r=e.scheme,a=e.authority,o=e.path,s=e.query,l=e.fragment;if(r&&(i+=r,i+=":"),(a||"file"===r)&&(i+=h,i+=h),a){var c=a.indexOf("@");if(-1!==c){var d=a.substr(0,c);a=a.substr(c+1),-1===(c=d.indexOf(":"))?i+=n(d,!1):(i+=n(d.substr(0,c),!1),i+=":",i+=n(d.substr(c+1),!1)),i+="@"}-1===(c=(a=a.toLowerCase()).indexOf(":"))?i+=n(a,!1):(i+=n(a.substr(0,c),!1),i+=a.substr(c))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2))(u=o.charCodeAt(1))>=65&&u<=90&&(o="/"+String.fromCharCode(u+32)+":"+o.substr(3));else if(o.length>=2&&58===o.charCodeAt(1)){var u;(u=o.charCodeAt(0))>=65&&u<=90&&(o=String.fromCharCode(u+32)+":"+o.substr(2))}i+=n(o,!0)}return s&&(i+="?",i+=n(s,!1)),l&&(i+="#",i+=t?l:b(l,!1)),i}function y(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}t.uriToFsPath=_;var T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(T)?e.replace(T,(function(e){return y(e)})):e}},679:function(e,t,n){var i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(h)){var h,u;d.length=0&&l[m].tagName!==c;)m--;if(m>=0){var f=l[m];l.length=m,(b=e.positionAt(a.getTokenOffset()).line-1)>(p=f.startLine)&&d!==p&&h({startLine:p,endLine:b})}break;case n.TokenType.Comment:p=e.positionAt(a.getTokenOffset()).line;var g=a.getTokenText().match(/^\s*#(region\b)|(endregion\b)/);if(g)if(g[1])l.push({startLine:p,tagName:""});else{for(m=l.length-1;m>=0&&l[m].tagName.length;)m--;if(m>=0){var b;f=l[m];l.length=m,(b=p)>(p=f.startLine)&&d!==p&&h({startLine:p,endLine:b,kind:n.FoldingRangeKind.Region})}}else p<(b=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line)&&h({startLine:p,endLine:b,kind:n.FoldingRangeKind.Comment})}o=a.scan()}var v=t&&t.rangeLimit||Number.MAX_VALUE;return s.length>v?function(e,t){e=e.sort((function(e,t){var n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n}));for(var n=void 0,i=[],r=[],a=[],o=function(e,t){r[e]=t,t<30&&(a[t]=(a[t]||0)+1)},s=0;sn.startLine)if(l.endLine<=n.endLine)i.push(n),n=l,o(s,i.length);else if(l.startLine>n.endLine){do{n=i.pop()}while(n&&l.startLine>n.endLine);n&&i.push(n),n=l,o(s,i.length)}}else n=l,o(s,0)}var c=0,d=0;for(s=0;st){d=s;break}c+=h}}var u=[];for(s=0;s=l.getTokenOffset()&&s<=l.getTokenEnd()&&(h.unshift([l.getTokenOffset(),l.getTokenEnd()]),('"'===m[0]&&'"'===m[m.length-1]||"'"===m[0]&&"'"===m[m.length-1])&&s>=l.getTokenOffset()+1&&s<=l.getTokenEnd()-1&&h.unshift([l.getTokenOffset()+1,l.getTokenEnd()-1]),h.push([p,l.getTokenEnd()]))}c=l.scan()}return h.map((function(e){return[e[0]+d,e[1]+d]}))}t.getSelectionRanges=function(e,t){return t.map((function(t){for(var n=function(e,t){var n=i.parse(e.getText()),o=e.offsetAt(t),s=n.findNodeAt(o),l=function(e){var t=e,n=function(e){return e.startTagEnd&&e.endTagStart&&e.startTagEnd"===e.getText(c)?l.unshift([s.start+1,s.startTagEnd-2]):l.unshift([s.start+1,s.startTagEnd-1]),l=a(e,s,o).concat(l)}if(!s.startTagEnd||!s.endTagStart)return l;return l.unshift([s.start,s.end]),s.start=s.endTagStart+2&&l.unshift([s.endTagStart+2,s.end-1]),l)}(e,t),o=void 0,s=void 0,l=n.length-1;l>=0;l--){var c=n[l];o&&c[0]===o[0]&&c[1]===o[1]||(s=r.SelectionRange.create(r.Range.create(e.positionAt(n[l][0]),e.positionAt(n[l][1])),s)),o=c}return s||(s=r.SelectionRange.create(r.Range.create(t,t))),s}))}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-html-languageservice/languageFacts/data/webCustomData",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.htmlData=void 0,t.htmlData={version:1.1,tags:[{name:"html",description:{kind:"markdown",value:"The html element represents the root of an HTML document."},attributes:[{name:"manifest",description:{kind:"markdown",value:"Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details."}},{name:"version",description:'Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.'},{name:"xmlns",description:'Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/html"}]},{name:"head",description:{kind:"markdown",value:"The head element represents a collection of metadata for the Document."},attributes:[{name:"profile",description:"The URIs of one or more metadata profiles, separated by white space."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/head"}]},{name:"title",description:{kind:"markdown",value:"The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/title"}]},{name:"base",description:{kind:"markdown",value:"The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information."},attributes:[{name:"href",description:{kind:"markdown",value:"The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed."}},{name:"target",description:{kind:"markdown",value:"A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/base"}]},{name:"link",description:{kind:"markdown",value:"The link element allows authors to link their document to other resources."},attributes:[{name:"href",description:{kind:"markdown",value:'This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL "URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.") of the linked resource. A URL can be absolute or relative.'}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`